[Thread Prev][Thread Next][Index]
Re: what is wrong with my script
On Fri, 2 Apr 2004, du hui wrote:
> Could anyone point out where the trouble is?
>
> USE mm5_lon180.ctrl.nc
> DEFINE AXIS/X=47.5E:177.5E:2.5 xnew
> DEFINE AXIS/Y=22.5N:22.5S:2.5 ynew
>
> FILL/x=xnew/y=ynew/z=200/l=1 unew
> **ERROR: command syntax: xnew
> CONTOUR/FILL/x=xnew/y=ynew/z=200/l=1 unew
> Command file, command group, or REPEAT execution aborted
>
hi du hui,
/x=xnew/y=ynew are not valid arguments for the "fill" or
"contour" commands. If unew is a regridded version of data in
the input file then you need to define that regridding, as
perhaps in this demo
! define an original lat-lon variable on a grid "grd"
def axis/x=160E:200E:1/units=longitude xax
def axis/y=5S:5N:1/units=latitude yax
def grid/x=xax/y=yax grd
let u=x[g=grd]+y[g=grd]
! and fill it
fill u
! now define another grid (same number of points but half spacing)
def axis/x=170E:190E:0.5/units=longitude xax2
def axis/y=2.5S:2.5N:0.5/units=latitude yax2
def grid/x=xax2/y=yax2 grd2
! ... and squeeze the same data into the new grid with "@asn"
let u2=u[g=grd2,gxy=@asn]
! ... then overlay the new variable
fill/o u2
One other thing that might be an issue for you is the data order.
You define the y-axis from north to south, whereas the "usual"
ferret order is (or was) from south to north.
A quick test of the above demo suggests that if I use
! now introduce a reversed order y-axis
def axis/y=2.5N:2.5S:0.5/units=latitude yax3
def grid/x=xax2/y=yax3 grd3
let u3=u[g=grd3,gxy=@asn]
! and overlay the new variable
contour/o u3
It overlays exactly, where I might have expected it to be inverted.
Maybe I'm not thinking it out right, but I would suggest that if
you use "reversed" axes you confirm that you get what you expect.
Good luck,
Mick
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement