From: Jeff W. <js...@fa...> - 2005-10-18 12:05:48
|
Jesper Larsen wrote: > On Saturday 15 October 2005 01:10, Jeff Whitaker wrote: > >> Jesper: Since this question has come up a couple of times, I decided to >> cook up an example. First you'll need to download and install the >> natgrid python module (included in CDAT, but I've separated it out from >> the huge tarball and put it at >> ftp://ftp.cdc.noaa.gov/Public/jsw/natgrid.tar.gz). Then try this: >> > > Sounds great. I tried your example and it works fine (though I had to modify > the import nat statement to "from natgrid import nat"). > > The only problem for my application is that I would like the interpolation to > be limited to areas near observations and avoiding extrapolation to areas far > from observations. Is that possible - from the natgrid documentation that > does not seem to be the case? > Jespers: You can tell natgrid to not do any extrapolation outside the convex hull defined by the data points - see test.py in ftp://ftp.cdc.noaa.gov/Public/jsw/natgrid-0.1.tar.gz. In that example I create a masked array that is only defined where there is no extrapolation needed. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |