[Thread Prev][Thread Next][Index]
Re: Re: about color key and plot a rectangular
Hi Gao Rongzhen,
On Sun, 16 Jan 2005, Rongzhen Gao wrote:
> Hi, Jaison Kurian,
>
> You did me a big favor. Thanks.
> Why i couldn't find out it in the Ferret user guide.
>
> Question 1: sp rm -f map.gif >>>>i wonder why you add this command
> befor "frame/file=map.gif".
Just like the "cancel var/all" or "cancel data/all" in your script.
If wind.gif is already present in the current directory, then Ferret
will create wind.gif.~1~. So if you issue a rm command before creating
the gif file, always you will get the output file in the name
"wind.gif".
> Question 2: pls see the attached jnl file. when i plot the upper view it
> is ok, but when i plot the upper and lower view together there is a
question. As if the etopo5 data file closed after the first plot by itself,
and when plot the second figure it does not exist. It is so strange!
Have you ever encountered it?
> --------------------------------error massage----------------------------------
> yes? go d:\wind
> Re-defining viewport V11
> **ERROR: unknown data set: D=1
> CONTOUR/FILL/nolabel/nokey/lev=(-10000,0,1000)/pal=bluescale/set rose[d=1]
> Command file, command group, or REPEAT execution aborted
> ----------------------------------
Your first dataset(d=1) is etopo5.cdf. By "go fland 5", the script
fland.jnl (in ferret/go dir) opens etopo5.cdf. Towards the end of
fland.jnl, you can see a line as " cancel data etopo$1"60" ", so
with " go fland 5" it is " cancel data etopo5 ". This is suitable
when you are not using etopo5 dataset as the main data, but in
your case it is, and will get cancelled/closed after the first
"go fland 5" commad. That is why you are getting the above error.
I don't know exactly how get the status of open datasets to ferret
variables so that we can modify the fland.jnl to suit for situations
like this. Anyway you can fix it in any of the following way.
1. use a symbolic link of the etopo5.nc as the main dataset.
(see the attachment, wind_2.jnl) & use "go fland 5"
2. use etopo5 as the main dataset & use some other etopo datasets
like etopo20 or etopo60 for land masking (not recommented)
3. make a copy of ferret/go/fland.jnl to the current directory
in a new name (say flnd.jnl) and comment out the line :
! cancel data etopo$1"60"
then use this new file for masking land ==> "go flnd 5"
>
> Gao Rongzhen
>
Hope this fix the problem.
With Regards
Jaison
>
>
> Hi Gao Rongzhen,
> I made few modifications to your script and is
> working fine for me (on my pc, Fer5.8). Have a trial with the modified
> script (please see the attachment color_key1.jnl).
>
> You can get a box overlayed on your plot in many ways. Two methods are
> illustrated in color_key1.jnl.
>
> 1. use box.jnl
>
> usage : GO box xlo xhi ylo yhi [pen_number]
>
> for details see this file /usr/local/fer5.8/go/box.jnl
>
> this is the most easy method
>
> 2. use plot command
>
> define the corner points and plot it using the qualifiers
>
> /ov/vs/line
>
> Please let me know if you need more explanation.
>
> With Regards
>
> Jaison
>
>
> On Tue, 11 Jan 2005, Rongzhen Gao wrote:
>
> > Hi, All
> >
> > I'm trying to plot topography by fill command, why the color of the shading key is not continuous?
> > Pls look at the attached figure. My problem is why the color from -9000 to -10000 is gray not blue? Is there a way to solve it?
> >
> > My second question is how to plot a rectangular over the Marianas trench? Thanks in advance!
> >
> > Ferret version is 5.5.
> > Gao Rongzhen
> >
> > ---------------------------map.jnl i used-------------------------------------
> > \ cancel mode verify
> > cancel region; cancel data/all;cancel var/all;cancel sym/all
> >
> > def view/xlim=0.05,0.95/ylim=0.2,0.8 v11
> > def sym lon1=105;def sym lon2=165
> > def sym lat1=0; def sym lat2=40
> > def sym dx=10; def sym dy=5
> > def sym pall=bluescale
> > def sym levv=(-10000,0,1000)
> > set window/size=1/aspect=1.294
> >
> > set data etopo5
> > set view v11
> > set region/x=($lon1):($lon2)/y=($lat1):($lat2)
> > fill/nolabel/nokey/lev=($levv)/pal=($pall)/set rose
> > ppl xaxis ($lon1),($lon2),($dx); ppl yaxis ($lat1),($lat2),($dy)
> > ppl labset,,0.16,0.16;ppl axlsze 0.16,0.16;ppl tics .1,.12,.1,.12;ppl axlint 1,1
> > let ylo = ($ppl$yorg);let yhi = ylo + ($ppl$ylen);let xlo = ($ppl$xorg) + ($ppl$xlen) + .2; let xhi = xlo + .2
> > ppl shakey 1, 1, 0.12, 0, 5, 6, `xlo`, `xhi`, `ylo`, `yhi`; ppl fill;ppl shaset reset
> > contour/nolabel/line=2/lev=(-10000,-9000,1000)/over/set rose;ppl contour/over
> > ppl xaxis ($lon1),($lon2),($dx); ppl yaxis ($lat1),($lat2),($dy); ppl labset,,0.16,0.16; ppl axlsze 0.16,0.16;ppl tics .1,.12,.1,.12;ppl axlint 1,1
> > ppl ylab LATITUDE;ppl xlab LONGITUDE;
> > ppl contour
> > go fland 5
> >
> >
> > frame/file=map.gif
> >
>
>
--
___________________________________________________
Jaison Kurian
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3942505
+91-80-3600450
Fax:+91-80-3600865
___________________________________________________
! cancel mode verify
cancel region; cancel data/all ; cancel var/all ; cancel sym/all
! "go fland 5" cancel's dataset etopo5 by default. So use a symbolic
! link to etopo5 instead of the actual dataset. Please modify it
! according to you ferret data directory.
sp ln -s /home/pkgs/fer5.8/fer_dsets/data/etopo5.cdf etopo5_ln.nc
use etopo5_ln.nc
use coads_climatology
def view/xlim=0.05,0.95/ylim=0.50,0.95 v11
def view/xlim=0.05,0.95/ylim=0.05,0.50 v21
set window/size=1/aspect=1.294
def sym lon1=105e ; def sym lon2=165e
def sym lat1=0 ; def sym lat2=30n
def sym dx=10 ; def sym dy=5
def sym pall=bluescale
def sym levv=(-10000,0,1000)
def sym vec_pos=160,32
def sym level3="(0,12,1,-1) dark(0,12,1) pen(0,12,1,1)"
def sym margin1= .2,.2,.2,.2
def sym string1=Mar
def sym string2=Apr
def sym string_pos=109,27,0,0,0.25
go bold
set region/x=($lon1):($lon2)/y=($lat1):($lat2)
set view v11
go margins ($margin1)
fill/nolabel/nokey/lev=($levv)/pal=($pall)/set rose[d=1]
ppl xaxis ($lon1),($lon2),($dx)
ppl yaxis ($lat1),($lat2),($dy)
ppl labset,,0.16,0.16
ppl axlsze 0.16,0.16
ppl tics .1,.12,.1,.12
ppl axlint 1,3
let ylo = ($ppl$yorg);let yhi = ylo + ($ppl$ylen)
let xlo = ($ppl$xorg) + ($ppl$xlen) + .2; let xhi = xlo + .2
ppl shakey 1, 1, 0.12, 0, 5, 6, `xlo`, `xhi`, `ylo`, `yhi`
ppl fill
contour/nolabel/color=5/lev=(-10000,-8000,1000,-3)/over/set rose[d=1]
ppl contour/over
vector/over/set/nolabel/length=10/color=2/L=3 uwnd[d=2],vwnd[d=2]
ppl veckey ($vec_pos)
ppl vector/over
contour/nolabel/lev=($level3)/set/over/L=3 wspd[d=2]
ppl conset 0.12,2
ppl contour/over
go fland 5
label ($string_pos) ($string1)
set view v21
go margins ($margin1)
fill/nolabel/nokey/lev=($levv)/pal=($pall)/set rose[d=1]
ppl xaxis ($lon1),($lon2),($dx)
ppl yaxis ($lat1),($lat2),($dy)
ppl labset,,0.16,0.16 ; ppl axlsze 0.16,0.16
ppl tics .1,.12,.1,.12 ; ppl axlint 1,3
let ylo = ($ppl$yorg);let yhi = ylo + ($ppl$ylen)
let xlo = ($ppl$xorg) + ($ppl$xlen) + .2; let xhi = xlo + .2
ppl shakey 1, 1, 0.12, 0, 5, 6, `xlo`, `xhi`, `ylo`, `yhi`
ppl fill
contour/nolabel/color=5/lev=(-10000,-8000,1000,-3)/over/set rose[d=1]
ppl contour/over
vector/over/set/nolabel/length=10/color=2/L=4 uwnd[d=2],vwnd[d=2]
! ppl veckey ($vec_pos)
ppl vector/over
contour/nolabel/lev=($level3)/set/over/L=4 wspd[d=2]
ppl conset 0.12,2
ppl contour/over
go fland 5
label ($string_pos) ($string2)
sp rm -f wind.gif*
frame/file=wind.gif
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement