/[MITgcm]/MITgcm_contrib/ESMF/global_ocean.128x60x15/diags_matlab/mit_zonalmean.m
ViewVC logotype

Contents of /MITgcm_contrib/ESMF/global_ocean.128x60x15/diags_matlab/mit_zonalmean.m

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


Revision 1.1 - (show annotations) (download)
Tue Mar 30 03:58:59 2004 UTC (21 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: adoption_1_0_pre_A, HEAD
New test with different size

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

  ViewVC Help
Powered by ViewVC 1.1.22