pyremap.remapper.Remapper.remap_numpy

Remapper.remap_numpy(ds, renormalization_threshold=None)[source]

Given a source data set, returns a remapped version of the data set, possibly masked and renormalized.

Parameters:
  • ds (xarray.Dataset or xarray.DataArray) – The dimention(s) along self.sourceDimNames must match self.src_grid_dims read from the mapping file.

  • renormalization_threshold (float, optional) – The minimum weight of a denstination cell after remapping, below which it is masked out, or None for no renormalization and masking.

Returns:

ds_remap (xarray.Dataset or xarray.DataArray) – Returns a remapped data set (or data array) where dimensions other than self.src_descriptor.dims are the same as in ds and the dimension(s) given by self.src_descriptor.dims have been replaced by self.dst_descriptor.dims.