climpred.classes.HindcastEnsemble

class climpred.classes.HindcastEnsemble(initialized: Union[xarray.DataArray, xarray.Dataset])[source]

An object for initialized prediction ensembles.

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

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

__init__(initialized: Union[xarray.DataArray, xarray.Dataset]) None[source]

Create HindcastEnsemble from initialized prediction ensemble output.

Parameters

initialized – initialized prediction ensemble output.

observations

datasets dictionary item of verification data to associate with the prediction ensemble.

uninitialized

datasets dictionary item of uninitialized forecast.

Methods

__init__(initialized)

Create HindcastEnsemble from initialized prediction ensemble output.

add_observations(obs)

Add verification data against which to verify the initialized ensemble.

add_uninitialized(uninit)

Add a companion uninitialized ensemble for comparison to verification data.

add_verification(verif)

Add verification data against which to verify the initialized ensemble.

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

Bootstrap with replacement according to Goddard et al. [2013].

equals(other)

Check if PredictionEnsemble is equal to other.

generate_uninitialized([resample_dim])

Generate uninitialized by resampling from initialized.

get_initialized()

Return the xarray.Dataset for the initialized ensemble.

get_observations()

Return the xarray.Dataset of the observations/verification data.

get_uninitialized()

Return the xarray.Dataset for the uninitialized ensemble.

identical(other)

Check if PredictionEnsemble is identical to other.

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

Plot datasets from PredictionEnsemble.

plot_alignment([alignment, reference, ...])

Plot initialized valid_time where matching verification time.

remove_bias([alignment, how, ...])

Remove bias from HindcastEnsemble.

remove_seasonality([seasonality])

Remove seasonal cycle from PredictionEnsemble.

smooth([smooth_kws, how])

Smooth in space and/or aggregate in time in PredictionEnsemble.

verify([metric, comparison, dim, alignment, ...])

Verify the initialized ensemble against observations.

Attributes

chunks

Return chunks of PredictionEnsemble.

chunksizes

Return chunksizes of PredictionEnsemble.

coords

Return coordinates of PredictionEnsemble.

data_vars

Return data variables of PredictionEnsemble.

dims

Return dimension of PredictionEnsemble.

mathType

alias of Union[int, float, numpy.ndarray, xarray.DataArray, xarray.Dataset]

nbytes

Bytes sizes of all PredictionEnsemble._datasets.

sizes

Return sizes of PredictionEnsemble.