[Thread Prev][Thread Next][Index]

[ferret_users] z depth (in meter) to sigma layer



Dear Ferret Users,

As we know, the vertical layer of levitus_climatology data (world ocean data) are provided in meter depth.
Since I am applying a simulation on the sigma coordinate, then I need levitus data in sigma layer for the input file of simulation.
After searching, I couldn't find an appropriate documentation and email archives which discuss about transform a variable from a vertical layer (in meter) into other vertical layer (in sigma coordinate). Most of information that I've found is the reverse thing (transformation from sigma to depth in meter).
Followings is my script to attempt as I mention above, I thought that the mistake command is on the step number 3.
Could you please check these script?
!--Prepare the data in one file: temp, salt, and rose
use levitus_climatology
use etopo60
save/clobber/file="levitus_etopo" temp
save/clobber/file="levitus_etopo"/append temp
save/clobber/file="levitus_etopo"/append rose
can dat/all

!--Transform from a vertical layer (in meter) into other vertical layer (in sigma layer)

! 1. set filedata to be used
use levitus_etopo

! 2. define new axis in vertical (20 layer of sigma layer)
define axis/z=0:1:0.05/units="sigma"/depth znew
!        -->there is always a notification as followings:
!        *** NOTE: (fyi) units are not subject to auto-conversion: SIGMA

! 3. set variable depth on sigma --> rose to depth_on_sigma
let/title="layer in sigma" depth_on_sigma=(rose*z[gz=znew])/z[gz=temp]

! 4. transformation
let temp_dens=zaxreplace(temp,depthonsigma,z[gz=znew])

! 5. check the result (randomize, such as: j=50)
list/j=50 temp_dens
!        ---> error notification as followings:
!        **ERROR: illegal limits: Z limits of data and depth fields must match
I am looking forward for any suggestion about these script.
Thank you very much for the attention and kindly help.

Best wishes,

dessy

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

Privacy Policy | Disclaimer | Accessibility Statement