API Reference

Purpose

pyesmda is an open-source, pure python, and object-oriented library that provides a user friendly implementation of one of the most popular ensemble based method for parameters estimation and data assimilation: the Ensemble Smoother with Multiple Data Assimilation (ES-MDA) algorithm, introduced by Emerick and Reynolds [1-2].

The following functionalities are directly provided on module-level.

Classes

ESMDA(obs, m_init, cov_obs, forward_model[, ...])

Ensemble Smoother with Multiple Data Assimilation.

ESMDA_RS(obs, m_init, cov_obs, std_m_prior, ...)

Restricted Step Ensemble Smoother with Multiple Data Assimilation.

Objective functions

compute_ensemble_average_normalized_objective_function(...)

Compute the ensemble average normalized objective function.

compute_normalized_objective_function(pred, ...)

Compute the normalized objective function for a given member \(j\).

Covariance approximation

get_ensemble_variance(m_ensemble)

Get the given ensemble variance (diagonal terms of the covariance matrix).

approximate_cov_mm(m_ensemble)

Approximate the parameters autocovariance matrix from the ensemble.

approximate_covariance_matrix_from_ensembles(...)

Approximate the covariance matrix between two ensembles in the EnKF way.

inflate_ensemble_around_its_mean(ensemble, ...)

Inflate the given parameter ensemble around its mean.

Correlation functions

distances_to_weights_beta_cumulative(distances)

Transform the distances into weights between 0 and 1 with a beta function.

distances_to_weights_fifth_order(distances)

Transform the distances into weights between 0 and 1 with a fifth order function.

Other functions

check_nans_in_predictions(d_pred, ...)

Check and raise an exception if there is any NaNs in the input predictions array.