<div dir="ltr">Here's an example.<div><br></div><div>




<span></span>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>cmap := read_</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">color</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">map_file("NCV_rainbow2")</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>cmap := cmap(50:, :)</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>cmap(0,:) = 1. <span class="gmail-Apple-converted-space">  </span>; Make first </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">color</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> white</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:22px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>opts_Prec@cnFillPalette <span class="gmail-Apple-converted-space">    </span>= cmap <span class="gmail-Apple-converted-space">        </span>; set </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">color</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> map</span></p>


<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 7:52 AM Adam Phillips <<a href="mailto:asphilli@ucar.edu">asphilli@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Melissa,<div>If all you want is white to not be the first color in your labelbar, you can read in your colormap using read_colormap_file, and then specify a subset of the colormap (eliminating white) in cnFillPalette. See example #8 here:</div><div><a href="http://www.ncl.ucar.edu/Applications/rgbacolor.shtml#ex8" target="_blank">http://www.ncl.ucar.edu/Applications/rgbacolor.shtml#ex8</a><br></div><div><br></div><div>Hope that helps. If not or if you have further questions please respond to the ncl-talk email list.</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 31, 2018 at 4:06 PM MELISSA KAZEMI RAD <<a href="mailto:mk1369@scarletmail.rutgers.edu" target="_blank">mk1369@scarletmail.rutgers.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi,</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I'm trying to create a panel contour plot of cloud liquid water, and I particularly want to have as many contour levels as possible, i.e. I need to be able to show the smallest amount of cloud water. In order to do so, I've set:</div><div class="gmail_default" style="font-family:georgia,serif">res@ContourParameters = (/0.0, max(qc_plane), 0.01 /)</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">However, the plots that I get don't have any designated color for 0 value.</div><div class="gmail_default" style="font-family:georgia,serif">I use a similar code to produce one such plot (instead of a panel plot), and it works fine, in the sense that I can divide the panel bar to the number of contour levels.<br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Here is my NCL code and the plot that I get: (NCL.6.4.0)<br></div><div class="gmail_default" style="font-family:georgia,serif"><br clear="all"></div>    type = "png"<br><br>   wks = gsn_open_wks(type,"Cloud_panel")<br><br>   times  = wrf_user_list_times(a)<br>   time = 166<br><br>    p    = wrf_user_getvar(a, "pressure", time)    ; Total Pressure<br>    z    = wrf_user_getvar(a,"z",time)<br>    qc   = wrf_user_getvar(a,"QCLOUD", time)<br><br>    qc       = qc*1000.<br>    qc@units = "g/kg"<br><br>    res                          = True<br>    res@NoHeaderFooter           = True<br><br>    pltres                  = True<br>    pltres@PanelPlot        = True<br>    mpres                   = True<br><br>  ; Generate Contours<br><br>    height_levels = (/750., 1000., 1200, 1400./)   ; heigth levels to plot<br>    nlevels         = dimsizes(height_levels)     ; number of height levels<br>    nplots     = 4<br>    plots      = new(nplots,"graphic")<br>    iplot      = 0<br><br>    do level  = 0,nlevels-1<br>       res@cnFillOn            = True<br>       res@cnFillPalette       = "WhViBlGrYeOrRe"<br><div style="font-family:georgia,serif" class="gmail_default">       res@lbLabelBarOn        = False<br>       res@cnLinesOn           = False<br>       res@cnLevelSpacingF     = 0.1<br><br>       height = height_levels(level)<br>       qc_plane = wrf_user_intrp3d(qc,z,"h",height,0.,False)<br><br>       res@ContourParameters = (/0.0, max(qc_plane), 0.01 /)<br><br>       contour = wrf_contour(a,wks,qc_plane,res)<br>       pltres@CommonTitle      = True<br>       pltres@PlotTitle        = height+"m"<br>       plots(iplot) = wrf_map_overlays(a, wks, (/contour/), pltres, mpres)<br>       delete(contour)<br>       iplot = iplot + 1<br>    end do<br><br>  ; Panel the WRF Plots<br>    pnlres                            = True<br>    pnlres@txString                   = qc@description + "  (" + qc@units + ")"+ "at" + " at "+  times(time)<br>    pnlres@gsnPanelYWhiteSpacePercent = 10       ; Add white space b/w plots.<br>    pnlres@gsnPanelLabelBar           = True    ; Turn on common labelbar<br><br>    pnlres@lbLabelAlignment           = "BoxCenters"<br>    pnlres@lbLabelsOn           = True<br>    pnlres@lbPerimOn            = False<br>    pnlres@lbTitleOn            = False</div><div style="font-family:georgia,serif" class="gmail_default"><br></div><div style="font-family:georgia,serif" class="gmail_default">    pnlres@pmLabelBarWidthF           = 0.6<br><br>    gsn_panel(wks,(/plots/),(/2,2/),pnlres)<br><br>end<br></div><br>-- <br><div class="m_6855671812235085374m_-5085423883118115343gmail_signature"><div dir="ltr"><font face="georgia, serif"><i>Melissa Kazemi Rad</i></font><div><font face="georgia, serif"><i>Atmospheric Sciences Department</i></font></div><div><font face="georgia, serif"><i>Rutgers University</i></font></div></div></div>
</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="m_6855671812235085374gmail_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>
_______________________________________________<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">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div></div></div></div></div>