--- MITgcm_contrib/gmaze_pv/compute_MLD.m 2006/10/06 18:54:35 1.1 +++ MITgcm_contrib/gmaze_pv/compute_MLD.m 2006/10/06 21:44:53 1.2 @@ -9,7 +9,7 @@ % SST the Sea Surface Temperature (oC) % SSS the Sea Surface Salinity (PSU-35) % p0 the Sea Level Pressure (mb) -% EKL is the Ekman layer depth (m) +% EKL is the Ekman layer depth (m, positive) % % Files names are: % INPUT: @@ -86,6 +86,16 @@ MLD(isnan(squeeze(ST(1,:,:)))) = NaN; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Ensure we have the right sign (positive) +mm = nanmean(nanmean(MLD,1)); +if mm <= 0 + MLD = -MLD; +end + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%% % Record %%%%%%%%%%%%%%%%%%%%%%%%%%%%