[Thread Prev][Thread Next][Index]

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



Hello,
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 = \
{0,2,4,6,8,10,12,15,20,25,30,35,40,45,50,60,70,80,90,100,125,150,200,250,\
300,350,400,500,600,700,800,900,1000,1250,1500,2000,2500,3000,4000,5000}

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:

http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/msg00149.html

Ansley

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
Mahesh



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

Privacy Policy | Disclaimer | Accessibility Statement