inverse_distance_to_points#

metpy.interpolate.inverse_distance_to_points(points, values, xi, r, gamma=None, kappa=None, min_neighbors=3, kind='cressman')#

Generate an inverse distance weighting interpolation to the given points.

Values are assigned to the given interpolation points based on either [Cressman1959] or [Barnes1964]. The Barnes implementation used here is based on [Koch1983].

Parameters
  • points (array-like, (N, 2)) – Coordinates of the data points.

  • values (array-like, (N,)) – Values of the data points.

  • xi (array-like, (M, 2)) – Points to interpolate the data onto.

  • r (float) – Radius from grid center, within which observations are considered and weighted.

  • gamma (float) – Adjustable smoothing parameter for the barnes interpolation. Default None.

  • kappa (float) – Response parameter for barnes interpolation. Default None.

  • min_neighbors (int) – Minimum number of neighbors needed to perform barnes or cressman interpolation for a point. Default is 3.

  • kind (str) – Specify what inverse distance weighting interpolation to use. Options: ‘cressman’ or ‘barnes’. Default ‘cressman’

Returns

img (numpy.ndarray, (M,)) – Array representing the interpolated values for each input point in xi