metpy.interpolate.interpolate_to_points(points, values, xi, interp_type='linear', minimum_neighbors=3, gamma=0.25, kappa_star=5.052, search_radius=None, rbf_func='linear', rbf_smooth=0)[source]#

Interpolate unstructured point data to the given points.

This function interpolates the given values valid at points to the points xi. This is modeled after scipy.interpolate.griddata, but acts as a generalization of it by including the following types of interpolation:

  • Linear

  • Nearest Neighbor

  • Cubic

  • Radial Basis Function

  • Natural Neighbor (2D Only)

  • Barnes (2D Only)

  • Cressman (2D Only)

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

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

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

  • interp_type (str) – What type of interpolation to use. Available options include: 1) “linear”, “nearest”, “cubic”, or “rbf” from scipy.interpolate. 2) “natural_neighbor”, “barnes”, or “cressman” from metpy.interpolate. Default “linear”.

  • minimum_neighbors (int) – Minimum number of neighbors needed to perform Barnes or Cressman interpolation for a point. Default is 3.

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

  • kappa_star (float) – Response parameter for barnes interpolation, specified non-dimensionally in terms of the Nyquist. Default 5.052.

  • search_radius (float) – A search radius to use for the Barnes and Cressman interpolation schemes. If search_radius is not specified, it will default to 5 times the average spacing of observations.

  • rbf_func (str) – Specifies which function to use for Rbf interpolation. Options include: ‘multiquadric’, ‘inverse’, ‘gaussian’, ‘linear’, ‘cubic’, ‘quintic’, and ‘thin_plate’. Default ‘linear’. See scipy.interpolate.Rbf for more information.

  • rbf_smooth (float) – Smoothing value applied to rbf interpolation. Higher values result in more smoothing.


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


This function primarily acts as a wrapper for the individual interpolation routines. The individual functions are also available for direct use.