/[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.5 by gforget, Wed Feb 4 11:41:30 2015 UTC revision 1.6 by gforget, Wed Feb 4 11:44:16 2015 UTC
# Line 41  end; Line 41  end;
41  %===============  %===============
42    
43  if choiceStruct==2;  if choiceStruct==2;
     budgName='budgHo'  
       
     structIn=[];  
     %  
     load release1/mat/diags_grid_parms.mat myparms;  
     dirMat=['release1/mat/diags_set_' budgName '/'];  
     fileMat=[budgName '_*.mat'];  
     structIn.vars=diags_read_from_mat(dirMat,fileMat);  
   
     %vector of time increment  
     [listTimes]=diags_list_times({'release1/diags/BUDG/'},{'budg2d_hflux_set1'});  
     structIn.vars.dt=diff(listTimes);  
     structIn.vars.dt=3600*structIn.vars.dt(1:end-1)';      
     %  
     specs=structIn.vars.specs(1);  
     if strcmp(specs.units,'W');  
         structIn.descr={'Heat budget in extensive form (in Watt, on C-Grid)'};  
     elseif strcmp(specs.units,'kg/s');  
         structIn.descr={'Mass budget in extensive form (in kg/s, on C-Grid)'};  
     elseif strcmp(specs.units,'g/s');  
         structIn.descr={'Salt budget in extensive form (in g/s, on C-Grid)'};  
     else;  
         error('unknown budget');  
     end;  
     structIn.descr={structIn.descr{:},'between',specs.top,'(top) and',specs.bottom,'(bottom)'};  
     %  
     vars=[]; nv=length(vars)+1;  
     vars(nv).fldName='tend'; vars(nv).longName='tendency term'; vars(nv).units=specs.units; nv=length(vars)+1;  
     vars(nv).fldName='trU'; vars(nv).longName='horizontal transport'; vars(nv).units=specs.units; nv=length(vars)+1;  
     vars(nv).fldName='trV'; vars(nv).longName='horizontal transport'; vars(nv).units=specs.units; nv=length(vars)+1;  
     vars(nv).fldName='trWtop'; vars(nv).longName='vertical transport'; vars(nv).units=specs.units; nv=length(vars)+1;  
     vars(nv).fldName='trWbot'; vars(nv).longName='vertical transport'; vars(nv).units=specs.units; nv=length(vars)+1;  
     vars(nv).fldName='dt'; vars(nv).longName='time increment'; vars(nv).units='s'; nv=length(vars)+1;  
     %  
     structIn.defs=vars;  
     %  
     struct2nctiles('release1/',budgName,structIn,[90 90]);  
44            
45  end;  end;
46    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22