climpred.metrics._rank_histogram#

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

Rank histogram or Talagrand diagram.

Parameters
  • forecast – Raw forecasts with member dimension.

  • verif – Verification data without member dim.

  • dim – Dimensions to aggregate. Requires to contain member and at least one additional dimension.

Notes

flat

perfect

slope

biased

u-shaped

overconfident/underdisperive

dome-shaped

underconfident/overdisperive

Example

>>> HindcastEnsemble.verify(
...     metric="rank_histogram",
...     comparison="m2o",
...     dim=["member", "init"],
...     alignment="same_verifs",
... )
<xarray.Dataset>
Dimensions:  (lead: 10, rank: 11)
Coordinates:
  * lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
  * rank     (rank) float64 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0
    skill    <U11 'initialized'
Data variables:
    SST      (lead, rank) int64 12 3 2 1 1 3 1 2 6 5 16 ... 0 1 0 0 3 0 2 6 6 34
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:                        rank_histogram
    comparison:                    m2o
    dim:                           ['member', 'init']
    reference:                     []
>>> PerfectModelEnsemble.verify(
...     metric="rank_histogram", comparison="m2c", dim=["member", "init"]
... )
<xarray.Dataset>
Dimensions:  (lead: 20, rank: 10)
Coordinates:
  * lead     (lead) int64 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  * rank     (rank) float64 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
Data variables:
    tos      (lead, rank) int64 1 4 2 1 2 1 0 0 0 1 2 ... 0 2 0 1 2 1 0 3 1 2 0
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  PerfectModelEnsemble.verify()
    number_of_initializations:     12
    number_of_members:             10
    metric:                        rank_histogram
    comparison:                    m2c
    dim:                           ['member', 'init']
    reference:                     []