[ncl-talk] Masking points based on gsn_csm_contour_map limits

Daniel Adriaansen - NCAR dadriaan at ucar.edu
Tue Feb 6 12:49:22 MST 2018


Hello,

I am plotting a Lambert Conformal map using res at mpLimitMode set to
"Corners". The map limits are configured to zoom in on a subset of the full
domain of the gridded dataset in the x-y dimensions (lat-lon). I am then
calling gsn_csm_contour_map to plot the data.

What I would like to do, is use the "Corners" resources, to create a
polygon so that I can perform statistics on the data only within the view
shown in the map that is drawn by gsn_csm_contour_map. The problem is, I
have not figured out how gsn_csm_contour_map determines what the bounds are
for the domain drawn when using the "Corners" resources.

My first attempt was to create a polygon from the "Corners" resources
(res at mpLeftCornerLonF, res at mpLeftCornerLatF, res at mpRightCornerLonF, and
res at mpRightCornerLatF) and then use gc_inout to identify which points from
the gridded dataset are within the map limits. When I plot the resultant
boolean mask however, the points "inside" the polygon do not directly match
the view shown in the bounding box from gsn_csm_contour_map (see attached
figure, Mask1.png).

The end goal is to make sure the statistics being computed are created from
exactly those grid cells shown within the bounding region created by
gsn_csm_contour_map.

Any suggestions or ideas are appreciated. Thanks!

-Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180206/5ade6091/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mask1.png
Type: image/png
Size: 89421 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180206/5ade6091/attachment.png>


More information about the ncl-talk mailing list