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 matchself.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 inds
and the dimension(s) given byself.src_descriptor.dims
have been replaced byself.dst_descriptor.dims
.