[Thread Prev][Thread Next][Index]

Re: MLD reaches bottom



Hi,
I don't see your earlier question on this; but at least, this one
got through.

If you search the email archives for "deepest depth" you'll see a
few helpful messages, including this one for how to define a variable
at its deepest depth

http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg00082.html

You could modify this to get the depth rather than the variable at
the deepest depth where data is defined for each location. When you
say  "bottom depth", do you want the deeper end of the grid cell for
temp, as deep as temp is defined?  That is what I do here:

  let kvals = k[g=temp] + 0*temp
  let kzero = kvals - kvals[k=1:`temp,return=kend`@max]

! Z value for coordinates on the Z axis.
  let zvals = z[gz=temp] + 0*temp
  let integrand = zvals*kzero[k=@weq:0]
  let z_low = integrand[k=1:`temp,return=kend`@sum]

 ! Deeper end of grid cells on z axis
  let zvals_bot = zboxhi[gz=temp] + 0*temp
  let int_bot = zbotvals*kzero[k=@weq:0]
  let z_bot = integrand[k=1:`temp,return=kend`@sum]

Then you can use this in combination with your MLD variable

   let mld=mls[z=@loc:1.0]
   let mlddepth = if mld eq z_low then z_bot else mld


Ansley Manke


Chan Joo Jang wrote:

> Dear Ferreters:
>
>  I would like to set the mixed layer depth (MLD) to bottom depth when
> MLD reaches the final depth with a valid value.
> How can I express this in Ferret(version 5.22)?
> Thanks in advance. Jang
>
> ps)  I posted the same question to this user group without any responses.
>  =====
>
> Following is a Ferret script which I used to calculate MLD based on
> temperature difference.
>
> % cat mld_feb.jnl
> cancel mode verify
> set mode metafile mld_feb.plt
> !===============
> ! EXP CR
> !===============
> set data temp_cr.nc
> let sst=temp[k=1]
> let mls=abs(temp-sst)
> let mld=mls[z=@loc:1.0]
> let sbad=MISSING(temp,0)
> define viewport/xlimits=0.15:0.5/ylimits=0.5:0.9 v1
> set viewport v1
> go margins 0.0 0.0 0.0 0.0
> fill/set/l=2/nolab/lev=(-10,1000,70) missing(mld,-10)
> ppl xlab " " !LONGITUDE
> ppl ylab LATITUDE
> ppl fill
> shade/over/nolab/pal=grey/lev=(0)/l=1/k=1 sbad
> label 140 55 0 0 0.35 MLD in Feb. (DT=1)
> label 130 48 0 0 0.28 EXP CR
> cancel data_set 1
>
> Information for the NetCDF file which I used.
>
> % ncdump -ch temp_cr.nc
>
> netcdf temp_cr {
> dimensions:
> longitude = 96 ;
> latitude = 114 ;
> level024 = 24 ;
> time = UNLIMITED ; // (12 currently)
> variables:
> float longitude(longitude) ;
> longitude:long_name = "Longitude values" ;
> longitude:cartesian_axis = "X" ;
> longitude:units = "degrees_E" ;
> longitude:ipositive = 1 ;
> float latitude(latitude) ;
> latitude:long_name = "Latitudes values" ;
> latitude:cartesian_axis = "Y" ;
> latitude:units = "degrees_N" ;
> latitude:ipositive = 1 ;
> float level024(level024) ;
> level024:long_name = "Level values" ;
> level024:cartesian_axis = "Z" ;
> level024:units = "level" ;
> level024:ipositive = 1 ;
> level024:positive = "up" ;
> double time(time) ;
> time:long_name = "Time coordinate values" ;
> time:cartesian_axis = "T" ;
> time:units = "months since 1900-01-01 00:00:00.0" ;
> time:ipositive = 1 ;
> time:calendar_type = "Gregorian" ;
> float temp(time, level024, latitude, longitude) ;
> temp:long_name = "temp(deg. C)" ;
> temp:units = "unknown" ;
> temp:valid_range = -1.e+37f, 1.e+37f ;
> temp:missing_value = 1.e+20f ;
>
> // global attributes:
> :title = "Simulated temperature (EXP CR)" ;
> :Conventions = "COARDS" ;
> :GFDL_NCIR_VER_NO = "0.7" ;
> :missing_value = 1.e+20f ;
> }
>
> --
>
> Chan Joo Jang, Ph.D., Senior researcher
> (cjjang@kordi.re.kr,http://ogcm.kordi.re.kr)
> Korea Ocean Research and Development Institute
> 1270 Sa1-dong, Ansan  425-744, Korea
> Phone 82-31-400-6317 FAX 82-31-408-5823



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement