<div dir="ltr">Meina,<div><br></div><div>Read the geometry data from the shape file.  The geometry data is essentially a set of one or more polygon outlines in lat/lon coordinates.  Now select the polygon that defines your area to mask.  Then use the NCL function gc_inout to determine whether each station is within the masked area.</div><div><br></div><div>Please see NCL example shapefiles_13 for a demonstration of how to read the geometry and apply polygons to select station point data.  That is a general example for a shape file containing multiple features and multiple polygons per feature.  If your shape file contains only one feature or one polygon, you can simplify your program and eliminate one or two of the loops from the example.</div><div><br></div><div>   <a href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml">http://www.ncl.ucar.edu/Applications/shapefiles.shtml</a><br></div><div><br></div><div>--Dave</div><div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 22, 2017 at 11:57 PM, Meina Wang <span dir="ltr">&lt;<a href="mailto:mnawang@ucdavis.edu" target="_blank">mnawang@ucdavis.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Dear NCL users,</div><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">I wanted to use shapefile to mask the station observational data (1D) in the grey area (sample plot attached below), and would like to pick out the station data in the grey area (for calculation purpose later).  I&#39;m wondering if there is a way to do this using shapefile in ncl? Any suggestion is much appreciated.  Thank you.</div><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Best,</div><div style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Meina</div></div></blockquote></div></div></div></div>