uxarray.remap.nearest_neighbor._nearest_neighbor#

uxarray.remap.nearest_neighbor._nearest_neighbor(source_grid, destination_grid, source_data, remap_to='nodes', coord_type='lonlat')#

Nearest Neighbor Remapping between two grids, mapping data that resides on either the corner nodes or face centers on the source grid to the corner nodes or face centers of the destination grid..

Parameters:
  • source_grid (Grid) – Source grid that data is mapped to

  • destination_grid (Grid) – Destination grid to remap data to

  • source_data (np.ndarray) – Data variable to remaps

  • remap_to (str, default="nodes") – Location of where to map data, either “nodes” or “face centers”

Returns:

destination_data – Data mapped to destination grid

Return type:

np.ndarray