[Thread Prev][Thread Next][Index]
Re: [ferret_users] Question about using script
Hi Ming,
In addition to the previous replies, I'd like to add that a direct way
to "pipe" a script to Ferret is to use the -script command-line option
ferret -script scriptname.jnl
If there are arguments to the script, they come after the script file name.
Ansley
Ming Yang wrote:
Hi, guys
I would like to read in 4 Netcdf files and plot the time series of
them into a single window. Here is what my script file looks like
#!/bin/ksh -x
ferret<<EOF
set mode metafile
set window/size=2
set data
"/scr/myang/wkdir/Compare//EMIC2.new.CTL/4001-5000/atmym02910-021410.t2m.nc"
set data
"/scr/myang/wkdir/Compare//EMIC4.new.ALB/3001-4000/atmym019910.t2m.nc"
set data
"/scr/myang/wkdir/Compare//EMIC2.new.AP/3001-4000/atmym019910.t2m.nc"
set data
"/scr/myang/wkdir/Compare//EMIC2.new.LGM/4001-5000/atmym020910-021410.t2m.nc"
set viewport ul
plot T2M[d=1,X=0:360@AVE,Y=-90:90@AVE]
set viewport ur
plot T2M[d=2,X=0:360@AVE,Y=-90:90@AVE]
set viewport ll
plot T2M[d=3,X=0:360@AVE,Y=-90:90@AVE]
set viewport lr
plot T2M[d=4,X=0:360@AVE,Y=-90:90@AVE]
exit
EOF
However, after invoking the script file in the unix command line,
I got such kind of response
+ ferret
+ << EOF
NOAA/PMEL TMAP
FERRET v5.81
Linux(g77) 2.4.21-32 - 07/13/05
22-Nov-05 15:53
yes? ,X=0:360@AVE,Y=-90:90@AVE]
**ERROR: command syntax: ,X=0:360@AVE,Y=-90:90@AVE]
yes?
yes? set viewport lr
yes? plot T2M[d=4,X=0:360@AVE,Y=-90:90@AVE]
**ERROR: unknown data set: D=4
yes?
yes?
yes?
yes?
yes? exit
Does any one know what happened? Why the ferret only read in the
last few sentences in my script file? Thank you for your help.
Best,
Ming
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement