Hi Saurabh,
now I want to map it back to the `m` axis of depth which is define by `
ohc.nc` so how I should do it ? or Do I map it first to `m` axis and after that I compute the slope ?
When you convert a variable F from the z axis to the ρ axis, you do this:
F_ρ = zaxreplace(F, ρ, denaxis) . . . . . (1)
The field ρ(x, y, z, t) is the value of density at (x, y, z, t).
Likewise, when you convert a variable G from the ρ axis to the z axis, you do this:
G_z = zaxreplace(G, zed_ρ, zedaxis)
That means that you need the variable "zed_ρ". The field zed_ρ(x, y, ρ, t) is the value of z at (x, y, ρ, t). That is, it's the depth of the isopycnal ρ at (x, y, t).
This zed_ρ can be obtained similarly to (1):
zed_ρ = zaxreplace(zed, ρ, denaxis)
where zed is the "4D distribution of z":
This "variable" is rather stupid: its value is the depth of each gridpoint (x, y, z, t).
Hope this helps.
Cheers,
Ryo