<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'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 "<a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/smth9_Wrap.shtml" target="_blank">smth_Wrap</a>" 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"><<a href="mailto:andybpenny@hotmail.com" target="_blank">andybpenny@hotmail.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">
<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'm trying to make a hovmoller plot with shading and contours. However, when I set "cres@cnSmoothingOn = True" for the contours, the script will hang when it tries to draw the plot- it doesn't reach the "RIGHT AFTER DRAW PLOT" print statement. The script works
fine when "cres@cnSmoothingOn = False". I'm using NCL version 6.3.0 (ncl_ncarg-6.3.0.Linux_RHEL6.<wbr>4_x86_64_nodap_gcc447.tar.gz). I'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("./<a href="http://test_data.nc" target="_blank">test_data.nc</a>","r")<br>
var = a->var<br>
var_filter = a->var_filter<br>
<br>
;#### Create Workstation ####<br>
plotname = "test"<br>
wks = gsn_open_wks("png", plotname)<br>
<br>
;#### Define Color Map ####<br>
gsn_define_colormap(wks, "ncl_default")<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> = "ExplicitLevels"<br>
cres@cnLineColor <wbr> = "black"<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("RIGHT BEFORE DRAW PLOT")<br>
draw(plot_var)<br>
print("RIGHT AFTER DRAW PLOT")<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>