Return to Ferret FAQ

Outlining a Mask on Map Projection Plots


Question:

I want to contour a mask which will match the grid cells on a plot with a map projection.

Example:

[Graphic]

Explanation:

See the FAQ, How can I contour a mask so that it matches the grid cells? for an explanation of the technique to contour a mask matching the grid cells on a standard plot.

Solution:

The plot above shows one component of the monthly Navy winds data set, masked by the land-ocean boundary on a 1-by-1 degree grid and displayed in a stereographic_north projection.  The outline of the land mask is overlaid.

The mask outline is computed by the script mp_mask_outline.jnl (part of the distribution of Ferret v5.3). It calls the script mask_outline.jnl and regrids the the mask outline to the grid of the map projection.  We outline the squared off boundaries by contouring the mask with the 3-argument contour command.  Here are the Ferret commands:

USE monthly_navy_winds
SET REGION/L=3/Y=30:90/X=110:250

!   Set up to mask out the winds over land masses.
!   (This could be any mask.)
!   Set the map projection parameters.

USE etopo60
SET grid rose
GO mp_stereographic_north 180 -30
GO mp_aspect

LET ocean_mask = IF rose LT 0 THEN 1 ELSE 0

!  Apply ocean_mask mask out wind data over land
!  Apply mp_mask to plot only the side of the earth facing us
!  (only important with some map projections)

LET masked_vwnd = vwnd[d=1,g=rose[d=2]]* ocean_mask* mp_mask

!  Plot the masked data

SHADE/NOAXIS/TITLE="Monthly Navy VWND masked over land" masked_vwnd, x_page, y_page

!   Call mp_mask_outline to define a contour field with
!   the edges of the land-ocean mask.

GO mp_mask_outline ocean_mask, , , x_page, y_page

!   Overlay the land outline.

mp_ovmo


Last modified: June 13, 2001 404 Not Found

Not Found

The requested URL "/footer.txt" was not found on this server.