Back to home page

MITgcm

 
 

    


Warning, /verification/tutorial_global_oce_latlon/diags_matlab/mit_meridflux.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 T = mit_meridflux(surface_flux,dx,dy)
                0002 % function T = mit_meridflux(surface_flux,dx,dy)
                0003   
                0004   if nargin == 2
                0005     area = dx;
                0006   elseif nargin == 3
                0007     area = dx.*dy;
                0008   else
                0009     error('need two or three input parameters')
                0010   end
                0011   [nx ny nt] = size(surface_flux);
                0012   for kt=1:nt
                0013     fdxdy(:,:,kt) = change(surface_flux(:,:,kt),'==',NaN,0).*area;
                0014   end
                0015 
                0016   T = squeeze(sum(cumsum(fdxdy,2),1));
                0017   
                0018   return