<div dir="ltr"><div class="gmail_default" style="font-size:small"><div class="gmail_default">Hi Andy,</div><div class="gmail_default"><br></div><div class="gmail_default">Thanks for providing a clean script and a data file.</div><div class="gmail_default"><br></div><div class="gmail_default">I was able to verify the problem. I also verified that it has something to do with setting both the smoothing, and a negative dash line pattern. I&#39;ve filed a bug report, NCL-2488.</div><div class="gmail_default"><br></div><div class="gmail_default">Setting cnSmoothingOn to True is causing one of the contours to go haywire (you can see this if you temporarily comment out the setting of gsnDraw and gsnFrame to False), and I think trying to set the pattern for this stray contour is causing the hang. In fact, if you draw the *positive* contours as dashed, it works fine.</div><div class="gmail_default"><br></div><div class="gmail_default">As a work-around, you can use &quot;<a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/smth9_Wrap.shtml" target="_blank">smth_Wrap</a>&quot; to smooth your contours, and then plot this instead of var_filter:<br></div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:12.8px"><p style="font-size:small"> <font face="monospace, monospace"> var_filter_smth = </font><font face="monospace, monospace">smth9_Wrap(var_filter, 0.50, -0.25, False) ; light local smoothing<br></font><span style="font-family:monospace,monospace">  . . .<br></span><span style="font-family:monospace,monospace">  plot_var_filter = </span><span style="font-family:monospace,monospace">gsn_csm_hov</span><span style="font-family:monospace,monospace">(wks, var_filter_smth, cres)</span></p><p style="font-size:small"><font face="arial, helvetica, sans-serif">See the attached modified script and its resultant PNG. You can set the third parameter of smth9_Wrap to vary the smoothing. See the documentation for more info:</font></p><p><font face="arial, helvetica, sans-serif"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/smth9_Wrap.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/smth9_Wrap.shtml</a><br></font></p><p style="font-size:small"><font face="arial, helvetica, sans-serif">--Mary</font></p></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 7, 2016 at 6:47 AM, Andy Penny <span dir="ltr">&lt;<a href="mailto:andybpenny@hotmail.com" target="_blank">andybpenny@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">
Hi there,<br>
<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">
I&#39;m trying to make a hovmoller plot with shading and contours. However, when I set &quot;cres@cnSmoothingOn = True&quot; for the contours, the script will hang when it tries to draw the plot- it doesn&#39;t reach the &quot;RIGHT AFTER DRAW PLOT&quot; print statement. The script works
 fine when &quot;cres@cnSmoothingOn = False&quot;. I&#39;m using NCL version 6.3.0 (ncl_ncarg-6.3.0.Linux_RHEL6.<wbr>4_x86_64_nodap_gcc447.tar.gz). I&#39;ve pasted the script below, and have attached the script and data file.<br>
<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">
Thanks in advance for any help,<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">
Andy<br>
</div>
<br>
-------------<br>
<br>
begin<br>
<br>
  a = addfile(&quot;./<a href="http://test_data.nc" target="_blank">test_data.nc</a>&quot;,&quot;r&quot;)<br>
  var           = a-&gt;var<br>
  var_filter    = a-&gt;var_filter<br>
<br>
;#### Create Workstation ####<br>
  plotname  = &quot;test&quot;<br>
  wks = gsn_open_wks(&quot;png&quot;, plotname)<br>
<br>
;#### Define Color Map ####<br>
  gsn_define_colormap(wks, &quot;ncl_default&quot;)<br>
<br>
;#### Shading Resources ####<br>
  res                           = True<br>
  res@cnFillOn                  = True<br>
  res@cnLinesOn                 = False<br>
  res@cnLineLabelsOn            = False<br>
  res@cnSmoothingOn             = True<br>
  res@gsnDraw                   = False<br>
  res@gsnFrame                  = False<br>
  res@gsnSpreadColors           = True<br>
<br>
;#### Contour Resources ####<br>
  cres                          <wbr>        = res<br>
  cres@cnFillOn                 <wbr>        = False<br>
  cres@<wbr>gsnContourNegLineDashPattern  <wbr>   = 1<br>
  cres@cnLinesOn                <wbr>        = True<br>
  cres@cnSmoothingOn            <wbr>        = True              ; if set to True, plot will not draw<br>
  cres@cnLineLabelsOn           <wbr>        = False<br>
  cres@cnLevelSelectionMode     <wbr>        = &quot;ExplicitLevels&quot;<br>
  cres@cnLineColor              <wbr>        = &quot;black&quot;<br>
  cres@cnInfoLabelOn            <wbr>        = False<br>
  cres@cnLineThicknessF         <wbr>        = 3.0<br>
<br>
;#### Create Plot ####<br>
  plot_var                  = gsn_csm_hov(wks, var, res)<br>
  plot_var_filter           = gsn_csm_hov(wks, var_filter, cres)<br>
  overlay(plot_var,plot_var_<wbr>filter)<br>
 <br>
  print(&quot;RIGHT BEFORE DRAW PLOT&quot;)<br>
  draw(plot_var)<br>
  print(&quot;RIGHT AFTER DRAW PLOT&quot;)<br>
<br>
  frame(wks)<br>
  delete(wks)<br>
<br>
end<br>
<br>
<p></p>
</div>
</div>

<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></blockquote></div><br></div>