climpred.metrics._crpss

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

Continuous Ranked Probability Skill Score.

This can be used to assess whether the ensemble spread is a useful measure for the forecast uncertainty by comparing the CRPS of the ensemble forecast to that of a reference forecast with the desired spread.

CRPSS = 1 - \frac{CRPS_{initialized}}{CRPS_{clim}}

Note

When assuming a Gaussian distribution of forecasts, use default gaussian=True. If not gaussian, you may specify the distribution type, xmin/xmax/tolerance for integration (see xskillscore.crps_quadrature()).

Parameters

Notes

minimum

-∞

maximum

1.0

perfect

1.0

orientation

positive

better than climatology

> 0.0

worse than climatology

< 0.0

References

  • Matheson and Winkler [1976]

  • Gneiting and Raftery [2007]

Example

>>> HindcastEnsemble.verify(
...     metric="crpss", comparison="m2o", alignment="same_inits", dim="member"
... )
<xarray.Dataset>
Dimensions:     (init: 52, lead: 10)
Coordinates:
  * init        (init) object 1954-01-01 00:00:00 ... 2005-01-01 00:00:00
  * lead        (lead) int32 1 2 3 4 5 6 7 8 9 10
    valid_time  (lead, init) object 1955-01-01 00:00:00 ... 2015-01-01 00:00:00
    skill       <U11 'initialized'
Data variables:
    SST         (lead, init) float64 0.2644 0.3636 0.7376 ... 0.7702 0.5126
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  HindcastEnsemble.verify()
    number_of_members:             10
    alignment:                     same_inits
    metric:                        crpss
    comparison:                    m2o
    dim:                           member
    reference:                     []
>>> import scipy
>>> PerfectModelEnsemble.isel(lead=[0, 1]).verify(
...     metric="crpss",
...     comparison="m2m",
...     dim="member",
...     gaussian=False,
...     cdf_or_dist=scipy.stats.norm,
...     xmin=-10,
...     xmax=10,
...     tol=1e-6,
... )  
<xarray.Dataset>
Dimensions:  (init: 12, lead: 2, member: 9)
Coordinates:
  * init     (init) object 3014-01-01 00:00:00 ... 3257-01-01 00:00:00
  * lead     (lead) int64 1 2
  * member   (member) int64 1 2 3 4 5 6 7 8 9
Data variables:
    tos      (lead, init, member) float64 0.9931 0.9932 0.9932 ... 0.9947 0.9947