Changeset 635 for trunk/src/series/aver_stat.m
- Timestamp:
- May 19, 2013, 11:37:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r633 r635 94 94 nbfield_i=size(i1_series{1},2); %nb of fields for the i index 95 95 nbfield=nbfield_j*nbfield_i; %total number of fields 96 [first_i,tild,last_i,first_j,tild,last_j,errormsg]=get_index_range(Param.IndexRange);97 if ~isempty(errormsg),display(errormsg),return,end98 96 99 97 %% determine the file type on each line from the first input file … … 140 138 elseif CheckNc{1} 141 139 FileExtOut='.nc';% write result as .nc files for netcdf inputs 142 else 140 else 143 141 msgbox_uvmat('ERROR',['invalid file type input ' FileType{1}]) 144 142 return 145 143 end 146 144 if nbview==2 && ~isequal(CheckImage{1},CheckImage{2}) 147 145 msgbox_uvmat('ERROR','input must be two image series or two netcdf file series') 148 146 return 149 147 end 150 %NomTypeOut='_1-2_1';% output file index will indicate the first and last ref index in the series 148 149 %% settings for the output file 151 150 NomTypeOut=nomtype2pair(NomType{1});% determine the index nomenclature type for the output file 151 first_i=i1_series{1}(1); 152 last_i=i1_series{1}(end); 153 if isempty(j1_series{1})% if there is no second index j 154 first_j=1;last_j=1; 155 else 156 first_j=j1_series{1}(1); 157 last_j=j1_series{1}(end); 158 end 152 159 153 160 %% Set field names and velocity types … … 177 184 for index=1:nbfield 178 185 update_waitbar(WaitbarHandle,index/nbfield) 179 if ~isempty(RUNHandle)&& ishandle(RUNHandle) &&~strcmp(get(RUNHandle,'BusyAction'),'queue')186 if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue') 180 187 disp('program stopped by user') 181 188 break … … 238 245 239 246 %%%%%%%%%%%% MAIN RUNNING OPERATIONS %%%%%%%%%%%% 240 %update sum241 247 if nbfiles==1 %first field 242 248 time_1=[]; … … 255 261 siz=size(Field.(VarName)); 256 262 if ~isequal(DataOut.(VarName),0)&& ~isequal(siz,sizmean) 257 msgbox_uvmat('ERROR',['unequal size of input field ' VarName ', need to project on a grid'])263 displ_uvmat('ERROR',['unequal size of input field ' VarName ', need to project on a grid'],checkrun) 258 264 return 259 265 else … … 285 291 end 286 292 else % time from ImaDoc prevails if it exists 287 % j1=1;%default288 % if ~isempty(j1_series{1})289 % j1=j1_series{1};290 % end291 %DataOut.Time=time(1,i1_series{1}(1),j1);292 %DataOut.Time_end=time(end,i1_series{end}(end),j1_series{end}(end));293 293 DataOut.Time=time(1); 294 294 DataOut.Time_end=time(end);
Note: See TracChangeset
for help on using the changeset viewer.