!! REGRID
!
define axis/from_data/z/depth/name=lnpz/units="hPa" ln(z[gz=U]*1.E-2) !assuming z axis is Pa, but you want hPa
let U_lnz = U[gz=lnpz@asn] !regrid onto ln(P)
!! PLOT
!
let zmin = 100 !z region (in hPa)
let zmax = 1000
set region/z=`ln(zmax)`:`ln(zmin)`
ppl axlabp -1, 0 !turn off y label
ppl tics 0.125, 0.25, 0, 0 !suppress y tics
shade/l=1/x=1 U_lnz[y=-90:90] !Plot the data
!! Z TIC MARKS (uses my attached script, logp_label_tics.jnl)
!
let size = 0.12
let latS = -90
let latN = 90
let plev_tics = zsequence({1000,900,800,700,600,500,400,300,200,100}) !Every 100 hPa
let plev_showtics = zsequence({1,0,0,1,0,1,0,1,0,1}) !Whether to label the tic
let ntics = `plev_tics,return=kend`
repeat/range=1:`plev_ntic`:1/name=kkk (\
define symbol plev = `kkk` ;\
if `plev_tics[k=($plev)] gt zmin` then \
go logp_label_missing `plev_tics[k=($plev)]` `size` `latS` `latN` `plev_showtics[k=($plev)]` (-4) endif ;\
if `plev_tics[k=($plev)] eq zmin` then \
go logp_label_missing `plev_tics[k=($plev)]` `size` `latS` `latN` 1 (-4) "hPa" endif )
> On 2 Mar 2016, at 09:15, Xi Chang <xi.chang01@xxxxxxxxx> wrote:
>
> Hallo,
>
> I have a simple question, I have zonal mean wind (U) data from NCEP,
> and im just wondering how can I change the Z axis in ferret to log-pressure height?
>
> shade/l=1/x=1 U[y=-90:90]
>
> Thanks
>
> Chang