[ncl-talk] gsn_contour_shade
Adam Phillips
asphilli at ucar.edu
Thu Jul 19 11:39:39 MDT 2018
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180719/9abeb236/attachment.html>
More information about the ncl-talk
mailing list