mbauer wrote:
> Matplotlib users, I looking to tap your wealth of ideas and experience  
> to help solve a problem I'm working on.
>
> The problem: I have a series of 2d scalar arrays representing a fixed  
> width/height lon/lat box centered on an arbitrary lon/lat. I need to  
> average these composites on a common basis that accommodates the scale  
> changes due to latitude, preferably by shifting everything to a common  
> central lon/lat (a polar/radial distance basis would work too). I want  
> a plot of the end result too and I'm like to do everything with  
> matplotlib and python so that it folds into the rest of my program.
>
> Something similar can be seen at 
> http://www.atmos.washington.edu/~robwood/topic_cyclones.htm
>
> I've been looking at transform_scalar from basemap but I'm not quite  
> sure this is what I should use.
>   
Mike:

transform_scalar does simple bilinear interpolation from a lat/lon grid 
to a regular grid in map projection coordinates. If your map projection 
is just a lat/lon projection, then this amounts to interpolating from 
one lat/lon grid to another.
> If anyone can offer a solution, a point in the right direction, or  
> just wave me off this path I'd be most appreciative.
>   
I'm sure numpy/matplotlib can do what you need to do.   Matplotlib can 
certainly make a plot similar to the one given in your link.  I think 
you question relates more to the processing of your arrays though, and 
not specifically the plotting.  Are all your 2d arrays the same shape 
(the same number of lats and lons)?  Are they just centered on different 
regions?  If so, I think you can just multiply each grid point by the 
cosine of latitude to get the proper area weighting before summing them 
together.  But perhaps I'm missing the essence of your question ....

-Jeff


-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to