[Thread Prev][Thread Next][Index]

Re: [ferret_users] about sigma coordinates to z coordinates..

There is a Ferret script, sigma_coordinate_demo.jnl which creates some example data on a sigma-z axis and then shows the method for regridding that to a depth axis.  It uses the ZAXREPLACE function.  Run the script, reading the comments on the command line as you go.

yes? go sigma_coordinate_demo.jnl

For a specific application, here is a piece from a script I have used on a dataset which has several variables, including "temp".  I'll show the conversion from sigma-z to depths for that variable.  Many of the model outputs also have mask variables that are intended to apply to variables, to mask out the data over land, so I've shown that here too.
use model_data.nc
! Regridding from sigma-z levels to depths.

! Define a depth axis
DEFINE AXIS/Z/UNITS=meters/DEPTH zaxmeters = \

LET zaxvar = z[gz=zaxmeters]
LET Zdepth = depth * Z[g=u]

! apply the mask variable
LET/D=1/UNITS="`temp,RETURN=units`"/TITLE="`temp,RETURN=title`" \
  mask_temp = IF mask EQ 1 THEN temp

! regrid in Z
LET/D=1/UNITS="`temp,RETURN=units`"/TITLE="`temp,RETURN=title`" \
  temp_z = ZAXREPLACE(mask_temp, Zdepth, zaxvar)

! the variables are defined with /D=1 so they are associated with the dataset
show data
Once you've done this kind of thing you'll have your variables on a depth axis. Look in the Users Guide, under the @LOC and @WEQ transformations, for examples to compute variables at the mixed-layer depth; and also the scripts mentioned in this message:



On 3/10/2011 1:34 AM, Mahesh Shinde wrote:
Dear frds,

I am new to ferret. I need to compute MLD using density criteria. I did it.
It plots fine. The only problem is I have to convert sigma coordinates into
z coordinates.
I am doing it for ROMS  files. How to do that? I will be grateful  if
provide some sample script.

Please help me in finding the MLD in this case.

Thanking you

kind regards

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement