<div dir="ltr">I got a different result when I commented out this line:<br><br>mpres@mpFillColors = (/"transparent","transparent","transparent","grey81"/)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 8, 2014 at 2:28 PM, Matthew Fearon <span dir="ltr"><<a href="mailto:Matthew.Fearon@dri.edu" target="_blank">Matthew.Fearon@dri.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div><span style="font-size:10pt">Thanks, Adam for your note, but unfortunately I tried your suggestion with no luck. The inland water bodies remain white. Therefore, I revised my code to NOT use wrf* functions, but I am still struggling with the white inland
water bodies rather than grey. Any ideas what I am missing? I am using wrf_map_resources to set some resources, but it shouldn't overwrite like wrf_map_overlays. Here's my revised script:</span></div>
<div><br>
</div>
<div>
<p>begin</p>
<p><br>
</p>
<p>;type = "ps"</p>
<p>type = "png"</p>
<p><br>
</p>
<p>colors=(/"white","black","grey81","red","green","blue","black"/) </p>
<p><br>
</p>
<p>wks = gsn_open_wks(type,pname+ndt)</p>
<p>gsn_define_colormap(wks,colors) </p>
<p><br>
</p>
<p><br>
</p>
<p>;********************** mpres</p>
<p><br>
</p>
<p>mpres = True</p>
<p>mpres@gsnDraw = False</p>
<p>mpres@gsnFrame = False</p>
<p><br>
</p>
<p>mpres = wrf_map_resources(f,mpres)</p>
<p><br>
</p>
<p>mpres@mpDataBaseVersion = "Ncarg4_1"</p>
<p>mpres@mpDataSetName = "Earth..1"</p>
<p>mpres@mpNationalLineColor = "black"</p>
<p>mpres@mpNationalLineThicknessF = 3.5</p>
<p>mpres@mpGeophysicalLineColor = "black"</p>
<p>mpres@mpGeophysicalLineThicknessF = 3.5</p>
<p>mpres@mpProvincialLineColor = "black"</p>
<p>mpres@mpProvincialLineThicknessF = 3.5</p>
<p>mpres@mpFillOn = True</p>
<p>mpres@mpFillColors = (/"transparent","transparent","transparent","grey81"/)</p>
<p>mpres@mpFillDrawOrder = "PostDraw"</p>
<p>;mpres@mpInlandWaterFillColor = "grey81"</p>
<p>;mpres@mpOceanFillColor = "grey81"</p>
<p>;mpres@mpLandFillColor = "grey81"</p>
<p><br>
</p>
<p>mpres@tfDoNDCOverlay = True</p>
<p>mpres@gsnAddCyclic = False</p>
<p><br>
</p>
<p>mpres@cnLinesOn = False</p>
<p>mpres@cnLineLabelsOn = False</p>
<p>mpres@cnInfoLabelOn = False</p>
<p>mpres@cnFillOn = True</p>
<p>mpres@cnFillMode = "RasterFill"</p>
<p>mpres@cnRasterSmoothingOn = False</p>
<p>mpres@cnMinLevelValF = 0</p>
<p>mpres@cnMaxLevelValF = 3</p>
<p>mpres@cnLevelSpacingF = 1</p>
<p><br>
</p>
<p>mpres@lbLabelBarOn = False</p>
<p>mpres@mpGridLineDashPattern = 2</p>
<p>mpres@tmXBLabelFontHeightF = 0.015</p>
<p>mpres@tmYLLabelFontHeightF = 0.015</p>
<p>mpres@tmXBMajorLengthF = 0.004</p>
<p>mpres@tmXBLabelDeltaF = -0.4</p>
<p>mpres@gsnMaximize = True</p>
<p><br>
</p>
<p><br>
</p>
<p></p>
<p>mplot = gsn_csm_contour_map(wks,vmap,mpres)</p>
<p>draw(mplot)</p>
<p></p>
<p>frame(wks)</p>
<p><br>
</p>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Adam Phillips [<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>]<br>
<b>Sent:</b> Monday, September 08, 2014 8:05 AM<br>
<b>To:</b> Dennis Shea<br>
<b>Cc:</b> Matthew Fearon; ncl-talk; <a href="mailto:wrfhelp@ucar.edu" target="_blank">wrfhelp@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] define infill color for inland water bodies<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Matthew,<br>
</div>
Both Kyle and Dennis are correct in that the wrf* functions can overrule or ignore some resources. However, I have one more combination of resources for you to try. I see that you are color filling your contours and that you'd like the inland lakes to be filled
gray. In order to do this you'd want to draw the map fill last, and set all map fill colors (default, ocean, land) to transparent other than inland water. I am also having you set the contour color fill draw order to "Draw" to further make sure that the map
fill is drawn after the contour color fill.<br>
<br>
Try this:<br>
</div>
; note that you could have set mpLandFillColor, mpOceanFIllColor, etc. instead of<br>
; mpFillColors<br>
</div>
<div>mpres@mpFillColors = (/"transparent","transparent","transparent","grey81"/)<br>
</div>
mpres@mpFillDrawOrder = "PostDraw"<br>
<br>
</div>
var3_res@cnFillDrawOrder = "Draw" ; might not be needed<br>
<div><br>
</div>
<div>If the above combination does not work, then I would follow Dennis' suggestions of either contacting wrf-help or stripping wrf_map_overlays out and modifying it to your own needs.
<br>
</div>
<div>Adam<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Sep 8, 2014 at 7:45 AM, Dennis Shea <span dir="ltr">
<<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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>
<div>
<div>The wrf_* were written by wrfhelp. You should send questions to <a href="mailto:wrfhelp@ucar.edu" target="_blank">
wrfhelp@ucar.edu</a> on all of these functions. You can cc <a href="mailto:ncl-talk@ucar.edu" target="_blank">
ncl-talk@ucar.edu</a><br>
<br>
</div>
As noted, the resources may not be allowed or are overwritten by the wrf code.<br>
</div>
I'd suggest extracting the function from the library, modifying the function and then calling the modified function.<br>
<br>
</div>
Good luck<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Sep 7, 2014 at 11:10 PM, Kyle Griffin <span dir="ltr">
<<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Although I'm not certain, most WRF plotting scripts overwrite many of the more complicated resources. It sounds like these map fill resources are included in the list that they either don't recognize or overwrite.<span><font color="#888888"><br>
<br>
</font></span></p>
<span><font color="#888888">
<p dir="ltr">Kyle</p>
</font></span>
<div>
<div>
<div class="gmail_quote">On Sep 7, 2014 8:27 PM, "Matthew Fearon" <<a href="mailto:Matthew.Fearon@dri.edu" target="_blank">Matthew.Fearon@dri.edu</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Thanks, Kyle, but I'm missing something still. My script is below. The wrf_map_overlays function is perhaps messing up the draw order or recoloring inland water bodies white. Any
ideas?
<div><br>
</div>
<div><br>
</div>
<div>
<p>type = "png"</p>
<p><br>
</p>
<p><span style="font-size:10pt">wks = gsn_open_wks(type,pname+ndt)</span></p>
<p>gsn_define_colormap(wks,"MPL_terrain")</p>
<p>res = True</p>
<p>res@NoHeaderFooter = True </p>
<p><br>
</p>
<p>mpres = True</p>
<p>mpres@mpDataBaseVersion = "Ncarg4_0"</p>
<p>mpres@mpDataSetName = "Earth..1"</p>
<p>mpres@mpNationalLineColor = "black"</p>
<p>mpres@mpNationalLineThicknessF = 2</p>
<p>mpres@mpGeophysicalLineColor = "black"</p>
<p>mpres@mpGeophysicalLineThicknessF = 2</p>
<p>mpres@mpProvincialLineColor = "black"</p>
<p>mpres@mpProvincialLineThicknessF = 3</p>
<p>;mpres@mpFillOn = True</p>
<p>;mpres@mpFillDrawOrder = "PreDraw"</p>
<p>mpres@mpInlandWaterFillColor = "grey81"</p>
<p>mpres@mpOceanFillColor = "grey81"</p>
<p>mpres@mpLandFillColor = "grey81"</p>
<p><br>
</p>
<p>pltres = True</p>
<p><br>
</p>
<p><span style="font-size:10pt">var3_res = res</span></p>
<p>var3_res@ContourParameters = (/ 0, 3, 1 /)</p>
<p>var3_res@cnFillMode = "RasterFill"</p>
<p>var3_res@cnFillOn = True</p>
<p>var3_res@cnRasterSmoothingOn = False</p>
<p>var3_res@cnFillColors = (/"grey81","red","green","blue","black"/)</p>
<p>var3_res@cnFillDrawOrder = "Draw"</p>
<p></p>
<p>con3_var = wrf_contour(f,wks,vmap,var3_res)</p>
<p><br>
</p>
<p><br>
</p>
<p>pltres@CommonTitle = True</p>
<p>pltres@PlotTitle = ndt</p>
<p>plot = wrf_map_overlays(f,wks,(/con3_var/),pltres,mpres)</p>
<p><br>
</p>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:windrunnerxc@gmail.com" target="_blank">
windrunnerxc@gmail.com</a> [<a href="mailto:windrunnerxc@gmail.com" target="_blank">windrunnerxc@gmail.com</a>] on behalf of Kyle Griffin [<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a>]<br>
<b>Sent:</b> Sunday, September 07, 2014 5:33 PM<br>
<b>To:</b> Matthew Fearon; ncl-talk<br>
<b>Subject:</b> Re: [ncl-talk] define infill color for inland water bodies<br>
</font><br>
</div>
<div></div>
<div>
<p dir="ltr">Don't use mpFillColor. Use a combination of mpLandFillColor, mpOceanFillColor, and mpInlandWaterFillColor. These are your desired resources.<br>
</p>
<p dir="ltr">Kyle</p>
<div class="gmail_quote">On Sep 7, 2014 4:56 PM, "Matthew Fearon" <<a href="mailto:Matthew.Fearon@dri.edu" target="_blank">Matthew.Fearon@dri.edu</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Dear NCL Users,
<div><br>
</div>
<div>What is the correct method for filling in inland water bodies with a specified color. Here's the resources I have been experimenting with, but none seem to work, eg, inland lakes are consistently colored white not grey81. Thanks, Matt</div>
<div><br>
</div>
<div><br>
</div>
<div>
<p>mpres = True</p>
<p>;mpres@mpDataBaseVersion = "Ncarg4_0"</p>
<p>;mpres@mpDataSetName = "Earth..4"</p>
<p>mpres@mpNationalLineColor = "black"</p>
<p>mpres@mpNationalLineThicknessF = 2</p>
<p>mpres@mpGeophysicalLineColor = "black"</p>
<p>mpres@mpGeophysicalLineThicknessF = 2</p>
<p>mpres@mpProvincialLineColor = "black"</p>
<p>mpres@mpProvincialLineThicknessF = 3</p>
<p>mpres@mpFillOn = True</p>
<p>mpres@mpMonoFillColor = True</p>
<p>mpres@mpFillColor = "grey81"</p>
<p>mpres@mpFillAreaSpecifiers = "water" ;"inlandwater"</p>
<p>mpres@mpSpecifiedFillColors = "grey81"</p>
</div>
</div>
</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>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</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>
<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><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<br>
-- <br>
<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 Division, 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"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </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>
</font></span></div>
</div>
</div>
</div>
</div>
</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>