climpred.classes.HindcastEnsemble#
- class climpred.classes.HindcastEnsemble(initialized: DataArray | Dataset)[source]#
An object for initialized prediction ensembles.
HindcastEnsembleis a sub-class ofPredictionEnsemble. 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.Datasetand thus requires the input object to be anxarray.Datasetorxarray.DataArray.- __init__(initialized: DataArray | Dataset) None[source]#
Create
HindcastEnsemblefrom 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
HindcastEnsemblefrom 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(*, alignment, metric, comparison)Bootstrap with replacement according to Goddard et al. [2013].
equals(other)Check if
PredictionEnsembleis equal to other.generate_uninitialized([resample_dim])Generate
uninitializedby resampling frominitialized.Return the
xarray.Datasetfor the initialized ensemble.Return the
xarray.Datasetof the observations/verification data.Return the
xarray.Datasetfor the uninitialized ensemble.identical(other)Check if
PredictionEnsembleis identical to other.plot([variable, ax, show_members, cmap, x])Plot datasets from
PredictionEnsemble.plot_alignment([alignment, reference, ...])Plot
initializedvalid_timewhere matchingverificationtime.remove_bias(alignment[, how, ...])Remove bias from
HindcastEnsemble.remove_seasonality([seasonality])Remove seasonal cycle from
PredictionEnsemble.smooth([smooth_kws, how, drop])Smooth in space and/or aggregate in time in
PredictionEnsemble.verify(*, metric, comparison[, dim, ...])Verify the initialized ensemble against observations.
Attributes
chunksReturn chunks of
PredictionEnsemble.chunksizesReturn chunksizes of
PredictionEnsemble.coordsReturn coordinates of
PredictionEnsemble.data_varsReturn data variables of
PredictionEnsemble.dimsReturn dimension of
PredictionEnsemble.mathTypealias of
int|float|ndarray|DataArray|Dataset|PredictionEnsemblenbytesBytes sizes of all PredictionEnsemble._datasets.
sizesReturn sizes of
PredictionEnsemble.