[ncl-talk] using shapefile to mask out values
Mary Haley
haley at ucar.edu
Mon Oct 27 11:17:12 MDT 2014
Lei,
Without knowing anything about your data, or how the China shapefile is
structured, I don't know why you have missing values inside the outline.
Are you getting any errors from running this script? Is the shapefile a
"polygon" shapefile or a "polyline" shapefile? If it is a "polyline"
shapefile, then you may have some areas that aren't fully enclosed, and
hence "gc_inout" won't work properly.
It would help if you could also provide the "total_china.shp" and "simple.nc"
data files.
Thanks,
--Mary
On Fri, Oct 24, 2014 at 3:33 PM, dream916 <dream916 at gmail.com> wrote:
> Dear All,
>
> I tried to use a China shapefile to mask out values outside of China for a
> crop dataset. I found that some values inside were also masked out. I
> attached the screenshot of the shapefile, a pdf file showing the output
> (top) and the original data (bottom), and my ncl code. After masking, some
> pixels inside China were assigned missing value. Any suggestions? Thank you,
>
> Lei
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141027/4d42a2b9/attachment.html
More information about the ncl-talk
mailing list