wradlib.ipol.get_mapping

Contents

wradlib.ipol.get_mapping#

wradlib.ipol.get_mapping(src, trg, src_coords=None, trg_coords=None, **kwargs)[source]#

Create xarray.Dataset with KDTree indices and distances derived from src and trg.

Parameters:
  • src (xarray.Dataset or xarray.DataArray) – Source data containing spatial coordinates. It should have two dimensions, typically representing x (azimuth, range) and y (azimuth, range).

  • trg (xarray.Dataset or xarray.DataArray) – Target data with spatial coordinates to interpolate. It should also have two dimensions, designated by x and y.

Keyword Arguments:
  • src_coords (dict or Coords, optional) – Mapping from canonical spatial roles to coordinate names in the source object. Keys must include “x” and “y”. For example: {“x”: “lon”, “y”: “lat”}. If None, defaults to {“x”: “x”, “y”: “y”}.

  • trg_coords (dict or Coords, optional) – Mapping from canonical spatial roles to coordinate names in the target object. Keys must include “x” and “y”. If None, defaults to {“x”: “x”, “y”: “y”}.

  • **kwargs (additional keyword arguments) – Additional parameters that may be passed to the KDTree implementation and query.

Returns:

xarray.Dataset – ix - indices dists - distances