Outlining a Mask on Map Projection Plots
Question:
I want to contour a mask which willmatch the grid cells on a plot with a map projection.
Example:

Explanation:
See the FAQ, How can I contour a maskso 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.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-argument contour command. Here are the Ferret commands:
USE monthly_navy_winds SET REGION/L=3/Y=30:90/X=-5:360 ! Overlap in X to fill the entire longitude range ! 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/PAL=rnb2/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