[SciPy-User] [SciPy-user] 2d interpolation, non-regular lat/lon grid - help with delauney/natgrid??

John [H2O] washakie at gmail.com
Wed Sep 16 18:28:34 EDT 2009



Robert Kern-2 wrote:
> 
> Ah, yes. griddata() only handles regular grids for some reason, not
> arbitrary interpolation points. You will have to use the underlying
> delaunay package to interpolate arbitrary points. Using your variable
> names:
> 
>         # triangulate data
>         tri = delaunay.Triangulation(x,y)
>         # interpolate data
>         interp = tri.nn_interpolator(z)
>         Z0 = interp(gridx, gridy)
> 
> -- 
> 

I'd like to revive the thread if I may... I'm now able to use the projected
coordinate system and do a regridding using the griddata function. But I
would like to use the Triangulation approach.

Unfortunately, I get the following error after some time:
 terminate called after throwing an instance of 'std::bad_alloc'

Any thoughts on what may be causing this?
-- 
View this message in context: http://www.nabble.com/2d-interpolation%2C-non-regular-lat-lon-grid-tp24909685p25482004.html
Sent from the Scipy-User mailing list archive at Nabble.com.




More information about the SciPy-User mailing list