[ncl-talk] gsn_contour_shade

Rick Brownrigg brownrig at ucar.edu
Thu Jul 19 13:51:40 MDT 2018


Hi Laura,

I don't know with certainty that this works, but you might try:

*gsnContourLineThicknessesScale* This resource, recognized by any gsn
contour <http://ncl.ucar.edu/Document/Graphics/Interfaces/#Contours>
drawing routine, allows you to set line thickness scale factors for all
contour lines. For example, aq value of 2.0 will make the lines twice as
thick. If this is set to an array that is not large enough to handle all
contour lines, then the default value of 1.0 will be used for the remaining
contour lines.

On Thu, Jul 19, 2018 at 12:47 PM, Laura Fowler <laura at ucar.edu> wrote:

> Hi Adam:
> Thanks for your help. Now it did work (see attached plot). Is there a way
> by chance to increase the thickness of the individual lines? Looking at the
> documentation on gsm_csm_shade, it does not seem to be an option, except
> that of increasing the density of lines?
>
> Thanks,
> Laura
>
>
>
> On Thu, Jul 19, 2018 at 12:12 PM, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Laura,
>> Try adding:
>> ores at cnLineLabelsOn = False
>> Adam
>>
>> On Thu, Jul 19, 2018 at 12:09 PM Laura Fowler <laura at ucar.edu> wrote:
>>
>>> Hi Adam:
>>>
>>> Thanks for your help. It did work after switching to gsn_csm_contour. I
>>> followed your suggestion and added separate resources for plot2 to remove
>>> the "mp" warning messages.
>>>
>>> Despite adding the following lines:
>>>
>>> ores at cnFillOn      = False
>>>
>>> ores at cnLinesOn     = False
>>>
>>> ores at cnLevelFlags  = "NoLine"
>>>
>>> ores at cnInfoLabelOn = False
>>>
>>> to my second (ores) set of ressources, I still get labels attached to
>>> the shading. Which additional option do I need to add to remove those extra
>>> labels so that the output looks like the one in overlay.ncl?
>>>
>>> Many thanks,
>>> Laura
>>>
>>>
>>>
>>>
>>> On Thu, Jul 19, 2018 at 11:39 AM, Adam Phillips <asphilli at ucar.edu>
>>> wrote:
>>>
>>>> Hi Laura,
>>>> One can't overlay a plotting type with a map over another plotting
>>>> class with a map. This should work:
>>>> plot  = gsn_csm_contour_map(wks,lwpath_a(:,:,n),res)
>>>> plot2 = gsn_csm_contour(wks,cldtopt_a(:,:,n),res)
>>>> overlay(plot,plot2)
>>>>
>>>> You are getting the various mp* errors as you can't pass mp resources
>>>> to a non-map plotting function, in this case gsn_csm_contour. You should be
>>>> able to safely ignore those messages as everything will still work; NCL is
>>>> just telling you it is ignoring some of your resources. If you would like
>>>> to get rid of the messages though, I would recommend you create a new
>>>> resource list, res2, for your cldtopt_a array that excludes mp resources.
>>>> Hope that helps!
>>>> Adam
>>>>
>>>> On Thu, Jul 19, 2018 at 11:33 AM Laura Fowler <laura at ucar.edu> wrote:
>>>>
>>>>> Hello:
>>>>>
>>>>> I am following the ncl script overlay_5.ncl to overlay shading over a
>>>>> contour plot. see the script test3.ncl in
>>>>>
>>>>> /glade2/scratch2/laura/forNCL
>>>>>
>>>>> first, I plot the cloud liquid water path:
>>>>>
>>>>> plot  = gsn_csm_contour_map(wks,lwpath_a(:,:,n),res)
>>>>>
>>>>> then I would like to overlay shading of the cloud-top temperature with
>>>>> shading for cloud-top temperatures less than 248 or greater than 268.
>>>>>
>>>>> When I use:
>>>>>
>>>>> plot2 = gsn_csm_contour_map(wks,cldtopt_a(:,:,n),res)
>>>>>
>>>>> I get the error message:
>>>>>
>>>>> fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot
>>>>> member
>>>>>
>>>>> When I use gsn_csm_contour(wks,cldtopt_a(:,:,n),res)
>>>>> then I get the messages:
>>>>>
>>>>> warning:mpProjection is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpMinLonF is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpMaxLonF is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpMinLatF is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpMaxLatF is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpCenterLonF is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpShapeMode is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> warning:mpDataBaseVersion is not a valid resource in
>>>>> test3.ceres_aqua.PO.dec2015_contour at this time
>>>>>
>>>>> I am not sure what is going wrong, and would really like a suggestion
>>>>> on how to fix this.
>>>>>
>>>>> Many thanks,
>>>>> Laura
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> !-----------------------------------------------------------
>>>>> --------------------------------------------------
>>>>> Laura D. Fowler
>>>>>
>>>>> Mesoscale and Microscale Meteorology Division (MMM)
>>>>> National Center for Atmospheric Research
>>>>> P.O. Box 3000, Boulder CO 80307-3000
>>>>>
>>>>> e-mail: laura at ucar.edu
>>>>> phone: 303-497-1628
>>>>>
>>>>> !-----------------------------------------------------------
>>>>> --------------------------------------------------
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>
>>>>
>>>> --
>>>> Adam Phillips
>>>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>>>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>>>
>>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>>
>>>
>>>
>>>
>>> --
>>> !-----------------------------------------------------------
>>> --------------------------------------------------
>>> Laura D. Fowler
>>>
>>> Mesoscale and Microscale Meteorology Division (MMM)
>>> National Center for Atmospheric Research
>>> P.O. Box 3000, Boulder CO 80307-3000
>>>
>>> e-mail: laura at ucar.edu
>>> phone: 303-497-1628
>>>
>>> !-----------------------------------------------------------
>>> --------------------------------------------------
>>>
>>
>>
>> --
>> Adam Phillips
>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>>
>
>
>
> --
> !-----------------------------------------------------------
> --------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
> !-----------------------------------------------------------
> --------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180719/25b51548/attachment.html>


More information about the ncl-talk mailing list