/[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.7 by gforget, Wed Feb 4 14:08:34 2015 UTC revision 1.8 by gforget, Fri Feb 12 16:19:16 2016 UTC
# Line 174  if choiceStruct==3; Line 174  if choiceStruct==3;
174    
175      %rename trWtop as trW if adequate      %rename trWtop as trW if adequate
176      if strcmp(fldName,'trWtop')&(budgName(end)=='o');      if strcmp(fldName,'trWtop')&(budgName(end)=='o');
177    %note: since geothermal heating was added we likely need to add a nr+1 level to trW
178    %  using trWbot(:,:,nr) or output trWtop and trWbot themselves (as done for seaice)
179        structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop);        structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop);
180        structIn.vars=rmfield(structIn.vars,'trWtop');        structIn.vars=rmfield(structIn.vars,'trWtop');
181        structIn.vars.listDiags={'trW'};        structIn.vars.listDiags={'trW'};
# Line 182  if choiceStruct==3; Line 184  if choiceStruct==3;
184    
185      %switch back to upward convention      %switch back to upward convention
186      if strcmp(fldName(1:3),'trW');      if strcmp(fldName(1:3),'trW');
187    %note: the following was needed in preparing the 03-Feb-2015 nctiles_budget (3d) files
188    %   but is no longer needed since the trW sign convention in gcmfaces_diags was
189    %   reversed to positive upward for consistency with MITgcm convention.
190        tmp1=getfield(structIn.vars,fldName);        tmp1=getfield(structIn.vars,fldName);
191        structIn.vars=setfield(structIn.vars,fldName,-tmp1);        structIn.vars=setfield(structIn.vars,fldName,-tmp1);
192      end;      end;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22