Re: NARR contour plots

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 19 Mar 2009 15:42:08 -0600

Hi David,
Yes, you should be able to overlay contour plots, NARR (w/2D lats/lons)
or otherwise. Can you send the group the code you are using?

One thing to watch for: Make sure the 2nd plot going into overlay is not
a "_map" plotting function. For instance, if the first plot was created
with this:
plot = gsn_csm_contour_map(wks,data,res)

then the second plot should be created with gsn_csm_contour:
plot2 = gsn_csm_contour(wks,data2,res)
overlay(plot,plot2)

Adam

David Small wrote:
> Thank you for your help. When I try to superimpose two sets of contours
> from NARR data, thickness and sea level pressure, I get the following error:
>
> NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member
>
> I can contour thickness or pressure separately (with or without winds).
> But I can’t lay the contours on top of each other. I’ve been told in
> the past that it is not possible to overlay contours using NARR in NCL.
> Other people have told me it is possible. Is it possible? I really
> need to know because otherwise I will have to switch back to GEMPAK
> (which I don’t want to do).
>
> Thanks again,
> Dave Small
>
> On 3/18/09 11:36 AM, "Mary Haley" <haley_at_ucar.edu> wrote:
>
> Hi Dave,
>
> See example 13 at:
>
> http://www.ncl.ucar.edu/Applications/panel.shtml#ex13
>
> This isn't NARR data, but it shows how to overlay contours and
> vectors on a map.
>
> For NARR data, since you have 2D lat/lon, this example would
> additionally need the special "lon2d" and "lat2d" attributes attached to
> the data, OR, you would need to know the exact map projection that
> your data is on, and set the special "tfDoNDCOverlay" resource
> to True. See the NARR examples for how to use this special resource:
>
> http://www.ncl.ucar.edu/Applications/narr.shtml
>
> Meanwhile, if you don't have the exact map projection, and you want
> to use the 2D lat/lon coords: assumed that the data in the panel 13
> example had 2D lat/lon coordinates called "lat" and "lon" on the
> file. Then, we would do something like this:
>
> a = addfile("uv300.nc","r")
> u = a->U(1,:,:)
> v = a->V(1,:,:)
> speed = sqrt(u^2+v^2)
> u_at_lat2d = a->lat
> u_at_lon2d = a->lon
> v_at_lat2d = u_at_lat2d
> v_at_lon2d = u_at_lon2d
> speed_at_lat2d = u_at_lat2d
> speed_at_lon2d = u_at_lon2d
> Everything else would be the same.
> For the vector plot, if you want wind barbs, set:
> vcres_at_vcGlpyhStyle = "WindBarb"
> --Mary
>
> On Mar 17, 2009, at 8:45 PM, David Small wrote:
>
> Hello everyone,
>
> The NARR dataset uses 2 dimensional latitude and longitude. Is
> it possible to lay several sets of contours over top of one
> another, possibly with vector winds? If so, can someone tell
> me how to do it?
>
> Thank you very much.
>
> Dave
>
> --
> David Small
> Graduate Research Assistant
> Department of Atmospheric and Oceanic Sciences
> McGill University
> Montreal, Quebec, Canada
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> --
> David Small
> Graduate Research Assistant
> Department of Atmospheric and Oceanic Sciences
> McGill University
> Montreal, Quebec, Canada
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 19 2009 - 15:42:08 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 20 2009 - 10:31:52 MDT