climpred.classes.PerfectModelEnsemble#
- class climpred.classes.PerfectModelEnsemble(initialized: DataArray | Dataset)[source]#
An object for “perfect model” prediction ensembles.
PerfectModelEnsemble
is a sub-class ofPredictionEnsemble
. It tracks the control run used to initialize the ensemble for easy computations, bootstrapping, etc.This object is built on
xarray
and thus requires the input object to be anxarray.Dataset
orxarray.DataArray
.- __init__(initialized: DataArray | Dataset) None [source]#
Create a
PerfectModelEnsemble
object.- 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
PerfectModelEnsemble
object.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
PredictionEnsemble
is equal to other.Generate an uninitialized ensemble by resampling from the control simulation.
Return the control as an
xarray.Dataset
.Return the
xarray.Dataset
for the initialized ensemble.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
.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, ...])Verify initialized predictions against a configuration of its members.
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
.