** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=MITgcm at /usr/local/share/lxr/lib/LXR/Common.pm line 1224.

Last-Modified: Mon, 24 Nov 2024 06:12:06 GMT Content-Type: text/html; charset=utf-8 MITgcm/MITgcm/verification/tutorial_global_oce_latlon/diags_matlab/mit_zonalmean.m
Back to home page

MITgcm

 
 

    


Warning, /verification/tutorial_global_oce_latlon/diags_matlab/mit_zonalmean.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
051ee7f715 Jean*0001 function meanfield = mit_zonalmean(field,hfac,dx);
                0002 %function meanfield = mit_zonalmean(field,hfac,dx);
                0003 
                0004   [nx ny nz] = size(field);
                0005 
                0006   area = hfac.*repmat(dx,[1 1 nz]);
                0007   meanfield = squeeze(nanmean(field.*area)./nanmean(area));
                0008   
                0009   knil = find(meanfield == 0);
                0010   meanfield(knil) = NaN;
                0011   
                0012   return