[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to mask land in a vertical section plot ?

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


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement