Dear Scott & Jeff,

Sorry for the delay in replying, I was off office for a while.

2008/12/9 Scott Sinclair <[EMAIL PROTECTED]>:

> As Jeff noted earlier, the number of elements in an array can't be
> increased simply by reshaping it, so the error message isn't too
> mysterious, if carefully considered.

Sure, I got lost because I tried to follow the solution previously
presented in the posting I referred to, since the example data I
provided are identical in format to that used in that solution (a
3-column space delimited file, with the first two representing the
longitude and latitude, and the 3rd representing the variable of
interest).

> 1. You have a small number of scattered data values in 'grid.dat' with
> their locations specified by lat/lon co-ordinates.
> 2. You want to create a regular square/rectangular grid that spans
> your region of interest and assign the values in 'grid.dat' to the
> grid box in which they fall, with all other regions of the grid being
> masked.
> 3. You then want to plot the masked rectangular grid onto a Basemap instance.

You did understood it very correctly, and of course offered a much
better description than I could provide myself using my pidgin English
:-). Indeed, there is just one detail to add to the above problem
description, and this is the fact that the "region of interest" may
span the entire world (land or sea, depending on the biological
organism under study).

> The attached script shows one way to do this (using the imshow
> method), I've left the task assigning the data values to the correct
> grid box for you..

Thank you very much, I feel somewhat ashamed! Anyway, the final
product of this project will be made freely available under GPL, so it
will belong to everyone (and due credit will be given to all of you
meteorologists, physicists, mathematicians, etc. that have been so
helpful!)

Returning to the techical aspects of the problem, it is indeed the
assignment of data values to the correct grid box that lays in the
core of the second part of my question -- it may indeed be not so
difficult as the previous requirement, that is to build the data file
(with the data values of interest) *before* the grid analysis, from
simple lat-long files for each species under study (usually up to 20,
but may be more). But I will develop this further.

One more detail: is it possible to plot the value of the variable of
interest, corresponding to each square of the grid, inside the
respective square?

With warmest regards,

-- 
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: [EMAIL PROTECTED]
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to