<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Lei,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing the files. I couldn't tell what the problem was, but I suggest using the fairly nwe shapefile_mask_data function instead. It makes your code simpler. This code is provided on the shapefiles examples page, but I'll attach it here, along with a modified version of your script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 11:39 AM, Lei Meng <span dir="ltr"><<a href="mailto:dream916@gmail.com" target="_blank">dream916@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
I attached my shapefile and netcdf data file as well as the original
ncl script. Thanks for your time on this.<br>
<br>
Lei<div><div class="h5"><br>
<div>On 10/27/14, 1:17 PM, Mary Haley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Lei,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">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.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">It would help
if you could also provide the "total_china.shp" and "<a href="http://simple.nc" target="_blank">simple.nc</a>"
data files.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Thanks,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">--Mary</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Oct 24, 2014 at 3:33 PM,
dream916 <span dir="ltr"><<a href="mailto:dream916@gmail.com" target="_blank">dream916@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Dear All,
<div><br>
</div>
<div>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,</div>
<div><br>
</div>
<div>Lei</div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>