climpred.metrics._spread

climpred.metrics._spread(forecast: xarray.Dataset, verif: xarray.Dataset, dim: Optional[Union[str, List[str]]] = None, **metric_kwargs: Any) xarray.Dataset[source]

Ensemble spread taking the standard deviation over the member dimension.

spread = std(f) = \sigma^2(f) = \sqrt\frac{\sum{(f-\overline{f})^2}}{N}

Parameters
  • forecast – Forecast.

  • verif – Verification data (not used).

  • dim – Dimension(s) to perform metric over.

  • metric_kwargs – see std()

Notes

minimum

0.0

maximum

perfect

obs.std()

orientation

negative

Example

>>> HindcastEnsemble.verify(
...     metric="spread",
...     comparison="m2o",
...     alignment="same_verifs",
...     dim=["member", "init"],
... )
<xarray.Dataset>
Dimensions:  (lead: 10)
Coordinates:
  * lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
    skill    <U11 'initialized'
Data variables:
    SST      (lead) float64 0.1468 0.1738 0.1922 0.2096 ... 0.2142 0.2178 0.2098
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  HindcastEnsemble.verify()
    number_of_initializations:     64
    number_of_members:             10
    alignment:                     same_verifs
    metric:                        spread
    comparison:                    m2o
    dim:                           ['member', 'init']
    reference:                     []