hydromt.model.processes.meteo.resample_time#

hydromt.model.processes.meteo.resample_time(da: DataArray, freq: str | Timedelta, label: str = 'right', closed: str = 'right', upsampling: str = 'bfill', downsampling: str = 'mean', conserve_mass: bool = True) DataArray[source]#

Resample data to destination frequency.

Skip if input data already at output frequency.

Parameters:
  • da (xarray.DataArray) – Input data

  • freq (str, pd.Timedelta) – Output frequency.

  • label ({'left', 'right'}, optional) – Side of each interval to use for labeling. By default ‘right’.

  • closed ({'left', 'right'}, optional) – Side of each interval to treat as closed. By default ‘right’.

  • upsampling (str, optional) – Resampling method if output frequency is higher, lower (resp.) compared to input frequency.

  • downsampling (str, optional) – Resampling method if output frequency is higher, lower (resp.) compared to input frequency.

  • conserve_mass (bool, optional) – If True multiply output with relative change in frequency to conserve mass

Returns:

pet – Resampled data.

Return type:

xarray.DataArray