iterative_ensemble_smoother is a Python package that implements the subspace iterative ensemble smoother as described in evensen2019. This algorithm is particularly effective for problems with a large number of parameters (e.g., millions) and a few realizations or samples (e.g., hundreds).
iterative_ensemble_smoother is on PyPi and can be installed using pip:
pip install iterative_ensemble_smoother
The following illustrates usage but does not actually create the inputs and can not be run.
The example below illustrates the usage of the package. Note that it does not create the necessary inputs and cannot be run directly. For complete information and runnable examples, please refer to the documentation.
import iterative_ensemble_smoother as ies
# `prior` is a matrix of size (num_params, ensemble_size).
# In geostatistical applications, it typically consists of Gaussian random fields
# that model rock properties like porosities and permeabilities.
# `response_ensemble` is a matrix of size (num_obs, ensemble_size) and is
# generated by running a dynamical model, such as a flow simulator.
# In geostatistical applications, this is typically a porous flow simulator like Eclipse or OPM flow.
# `obs_errors` and `obs_values` are 1D array of size `num_obs` that hold observations from real-life
# sensors and their uncertainty specifications.
# In geostatistical applications, the observations are typically pressures, temperatures, production rates etc.
smoother = ies.ES()
smoother.fit(response_ensemble, obs_errors, obs_values)
posterior = smoother.update(prior)
Before building, ensure you have a C compiler and Python with pip installed. You may need to provide the Conan package manager with information about your C compiler, depending on your environment.
c++ --version # to get information about which c compiler is installed
# on your system.
pip install conan
# The following sets the compiler settings
# assuming the output of `c++ --version` indicated
# that the installed c compiler was gcc version 11.2
# and writes it to the default profile.
conan profile update "settings.compiler=gcc" default
conan profile update "settings.compiler.version=11.2" default
To build iterative_ensemble_smoother from source:
git clone https://github.com/equinor/iterative_ensemble_smoother.git
cd iterative_ensemble_smoother
pip install .
apt install pandoc # Pandoc is required to build the documentation.
pip install .[doc]
spinx-build -c docs/source/ -b html docs/source/ docs/build/html/