[ncl-talk] define infill color for inland water bodies
Adam Phillips
asphilli at ucar.edu
Mon Sep 8 09:05:51 MDT 2014
Hi Matthew,
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.
Try this:
; note that you could have set mpLandFillColor, mpOceanFIllColor, etc.
instead of
; mpFillColors
mpres at mpFillColors = (/"transparent","transparent","transparent","grey81"/)
mpres at mpFillDrawOrder = "PostDraw"
var3_res at cnFillDrawOrder = "Draw" ; might not be needed
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.
Adam
On Mon, Sep 8, 2014 at 7:45 AM, Dennis Shea <shea at ucar.edu> wrote:
> The wrf_* were written by wrfhelp. You should send questions to
> wrfhelp at ucar.edu on all of these functions. You can cc ncl-talk at ucar.edu
>
> As noted, the resources may not be allowed or are overwritten by the wrf
> code.
> I'd suggest extracting the function from the library, modifying the
> function and then calling the modified function.
>
> Good luck
>
> On Sun, Sep 7, 2014 at 11:10 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:
>
>> 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.
>>
>> Kyle
>> On Sep 7, 2014 8:27 PM, "Matthew Fearon" <Matthew.Fearon at dri.edu> wrote:
>>
>>> 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?
>>>
>>>
>>> type = "png"
>>>
>>>
>>> wks = gsn_open_wks(type,pname+ndt)
>>>
>>> gsn_define_colormap(wks,"MPL_terrain")
>>>
>>> res = True
>>>
>>> res at NoHeaderFooter = True
>>>
>>>
>>> mpres = True
>>>
>>> mpres at mpDataBaseVersion = "Ncarg4_0"
>>>
>>> mpres at mpDataSetName = "Earth..1"
>>>
>>> mpres at mpNationalLineColor = "black"
>>>
>>> mpres at mpNationalLineThicknessF = 2
>>>
>>> mpres at mpGeophysicalLineColor = "black"
>>>
>>> mpres at mpGeophysicalLineThicknessF = 2
>>>
>>> mpres at mpProvincialLineColor = "black"
>>>
>>> mpres at mpProvincialLineThicknessF = 3
>>>
>>> ;mpres at mpFillOn = True
>>>
>>> ;mpres at mpFillDrawOrder = "PreDraw"
>>>
>>> mpres at mpInlandWaterFillColor = "grey81"
>>>
>>> mpres at mpOceanFillColor = "grey81"
>>>
>>> mpres at mpLandFillColor = "grey81"
>>>
>>>
>>> pltres = True
>>>
>>>
>>> var3_res = res
>>>
>>> var3_res at ContourParameters = (/ 0, 3, 1 /)
>>>
>>> var3_res at cnFillMode = "RasterFill"
>>>
>>> var3_res at cnFillOn = True
>>>
>>> var3_res at cnRasterSmoothingOn = False
>>>
>>> var3_res at cnFillColors =
>>> (/"grey81","red","green","blue","black"/)
>>>
>>> var3_res at cnFillDrawOrder = "Draw"
>>>
>>> con3_var = wrf_contour(f,wks,vmap,var3_res)
>>>
>>>
>>>
>>> pltres at CommonTitle = True
>>>
>>> pltres at PlotTitle = ndt
>>>
>>> plot = wrf_map_overlays(f,wks,(/con3_var/),pltres,mpres)
>>>
>>>
>>> ------------------------------
>>> *From:* windrunnerxc at gmail.com [windrunnerxc at gmail.com] on behalf of
>>> Kyle Griffin [ksgriffin2 at wisc.edu]
>>> *Sent:* Sunday, September 07, 2014 5:33 PM
>>> *To:* Matthew Fearon; ncl-talk
>>> *Subject:* Re: [ncl-talk] define infill color for inland water bodies
>>>
>>> Don't use mpFillColor. Use a combination of mpLandFillColor,
>>> mpOceanFillColor, and mpInlandWaterFillColor. These are your desired
>>> resources.
>>>
>>> Kyle
>>> On Sep 7, 2014 4:56 PM, "Matthew Fearon" <Matthew.Fearon at dri.edu> wrote:
>>>
>>>> Dear NCL Users,
>>>>
>>>> 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
>>>>
>>>>
>>>> mpres = True
>>>>
>>>> ;mpres at mpDataBaseVersion = "Ncarg4_0"
>>>>
>>>> ;mpres at mpDataSetName = "Earth..4"
>>>>
>>>> mpres at mpNationalLineColor = "black"
>>>>
>>>> mpres at mpNationalLineThicknessF = 2
>>>>
>>>> mpres at mpGeophysicalLineColor = "black"
>>>>
>>>> mpres at mpGeophysicalLineThicknessF = 2
>>>>
>>>> mpres at mpProvincialLineColor = "black"
>>>>
>>>> mpres at mpProvincialLineThicknessF = 3
>>>>
>>>> mpres at mpFillOn = True
>>>>
>>>> mpres at mpMonoFillColor = True
>>>>
>>>> mpres at mpFillColor = "grey81"
>>>>
>>>> mpres at mpFillAreaSpecifiers = "water" ;"inlandwater"
>>>>
>>>> mpres at mpSpecifiedFillColors = "grey81"
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Division, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140908/5593a17d/attachment.html
More information about the ncl-talk
mailing list