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

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_IO/grid_load.m

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


Revision 1.1 - (hide annotations) (download)
Wed Feb 10 14:46:48 2010 UTC (15 years, 5 months ago) by gforget
Branch: MAIN
matlab_class: backward compatibility routines

1 gforget 1.1 function []=grid_load(varargin);
2    
3     global mygrid;
4    
5     if isempty(mygrid);
6    
7     if nargin==1; dirGrid=varargin{1}; nFaces=5;
8     elseif nargin==2; dirGrid=varargin{1}; nFaces=varargin{2};
9     else; dirGrid='/net/altix3700/raid4/gforget/mysetups/ecco_v4/RUNS/GRIDmds_90x50/'; nFaces=5;
10     end;
11    
12     list0={'XC','XG','YC','YG','RC','RF','RAC','DRC','DRF',...
13     'DXC','DXG','DYC','DYG','hFacC','hFacS','hFacW','Depth'};
14     %list0={'AngleCS','AngleSN','Depth','DRC','DRF','DXC','DXG','DYC','DYG',...
15     % 'hFacC','hFacS','hFacW','maskCtrlC','maskCtrlS','maskCtrlW',...
16     % 'PHrefC','PHrefF','RAC','RAS','RAW','RAZ','RC','RF','XC','XG','YC','YG'};
17    
18     list0={'XC','XG','YC','YG','RAC','RAZ','DXC','DXG','DYC','DYG',...
19     'hFacC','hFacS','hFacW','Depth','AngleCS','AngleSN'};
20     for iFld=1:length(list0);
21     eval(['mygrid.' list0{iFld} '=rdmds2gcmfaces([dirGrid ''' list0{iFld} '*''],[],nFaces);']);
22     end;
23    
24     list0={'RC','RF','DRC','DRF'};
25     for iFld=1:length(list0);
26     eval(['mygrid.' list0{iFld} '=rdmds([dirGrid ''' list0{iFld} '*'']);']);
27     end;
28    
29     mygrid.hFacCsurf=mygrid.hFacC;
30     for ff=1:mygrid.hFacC.nFaces; mygrid.hFacCsurf{ff}=mygrid.hFacC{ff}(:,:,1); end;
31    
32     end;
33    

  ViewVC Help
Powered by ViewVC 1.1.22