uxarray.Grid.subset.nearest_neighbor

uxarray.Grid.subset.nearest_neighbor#

Grid.subset.nearest_neighbor(center_coord, k, element='nodes', **kwargs)#

Subsets an unstructured grid by returning the k closest neighbors from a center coordinate.

Parameters:
  • center_coord (tuple, list, np.ndarray) – Longitude and latitude of the center of the bounding circle

  • k (int) – Number of neighbors to query

  • element (str) – Element for use with coords comparison, one of nodes, face centers, or edge centers