climpred.bootstrap.bootstrap_hindcast¶
-
climpred.bootstrap.
bootstrap_hindcast
(hind, hist, verif, alignment='same_verifs', metric='pearson_r', comparison='e2o', dim='init', resample_dim='member', sig=95, iterations=500, pers_sig=None, reference_compute=<function compute_persistence>, **metric_kwargs)[source]¶ - Bootstrap compute with replacement. Wrapper of
- py:func:bootstrap_compute for hindcasts.
Parameters: - hind (xr.Dataset) – prediction ensemble.
- verif (xr.Dataset) – Verification data.
- hist (xr.Dataset) – historical/uninitialized simulation.
- metric (str) – metric. Defaults to ‘pearson_r’.
- comparison (str) – comparison. Defaults to ‘e2o’.
- dim (str) – dimension to apply metric over. default: ‘init’.
- resample_dim (str or list) –
dimension to resample from. default: ‘member’.
- ’member’: select a different set of members from hind
- ’init’: select a different set of initializations from hind
- sig (int) – Significance level for uninitialized and initialized skill. Defaults to 95.
- pers_sig (int) – Significance level for persistence skill confidence levels. Defaults to sig.
- iterations (int) – number of resampling iterations (bootstrap with replacement). Defaults to 500.
- reference_compute (func) – function to compute a reference forecast skill with.
Default:
climpred.prediction.compute_persistence()
. - metric_kwargs (**) – additional keywords to be passed to metric (see the arguments required for a given metric in Metrics).
Returns: - (xr.Dataset): bootstrapped results for the three different kinds of
predictions:
- init for the initialized hindcast hind and describes skill due to
initialization and external forcing
- uninit for the uninitialized historical hist and approximates skill
from external forcing
- pers for the reference forecast computed by reference_compute, which
defaults to compute_persistence
- the different results:
- skill: skill values
- p: p value
- low_ci and high_ci: high and low ends of confidence intervals based
on significance threshold sig
Return type: results
- Reference:
- Goddard, L., A. Kumar, A. Solomon, D. Smith, G. Boer, P. Gonzalez, V. Kharin, et al. “A Verification Framework for Interannual-to-Decadal Predictions Experiments.” Climate Dynamics 40, no. 1–2 (January 1, 2013): 245–72. https://doi.org/10/f4jjvf.
See also
- climpred.bootstrap.bootstrap_compute
- climpred.prediction.compute_hindcast
Example
>>> hind = climpred.tutorial.load_dataset('CESM-DP-SST')['SST'] >>> hist = climpred.tutorial.load_dataset('CESM-LE')['SST'] >>> obs = load_dataset('ERSST')['SST'] >>> bootstrapped_skill = climpred.bootstrap.bootstrap_hindcast(hind, hist, obs) >>> bootstrapped_skill.coords Coordinates: * lead (lead) int64 1 2 3 4 5 6 7 8 9 10 * kind (kind) object 'init' 'pers' 'uninit' * results (results) <U7 'skill' 'p' 'low_ci' 'high_ci'