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. 2013.

equals(other)

Two PredictionEnsembles are equal if they have matching variables and coordinates, all of which are equal.

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.

identical(other)

Like equals, but also checks all dataset attributes and the attributes on all variables and coordinates.

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

Plot datasets from PredictionEnsemble.

remove_bias([alignment, how, …])

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.

Attributes

chunks

Mapping from chunks all PredictionEnsemble._datasets.

coords

Dictionary of xarray.DataArray objects corresponding to coordinate variables available in all PredictionEnsemble._datasets.

data_vars

Dictionary of DataArray objects corresponding to data variables available in all PredictionEnsemble._datasets.

dims

Mapping from dimension names to lengths all PredictionEnsemble._datasets.

nbytes

Bytes sizes of all PredictionEnsemble._datasets.

sizes

Mapping from dimension names to lengths for all PredictionEnsemble._datasets.