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, sig, …]) Bootstrap ensemble simulations with replacement.
compute_metric([metric, comparison]) Compares the initialized ensemble to the control run.
compute_persistence([metric]) Compute a simple persistence forecast for the control run.
compute_uninitialized([metric, comparison]) Compares the bootstrapped uninitialized run to the control run.
generate_uninitialized() Generate an uninitialized ensemble by bootstrapping the initialized prediction ensemble.
get_control() Returns the control as an xarray dataset.
get_initialized() Returns the xarray dataset for the initialized ensemble.
get_uninitialized() Returns the xarray dataset for the uninitialized ensemble.
smooth([smooth_kws]) Smooth all entries of PredictionEnsemble in the same manner to be able to still calculate prediction skill afterwards.