/[MITgcm]/MITgcm/verification/tutorial_global_oce_latlon/diags_matlab/mit_zonalmean.m
ViewVC logotype

Contents of /MITgcm/verification/tutorial_global_oce_latlon/diags_matlab/mit_zonalmean.m

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


Revision 1.1 - (show annotations) (download)
Sat Aug 12 19:37:26 2006 UTC (17 years, 9 months ago) by jmc
Branch: MAIN
moved from verification/global_ocean.90x40x15/diags_matlab ;
 add Header and Name; use "quiver" instead of NaNquiver (<- not standard);

1 function meanfield = mit_zonalmean(field,hfac,dx);
2 %function meanfield = mit_zonalmean(field,hfac,dx);
3
4 % $Header: $
5 % $Name: $
6
7 [nx ny nz] = size(field);
8
9 area = hfac.*repmat(dx,[1 1 nz]);
10 meanfield = squeeze(nanmean(field.*area)./nanmean(area));
11
12 knil = find(meanfield == 0);
13 meanfield(knil) = NaN;
14
15 return

  ViewVC Help
Powered by ViewVC 1.1.22