/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_IO/prep2nctiles.m
ViewVC logotype

Diff of /MITgcm_contrib/gael/matlab_class/gcmfaces_IO/prep2nctiles.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by gforget, Tue Feb 3 14:02:01 2015 UTC revision 1.4 by gforget, Tue Feb 3 16:29:09 2015 UTC
# Line 85  end; Line 85  end;
85    
86  if choiceStruct==3;  if choiceStruct==3;
87    
88      budgName='budgHo';    budgName='budgHo';
89      fldName='trU';  
90      if budgName(end)=='o'; listFlds={'tend','trU','trV','trWtop'};
91      else; listFlds={'tend','trU','trV','trWtop','trWbot'};
92      end;
93    
94      for ii=1:length(listFlds);
95        fldName=listFlds{ii};
96        %fldName='trWtop';
97      [budgName ' -- ' fldName]      [budgName ' -- ' fldName]
98    
99      %directories      %directories
# Line 109  if choiceStruct==3; Line 116  if choiceStruct==3;
116      structIn.vars.t1=3600*listTimes(2:end-1);      structIn.vars.t1=3600*listTimes(2:end-1);
117    
118      %rename trWtop as trW if adequate      %rename trWtop as trW if adequate
119      if strcmp(fldName,'trWtop');      if strcmp(fldName,'trWtop')&(budgName(end)=='o');
120        structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop);        structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop);
121        structIn.vars=rmfield(structIn.vars,'trWtop');        structIn.vars=rmfield(structIn.vars,'trWtop');
122        structIn.vars.listDiags={'trW'};        structIn.vars.listDiags={'trW'};
# Line 137  if choiceStruct==3; Line 144  if choiceStruct==3;
144      case 'trU'; vars(nv).longName='horizontal transport (U)';      case 'trU'; vars(nv).longName='horizontal transport (U)';
145      case 'trV'; vars(nv).longName='horizontal transport (V)';      case 'trV'; vars(nv).longName='horizontal transport (V)';
146      case 'trW'; vars(nv).longName='vertical transport (W)';      case 'trW'; vars(nv).longName='vertical transport (W)';
147        case 'trWtop'; vars(nv).longName='vertical transport (W)';
148        case 'trWbot'; vars(nv).longName='vertical transport (W)';
149      end;      end;
150      nv=length(vars)+1;      nv=length(vars)+1;
151      vars(nv).fldName='t0'; vars(nv).longName='initial time'; vars(nv).units='s'; nv=length(vars)+1;      vars(nv).fldName='t0'; vars(nv).longName='initial time'; vars(nv).units='s'; nv=length(vars)+1;
# Line 148  if choiceStruct==3; Line 157  if choiceStruct==3;
157      tic; struct2nctiles(dirIn,fldName,structIn,[90 90]); toc;      tic; struct2nctiles(dirIn,fldName,structIn,[90 90]); toc;
158      eval(['!mv ' pwd filesep dirIn filesep 'tmp_nctiles' filesep fldName ' ' pwd filesep dirOut]);      eval(['!mv ' pwd filesep dirIn filesep 'tmp_nctiles' filesep fldName ' ' pwd filesep dirOut]);
159    
160      end;%for fldName=listFlds;
161    
162  end;  end;
163    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22