esmda#
- dageo.data_assimilation.esmda(model_prior, forward, data_obs, sigma, alphas=4, data_prior=None, localization_matrix=None, callback_post=None, return_post_data=True, return_steps=False, random=None)[source]#
ESMDA algorithm ([EmRe13]) with optional localization.
Consult the section ESMDA in the manual for the theory and more information about ESMDA.
- Parameters:
- model_priorndarray
Prior models of dimension
(ne, ...)
, wherene
is the number of ensembles.- forwardcallable
Forward model that takes an ndarray of the shape of the prior models
(ne, ...)
, and returns a ndarray of the shape of the prior data(ne, nd)
;ne
is the number of ensembles,nd
the number of data.- data_obsndarray
Observed data of shape
(nd)
.- sigma{float, ndarray}
Standard deviation(s) of the observation noise.
- alphas{int, array-like}, default: 4
Inflation factors for ESMDA.
- data_priorndarray, default: None
Prior data ensemble, of shape
(ne, nd)
.- callback_postfunction, default: None
Function to be executed after each ESMDA iteration to the posterior model,
callback_post(model_post)
.- return_post_databool, default: True
If true, returns also
forward(model_post)
.- return_stepsbool, default: False
If true, returns model and data of all ESMDA steps. Setting
return_steps
to True enforcesreturn_post_data=True
.- random{None, int, np.random.Generator}, default: None
Seed or random generator for reproducibility; see
dageo.utils.rng
.- localization_matrix{ndarray, None}, default: None
If provided, apply localization to the Kalman gain matrix, of shape
(model-shape, nd)
.
- Returns:
- model_postndarray
Posterior model ensemble.
- data_postndarray, only returned if
return_post_data=True
Posterior simulated data ensemble.