climpred.metrics._crpss

climpred.metrics._crpss(forecast, verif, dim=None, **metric_kwargs)[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 crps_quadrature()).

Parameters
  • forecast (xr.object) – Forecast with member dim.

  • verif (xr.object) – Verification data without member dim.

  • dim (list of str) – Dimension to apply metric over. Expects at least member. Other dimensions are passed to xskillscore and averaged.

  • metric_kwargs (dict) –

    optional gaussian (bool, optional): If True, assume Gaussian distribution for

    baseline skill. Defaults to True.

    see crps_ensemble(), crps_gaussian() and crps_quadrature()

Details:

minimum

-∞

maximum

1.0

perfect

1.0

orientation

positive

better than climatology

> 0.0

worse than climatology

< 0.0

Reference:
  • Matheson, James E., and Robert L. Winkler. “Scoring Rules for Continuous Probability Distributions.” Management Science 22, no. 10 (June 1, 1976): 1087–96. https://doi.org/10/cwwt4g.

  • Gneiting, Tilmann, and Adrian E Raftery. “Strictly Proper Scoring Rules, Prediction, and Estimation.” Journal of the American Statistical Association 102, no. 477 (March 1, 2007): 359–78. https://doi.org/10/c6758w.

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
    skill    <U11 'initialized'
Data variables:
    SST      (lead, init) float64 0.2644 0.3636 0.7376 ... 0.7526 0.7702 0.5126
>>> 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

See also