<div dir="ltr"><div dir="ltr">Dear Sir Dennis,<div><br></div><div>Thank you so much for help (always).</div><div><br></div><div>I have a question about the output of this sample script.</div><div><br></div><div>I am not sure why the masked data only have a few gridpoints compared to the original data overlayed with the shapefile?</div><div><br></div><div>The output of the script is attached to this email.</div><div><br></div><div>I'll appreciate any comment on this.<br><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>Lyndz</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 9:48 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Change:</div><div>   u          = fin->precip(:,:,:)</div><div>To</div><div>   u          = fin->precip(0,:,:)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 5, 2020 at 11:37 AM Lyndz via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="4">Dear NCL-experts,</font></div><div><font size="4"><br></font></div><div><font size="4">I am trying to replicate the mask_9.ncl example but using a new shapefile.</font></div><div><font size="4">When I run the script, I got the following errors:</font></div><div><br></div><div>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><span style="font-size:14px"> </span><font size="1">Copyright (C) 1995-2019 - All Rights Reserved</font></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1"><span> </span>University Corporation for Atmospheric Research</font></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1"><span> </span>NCAR Command Language Version 6.6.2</font></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1"><span> </span>The use of this software is governed by a License Agreement.</font></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1"><span> </span>See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</font></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1">(0)<span style="white-space:pre-wrap">       </span>shapefile_mask_data: Error: not a valid rectilinear, curvilinear, or unstructured grid</font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="1"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="4"><br></font></span></p></div><div><font size="4">Attached are the shapefile and script.</font></div><div><font size="4">The ncdump of the input netcdf file is below:</font></div><div><br></div><div>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1">dimensions:</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>time = UNLIMITED ; // (1 currently)</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>bnds = 2 ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>longitude = 360 ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>latitude = 280 ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1">variables:</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>double time(time) ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>time:standard_name = "time" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>time:bounds = "time_bnds" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>time:units = "days since 1951-1-1 0" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>time:calendar = "standard" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>time:axis = "T" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>double time_bnds(time, bnds) ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>double longitude(longitude) ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>longitude:standard_name = "longitude" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>longitude:long_name = "Longitude" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>longitude:units = "degrees_east" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>longitude:axis = "X" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>double latitude(latitude) ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>latitude:standard_name = "latitude" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>latitude:long_name = "Latitude" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>latitude:units = "degrees_north" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>latitude:axis = "Y" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span>float precip(time, latitude, longitude) ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>precip:long_name = "daily precipitation analysis interpolated onto 0.25deg grids [mm/day]" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>precip:units = "mm/day" ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>precip:_FillValue = -99.9f ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>precip:missing_value = -99.9f ;</font></i></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><i><font size="1"><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">        </span>precip:level_description = "Earth surface" ;</font></i></span></p></div><div><br></div><div>Any advise on how to do this correctly in NCL?</div><div><br></div><div>I'll appreciate any help.</div><div><br></div><div>Sincerely,</div><div>Lyndz</div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div></div>