climpred.classes.PerfectModelEnsemble

climpred.classes.PerfectModelEnsemble

class climpred.classes.PerfectModelEnsemble(initialized: Union[xarray.DataArray, xarray.Dataset])[source]

An object for “perfect model” 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 xarray.DataArray.

__init__(initialized: Union[xarray.DataArray, xarray.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_uninitialized()

Generate an uninitialized ensemble by resampling from the control simulation.

get_control()

Return the control as an xarray.Dataset.

get_initialized()

Return the xarray.Dataset for the initialized ensemble.

get_uninitialized()

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, reference, ...])

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

alias of Union[int, float, numpy.ndarray, xarray.DataArray, xarray.Dataset]

nbytes

Bytes sizes of all PredictionEnsemble._datasets.

sizes

Return sizes of PredictionEnsemble.