climpred.classes.HindcastEnsemble#
- class climpred.classes.HindcastEnsemble(initialized: Union[DataArray, Dataset])[source]#
An object for initialized prediction ensembles.
HindcastEnsemble
is 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.Dataset
and thus requires the input object to be anxarray.Dataset
orxarray.DataArray
.- __init__(initialized: Union[DataArray, 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 frominitialized
.Return the
xarray.Dataset
for the initialized ensemble.Return the
xarray.Dataset
of the observations/verification data.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 matchingverification
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
nbytes
Bytes sizes of all PredictionEnsemble._datasets.
sizes
Return sizes of
PredictionEnsemble
.