--- MITgcm_contrib/gmaze_pv/compute_MLD.m 2006/10/06 21:44:53 1.2 +++ MITgcm_contrib/gmaze_pv/compute_MLD.m 2007/09/19 14:45:59 1.4 @@ -1,5 +1,5 @@ % -% [] = compute_MLD(SNAPSHOT) +% [MLD] = compute_MLD(SNAPSHOT) % % Here we compute the Mixed Layer Depth as: % MLD = min depth for which : ST > ST(SSS,SST-0.8,p0) @@ -28,7 +28,7 @@ % 09/20/06 % gmaze@mit.edu -function compute_MLD(snapshot) +function varargout = compute_MLD(snapshot) global sla toshow global netcdf_suff netcdf_domain @@ -155,5 +155,14 @@ nc{ncid}(:,:,:) = MLD; nc=close(nc); +close(ncST); +close(ncS); +close(ncT); +% Output: +output = struct('MLD',MLD,'lat',STlat,'lon',STlon); +switch nargout + case 1 + varargout(1) = {output}; +end