Re: wmbarb not working with Lambert Conformal projection

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 08 2011 - 13:21:08 MDT

Hi Antti,
A better question would be why does wmbarb work at all when overlaid on
a map, non-lambert or otherwise? From the documentation:

If you want to draw wind barbs over a map that are defined on gridded
data, then you could use a vector plot with vcGlyphStyle set to
"WindBarb". If you want to draw wind barbs over a map that are defined
on non-gridded data, then use wmbarbmap.

I guess it doesn't explicitly say that wmbarb will not work when
overlaid on a map, but it does point you to using wmbarbmap for your
particular situation.. Adam

On 04/08/2011 01:00 PM, antti.pessi@vaisala.com wrote:
> Hi Adam,
>
> Yes, that is exactly what I was after. That solved the problem (but
> still wondering why wmbarb did work with a non-Lambert map?)
>
> Thanks a lot,
> Antti
>
> -----Original Message-----
> From: ncl-talk-bounces@ucar.edu [mailto:ncl-talk-bounces@ucar.edu] On
> Behalf Of Adam Phillips
> Sent: Friday, April 08, 2011 12:07 PM
> To: ncl-talk@ucar.edu
> Subject: Re: wmbarb not working with Lambert Conformal
> projection
>
> Hi Antti,
> I ran the script you downloaded to our ftp site, and got it to work by
> using wmbarbmap. (You do want to use wmbarbmap as opposed to wmbarb when
>
> drawing wind barbs over a map.)
>
> The key is, wmbarb's inputs are (wks,x,y,...) while wmbarbmap's inputs
> are (wks,lat,lon,...)
>
> Thus when I changed this:
> wmbarb(wks, lon, lat, u, v)
> to this:
> wmbarbmap(wks, lat, lon, u, v)
>
> I got the attached plot. Hopefully this is what you were after.. Adam
>
> On 04/06/2011 05:55 PM, antti.pessi@vaisala.com wrote:
>> Rick,
>>
>> Good catch, but I checked the "Lov" values and they are the same in
> both
>> variables lat2d and lon2d. So the problem is still there...
>>
>> Antti
>>
>>
> ------------------------------------------------------------------------
>>
>> *From:*Rick Brownrigg [mailto:brownrig@ucar.edu]
>> *Sent:* Tuesday, April 05, 2011 1:47 PM
>> *To:* Pessi Antti ANPE
>> *Cc:* ncl-talk@ucar.edu
>> *Subject:* Re: [ncl-talk] wmbarb not working with Lambert Conformal
>> projection
>>
>> Hi,
>>
>> A central meridian in the Lambert projection is a line of constant
>> *longitude*. The assignment below suggests its being set to a value of
>> latitude -- is this perhaps the issue?
>>
>> Rick
>>
>> On Apr 5, 2011, at 11:51 AM, antti.pessi@vaisala.com
>> <mailto:antti.pessi@vaisala.com> wrote:
>>
>>
>>
>> Hello,
>>
>> I'm trying to plot observed wind barbs using wmbarb on a gridded model
>> map. My map resources are following:
>>
>> res1@mpProjection = "LambertConformal"
>>
>> res1@mpLambertParallel1F = lat2d@Latin1
>>
>> res1@mpLambertParallel2F = lat2d@Latin2
>>
>> res1@mpLambertMeridianF = lat2d@Lov
>>
>> res1@mpLimitMode = "Corners"
>>
>> res1@mpLeftCornerLatF = lat2d@corners(0)
>>
>> res1@mpLeftCornerLonF = lon2d@corners(0)
>>
>> res1@mpRightCornerLatF = lat2d@corners(2)
>>
>> res1@mpRightCornerLonF = lon2d@corners(2)
>>
>> res1@tfDoNDCOverlay = True
>>
>> If I comment out the first four lines, the wmbarb works just fine and
>> plots the barbs correctly. However, that way I get a distorted map
> with
>> straight latitude and longitude lines. If I run the code as above,
>> wmbarb doesn't plot anything. I tried wmbarbmap as well but that
> didn't
>> work either.
>>
>> Are there some settings that would make the wmbarb to work with
> Lambert
>> projection?
>>
>> Thanks,
>>
>> Antti Pessi
>>
>> _______________________________________________
>> 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 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         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 Sat Apr 9 05:21:14 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 19 2011 - 18:32:03 MDT