Outlining a Mask on Map Projection Plots
I want to contour a mask which willmatch the grid cells on a plot with a map projection.
See the FAQ, How can I contour a maskso that it matches the grid cells? for an explanation of the techniqueto contour a mask matching the grid cells on a standard plot.
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 displayedin a stereographic_north projection. The outline of the land maskis overlaid.
The mask outline is computed by the script mp_mask_outline.jnlIt calls the script mask_outline.jnl, both of which are included in the Ferret distribution.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-argumentcontour command. Here are the Ferret commands:
! Set up to mask out the winds over land masses.
! (This could be any mask.)
! Set the map projection parameters
SET grid rose
GO mp_stereographic_north 180 -30
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.