[Thread Prev][Thread Next][Index]

Re: [ferret_users] zaxreplace - convert z-axis of density to the z-axis of `m`



Dear Ryo,
G'day

Thanks for your explanation but it is still not clear to me. I tried your way but it is showing an error **ERROR: illegal limits: Z limits of data and depth fields must match.

here is my script

use /data/rg/rgsigmaslope.nc
use /data/rg/neutraldensrg.nc

sh gr slope[d=1], NEUTRALRHO[d=2]
    GRID GRC1
 name                  axis            # pts      start         end                 subset
 LONGITUDE  LONGITUDE      360mr   20.5E     19.5E(379.5)        full
 LATITUDE     LATITUDE          145 r    64.5S      79.5N               full
 AXDEN               Z                  118 r    16.81       28.51               full
 normal                T
    GRID GFP1
 name       axis                # pts      start                          end                      subset
 LON       LONGITUDE       360 r    20.5E                       19.5E(379.5)           full
 LAT       LATITUDE           145 r    64.5S                       79.5N                     full
 LEV       DEPTH (dbar)      58 i-     2.4811                     1950.9                     full
 TIME      TIME                 180 i    16-JAN-2004 05:14    16-DEC-2018 10:03  full

define axis/z=`NEUTRALRHO[d=2,x=@min,y=@min,l=@min,z=@min]`:`NEUTRALRHO[d=2,x=@max,y=@max,l=@max,z=@max]`:.1 axden

let zed=z[gz=slope[d=1]] + 0*slope[d=1]

let zedp=zaxreplace(zed, NEUTRALRHO[d=2,gx=slope[d=1],gy=slope[d=1]], z[gz=axden])

set mem/size=5000

define axis/z=`zed[x=@min,y=@min,l=@min,z=@min]`:`zed[x=@max,y=@max,l=@max,z=@max]`:50 zedaxis

let slopez=zaxreplace(slope[d=1],zedp,z[gz=zedaxis])

fill slopez[z=0:700@din]

I am not clear where I am making mistake. This is my firs time using this method.

Cheers, Saurabh

On Wed, May 1, 2019 at 9:24 AM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Saurabh,

On Wed, May 1, 2019 at 9:12 PM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:

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":

zed = z[gz=F] + 0*F

This "variable" is rather stupid: its value is the depth of each gridpoint (x, y, z, t).

Hope this helps.

Cheers,
Ryo



--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434

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

Privacy Policy | Disclaimer | Accessibility Statement