earthkit.climate.land.standardized_streamflow_index

earthkit.climate.land.standardized_streamflow_index(q: xarray.DataArray | str = 'q', ds: xarray.Dataset | Any = None, *, freq: str | None = 'MS', window: int = 1, dist: str | Any = 'genextreme', method: str = 'ML', fitkwargs: dict | None = None, cal_start: str | None = None, cal_end: str | None = None, params: Any | None = None, **kwargs: Any) Any

Standardized streamflow index (ssi).

Streamflow over a moving window, normalized such that SSI averages to 0 for the calibration data. The window unit X is the minimal time period defined by the resampling frequency.

Units:

  • ssi: dimensionless

This function wraps xclim.indicators.land.standardized_streamflow_index.

Parameters:
  • q (xarray.DataArray | str) – Rate of river discharge.

  • freq (str | None) – Resampling frequency. A monthly or daily frequency is expected. Option None assumes that the desired resampling has already been applied input dataset and will skip the resampling step.

  • window (int) – Averaging window length relative to the resampling frequency. For example, if freq=”MS”, i.e. a monthly resampling, the window is an integer number of months.

  • dist (str | Any) – Name of the univariate distribution, or a callable rv_continuous (see scipy.stats).

  • method (str) – Name of the fitting method, such as ML (maximum likelihood), APP (approximate). The approximate method uses a deterministic function that does not involve any optimization. PWM should be used with a lmoments3 distribution.

  • fitkwargs (dict | None) – Kwargs passed to xclim.indices.stats.fit used to impose values of certain parameters (floc, fscale).

  • cal_start (str | None) – Start date of the calibration period. A DateStr is expected, that is a str in format “YYYY-MM-DD”. Default option None means that the calibration period begins at the start of the input dataset.

  • cal_end (str | None) – End date of the calibration period. A DateStr is expected, that is a str in format “YYYY-MM-DD”. Default option None means that the calibration period finishes at the end of the input dataset.

  • params (Any | None) – Fit parameters. The params can be computed using xclim.indices.stats.standardized_index_fit_params in advance. The output can be given here as input, and it overrides other options.

  • ds (xarray.Dataset | Any) – Input dataset.

  • **kwargs (Any) – Additional keyword arguments.

Returns:

The computed index.

Return type:

Any