<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Dear David,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Thank you for your explanation! I'll mask out the California domain to get rid of the strips.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Best,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><span class="" id=":3pc.1" tabindex="-1" style="">Meina</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 12:14 PM, David Brown <span dir="ltr"><<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is a "feature" of the triangular mesh contouring method (in effect<br>
whenever you use non-gridded data) that it fills the convex hull<br>
(<a href="https://en.wikipedia.org/wiki/Convex_hull" rel="noreferrer" target="_blank">https://en.wikipedia.org/<wbr>wiki/Convex_hull</a>) of your data. The boundary<br>
of California is concave in the region depicted, but the contouring<br>
algorithm has no way to know where this boundary is, and thus the<br>
appearance of drawing outside the lines.<br>
The only way to avoid this is to mask around the borders of<br>
California. There are examples of how to do this on the web site. See<br>
<a href="http://www.ncl.ucar.edu/Applications/mask.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/mask.shtml</a>, particularly<br>
mask_8.ncl or mask_11.ncl.<br>
-dave<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Jul 12, 2017 at 12:26 PM, Meina Wang <<a href="mailto:mnawang@ucdavis.edu">mnawang@ucdavis.edu</a>> wrote:<br>
> Dear Mary,<br>
><br>
> Thank you for your reply!<br>
><br>
> I've actually used the setting res@cnFillMode = "RasterFill" in the plotted<br>
> attached but still got the "streaking" over Nevada. I just tried with<br>
> smooth contour setting (please see attached below) and still got the noise<br>
> there. I could map out the rest of the region except California, but still<br>
> curious if this could be fixed. Please let me know if you have any<br>
> suggestions. Thank you.<br>
><br>
><br>
> Best,<br>
> Meina<br>
><br>
> On Wed, Jul 12, 2017 at 9:52 AM, Mary Haley <<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>> wrote:<br>
>><br>
>> Hi Meina,<br>
>><br>
>> The "streaking" that's occurring I think is because when you plot random<br>
>> data using NCL, it is trying to smooth the data by default, using a<br>
>> non-convex polygon that encloses all your data points.<br>
>><br>
>> Try drawing raster contours instead, by setting:<br>
>><br>
>> res@cnFillMode = "RasterFill" ; draw raster contours instead of<br>
>> smoothed contours<br>
>><br>
>> If you want to mask all areas except California, see example mask_8.ncl<br>
>> which is similar:<br>
>><br>
>> <a href="http://www.ncl.ucar.edu/Applications/mask.shtml#ex8" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/mask.shtml#ex8</a><br>
>><br>
>> I think in your case you could set:<br>
>><br>
>> res@mpDataBaseVersion = "MediumRes"<br>
>> res@mpFillAreaSpecifiers = (/"Land", "California","Water"/)<br>
>> res@mpSpecifiedFillColors = (/"white","transparent","<wbr>white"/)<br>
>> res@cnFillDrawOrder = "PreDraw" ; Make sure map fill<br>
>> happens<br>
>> ; last.<br>
>><br>
>> I will update the station_1 example to reflect the difference b/w smooth<br>
>> and raster fill.<br>
>><br>
>><br>
>> --Mary<br>
>><br>
>><br>
>><br>
>><br>
>> On Tue, Jul 11, 2017 at 9:00 PM, Meina Wang <<a href="mailto:mnawang@ucdavis.edu">mnawang@ucdavis.edu</a>> wrote:<br>
>>><br>
>>> Dear NCL users:<br>
>>><br>
>>> I ran into a problem when trying to use the function<br>
>>> gsn_csm_contour_map_ce to plot station data (with latitude and longitude).<br>
>>> I followed this example form NCL website and got the figure with "noise"<br>
>>> over region where there is no input data point (over Nevada). The plot is<br>
>>> attached below, with black dots showing the data points, and color contour<br>
>>> underneath is plotted from gsn_csm_contour_map_ce function, so there is no<br>
>>> data over Nevada, while the function still extrapolate values over there.<br>
>>><br>
>>> Below are the main res setting for plotting station data:<br>
>>><br>
>>> res@sfXArray = lons<br>
>>><br>
>>> res@sfYArray = lats<br>
>>><br>
>>><br>
>>> plot=gsn_csm_contour_map_ce(<wbr>wks,w,res1)<br>
>>><br>
>>><br>
>>> Has any one had this problem before? Any thoughts or suggestion is much<br>
>>> appreciated! Thank you.<br>
>>><br>
>>> Best,<br>
>>> Meina<br>
>>><br>
>>> --<br>
>>> Meina Wang<br>
>>> PhD candidate in Atmospheric Science<br>
>>> Department of Land, Air and Water Resources<br>
>>> University of California, Davis<br>
>>> Davis, CA 95616<br>
>>><br>
>>> ______________________________<wbr>_________________<br>
>>> ncl-talk mailing list<br>
>>> <a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
>>><br>
>><br>
><br>
><br>
><br>
> --<br>
> Meina Wang<br>
> PhD candidate in Atmospheric Science<br>
> Department of Land, Air and Water Resources<br>
> University of California, Davis<br>
> Davis, CA 95616<br>
><br>
> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Meina Wang</font><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">PhD candidate in Atmospheric Science</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Department of Land, Air and Water Resources</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">University of California, Davis</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Davis, CA 95616</font></div></div></div></div></div>
</div>