Hi -
It would be helpful if you could include the output of a "show data"
command after opening the dataset. Also, "show grid temp".
I believe that the ROMS model output includes a variable "depth" or
something similar. Is that the variable "h" in your script? What is
cs_r?
You might use Ferret to plot the Z and d_at_sig variables that you
are defining, to see if the definitions do what you think they're
doing.
I also think that these model outputs are typically on a curvilinear
grid. Your script looks as if you want to treat this as if it's on
a rectilinear grid, with that grid being determined by lat_rho[j=1]
and lon_rho[i=1]. Is that what you're doing? You might do well to
leave that step for later, and test what your z-regridding looks
like on the curvilinear grid first.
Finally, let us know what is going wrong. Are you getting error
messages? If so what are they? Or do you see output that looks
wrong?
Ansley
On 7/5/2011 6:11 AM, Mahesh Shinde wrote:
Dear ferret usrs,
I want to convert roms sigma coordinates to zaxis. i write one
script but it does not working well. the script is here
my roms application has 40 sigma levels
cancel data/all
cancel viewport
!SET MODE META
PPL SHASET RESET
set mem/size=5000
use "/home/mahesh/Desktop/rmed16_new_data/avg_rmed16_grd_e_0170.nc"
define axis/z/unit=m/depth
znew={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}
define axis/y/from_data/unit=degree/name=ynew1 lat_rho[i=1]
define axis/x/from_data/unit=degree/name=xnew1 lon_rho[j=1]
define axis/z/from_data/name=zcsr cs_r
let d_at_sig=((z[gz=temp]-z[gz=zcsr])*hc)+(z[gz=zcsr]*h)
let d_at_sig1=d_at_sig+zeta*(1+d_at_sig)/h
let d_at_sig2=-1*d_at_sig1
let temp1=zaxreplace(temp,d_at_sig2,z[gz=znew])
let tem=temp1[gx=xnew1@asn,gy=ynew1@asn]
set var/bad=0.00 tem
save /file=roms_temp.nc
tem
Please tell me where it goes wrong......
Thanks
best regards
Mahesh
--
----------------------------------------------------------------------------------------------------------------------
(Permanent Affiliaiton)
Mr. Mahesh Shinde
Climate and Global
Modeling Division,
Indian Institute of
Tropical Meteorology,
NCL POST, Dr. Homi
Bhabha Road,
Pashan, Pune-411008,
INDIA
email: samurai@xxxxxxxxxxxxxx
cell: +91-9822050959
skype : mshinde2k9
----------------------------------------------------------------------------------------------------------------------
|