<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&#39;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">&lt;<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is a &quot;feature&quot; 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 &lt;<a href="mailto:mnawang@ucdavis.edu">mnawang@ucdavis.edu</a>&gt; wrote:<br>
&gt; Dear Mary,<br>
&gt;<br>
&gt; Thank you for your reply!<br>
&gt;<br>
&gt; I&#39;ve actually used the setting  res@cnFillMode = &quot;RasterFill&quot; in the plotted<br>
&gt; attached but still got the &quot;streaking&quot; over Nevada.  I just tried with<br>
&gt; smooth contour setting (please see attached below) and still got the noise<br>
&gt; there.  I could map out the rest of the region except California, but still<br>
&gt; curious if this could be fixed.  Please let me know if you have any<br>
&gt; suggestions.  Thank you.<br>
&gt;<br>
&gt;<br>
&gt; Best,<br>
&gt; Meina<br>
&gt;<br>
&gt; On Wed, Jul 12, 2017 at 9:52 AM, Mary Haley &lt;<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Meina,<br>
&gt;&gt;<br>
&gt;&gt; The &quot;streaking&quot; that&#39;s occurring I think is because when you plot random<br>
&gt;&gt; data using NCL, it is trying to smooth the data by default, using a<br>
&gt;&gt; non-convex polygon that encloses all your data points.<br>
&gt;&gt;<br>
&gt;&gt; Try drawing raster contours instead, by setting:<br>
&gt;&gt;<br>
&gt;&gt;   res@cnFillMode = &quot;RasterFill&quot;     ; draw raster contours instead of<br>
&gt;&gt; smoothed contours<br>
&gt;&gt;<br>
&gt;&gt; If you want to mask all areas except California, see example mask_8.ncl<br>
&gt;&gt; which is similar:<br>
&gt;&gt;<br>
&gt;&gt; <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>
&gt;&gt;<br>
&gt;&gt; I think in your case you could set:<br>
&gt;&gt;<br>
&gt;&gt;   res@mpDataBaseVersion           = &quot;MediumRes&quot;<br>
&gt;&gt;   res@mpFillAreaSpecifiers        = (/&quot;Land&quot;, &quot;California&quot;,&quot;Water&quot;/)<br>
&gt;&gt;   res@mpSpecifiedFillColors       = (/&quot;white&quot;,&quot;transparent&quot;,&quot;<wbr>white&quot;/)<br>
&gt;&gt;   res@cnFillDrawOrder             = &quot;PreDraw&quot;  ; Make sure map fill<br>
&gt;&gt; happens<br>
&gt;&gt;                                                ; last.<br>
&gt;&gt;<br>
&gt;&gt; I will update the station_1 example to reflect the difference b/w smooth<br>
&gt;&gt; and raster fill.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --Mary<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Jul 11, 2017 at 9:00 PM, Meina Wang &lt;<a href="mailto:mnawang@ucdavis.edu">mnawang@ucdavis.edu</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Dear NCL users:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I ran into a problem when trying to use the function<br>
&gt;&gt;&gt; gsn_csm_contour_map_ce to plot station data (with latitude and longitude).<br>
&gt;&gt;&gt; I followed this example form NCL website and got the figure with &quot;noise&quot;<br>
&gt;&gt;&gt; over region where there is no input data point (over Nevada).  The plot is<br>
&gt;&gt;&gt; attached below, with black dots showing the data points, and color contour<br>
&gt;&gt;&gt; underneath is plotted from gsn_csm_contour_map_ce function, so there is no<br>
&gt;&gt;&gt; data over Nevada, while the function still extrapolate values over there.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Below are the main res setting for plotting station data:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;   res@sfXArray                    = lons<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;   res@sfYArray                    = lats<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;   plot=gsn_csm_contour_map_ce(<wbr>wks,w,res1)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Has any one had this problem before?  Any thoughts or suggestion is much<br>
&gt;&gt;&gt; appreciated!  Thank you.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Best,<br>
&gt;&gt;&gt; Meina<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Meina Wang<br>
&gt;&gt;&gt; PhD candidate in Atmospheric Science<br>
&gt;&gt;&gt; Department of Land, Air and Water Resources<br>
&gt;&gt;&gt; University of California, Davis<br>
&gt;&gt;&gt; Davis, CA 95616<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt; ncl-talk mailing list<br>
&gt;&gt;&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt;&gt;&gt; List instructions, subscriber options, unsubscribe:<br>
&gt;&gt;&gt; <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>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Meina Wang<br>
&gt; PhD candidate in Atmospheric Science<br>
&gt; Department of Land, Air and Water Resources<br>
&gt; University of California, Davis<br>
&gt; Davis, CA 95616<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <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>
&gt;<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>