natural_neighbor_to_grid#
- metpy.interpolate.natural_neighbor_to_grid(xp, yp, variable, grid_x, grid_y)#
Generate a natural neighbor interpolation of the given points to a regular grid.
This assigns values to the given grid using the Liang and Hale [Liang2010]. approach.
- Parameters
xp ((P, ) ndarray) – x-coordinates of observations
yp ((P, ) ndarray) – y-coordinates of observations
variable ((P, ) ndarray) – observation values associated with (xp, yp) pairs. IE, variable[i] is a unique observation at (xp[i], yp[i])
grid_x ((M, N) ndarray) – Meshgrid associated with x dimension
grid_y ((M, N) ndarray) – Meshgrid associated with y dimension
- Returns
img ((M, N) ndarray) – Interpolated values on a 2-dimensional grid
See also