hydromt.stats.design_events.get_peak_hydrographs#

hydromt.stats.design_events.get_peak_hydrographs(da: DataArray, da_peaks: DataArray, wdw_size: int, n_peaks: int | None = None, normalize: bool = True) DataArray[source]#

Return peak hydrographs.

Return a hydrograph of wdw_size length around each peak in da_peaks with a max value or 1 at the peak. The mean hydrograph can be derived by applying statistics along the ‘peak’ output dimension.

Parameters:
  • da (xr.DataArray) – Timeseries data, must have a regular spaced ‘time’ dimension.

  • da_peaks (xr.DataArray) – Timeseries data with only peak values, all other values are set to NaN

  • wdw_size (int) – Length of hydrographs measured in the time series time step.

  • n_peaks (int, optional) – N largest peaks to return. If None (default) all peaks are returned.

  • normalize (bool, optional) – If True (default) return peak hydrographs normalized by peak value.

Returns:

Hydrographs with new ‘peak’ and ‘dt’ dimensions.

Return type:

xr.DataArray