climpred.classes.PerfectModelEnsemble#
- class climpred.classes.PerfectModelEnsemble(initialized: DataArray | Dataset)[source]#
An object for “perfect model” prediction ensembles.
PerfectModelEnsembleis a sub-class ofPredictionEnsemble. It tracks the control run used to initialize the ensemble for easy computations, bootstrapping, etc.This object is built on
xarrayand thus requires the input object to be anxarray.Datasetorxarray.DataArray.- __init__(initialized: DataArray | Dataset) None[source]#
Create a
PerfectModelEnsembleobject.- Parameters:
initialized – prediction ensemble output.
- control#
datasets dictionary item of control simulation associated with the initialized ensemble.
- uninitialized#
datasets dictionary item of uninitialized forecast.
Methods
__init__(initialized)Create a
PerfectModelEnsembleobject.add_control(control)Add the control run that initialized the prediction ensemble.
bootstrap(*, metric, comparison[, dim, ...])Bootstrap with replacement according to Goddard et al. [2013].
equals(other)Check if
PredictionEnsembleis equal to other.Generate an uninitialized ensemble by resampling from the control simulation.
Return the control as an
xarray.Dataset.Return the
xarray.Datasetfor the initialized ensemble.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.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 initialized predictions against a configuration of its members.
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.