Skip to content

es⚓︎

ES type schemes

ES ⚓︎

Bases: EnKF

Ensemble Smoother (ES).

Assimilates all observations simultaneously in a single update, rather than sequentially in time as the filter does. It is :class:EnKF specialised to one data group, and shares its analysis step; only the iteration budget and the misfit bookkeeping differ.

A single conditioning step is cheap but can over-correct when the model is strongly non-linear. :class:ESMDA addresses this by spreading the same update over several inflated steps.

Parameters:

Name Type Description Default
keys_da dict

Parsed dataassim configuration. Besides the keys every scheme reads -- data, datavar, obsname, truedataindex -- the ones this scheme acts on are listed under Notes.

required
keys_en dict

Parsed ensemble configuration: ensemble size ne, the state variable names, and the prior_<name> blocks describing each.

required
sim object

Forward simulator instance, e.g. simulator.opm.flow.

required
analysis (approx, full, subspace)

Analysis flavour, i.e. how the ensemble-approximated sensitivity is inverted. Defaults to the analysis key in keys_da, falling back to 'approx'. The flavours differ in cost and in how they handle a rank-deficient ensemble; they solve the same update equation.

'approx'

Attributes:

Name Type Description
ensemble AssimilationEnsemble

Collaborator holding the state realisations, observed data and simulator. Its state is exposed as properties on the scheme, so scheme.enX and scheme.keys_da read straight through.

analysis AnalysisBase

The bound analysis object. Note the constructor takes analysis as a name and this attribute holds the resulting object, the way Model(optimizer="adam").optimizer is an optimizer instance.

analysis_name str

The flavour name that was resolved, e.g. 'approx'.

iteration int

Accepted iterations completed so far.

data_misfit, prior_data_misfit float

Current and initial mean data misfit.

Notes

assimindex is flattened to a single group at construction, so the ordering that matters for :class:EnKF has no effect here.

Because there is only one step, the full flavour coincides with approx -- the prior-increment term they differ over is only reached when iterating -- so :attr:EnKF.COMPATIBLE_ANALYSES, inherited unchanged here, points "full" at the cheaper approx analysis.

Examples:

>>> result = ES.assimilate(keys_da, keys_en, flow(keys_sim))
>>> result.nit
1
References

Evensen, Data Assimilation: The Ensemble Kalman Filter evensen2009a.

See Also

EnKF : Sequential form of the same update. ESMDA : Spreads the conditioning over several inflated steps.

__init__(keys_da, keys_en, sim, analysis=None, ensemble=None) ⚓︎

Build the ensemble from the config (or take the one given) and bind the analysis.

See the class docstring for the parameters.

check_convergence() ⚓︎

ES takes a single all-data-at-once step; nothing stops early.

score_and_commit() ⚓︎

Calculate the "convergence" of the method. Important to