hydromt.stats.extremes.fit_extremes#

hydromt.stats.extremes.fit_extremes(da_peaks: DataArray, distribution: str | None = None, ev_type: str = 'BM', criterium: str = 'AIC', time_dim: str = 'time') DataArray[source]#

Return distribution fit from extremes.

Return the fitted parameters of the extreme value distribution based on the lmoments method. If no distribution name is provided distribution=None, the optimal distribution is selected based on criterium from a list of distributions associated with ev_type.

Block maximum distributions: gumbel (“gumb”) and general extreme value (“gev”). Peak over threshold distributions: exponential (“exp”) and general pareto distribution (“gdp”).

Parameters:
  • da_peaks (xr.DataArray) – Timeseries data with only peak values, any other values are set to NaN. The DataArray should contain as coordinate extreme_rates indicating the yearly rate of extreme events. If not provided, this value is set to 1.0

  • distribution ({'gev', 'gpd', 'gumb', 'exp'}, optional) – Short distribution name. If None (default) the optimal distribution is calculated based on criterium

  • ev_type ({"POT", "BM"}) – Peaks over threshold (POT) or block maxima (BM) peaks, by default “BM”

  • criterium ({'AIC', 'AICc', 'BIC'}) – Selection criterium, by default “AIC”

Returns:

Parameters and short name of optimal extreme value distribution.

Return type:

xr.DataArray