Changeset 93 for trunk/src/series
- Timestamp:
- May 27, 2010, 7:25:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/merge_proj.m
r89 r93 267 267 Field{iview}.VarAttribute=SubField.VarAttribute; 268 268 end 269 if isfield(Field{iview},'Txt') 270 msgbox_uvmat('ERROR',Field{iview}.Txt) 271 return 272 end 269 273 if isfield(Field{iview},'Time') 270 274 timeread(iview)=Field{iview}.Time; … … 280 284 Field{iview}=transform_fct(Field{iview},XmlData{iview});%transform to phys if requested 281 285 end 282 min(Field{iview}.X)283 286 if testcivx 284 287 Field{iview}=calc_field(FieldName,Field{iview}); 285 288 end 286 min(Field{iview}.X)287 289 288 290 %projection on object (gridded plane) … … 350 352 MergeData.nb_coord=2; 351 353 MergeData.nb_dim=2; 352 MergeData.dt=1; 354 dt=[]; 355 if isfield(Field{1},'dt')&& isnumeric(Field{1}.dt) 356 dt=Field{1}.dt; 357 end 358 for iview =2:numel(Field) 359 if ~(isfield(Field{iview},'dt')&& isequal(Field{iview}.dt,dt)) 360 dt=[];%dt not the same for all fields 361 end 362 end 363 if isempty(dt) 364 MergeData.ListGlobalAttribute(6)=[]; 365 else 366 MergeData.dt=dt; 367 end 368 %MergeData.dt=1; 353 369 MergeData.Time=time_i; 354 370 error=struct2nc(mergename,MergeData); %save result file … … 387 403 return 388 404 end 405 406 407 389 408 390 409 %group the variables (fields of 'FieldData') in cells of variables with the same dimensions … … 412 431 test_grid=0; 413 432 end 414 % DimIndices=Data{1}.VarDimIndex{VarIndex(1)};%indices of the dimensions of the first variable (common to all variables in the cell)415 433 %case of input fields with unstructured coordinates 416 434 if ~test_grid … … 423 441 %case of fields defined on a structured grid 424 442 else 425 % DimValue=MergeData.DimValue(DimIndices);%set of dimension values426 443 testFF=0; 427 444 for iview=2:nbview 428 % if ~isequal(DimValue,Data{iview}.DimValue(DimIndices))429 % MergeData.Txt='ERROR: attempt at merging structured fields with different sizes';430 % return431 % end432 445 for ivar=VarIndex 433 446 VarName=MergeData.ListVarName{ivar};
Note: See TracChangeset
for help on using the changeset viewer.