Hi
Ferret gets that information from the dataset. For many model
outputs, there is a separate variable in the dataset that defines
the depth as a function of layer. There are older functions in
Ferret that will do this operation, but the best way is the
"Auxiliary Variable Regridding" operation, available in Ferret
v6.96 and higher. See:
The examples in the Ferret manual define a sigma function using
variables in the file. I am guessing that you may be using a file
that already contains a variable that defines the conversion
between layers and depth. It may be named something else of
course. Look for the "coordinates" attribute in the dataset.
If your variable is "temp", then part of the ncdump output of
the file might look like this:
float temp(zlev,lat,lon);
temp:units="Degree C";
temp:coordinates="model_level";
float sigma(zlev);
sigma:long_name="sigma";
sigma:positive="down";
sigma:units="m";
int model_level(zlev);
model_level:long_name="model level number";
model_level:positive="down";
The variable "temp", and the coordinate variables "sigma" and
"model_level" all have the same z dimension "zlev". The native grid
of temp is on the model-level axis, just level # 1, 2, 3... To get
a variable on a depth axis, the data in "sigma" can be used to
convert between the two.
So, you would define any depth axis, with the same units as
"sigma". Define your depth axis to have depths with the range of
depth values that appear in the sigma coordinate variable in your
dataset.
yes? define axis/z=0:5000:10/units=m depthaxis
yes? let/units="Degree C" temp_z = temp[gz(sigma) = depthaxis]
Now you can make a plot of the variable "temp_z" and it will be on a
depth axis.
-Ansley
Hello Ferret Users,
I want to plot
a transect of temp with region of x=193 by y=87 points which
has 25 layes in depth. But I dont want to have layers in my
yaxis when plotting. I want to have depth instead of number of
layers. Could you please tell me What the script is for that?
Thanks