--- MITgcm_contrib/gmaze_pv/compute_JFz.m 2006/07/10 15:09:01 1.1 +++ MITgcm_contrib/gmaze_pv/compute_JFz.m 2007/02/01 17:02:02 1.3 @@ -1,5 +1,5 @@ % -% [] = compute_JFz(SNAPSHOT) +% [JFz] = compute_JFz(SNAPSHOT) % % Here we compute the PV flux due to frictionnal forces as % JFz = ( TAUx * dSIGMATHETA/dy - TAUy * dSIGMATHETA/dx ) / RHO / EKL @@ -8,7 +8,7 @@ % TAU is the surface wind-stress (N/m2) % SIGMATHETA is the potential density (kg/m3) % RHO is the density (kg/m3) -% EKL is the Ekman layer depth (m) +% EKL is the Ekman layer depth (m, positive) % % Files names are: % INPUT: @@ -25,7 +25,7 @@ % 06/27/06 % gmaze@mit.edu -function compute_JFz(snapshot) +function varargout = compute_JFz(snapshot) global sla toshow global netcdf_suff netcdf_domain @@ -216,3 +216,9 @@ nc=close(nc); +% Output: +output = struct('JFz',JFz,'lat',STlat(2:ny-1),'lon',STlon(2:nx-1)); +switch nargout + case 1 + varargout(1) = {output}; +end