hydromt.DataArray.raster.reindex2d#

DataArray.raster.reindex2d(index, dst_nodata=None)#

Return reprojected DataArray object based on simple reindexing.

Use linear indices in index, which can be calculated with nearest_index().

This is typically used to downscale time series data.

Parameters:
  • index (xarray.DataArray of intp) – DataArray with flat indices of source DataArray

  • dst_nodata (int or float, optional) – The nodata value used to initialize the destination; it will remain in all areas not covered by the reprojected source. If None, the source nodata value will be used.

Returns:

da_reproject – The reindexed DataArray.

Return type:

xarray.DataArray