Hi -
See this message for more about zaxreplace,
../fu_2002/msg00209.html
The second argument to ZAXREPLACE needs to be the depths that
correspond to the sigma-levels. This is the conversion to the new z
axis. So, something like this would work:
let sig = cs_r
let depz = -4000*sig
let tempn = zaxreplace(temp,depz,z[gz=zdepth])
You were doing something else with the _expression_
cs_r[k=@rsum]-cs_r/2
so you may use a different second argument, but i think this will
get you started.
Ansley
On 9/14/2011 05:08AM, Mahesh Shinde wrote:
Dear ferret users,
I am trying to convert ROMS sigma levels to z depths using following script,
but plot is not generated at required depth giving the message as No Data
Valid.
the script
cancel data/all
cancel viewport
SET MODE META
PPL SHASET RESET
CANCEL MODE logo
use "/home/rmed16_his/his_rmed16_grd_gls_3960.nc"
SET MEMORY/SIZE=50
define axis/z/unit=m/depth
zdepth={0,5,10,20,30,50,75,100,125,150,200,250,300,400,500,600,800,1000,1200,1500,2000,2500,3000,3500,4000}
let depths=cs_r[k=@rsum]-cs_r/2 ! cs_r is at rho points
let tempn=ZAXREPLACE(temp,depths,z[gz=zdepth])
shade/k=5 tempn
*show data
show data
currently SET data sets:
1>
/home/mahesh/Desktop/rmed16_new_data/rmed16_test_tmp/rmed16_his/test1/
his_rmed16_grd_gls_3960.nc (default)
name title I J K L
NTIMES number of long time-steps ... ... ... ...
NDTFAST number of short time-steps ... ... ... ...
DT size of long time-steps ... ... ... ...
DTFAST size of short time-steps ... ... ... ...
DSTART time stamp assigned to model in ... ... ... ...
NHIS number of time-steps between hi ... ... ... ...
NDEFHIS number of time-steps between th ... ... ... ...
NRST number of time-steps between re ... ... ... ...
NTSAVG starting time-step for accumula ... ... ... ...
NAVG number of time-steps between ti ... ... ... ...
NDEFAVG number of time-steps between th ... ... ... ...
NTSDIA starting time-step for accumula ... ... ... ...
NDIA number of time-steps between di ... ... ... ...
NDEFDIA number of time-steps between th ... ... ... ...
NSTA number of time-steps between st ... ... ... ...
FALPHA Power-law shape barotropic filt ... ... ... ...
FBETA Power-law shape barotropic filt ... ... ... ...
FGAMMA Power-law shape barotropic filt ... ... ... ...
NL_TNU2 nonlinear model Laplacian mixin ... ... ... 1:2
NL_VISC2 nonlinear model Laplacian mixin ... ... ... ...
AKT_BAK background vertical mixing coef ... ... ... 1:2
AKV_BAK background vertical mixing coef ... ... ... ...
AKK_BAK background vertical mixing coef ... ... ... ...
AKP_BAK background vertical mixing coef ... ... ... ...
RDRG linear drag coefficient ... ... ... ...
RDRG2 quadratic drag coefficient ... ... ... ...
ZOB bottom roughness ... ... ... ...
ZOS surface roughness ... ... ... ...
GLS_P stability exponent ... ... ... ...
GLS_M turbulent kinetic energy expone ... ... ... ...
GLS_N turbulent length scale exponent ... ... ... ...
GLS_CMU0 stability coefficient ... ... ... ...
GLS_C1 shear production coefficient ... ... ... ...
GLS_C2 dissipation coefficient ... ... ... ...
GLS_C3M buoyancy production coefficient ... ... ... ...
GLS_C3P buoyancy production coefficient ... ... ... ...
GLS_SIGK constant Schmidt number for TKE ... ... ... ...
GLS_SIGP constant Schmidt number for PSI ... ... ... ...
GLS_KMIN minimum value of specific turbu ... ... ... ...
GLS_PMIN minimum Value of dissipation ... ... ... ...
CHARNOK_ALPHA
Charnok factor for surface roug ... ... ... ...
ZOS_HSIG_ALPHA
wave amplitude factor for surfa ... ... ... ...
SZ_ALPHA surface flux from wave dissipat ... ... ... ...
CRGBAN_CW
surface flux due to Craig and B ... ... ... ...
ZNUDG free-surface nudging/relaxation ... ... ... ...
M2NUDG 2D momentum nudging/relaxation ... ... ... ...
M3NUDG 3D momentum nudging/relaxation ... ... ... ...
TNUDG Tracers nudging/relaxation inve ... ... ... 1:2
FSOBC_IN free-surface inflow, nudging in 1:4 ... ... ...
FSOBC_OUT
free-surface outflow, nudging i 1:4 ... ... ...
M2OBC_IN 2D momentum inflow, nudging inv 1:4 ... ... ...
M2OBC_OUT
2D momentum outflow, nudging in 1:4 ... ... ...
TOBC_IN tracers inflow, nudging inverse 1:4 ... ... 1:2
TOBC_OUT tracers outflow, nudging invers 1:4 ... ... 1:2
M3OBC_IN 3D momentum inflow, nudging inv 1:4 ... ... ...
M3OBC_OUT
3D momentum outflow, nudging in 1:4 ... ... ...
RHO0 mean density used in Boussinesq ... ... ... ...
GAMMA2 slipperiness parameter ... ... ... ...
SPHERICAL
grid type logical switch ... ... ... ...
XL domain length in the XI-directi ... ... ... ...
EL domain length in the ETA-direct ... ... ... ...
VTRANSFORM
vertical terrain-following tran ... ... ... ...
VSTRETCHING
vertical terrain-following stre ... ... ... ...
THETA_S S-coordinate surface control pa ... ... ... ...
THETA_B S-coordinate bottom control par ... ... ... ...
TCLINE S-coordinate surface/bottom lay ... ... ... ...
HC S-coordinate parameter, critica ... ... ... ...
CS_R S-coordinate stretching curves ... ... 1:40 ...
CS_W S-coordinate stretching curves ... ... 1:41 ...
H bathymetry at RHO-points 1:940 1:424 ... ...
F Coriolis parameter at RHO-point 1:940 1:424 ... ...
PM curvilinear coordinate metric i 1:940 1:424 ... ...
PN curvilinear coordinate metric i 1:940 1:424 ... ...
LON_RHO longitude of RHO-points 1:940 1:424 ... ...
LAT_RHO latitude of RHO-points 1:940 1:424 ... ...
LON_U longitude of U-points 1:939 1:424 ... ...
LAT_U latitude of U-points 1:939 1:424 ... ...
LON_V longitude of V-points 1:940 1:423 ... ...
LAT_V latitude of V-points 1:940 1:423 ... ...
LON_PSI longitude of PSI-points 1:939 1:423 ... ...
LAT_PSI latitude of PSI-points 1:939 1:423 ... ...
ANGLE angle between XI-axis and EAST 1:940 1:424 ... ...
MASK_RHO mask on RHO-points 1:940 1:424 ... ...
MASK_U mask on U-points 1:939 1:424 ... ...
MASK_V mask on V-points 1:940 1:423 ... ...
MASK_PSI mask on psi-points 1:939 1:423 ... ...
ZETA free-surface 1:940 1:424 ... 1:1
UBAR vertically integrated u-momentu 1:939 1:424 ... 1:1
VBAR vertically integrated v-momentu 1:940 1:423 ... 1:1
U u-momentum component 1:939 1:424 1:40 1:1
V v-momentum component 1:940 1:423 1:40 1:1
TEMP potential temperature 1:940 1:424 1:40 1:1
SALT salinity 1:940 1:424 1:40 1:
so please help.
Thanking you
regards
Mahesh
|