Thank you very much for your solution. Now I am able to give gray color along the land part in my plot.
On Sat, Jul 28, 2012 at 2:16 AM, Ryo Furue
<furue@xxxxxxxxxx> wrote:
Hi Sudev,
> I have a script meant for plotting vertical section of
> temperature. I don't know how to do the land masking using "go
> fland" command or any other similar command. Please see the attached
> figure. Please give me some suggestions how I can do this.
I don't know if there is a simple solution like "go fland"
for vertical sections.
I think of two solutions. One is
yes? set data levitus_climatology
yes? let allmissing = 0/0 + temp !! missing everywhere
yes? cancel MODE NODATA_LAB
yes? shade/y=20S:20N/x=120/nolabel allmissing !! plot the axes
yes? polygon/palette=gray/ov {-20,20,20,-20}, {5000,5000,0,0}
yes? fill/y=20S:20N/x=120/ov temp
(You can copy and paste this script onto your ferret command line to
see what it does.) In this case, you paint the background
with gray and overlay the temperature plot.
The other is
yes? set data levitus_climatology
yes? let mask = ifv temp then 0/0 else 1
yes? fill/y=20S:20N/x=120 temp
yes? shade/y=20S:20N/x=120/palette=gray/ov mask
where you define a variable (mask in this case) that
is defined only where temp is missing. In this case,
the gray area indicates the gridboxes where temp
is missing. The result is similar to what "go fland"
would do if it worked for vertical sections.
The plot is not very pretty in this case because the
vertical resolution of the original data is coarse at
depths.
Regards,
Ryo