<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi <br>
</p>
No not really. What line in the code is causing it to be included? <br>
My understanding from both these lines is that it starts at zero.<br>
<br>
res@cnLevels = fspan(0,1,10)<br>
...<br>
res@lbLabelStrings = (/"0","0.1","0.2","0.3","0.4",
<div bgcolor="#FFFFFF" text="#000000"><wbr>"0.5","0.6","0.7","0.8","0.9",<wbr>"1"/)<br>
<br>
Mike<br>
</div>
<br>
<br>
<div class="moz-cite-prefix">On 02/08/2017 16:21, Barry Lynn wrote:<br>
</div>
<blockquote
cite="mid:CAN7Bv26E2Vm+ftnhp9V0abcG8vEkwWtsJR3qp+fjo+S+2Q2b+g@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Hi:
<div><br>
</div>
<div>Do you really want to include the < 0 part of your color
bar?</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 2, 2017 at 2:51 PM, Michael
Weston <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mjweston@masdar.ac.ae" target="_blank">mjweston@masdar.ac.ae</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Dear NCL users,<br>
<br>
This question has been asked many times. However, I wonder
if a more elegant solution has been found in the mean
time.<br>
E.g subjects in this group, but these do not answer my
question<br>
<br>
Making zero value white in contour plot (Jake Huff)<br>
Re: Making zero value white in contour plot (Mary Haley)<br>
Re: Making zero value white in contour plot (Dennis Shea)<br>
<br>
I have also tried:<br>
Getting the colour index (<i>get_color_index</i>), setting
the colour index to another colour using <i>NhlSetColor</i><i><br>
</i><br>
I have tried these links<br>
"How to coincide zero with the white color of the colo bar
with uneven numbering"<br>
<a moz-do-not-send="true"
class="m_2480953898124925383moz-txt-link-freetext"
href="http://mailman.ucar.edu/pipermail/ncl-talk/2014-November/001361.html"
target="_blank">http://mailman.ucar.edu/<wbr>pipermail/ncl-talk/2014-<wbr>November/001361.html</a>
<br>
This involves indexing a 256 color palette to the colours
you want in your 16 level map/color bar. <br>
<br>
combined with <br>
<br>
<a moz-do-not-send="true"
class="m_2480953898124925383moz-txt-link-freetext"
href="http://www.ncl.ucar.edu/Document/Functions/Built-in/get_color_index.shtml"
target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>get_color_index.shtml</a><br>
<br>
However, none have really hit the nail on the head despite
my efforts. And I imagine this must be much simpler than
indexing a 256 color scheme.<br>
<br>
What I want: <br>
1. I want to make a map using filled contours, but I want
zero to be represented by white.<br>
I can achieve this by making all zero values missing
values.<br>
2. I want to have a color bar next to my map, with zero
represented by white.<br>
I can not achieve this.<br>
<br>
My map is attached.<br>
As you can see it is beautiful, except, I would like to
get rid of the delightful purple and dark blue in the
color bar. (i.e. first two classes.)<br>
<br>
Is this possible?<br>
<br>
Thanks and regards<br>
Michael<br>
<br>
<br>
general overview of code below<br>
<br>
sfile = addfile(srcFileName,"r")<br>
TMP = sfile->var_index<br>
TMP = where(TMP.ne.0,TMP,TMP@_<wbr>FillValue) ;MAKE
ZERO MISSING<br>
<br>
res@cnFillOn = True<br>
res@cnFillMode = "RasterFill" ; Raster
Mode<br>
res@cnConstFEnableFill = True<br>
res@cnLinesOn = False<br>
res@cnLineLabelsOn = False<br>
<br>
res@cnLevelSelectionMode = "ExplicitLevels"<br>
res@cnLevels = fspan(0,1,10)<br>
cmap = read_colormap_file("<wbr>BlueYellowRed")<br>
res@lbLabelBarOn = True<br>
res@lbLabelStrings =
(/"0","0.1","0.2","0.3","0.4",<wbr>"0.5","0.6","0.7","0.8","0.9",<wbr>"1"/)<br>
res@lbOrientation = "Vertical"<br>
wks = gsn_open_wks("png","ncl_map")<br>
plot = gsn_csm_contour_map(wks,TMP,<wbr>res)<br>
draw(plot)<br>
frame(wks)<br>
delete(wks)<br>
<br>
<div class="m_2480953898124925383moz-signature">-- <br>
<br>
<div class="m_2480953898124925383moz-signature">
<div class="m_2480953898124925383moz-signature"><b>Michael</b><font
face="Arial,sans-serif" color="#1F497D"><b> </b></font><font
face="Arial,sans-serif" color="black"><b>Weston</b></font><font
face="Arial,sans-serif" color="black"><b><br>
</b></font><font face="Arial,sans-serif"
color="black" size="2"><span
style="font-size:10pt">Research Engineer </span></font></div>
<img alt=""
src="cid:part4.18D1EA8F.17583185@masdar.ac.ae"
height="57" width="339"><br>
<br>
<b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif">A
Part of Khalifa University of Science and
Technology<span style="color:#1f497d"></span></span></b>
<p class="MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal">
</p>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"><font
face="Arial,sans-serif" color="#0391BE"
size="2"><span style="font-size:10pt">PO Box
54224, Abu Dhabi, </span></font><font
face="Arial,sans-serif" color="#0391BE"
size="2"><span style="font-size:10pt"><br>
United Arab Emirates</span></font><font
face="Arial,sans-serif" color="#0391BE"
size="2"><span style="font-size:10pt"><br>
Office <a moz-do-not-send="true"
href="tel:+971%202%20810%209510"
value="+97128109510" target="_blank">+971
2 810 9510</a></span></font></span></font></div>
<font face="Arial,sans-serif" color="#0391BE" size="2"><span
style="font-size:10pt"><br>
</span></font>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"><font
face="Arial,sans-serif" color="#0391BE"
size="2"><span style="font-size:10pt">Email </span></font><a
moz-do-not-send="true"
href="mailto:mjweston@masdar.ac.ae"
target="_blank"><font face="Times New
Roman,serif">mjweston@masdar.ac.ae</font></a><font
face="Times New Roman,serif" color="#0391BE">
</font><font face="Times New Roman,serif"
color="black"> </font><font
face="Arial,sans-serif" color="#0391BE"
size="2"><span style="font-size:10pt"></span></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"><font
color="black"> </font><a
moz-do-not-send="true"
href="http://www.masdar.ac.ae/"
target="_blank"><font face="Arial,sans-serif"
size="2"><span style="font-size:10pt">http://www.masdar.ac.ae</span></font></a></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"><font
face="Times New Roman,serif" color="black"
size="3"><span style="font-size:12pt"><b> </b></span></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"> </span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif"
size="2"><span style="font-size:11pt"><font
face="Webdings" color="#0099FF" size="2"><span
style="font-size:10pt"></span></font><font
color="#0099FF" size="2"><span
style="font-size:10pt"> </span></font><font
face="Arial,sans-serif" color="#0099FF"
size="1"><span style="font-size:8pt"><i>Please
consider the environment before printing
this email</i></span></font><font
face="Arial,sans-serif" color="#0099FF"
size="1"><span style="font-size:8pt"><i><br>
</i></span></font><font
face="Arial,sans-serif" color="#0099FF"
size="1"><span style="font-size:8pt"><br>
This transmission is confidential and
intended solely for the person or
organization to whom it is addressed. It may
contain privileged and confidential
information. If you are not the intended
recipient, you should not copy, distribute
or take any action in reliance on it. If you
have received this transmission in error,
please notify us immediately by e-mail at </span></font><font
face="Arial,sans-serif" size="1"><span
style="font-size:8pt"><b><font
color="#0099FF"><a
moz-do-not-send="true"
class="m_2480953898124925383moz-txt-link-abbreviated"
href="mailto:info@masdar.ae"
target="_blank">info@masdar.ae</a></font></b></span></font><font
face="Arial,sans-serif" color="#0099FF"
size="1"><span style="font-size:8pt"><b>.</b>
</span></font></span></font></div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
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>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior 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 moz-do-not-send="true" 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>
US 914 432 3108<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
<br>
<div class="moz-signature">
<div class="moz-signature"><b>Michael</b><font
face="Arial,sans-serif" color="#1F497D"><b> </b></font><font
face="Arial,sans-serif" color="black"><b>Weston</b></font><font
face="Arial,sans-serif" color="black"><b><br>
</b></font><font face="Arial,sans-serif" color="black"
size="2"><span style="font-size:10pt;">Research Engineer </span></font></div>
<img alt="" src="cid:part12.6D933892.A12A30F1@masdar.ac.ae"
height="57" width="339"><br>
<br>
<b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif">A
Part of Khalifa University of Science and Technology<span
style="color:#1F497D"><o:p></o:p></span></span></b>
<p class="MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal">
</p>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"><font face="Arial,sans-serif"
color="#0391BE" size="2"><span style="font-size:10pt;">PO
Box 54224, Abu Dhabi, </span></font><font
face="Arial,sans-serif" color="#0391BE" size="2"><span
style="font-size:10pt;"><br>
United Arab Emirates</span></font><font
face="Arial,sans-serif" color="#0391BE" size="2"><span
style="font-size:10pt;"><br>
Office +971 2 810 9510</span></font></span></font></div>
<font face="Arial,sans-serif" color="#0391BE" size="2"><span
style="font-size:10pt;"><br>
</span></font>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"><font face="Arial,sans-serif"
color="#0391BE" size="2"><span style="font-size:10pt;">Email </span></font><a
href="mailto:mjweston@masdar.ac.ae" target="_blank"><font
face="Times New Roman,serif">mjweston@masdar.ac.ae</font></a><font
face="Times New Roman,serif" color="#0391BE"> </font><font
face="Times New Roman,serif" color="black"> </font><font
face="Arial,sans-serif" color="#0391BE" size="2"><span
style="font-size:10pt;"></span></font></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"><font color="black"> </font><a
href="http://www.masdar.ac.ae/" target="_blank"><font
face="Arial,sans-serif" size="2"><span
style="font-size:10pt;">http://www.masdar.ac.ae</span></font></a></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"><font face="Times New Roman,serif"
color="black" size="3"><span style="font-size:12pt;"><b> </b></span></font></span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"> </span></font></div>
<div style="margin:0;"><font face="Calibri,sans-serif" size="2"><span
style="font-size:11pt;"><font face="Webdings"
color="#0099FF" size="2"><span style="font-size:10pt;"></span></font><font
color="#0099FF" size="2"><span style="font-size:10pt;">
</span></font><font face="Arial,sans-serif"
color="#0099FF" size="1"><span style="font-size:8pt;"><i>Please
consider the environment before printing this email</i></span></font><font
face="Arial,sans-serif" color="#0099FF" size="1"><span
style="font-size:8pt;"><i><br>
</i></span></font><font face="Arial,sans-serif"
color="#0099FF" size="1"><span style="font-size:8pt;"><br>
This transmission is confidential and intended solely
for the person or organization to whom it is
addressed. It may contain privileged and confidential
information. If you are not the intended recipient,
you should not copy, distribute or take any action in
reliance on it. If you have received this transmission
in error, please notify us immediately by e-mail at </span></font><font
face="Arial,sans-serif" size="1"><span
style="font-size:8pt;"><b><font color="#0099FF"><a class="moz-txt-link-abbreviated" href="mailto:info@masdar.ae">info@masdar.ae</a></font></b></span></font><font
face="Arial,sans-serif" color="#0099FF" size="1"><span
style="font-size:8pt;"><b>.</b> </span></font></span></font></div>
</div>
</div>
</body>
</html>