/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_calc/gcmfaces_lines_zonal.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_calc/gcmfaces_lines_zonal.m

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


Revision 1.3 - (hide annotations) (download)
Tue Dec 4 04:40:25 2012 UTC (12 years, 7 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u
Changes since 1.2: +9 -2 lines
- allow specification of subset MSKS_NAM of the full
  {'mskCint','mskCedge','mskWedge','mskSedge'}
  when memory becomes a limiting factor.

1 gforget 1.1 function []=gcmfaces_lines_zonal(varargin);
2     %object: define the set of quasi longitudinal lines
3     % along which transports will integrated;
4     % LATS_MASKS that will be added to mygrid.
5     %optional input:
6     % LATS_VAL is the latitudes vector ([-89:89]' by default)
7 gforget 1.3 % MSKS_NAM is the list of fields to store in mygrid
8 gforget 1.1
9     global mygrid;
10    
11     if nargin>0; LATS_VAL=varargin{1}; else; LATS_VAL=[-89:89]'; end;
12 gforget 1.3 if nargin>1; MSKS_NAM=varargin{2}; else; MSKS_NAM={'mskCint','mskCedge','mskWedge','mskSedge'}; end;
13 gforget 1.1
14     for iy=1:length(LATS_VAL);
15 gforget 1.2
16     mskCint=1*(mygrid.YC>=LATS_VAL(iy));
17     [mskCedge,mskWedge,mskSedge]=gcmfaces_edge_mask(mskCint);
18    
19 gforget 1.3 for im=1:length(MSKS_NAM);
20     eval(['tmp1.' MSKS_NAM{im} '=' MSKS_NAM{im} ';']);
21     end;
22     tmp1.lat=LATS_VAL(iy);
23    
24 gforget 1.1 %store:
25     if iy==1;
26 gforget 1.3 LATS_MASKS=tmp1;
27 gforget 1.1 else;
28 gforget 1.3 LATS_MASKS(iy)=tmp1;
29 gforget 1.1 end;
30    
31     end;
32    
33     mygrid.LATS_MASKS=LATS_MASKS;
34    
35    

  ViewVC Help
Powered by ViewVC 1.1.22