- Timestamp:
- May 20, 2016, 6:19:16 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_cells.m
r924 r944 263 263 if ~isempty(ind_dim) 264 264 DimIndices=[DimIndices ind_dim]; %update the list of dim indices included in DimCell 265 if check_var & &CoordSize(ind_dim)==2 % determine the size of the coordinate in case of coordinate definition limited to lower and upper bounds265 if check_var & CoordSize(ind_dim)==2 % determine the size of the coordinate in case of coordinate definition limited to lower and upper bounds 266 266 if isvector(Data.(ListVarName{ivardim})) 267 267 if numel(Data.(ListVarName{ivardim}))>2 -
trunk/src/series/civ_series.m
r938 r944 550 550 nbvar=length(Data.ListVarName); 551 551 Data.VarAttribute{nbvar}.Role='errorflag'; 552 Data.Civ1_FF= fix(Param.ActionInput.Fix1,Data.Civ1_F,Data.Civ1_C,Data.Civ1_U,Data.Civ1_V);552 Data.Civ1_FF=int8(fix(Param.ActionInput.Fix1,Data.Civ1_F,Data.Civ1_C,Data.Civ1_U,Data.Civ1_V)); 553 553 Data.CivStage=2; 554 554 end … … 595 595 Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep 0 for the others 596 596 Data.Civ1_V_smooth(ind_good)=Vres; 597 Data.Civ1_FF(ind_good)= FFres;597 Data.Civ1_FF(ind_good)=int8(FFres); 598 598 disp('patch1 performed') 599 599 end -
trunk/src/series/merge_proj_polar.m
r943 r944 146 146 %% define the name for result file (with path=RootPath{1}) 147 147 OutputDir=[Param.OutputSubDir Param.OutputDirExt];% subdirectory for output files 148 OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},'.nc','_1',i1_series{1}(1));149 CheckOverwrite=1;%default150 if isfield(Param,'CheckOverwrite')151 CheckOverwrite=Param.CheckOverwrite;152 end153 if ~CheckOverwrite && exist(OutputFile,'file')154 disp(['existing output file ' OutputFile ' already exists, skip to next field'])155 return% skip iteration if the mode overwrite is desactivated and the result file already exists156 end148 % OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},'.nc','_1',i1_series{1}(1)); 149 % CheckOverwrite=1;%default 150 % if isfield(Param,'CheckOverwrite') 151 % CheckOverwrite=Param.CheckOverwrite; 152 % end 153 % if ~CheckOverwrite && exist(OutputFile,'file') 154 % disp(['existing output file ' OutputFile ' already exists, skip to next field']) 155 % return% skip iteration if the mode overwrite is desactivated and the result file already exists 156 % end 157 157 158 158 if ~isfield(Param,'InputFields') 159 159 Param.InputFields.FieldName=''; 160 160 end 161 162 %% prepare output file content163 % TimeData.ListGlobalAttribute={'Conventions','Project','CoordUnit','TimeUnit','ZPos'};164 % TimeData.Conventions='uvmat';165 % TimeData.Project='2016_Circumpolar';166 % TimeData.CoordUnit='cm';167 % TimeData.TimeUnit='s';168 % TimeData.ZPos=0;169 % TimeData.ListVarName={'time','radius','azimuth','U','V','curl','div'};170 % TimeData.VarDimName={'time','radius','azimuth',{'time','radius','azimuth'},{'time','radius','azimuth'}...171 % {'time','radius','azimuth'},{'time','radius','azimuth'}};172 % TimeData.VarAttribute{1}.Role='';173 % TimeData.VarAttribute{2}.Role='';174 % TimeData.VarAttribute{3}.Role='';175 % TimeData.VarAttribute{4}.Role='vector_x';176 % TimeData.VarAttribute{5}.Role='vector_y';177 % TimeData.VarAttribute{6}.Role='scalar';178 % TimeData.VarAttribute{7}.Role='scalar';179 % TimeData.time=nan(1,NbField);180 % TimeData.radius=radius_shifted;181 % TimeData.azimuth=azimuth_arclength;182 % nby=numel(radius);183 % nbx=numel(azimuth);184 % TimeData.U=nan(NbField,nby,nbx);185 % TimeData.V=nan(NbField,nby,nbx);186 % TimeData.curl=nan(NbField,nby,nbx);187 % TimeData.div=nan(NbField,nby,nbx);188 189 % if ~isempty(timeread)190 % MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'Time'}];191 % MergeData.Time=timeread;192 % end193 194 % time unit195 % if isfield(Data{1},'TimeUnit')196 % TimeUnit=Data{1}.TimeUnit;197 % for iview =2:numel(Data)198 % if ~(isfield(Data{iview},'TimeUnit')&& isequal(Data{iview}.TimeUnit,TimeUnit))199 % TimeUnit=[];%TimeUnit not the same for all fields200 % end201 % end202 % if ~isempty(TimeUnit)203 % MergeData.ListGlobalAttribute=[MergeData.ListGlobalAttribute {'TimeUnit'}];204 % MergeData.TimeUnit=TimeUnit;205 % end206 % end207 161 208 162 … … 309 263 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 310 264 tstart=tic; %used to record the computing time 311 265 CheckOverwrite=1;%default 266 if isfield(Param,'CheckOverwrite') 267 CheckOverwrite=Param.CheckOverwrite; 268 end 312 269 313 270 for index=1:NbField -
trunk/src/struct2nc.m
r943 r944 118 118 case {'single','double'} 119 119 VarType='nc_float'; % store all floating reals as single 120 case {' uint8','int16','uint16','int32','uint32','int64','uint64'}120 case {'int8','uint8','int16','uint16','int32','uint32','int64','uint64'} 121 121 VarType='nc_int'; 122 122 case 'logical' -
trunk/src/transform_field/signal_spectrum.m
r924 r944 80 80 DataOut.TransformInput.IndexRange(ilist,1:2)=str2num(answer{ilist+1}); 81 81 end 82 if DataOut.TransformInput.IndexRange(1,2)-DataOut.TransformInput.IndexRange(1,1)<DataOut.TransformInput.WindowLength 83 msgbox_uvmat('ERROR','WindowLength must be smaller than the total time index range') 84 return 85 end 86 huvmat=findobj(allchild(0),'Tag','uvmat'); 87 UvData=get(huvmat,'UserData'); 88 Data=UvData.PlotAxes; 89 YName=Data.ListVarName{1}; 90 XName=Data.ListVarName{2}; 91 yindex=DataOut.TransformInput.IndexRange(2,:); 92 y=Data.(YName)(yindex); 93 xindex=DataOut.TransformInput.IndexRange(3,:); 94 x=Data.(XName)(xindex); 95 haxes=findobj(huvmat,'Tag','PlotAxes'); 96 axes(haxes); 97 hbounds=findobj(haxes,'Tag','Bounds'); 98 if isempty(hbounds) 99 hbounds=rectangle('Position',[x(1) y(1) x(2)-x(1) y(2)-y(1)],'Tag','Bounds'); 100 else 101 set(hbounds,'Position',[x(1) y(1) x(2)-x(1) y(2)-y(1)]) 102 end 82 103 end 83 104 return … … 90 111 91 112 %% get the variable to process 113 if ~isfield(DataIn,Param.TransformInput.VariableName) 114 return 115 end 92 116 Var= DataIn.(Param.TransformInput.VariableName);%variable to analyse 93 117 if isfield(Param.TransformInput,'IndexRange') … … 128 152 end 129 153 130 %% c laculate the spectrum154 %% calculate the spectrum 131 155 specmean=0;% mean spectrum initialisation 132 156 cospecmean=0;
Note: See TracChangeset
for help on using the changeset viewer.