climpred.classes.HindcastEnsemble

class climpred.classes.HindcastEnsemble(xobj)[source]

An object for climate prediction ensembles initialized by a data-like product.

HindcastEnsemble is a sub-class of PredictionEnsemble. It tracks a single verification dataset (i.e., observations) associated with the hindcast ensemble for easy computation across multiple variables.

This object is built on xarray and thus requires the input object to be an xarray Dataset or DataArray.

__init__(xobj)[source]

Create a HindcastEnsemble object by inputting output from a prediction ensemble in xarray format.

Parameters

xobj (xarray object) – decadal prediction ensemble output.

observations

Dictionary of verification data to associate with the decadal prediction ensemble.

uninitialized

Dictionary of companion (or bootstrapped) uninitialized ensemble run.

Methods

__init__(xobj)

Create a HindcastEnsemble object by inputting output from a prediction ensemble in xarray format.

add_observations(xobj)

Add verification data against which to verify the initialized ensemble.

add_uninitialized(xobj)

Add a companion uninitialized ensemble for comparison to verification data.

bootstrap([metric, comparison, dim, …])

Bootstrap with replacement according to Goddard et al.

get_initialized()

Returns the xarray dataset for the initialized ensemble.

get_observations()

Returns xarray Datasets of the observations/verification data.

get_uninitialized()

Returns the xarray dataset for the uninitialized ensemble.

plot([variable, ax, show_members, cmap])

Plot datasets from PredictionEnsemble.

remove_bias(alignment[, how, cross_validate])

Calculate and remove bias from HindcastEnsemble.

smooth([smooth_kws, how])

Smooth all entries of PredictionEnsemble in the same manner to be able to still calculate prediction skill afterwards.

verify([reference, metric, comparison, dim, …])

Verifies the initialized ensemble against observations.