Changeset 531
- Timestamp:
- Aug 27, 2012, 4:39:28 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/time_series.m
r526 r531 132 132 displ_uvmat('WARNING',['times of series differ by (max) ' num2str(diff_time)],checkrun) 133 133 end 134 time=time(1,:);% choose the time data from the first sequence 134 135 end 135 136 … … 225 226 end 226 227 if isequal(stopstate,'queue')% enable STOP command 227 Data=cell(1,nbview);%initiate the set Data 228 Data=cell(1,nbview);%initiate the set Data; 228 229 nbtime=0; 229 230 dt=[]; … … 233 234 [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index)); 234 235 if ~isempty(errormsg) 235 errormsg=['time_series /read_field/' errormsg];236 errormsg=['time_series / read_field / ' errormsg]; 236 237 display(errormsg) 237 238 break 238 end239 timeread(iview)=0;240 if isfield(Data{iview},'Time')241 timeread(iview)=Data{iview}.Time;242 nbtime=nbtime+1;243 239 end 244 240 if ~isempty(NbSlice_calib) … … 279 275 [Field,errormsg]=proj_field(Field,Param.ProjObject); 280 276 if ~isempty(errormsg) 281 msgbox_uvmat('ERROR',[' error in aver_stat/proj_field:' errormsg])277 msgbox_uvmat('ERROR',['time_series / proj_field / ' errormsg]) 282 278 return 283 279 end … … 289 285 % stop program if the first field reading is in error 290 286 if ~isempty(errormsg) 291 displ_uvmat('ERROR',[' error in time_series/sub_field:' errormsg],checkrun)287 displ_uvmat('ERROR',['time_series / sub_field / ' errormsg],checkrun) 292 288 return 293 289 end … … 296 292 nbvar=length(Field.ListVarName); 297 293 if nbvar==0 298 displ_uvmat('ERROR','no input variable selected in get_field',checkrun)294 displ_uvmat('ERROR','no input variable selected',checkrun) 299 295 return 300 296 end … … 363 359 364 360 % record the time: 365 if isempty(time)% time read in ncfiles366 if isfield( Field,'Time')361 if isempty(time)% time not set by xml filer(s) 362 if isfield(Data{1},'Time') 367 363 DataOut.Time(nbfile,1)=Field.Time; 368 364 else … … 370 366 end 371 367 else % time from ImaDoc prevails TODO: correct 372 DataOut.Time(nb time,1)=i1_series{1}(index);% TODO : generalise368 DataOut.Time(nbfile,1)=time(index);% 373 369 end 374 370 … … 419 415 test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant) 420 416 if ~test_time 421 DataOut.Time= [1:filecounter];417 DataOut.Time=1:filecounter; 422 418 end 423 419
Note: See TracChangeset
for help on using the changeset viewer.