<div dir="ltr">Hi Guido,<div>That does seem odd, and not the behavior that one would expect. One of the NCL developers would have to speak as to if that is the intended graphical outcome. Two possible solutions:</div><div>1 - When the array does not have a max greater than the first contour level, set the array for that timestep to _FillValue</div><div>2 - <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">When the array does not have a max greater than the first contour level, skip the plotting.</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>Demonstration of solution 2:</div><div><div>do time_i=1,dimsizes(time)-1</div><div> ResC@gsnCenterString= "Forecast for "+cd_string(time(time_i), "%d %c. %Y")+" at "+cd_string(time(time_i), "%H:%M")+" UTC"</div><div> wks = gsn_open_wks(wkstype,folder_output+"precip_clouds_"+date_string(time_i))</div><div><br></div><div> plot = gsn_csm_contour_map(wks,clcl(time_i,:,:),ResC)</div><div> if (max(<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">clch(time_i,:,:).ge.ResC3@cnMinLevelValF) then</span></div><div> over_clouds=gsn_csm_contour(wks,clch(time_i,:,:), ResC3)</div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> overlay(plot,over_clouds)</span><br></div><div> end if </div><div> <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> if (max(rain</span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">(time_i,:,:).ge.ResC2@cnLevels(0)) then</span></div><div> over=gsn_csm_contour(wks, rain(time_i,:,:), ResC2)</div><div> overlay(plot,over)</div><div> end if</div><div> draw(plot)</div><div> frame(wks)</div><div>end do</div></div><div><br></div><div>Hope that helps!</div><div>Adam</div><div><br></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 25, 2018 at 1:02 AM Guido Cioni <<a href="mailto:guidocioni@gmail.com">guidocioni@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Bumping up this issue in case it was lost in translation. <br><div><br><blockquote type="cite"><div>On 9. Jul 2018, at 12:13, Guido Cioni <<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>> wrote:</div><br class="m_-5679142311947525788Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space">Dear all,<div>I've been struggling with this problem for a while now, and that led me to believe that I may have discovered a bug or at least an unexpected behaviour.</div><div><br></div><div>Little bit of background. I process NWP model output daily for my website and among the multiple plots that I do with NCL there is one that uses mid- low-level clouds, precip. and snow on the same map. Now, what happens sometimes is that values of either rain or snow are really small or even 0. Although I have fixed explicit levels, this causes the plotting routine to produce the warning </div><div><br></div><div><font face="Menlo">warning:ContourPlotSetValues: Data values out of range of levels set by EXPLICITLEVELS mode</font></div><div><br></div><div>and fill the entire contour area with a single color, as you can see in the animation that I'm attaching. This basically covers everything on the plot, making any interpretation of the results impossible. I think that, even in the case of low values, the entire area should stay transparent...</div><div><br></div><div></div></div><span id="m_-5679142311947525788cid:47EB4A5D-8ACF-488D-B84D-6954CD77166B@mpimet.mpg.de"><output.gif></span><div style="word-wrap:break-word;line-break:after-white-space"><div></div><div><div>Is there any way to fix this?</div><div><br></div><div>I'm attaching an example script. </div><div></div></div></div><span id="m_-5679142311947525788cid:C04AF062-3A46-48B1-8AE8-08075DCA2E7F@mpimet.mpg.de"><plot_rain_clouds_nord.ncl></span><div style="word-wrap:break-word;line-break:after-white-space"><div><div></div><div>Cheers </div><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-5679142311947525788Apple-interchange-newline">Guido Cioni</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista/" target="_blank">http://guidocioni.altervista</a>.org</div>
</div>
<br></div></div></div></blockquote></div><br><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-5679142311947525788Apple-interchange-newline">Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista" target="_blank">http://guidocioni.altervista</a>.org</div>
</div>
<br></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><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><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><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>