climpred.classes.PerfectModelEnsemble¶
- class climpred.classes.PerfectModelEnsemble(xobj)[source]¶
An object for “perfect model” climate prediction ensembles.
PerfectModelEnsemble is a sub-class of PredictionEnsemble. 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 an xarray Dataset or DataArray.
- __init__(xobj)[source]¶
Create a PerfectModelEnsemble object by inputting output from the control run in xarray format.
- Parameters
xobj (xarray object) – decadal prediction ensemble output.
- control¶
Dictionary of control run associated with the initialized ensemble.
- uninitialized¶
Dictionary of uninitialized run that is bootstrapped from the initialized run.
Methods
__init__
(xobj)Create a PerfectModelEnsemble object by inputting output from the control run in xarray format.
add_control
(xobj)Add the control run that initialized the climate prediction ensemble.
bootstrap
([metric, comparison, dim, …])Bootstrap with replacement according to Goddard et al. 2013.
equals
(other)Two PredictionEnsembles are equal if they have matching variables and coordinates, all of which are equal.
Generate an uninitialized ensemble by bootstrapping the initialized prediction ensemble.
Returns the control as an xarray dataset.
Returns the xarray dataset for the initialized ensemble.
Returns the xarray dataset for the uninitialized ensemble.
identical
(other)Like equals, but also checks all dataset attributes and the attributes on all variables and coordinates.
plot
([variable, ax, show_members, cmap])Plot datasets from PredictionEnsemble.
smooth
([smooth_kws, how])Smooth all entries of PredictionEnsemble in the same manner to be able to still calculate prediction skill afterwards.
verify
([metric, comparison, dim, reference])Verify initialized predictions against a configuration of other ensemble members.
Attributes
chunks
Mapping from chunks all PredictionEnsemble._datasets.
coords
Dictionary of xarray.DataArray objects corresponding to coordinate variables available in all PredictionEnsemble._datasets.
data_vars
Dictionary of DataArray objects corresponding to data variables available in all PredictionEnsemble._datasets.
dims
Mapping from dimension names to lengths all PredictionEnsemble._datasets.
nbytes
Bytes sizes of all PredictionEnsemble._datasets.
sizes
Mapping from dimension names to lengths for all PredictionEnsemble._datasets.