interpolate a point from an array

From: Ertl, John C CIV 63134 <john.ertl_at_nyahnyahspammersnyahnyah>
Date: Fri, 17 Aug 2007 12:00:41 -0700

I am trying to pull a single interpolated value from a grid (it can be 1D or 2D). I am trying to find the fastest (computation) way but I have not gotten any way in PyNGL to work .
I am going to be using equally spaced weather grids. I am likely going to be needing data from many different parameters for the same interpolated point so speed is something I need to keep in mind.
I have tired: natgrid and linint2_points neither of these worked. What would be the best option.

latI = [0,1,2,3,4]
lonI = [0,1,2,3,4]
Lat = [2.5]
Lon = [2]
grid = Numeric.array(range(25))
value = PyNGL.natgrid(latI,lonI,grid,Lat,Lon)
print "the Value is ", value

# linint2_points
#make a 5x5 array
grid = Numeric.reshape(Numeric.array(range(25)), (5,-1))
value = PyNGL.linint2_points(latI,lonI,grid,False,Lat,Lon,0)
print "the Value is ", value

Thanks for the ideas.
John Ertl

pyngl-talk mailing list
Received on Fri Aug 17 2007 - 13:00:41 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 23 2007 - 10:48:58 MDT