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

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

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


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Sun Feb 15 22:28:31 2004 UTC (21 years, 5 months ago) by cnh
Branch: MAIN, Initial
CVS Tags: adoption_1_0_pre_A, Baseline, HEAD
Changes since 1.1: +0 -0 lines
Initial checkin

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