climpred.reference.compute_persistence

climpred.reference.compute_persistence(hind, verif, metric='pearson_r', alignment='same_verifs', add_attrs=True, dim='init', comparison='m2o', **metric_kwargs)[source]

Computes the skill of a persistence forecast from a simulation.

Parameters
  • hind (xarray object) – The initialized ensemble.

  • verif (xarray object) – Verification data.

  • metric (str) – Metric name to apply at each lag for the persistence computation. Default: ‘pearson_r’

  • alignment (str) – which inits or verification times should be aligned? - maximize/None: maximize the degrees of freedom by slicing hind and verif to a common time frame at each lead. - same_inits: slice to a common init frame prior to computing metric. This philosophy follows the thought that each lead should be based on the same set of initializations. - same_verif: slice to a common/consistent verification time frame prior to computing metric. This philosophy follows the thought that each lead should be based on the same set of verification dates.

  • dim (str or list of str) – dimension to apply metric over.

  • add_attrs (bool) – write climpred compute_persistence args to attrs. default: True

  • metric_kwargs (**) – additional keywords to be passed to metric (see the arguments required for a given metric in Metrics).

Returns

Results of persistence forecast with the input metric

applied.

Return type

pers (xarray object)

Reference:
  • Chapter 8 (Short-Term Climate Prediction) in Van den Dool, Huug. Empirical methods in short-term climate prediction. Oxford University Press, 2007.