source: Roms_tools/Visualization_tools/get_Lorbacher_MLD.m @ 1

Last change on this file since 1 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

File size: 1.6 KB
Line 
1function [lat,lon,mask,h]=get_Lorbacher_MLD(hisfile,gridfile,tindex,coef)
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3%
4%  Get the depth of the mixed layer depth using the
5%  Lorbacher & Dommenget routine
6%
7%  Further Information: 
8%  http://www.brest.ird.fr/Roms_tools/
9
10%  This file is part of ROMSTOOLS
11%
12%  ROMSTOOLS is free software; you can redistribute it and/or modify
13%  it under the terms of the GNU General Public License as published
14%  by the Free Software Foundation; either version 2 of the License,
15%  or (at your option) any later version.
16%
17%  ROMSTOOLS is distributed in the hope that it will be useful, but
18%  WITHOUT ANY WARRANTY; without even the implied warranty of
19%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20%  GNU General Public License for more details.
21%
22%  You should have received a copy of the GNU General Public License
23%  along with this program; if not, write to the Free Software
24%  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25%  MA  02111-1307  USA
26%
27%  Copyright (c) 2006 by Pierrick Penven
28%  e-mail:Pierrick.Penven@ird.fr 
29%
30%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31disp('Warning, this is a non-vectorial routine: it can be very slow')
32[lat,lon,mask]=read_latlonmask(gridfile,'r');
33zr=get_depths(hisfile,gridfile,tindex,'r');
34nc=netcdf(hisfile);
35temp=squeeze(nc{'temp'}(tindex,:,:,:));
36close(nc)
37h=0.*mask;
38[M,L]=size(h);
39for j=1:M
40  for i=1:L
41    if isfinite(mask(j,i))
42      z=flipud(squeeze(zr(:,j,i)));
43      t=flipud(squeeze(temp(:,j,i)));
44      [h(j,i),qe,imf]=get_mld(z,t);
45    end
46  end
47end
48h=coef.*mask.*h;
Note: See TracBrowser for help on using the repository browser.