[Thread Prev][Thread Next][Index]
Re: Masking fields by topography
The GO script attached below is used by us to plot masks for the Levitus
climatologies. A variable MASK is defined in the dataset and made use of
in the script. It works for both horizontal and vertical sections.
D. Shankar Ph. (O): [91](832) 22 6253/4/5/6
Physical Oceanography Division, * 4400/4224
National Institute of Oceanography (R): [91](832) 23 8208
Dona Paula, Fax : [91](832) 22 3340/1360/9102
Goa 403 004, email : shankar@csnio.ren.nic.in
India. shankar@darya.nio.org
_______________________________________________________________________
! NOTE: for a contour plot in the XY plane BELOW the surface, you MUST
! supply the first argument to this GO script.
! usage: GO fland_levitus k=N (where N is the required level)
! or GO fland_levitus z=Z (where Z is the required depth)
! GO fland_levitus (in other cases)
\cancel mode verify
! fland_levitus.jnl - a land mask for the LEVITUS dataset (overlay or "basemap")
! 1/97
! Description: Plot/overlay an an area-filled continental map using LEVITUS mask
! usage: arg1 arg2 arg3 arg4 arg5
! GO fland_levitus [z=lo:hi] [palette] [overlay_style] [x=lo:hi] [y=lo:hi]
! arg1 - depth limits - specify as for any FERRET depth range
! use either k=*:* or z=*:*
! arg2 - palette - may be any palette on your system. Normally solid colors
! like black, gray,red, etc. (see Fpalette '*') default=gray
! arg3 - overlay_style - "basemap", "transparent", or "overlay" (default)
! arg4 - longitude limits - specify as for any FERRET longitude range
! arg5 - latitude limits - specify as for any FERRET latitude range
! examples:
! GO fland_levitus ! default - color gray, overlay
! GO fland_levitus k=1 ! MASK for surface
! GO fland_levitus k=1 red ! palette red.spk, overlay
! GO fland_levitus z=0:1000 red basemap ! color red, basemap
! GO fland_levitus z=1000 gray transparent ! color gray, transparent mask
! GO fland k=1 gray overlay x=30e:100w y=20s:20n
! Note : The transparent option creates a see-through overlay land mask
! check the overlay/basemap/transparent option
query/ignore $3%overlay|overlay|basemap|transparent<3rd argument of GO fland_levitus must be "overlay", "basemap", or "transparent"%
! save data set
set data/save
! save region
define region/default levitus
! set data for MASK
use levitus_mask.nc
set region/l=1
shade/nolab/nokey/levels="(-0.5,0.5,1.0)"$1" |*>/*"/pal=$2"gray"$3"/overlay|basemap> |*>/overlay"$4" |*>/*"$5" |*>/*" $3"MASK|transparent>if mod(i+j,2) eq 0 then MASK|*>MASK"
! cancel MASK data set
cancel data levitus_mask.nc
! restore region
set region levitus
! restore original data set
set data/restore
set mode/last verify
_______________________________________________________________________
On Mon, 23 Nov 1998, David Oxilia wrote:
> Dear Ferreters,
>
> One of the things I've always had trouble doing with ferret is
> masking a field to be plotted as a section (ie, lat or lon vs
> depth) by bottom topography. Say I want to plot a section of
> sigma-0. I read in my data and generate the plot. However, I
> then want to overlay a plot of the bathymetry.
>
> How does one do this?
>
> It is straight forward to simply draw a line plot of depth vs
> latitude say over the sigma-0 field. There is a problem though;
> that is, the line plot simply places a line over the field
> without covering up (in a uniform color) the underlying colored
> field. In essence if there was a means to do "filled curves"
> this would solve the problem. One would say something like:
>
> yes? plot/vs/over/yfilled/nolab/line=1 lat,zb
>
> where the yfilled would instruct to fill the curve down to the
> "y-axis" (defined by the grid) in the color specified by "line".
> Alternatively, if one could mask the field by the topography
> with something like:
>
> yes? let masked_field = if (field_depth lt zb) then field else missing
>
> This would allow one to contour the field with the lower bound
> masked off by the topographic height. One could then plot the
> topography line to make it stand out. This approach limits the
> topography "color" to be white though which is not entirely
> satisfactory.
>
> Any suggestions?
>
> David.
>
> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
> David Oxilia Tel: (541) 737-2368
> COAS:Oregon State University Fax: (541) 737-2064
> Ocean Admin. Bldg. 104 WWW: http://www.oce.orst.edu/po
> Corvallis, OR 97331-5503 Email: oxilia@kundun.oce.orst.edu
> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement