[ncl-talk] Mask 1D station data with shapefile?
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Mon Jul 24 12:43:29 MDT 2017
Meina,
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.
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.
http://www.ncl.ucar.edu/Applications/shapefiles.shtml
--Dave
On Sat, Jul 22, 2017 at 11:57 PM, Meina Wang <mnawang at ucdavis.edu> wrote:
> Dear NCL users,
>
> 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'm
> wondering if there is a way to do this using shapefile in ncl? Any
> suggestion is much appreciated. Thank you.
>
> Best,
> Meina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170724/f2215a5f/attachment.html
More information about the ncl-talk
mailing list