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.

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.

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.