climpred.prediction.compute_hindcast¶
- climpred.prediction.compute_hindcast(initialized, verif, metric='pearson_r', comparison='e2o', dim='init', alignment='same_verifs', **metric_kwargs)[source]¶
Verify hindcast predictions against verification data.
- Parameters
initialized (xr.Dataset) – Initialized 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 (xr.Dataset) – 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: maximize the degrees of freedom by slicing
initialized
andverif
to a common time frame at each lead. - same_inits: slice to a commoninit
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.**metric_kwargs (dict) – additional keywords to be passed to metric (see the arguments required for a given metric in Metrics).
- Returns
result (xr.Dataset) – Verification metric over
lead
reduced by dimension(s)dim
.