/[MITgcm]/MITgcm_contrib/enderton/Diagnostics/DiagLoad.m
ViewVC logotype

Diff of /MITgcm_contrib/enderton/Diagnostics/DiagLoad.m

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

revision 1.5 by enderton, Wed Feb 2 16:20:12 2005 UTC revision 1.6 by enderton, Mon Feb 7 05:31:45 2005 UTC
# Line 1  Line 1 
1  function [data,xax,yax,time,pltslc] = ...  function [data,xax,yax,time,pltslc] = ...
2      DiagLoad(fln,trl,dat,dad,grd,itr,tst,flu,ddf,gdf,avg,slc,pst,...      DiagLoad(fln,trl,dat,dad,grd,itr,tst,flu,ddf,gdf,avg,slc,pst,...
3               LoadGridData,DiagDebug,GridSuffix,ZcordFile,Index,Dim,...               LoadGridData,DiagDebug,GridSuffix,ZcordFile,Index,Dim,...
4               Grads,Year0Iter,Months);               Grads,Year0Iter,SecPerYear,Months);
5    
6    
7  % Load parameters.  % Load parameters.
# Line 25  if isequal(dat,'Tav') Line 25  if isequal(dat,'Tav')
25      else               , mnchandle  = 'tave.*'    ; end      else               , mnchandle  = 'tave.*'    ; end
26  elseif isequal(dat,'Ins')  elseif isequal(dat,'Ins')
27      filesuffix = '';  mnchandle  = 'state.*';      filesuffix = '';  mnchandle  = 'state.*';
28    elseif isequal(dat(1:2),'Mn')
29        filesuffix = '';
30        if ismember(dat,{'MnA','MnO'}), mnchandle = 'monitor.*'; end
31        if isequal(dat,'MnI'), mnchandle = 'monitor_sice.*'; end
32        if isequal(dat,'MnL'), mnchandle = 'monitor_land.*'; end
33  elseif ismember(dat,{'','Non','None'})  elseif ismember(dat,{'','Non','None'})
34      filesuffix = '';  mnchandle  = '';      filesuffix = '';  mnchandle  = '';
35  else  else
# Line 46  time = months/12; Line 51  time = months/12;
51  % Open grads files  % Open grads files
52  if ~isequal(Grads,0)  if ~isequal(Grads,0)
53      if DiagDebug, disp(['  Debug -- Loading GRADS field.']); end      if DiagDebug, disp(['  Debug -- Loading GRADS field.']); end
54      [data,xax,yax,zax,months,time,dim] = DiagLoadGradsData(Grads,dad,fln,DiagDebug);      [data,xax,yax,zax,months,time,dim] = ...
55            DiagLoadGradsData(Grads,dad,fln,DiagDebug);
56      if DiagDebug, disp(['  Debug -- ''data'' size after load:  ',mat2str(size(data))]); end      if DiagDebug, disp(['  Debug -- ''data'' size after load:  ',mat2str(size(data))]); end
57      data = DiagAverage(data,fln,avg,months,ddf,dim);      data = DiagAverage(data,fln,avg,months,ddf,dim);
58      if DiagDebug, disp(['  Debug -- ''data'' size after averaging:  ',mat2str(size(data))]); end      if DiagDebug, disp(['  Debug -- ''data'' size after averaging:  ',mat2str(size(data))]); end
# Line 56  if ~isequal(Grads,0) Line 62  if ~isequal(Grads,0)
62      else      else
63          error('Loading grads data only set to handle surface plots!');          error('Loading grads data only set to handle surface plots!');
64      end      end
65        
66    % Load monitor data.
67    elseif isequal(dat(1:2),'Mn')
68        [data,time] = ...
69            DiagLoadMonitor(fln,mnchandle,dad,itr,tst,SecPerYear,DiagDebug);
70        xax = time; yax = NaN; pltslc = 'timfld';
71    
72  % Load AIM physics data.  The data is all stuffed into one file called  % Load AIM physics data.  The data is all stuffed into one file called
73  % 'aimPhy' which currently only comes in MDS format.  When loading a field,  % 'aimPhy' which currently only comes in MDS format.  When loading a field,
# Line 69  if ~isequal(Grads,0) Line 80  if ~isequal(Grads,0)
80  % stresses (on atmosphere) must converted to a lat-lon grid.  % stresses (on atmosphere) must converted to a lat-lon grid.
81  elseif ismember(fln,aimparameters)  elseif ismember(fln,aimparameters)
82      if isequal(ddf,'MNC')      if isequal(ddf,'MNC')
83          error('Aim physics reader not set to hande ''MNC'' data format.')          error('Aim physics reader not set to handle ''MNC'' data format.')
84      end      end
85      data = DiagLoad_Local('aimPhy',dat,dad,grd,itr,ddf,filesuffix,mnchandle);      data = DiagLoad_Local('aimPhy',dat,dad,grd,itr,ddf,filesuffix,mnchandle);
86      if isequal(fln,'TotP')      if isequal(fln,'TotP')

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

  ViewVC Help
Powered by ViewVC 1.1.22