[Thread Prev][Thread Next][Index]

trouble with saving 3D data



Hello
 What I am trying to do here is to calculate the atmosphere thickness. I have to
seperate the bottom layer with the rest layers as I have to use the surface
temperature field. So what I did is to calculate the 1st level's height, and
then use a rep/ command to compute the rest of the layers. However, when I save
the file, I always got warnings like
"*** NOTE: Invalid K axis limits ignored: HGT"
and then ferret overwrite my first level's data. Below is my scipt, and I  did
specify the level at each by giving /k=`k`,
but, after running my script in ferret, what I got is the 2nd level's data over
wrote the 1st one, and at the end, at level k=1, I got "invalid data" assigned
to the last level! It seems that Ferret "shifted" the level by one.
How could I avoid this?
Thank for your suggestions.
Muyin

! cal_hgt.jnl
! To compute the height field from Temp based on TOVS analysis
!
can data/all
can region/all
can var/all

use "/home/aegir2/muyin/cdf/tovs_monthly.cdf"
use "/home/aegir2/muyin/cdf/tovs_monthly_crs.cdf"

set mem/size=30

let Rd = 287  !j kg-1s-1
let g = 9.81
!Define z grid with iregular space
define axis/units=mb/z zlevs={50,70,100,300,400,500,600,700,850,900,1000}

!Define 2D grid
define grid/x=temp[d=2]/y=temp[d=2]/t=temp[d=2] g2d

let tm = 0*z[g=g2d]
let p10 = 1*z[g=temp[d=2]]
let hgt = 0*temp[d=2,g=temp[d=2]]

!Compute thickness layer by layer

set region/l=1

let tm = 0.5*(sktemp[d=2]+temp[d=2,k=10])
let/title="Geo Height" hgt = rd *tm*ln(press[d=1]/p10[k=10])/g
save/clob/rigid/file=tovs_hgt_monthly.cdf/llimits=1:228/klimits=1:10/k=10 hgt

rep/k=9:1:-1 (go cal_h_slab.jnl )

!can region/l
!set region/l=2:10

!let tm = 0.5*(sktemp[d=2]+temp[d=2,k=10])
!let/title="Geo Height" hgt = rd *tm*ln(press[d=1]/p10[k=10])/g
!save/app/rigid/file=tovs_hgt_monthly.cdf/llimits=1:228/k=10 hgt

!rep/k=9:1:-1 (go cal_h_slab.jnl)

and cal_h_slab.jnl is like this:

let tm = 0.5*(temp[d=2,k=`k+1`]+temp[d=2,k=`k`])
let/title="Geo Height" hgt = rd/g*tm*ln(p10[k=`k+1`]/p10[k=`k`])
save/app/rigid/file=tovs_hgt_monthly.cdf/llimits=1:228/k=`k` hgt
! cal_hgt.jnl
! To compute the height field from Temp based on TOVS analysis
!
can data/all
can region/all
can var/all

use "/home/aegir2/muyin/cdf/tovs_monthly.cdf"
use "/home/aegir2/muyin/cdf/tovs_monthly_crs.cdf"

set mem/size=30

let Rd = 287  !j kg-1s-1
let g = 9.81
!Define z grid with iregular space
define axis/units=mb/z zlevs={50,70,100,300,400,500,600,700,850,900,1000}

!Define 2D grid
define grid/x=temp[d=2]/y=temp[d=2]/t=temp[d=2] g2d

let tm = 0*z[g=g2d]
let p10 = 1*z[g=temp[d=2]]
let hgt = 0*temp[d=2,g=temp[d=2]]

!Compute thickness layer by layer

set region/l=1

let tm = 0.5*(sktemp[d=2]+temp[d=2,k=10])
let/title="Geo Height" hgt = rd *tm*ln(press[d=1]/p10[k=10])/g
save/clob/rigid/file=tovs_hgt_monthly.cdf/llimits=1:228/klimits=1:10/k=10 hgt

rep/k=9:1:-1 (go cal_h_slab.jnl )

!can region/l
!set region/l=2:10

!let tm = 0.5*(sktemp[d=2]+temp[d=2,k=10])
!let/title="Geo Height" hgt = rd *tm*ln(press[d=1]/p10[k=10])/g
!save/app/rigid/file=tovs_hgt_monthly.cdf/llimits=1:228/k=10 hgt

!rep/k=9:1:-1 (go cal_h_slab.jnl)


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement