Hi Ryo, Ansley and Ferreters
As of now its very difficult for me to get Z axis in meters from Z axis of dbars but what I can do is this:-
suppose I am having two NC files
salt_pressure.nc !! salinity in unit of dbars axis
salt_meter.nc !! salinity in units of meter axis
so can I do like this to get salinity in the Z axis of units of meter
let salt_new_meter=salt_pressure[gz=salt_meter]
so in this way I am replacing the Z axis of dbars from Z axis of meters. Is this the way I can use to get my
desired results ?
regards, binny
On Wed, Jan 18, 2017 at 1:09 PM, Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Binny, Ansley, and ferret users,
On Wed, Jan 18, 2017 at 5:32 AM, Ansley C. Manke
<ansley.b.manke@xxxxxxxx> wrote:
> The method would be the same. You need an expression that relates the units
> of Z axis to the other; it doesn't matter what is being converted to what.
I agree, but one issue that may not be obvious when you want to
convert to the z axis, is how to find the "z field". In the
z-to-sigma (z-to-density) conversion of the 3D variable salt
ZAXREPLACE( salt, sigma, z[gz=axden]) ,
you need the 3D variable sigma(x,y,z). To convert a 3D variable
salt(x,y,p) to the z axis, one needs the 3D "z field" z3d(x,y,p),
which is the depth of the isobaric surface p at (x,y). If you have
such a variable, then the conversion would be
ZAXREPLACE(salt, z3d, z[gz=z_axis]) .
You can compute z3d using the hydrostatic relation dp/dz = - rho z if
you know density.
HAVING SAID THAT, is this really what you are after, Binny?
Normally, pressure-to-z conversion is just to "re-interpret" the
vertical axis: You equate 10 dbar to 10 meters, for example. If this
re-interpretation is fine, all you need is
define axis/z= . . . ./units=meters z_axis
let salt_in_z = salt_in_p[gz=z_axis@ASN]
See
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/Grids-Regions/GRIDS#_VPINDEXENTRY_663
for the @ASN transformation. There is an example down the webpage.
Regards,
Ryo