hydromt.stats.extremes.eva#
- hydromt.stats.extremes.eva(da: DataArray, ev_type: str = 'BM', min_dist: int = 0, qthresh: float = 0.9, period: str = '365.25D', min_sample_size: int = 0, distribution: str | None = None, rps: ndarray[Any, dtype[int64]] = array([2, 5, 10, 25, 50, 100, 250, 500]), criterium: str = 'AIC') Dataset [source]#
Return Extreme Value Analysis.
Extreme value analysis based on block maxima (BM) or Peaks Over Threshold (POT). The method selects the peaks, fits a distribution and calculates return values for provided return periods.
- Parameters:
da (
xr.DataArray
) – Timeseries data, must have a regular spaced ‘time’ dimension.ev_type (
{"POT", "BM"}
) – Peaks over threshold (POT) or block maxima (BM) peaks, by default “BM”period (
str
, optional) – Period string, by default “365.25D”. See pandas.Timedelta for options.min_dist (
int
, optional) – Minimum distance between peaks measured in time steps, by default 0qthresh (
float
, optional) – Quantile threshold used with peaks over threshold method, by default 0.9min_sample_size (
int
, optional) – Minimum number of finite values in a valid block, by default 0. Peaks of invalid blocks are set to NaN.distribution (
str
, optional) – Short name of distribution. If None (default) the optimal block maxima distribution (“gumb” or “gev” for BM and “exp” or “gpd” for POT) is selected based on criterium.rps (
np.ndarray
, optional) – Array of return periods, by default [2, 5, 10, 25, 50, 100, 250, 500]criterium (
{'AIC', 'AICc', 'BIC'}
) – Selection criterium, by default “AIC”
- Returns:
Dataset with peaks timeseries, distribution name and parameters and return values.
- Return type:
xr.Dataset