|
From: Scott S. <sco...@gm...> - 2011-09-09 12:43:08
|
On 8 September 2011 19:20, Matt Funk <mat...@gm...> wrote: > Hi, > sorry that it has taken me so long to reply. Anyway, i could be wrong, but i > don't think that the code: > xi = np.linspace(llcrnlon,urcrnlon,1000) > yi = np.linspace(llcrnlat,urcrnlat,1000) > > will produce a grid which gives the lat/lon coordinates with 1km spacing. > The reason being is that the distance between 2 lons (say -117.731659 and > -91.303642) is different depending on where you are in terms of the latitude > (i.e. the extreme examples are of course the north pole vs the equator). So > the above gives a regular grid in terms of degrees but not in terms of > distance. Yes, that's correct. You'll need to project your original data locations into a cartesian co-ordinate system before interpolating their values onto a regular grid in that co-ordinate system using griddata et al. You might like to use pyproj (included with the basemap toolkit) to help you project from lat/lon to your chosen co-ordinate system.. Cheers, Scott |