climpred.prediction.compute_hindcast¶
- climpred.prediction.compute_hindcast(hind, verif, metric='pearson_r', comparison='e2o', dim='init', alignment='same_verifs', add_attrs=True, **metric_kwargs)[source]¶
Verify hindcast predictions against verification data.
- Parameters
hind (xarray object) – Hindcast ensemble. Expected to follow package conventions: *
init
: dim of initialization dates *lead
: dim of lead time from those initializations Additional dims can be member, lat, lon, depth, …verif (xarray object) – Verification data with some temporal overlap with the hindcast.
metric (str) – Metric used in comparing the decadal prediction ensemble with the verification data. (see
get_metric_class()
and Metrics).comparison (str) –
How to compare the decadal prediction ensemble to the verification data:
e2o : ensemble mean to verification data (Default)
m2o : each member to the verification data
(see Comparisons)
dim (str or list) – dimension to apply metric over. default: ‘init’
alignment (str) – which inits or verification times should be aligned? - maximize/None: maximize the degrees of freedom by slicing
hind
andverif
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.add_attrs (bool) – write climpred compute args to attrs. default: True
**metric_kwargs (dict) – additional keywords to be passed to metric (see the arguments required for a given metric in Metrics).
- Returns
Verification metric over
lead
reduced by dimension(s)dim
.- Return type
result (xarray object)