<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Lisi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In general, with the new way of doing color in NCL V6.2.0 and later, we recommend that people use "cnFillPalette" and not "cnFillColors". </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I know this is confusing for people using the wrf_xxx functions, because internally, I think these functions may still be trying to use the old way of doing color.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">A quick fix for you is to try:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div style="font-size:13px"><div style="margin:0px;font-size:11px;font-family:Menlo"><span style="background-color:rgb(230,230,0)">cmap</span> = read_colormap_file("BlWhRe")</div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="background-color:rgb(230,230,0)">cmap</span>_r = <span style="background-color:rgb(230,230,0)">cmap</span>(::-1,:)</div></div><div style="font-size:13px"><br></div><div style="font-size:13px"><div style="margin:0px;font-size:11px;font-family:Menlo"> opts@gsnSpreadColors = False</div><div style="margin:0px;font-size:11px;font-family:Menlo"> opts@cnFillPalette = <span style="background-color:rgb(230,230,0)">cmap</span>_r</div><div style="margin:0px;font-size:11px;font-family:Menlo"> delete(opts@ContourParameters)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> opts@ContourParameters = (/ -150., 150., 10. /)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> contour_pbl_diff = wrf_contour(pbl_irri,wks,pbl_ir-pbl_no,opts)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> plot(2) = wrf_map_overlays(wrf,wks,(/contour_pbl_diff/),pltres,mpres)</div></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">When you use cnFillPalette, this will automatically span the full colormap, unless you set cnSpanFillPalette to False. By also setting gsnSpreadColors to False, this effectively turns off the "old" way of doing color in the internal WRF routines. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 12:06 PM, Lisi Pei <span dir="ltr"><<a href="mailto:lisipei@msu.edu" target="_blank">lisipei@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi There,<div><br></div><div>I tried a couple of hours already on changing the color table in the wrf_contour function. It seems that other than the default color map it is problematic to apply any other color maps.</div><div>What I really want to apply is the symmetrical color tables like BlWhRe. I scaled my data contour parameter as (/-10.,10.,10./) for example to check if this color table displays the white color. It is not. I want to have the white color displaying the 0s in the data, would you show me how? And also the main problem in applying this color table in the wrf_contour is that the offset is significant which means the white color never centers at the 0.</div><div>Part of my codes are here:</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="background-color:#e6e600">cmap</span> = read_colormap_file("BlWhRe")</div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="background-color:#e6e600">cmap</span>_r = <span style="background-color:#e6e600">cmap</span>(::-1,:)</div></div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo"> ;opts@gsnSpreadColors = True</div><div style="margin:0px;font-size:11px;font-family:Menlo"> opts@cnFillColors = <span style="background-color:#e6e600">cmap</span>_r</div><div style="margin:0px;font-size:11px;font-family:Menlo"> delete(opts@ContourParameters)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> opts@ContourParameters = (/ -150., 150., 10. /)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> contour_pbl_diff = wrf_contour(pbl_irri,wks,pbl_ir-pbl_no,opts)</div><div style="margin:0px;font-size:11px;font-family:Menlo"> plot(2) = wrf_map_overlays(wrf,wks,(/contour_pbl_diff/),pltres,mpres)</div></div><div><br></div><div>I even tried subset the BlWhRe to select the range centered at the white color (36:68,37:67,38:66...) but the offset is still there.</div><div><br></div><div>Thanks..</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>L.</div></font></span></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>