Skip to main content

Ensemble based Reservoir Tool (ERT)

Project description

Build Status PyPI - Python Version Code Style Type checking codecov License: GPL v3

ert - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ert supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).

Installation

$ pip install ert
$ ert --help

or, for the latest development version (requires Python development headers):

$ pip install git+https://github.com/equinor/ert.git@main
$ ert --help

For examples and help with configuration, see the ert Documentation.

Developing

ert was originally written in C/C++ but most new code is Python.

Developing Python

You might first want to make sure that some system level packages are installed before attempting setup:

- pip
- python include headers
- (python) venv
- (python) setuptools
- (python) wheel

It is left as an exercise to the reader to figure out how to install these on their respective system.

To start developing the Python code, we suggest installing ert in editable mode into a virtual environment to isolate the install (substitute the appropriate way of sourcing venv for your shell):

# Create and enable a virtualenv
python3 -m venv my_virtualenv
source my_virtualenv/bin/activate

# Update build dependencies
pip install --upgrade pip wheel setuptools

# Download and install ert
git clone https://github.com/equinor/ert
cd ert
pip install --editable .

Test setup

Additional development packages must be installed to run the test suite:

pip install ".[dev]"
pytest tests/

Git LFS must be installed to get all the files. This is packaged as git-lfs on Ubuntu, Fedora or macOS Homebrew. For Equinor RGS node users, it is possible to use git from Red Hat Software Collections:

source /opt/rh/rh-git227/enable

test-data/block_storage is a submodule and must be checked out.

git submodule update --init --recursive

If you checked out submodules without having git lfs installed, you can force git lfs to run in all submodules with:

git submodule foreach "git lfs pull"

Style requirements

There are a set of style requirements, which are gathered in the pre-commit configuration, to have it automatically run on each commit do:

$ pip install pre-commit
$ pre-commit install

Trouble with setup

If you encounter problems during install, try deleting the _skbuild folder before reinstalling.

As a simple test of your ert installation, you may try to run one of the examples, for instance:

cd test-data/poly_example
# for non-gui trial run
ert test_run poly.ert
# for gui trial run
ert gui poly.ert

Note that in order to parse floating point numbers from text files correctly, your locale must be set such that . is the decimal separator, e.g. by setting

# export LC_NUMERIC=en_US.UTF-8

in bash (or an equivalent way of setting that environment variable for your shell).

Developing C++

C++ is the backbone of ert as in used extensively in important parts of ert. There's a combination of legacy code and newer refactored code. The end goal is likely that some core performance-critical functionality will be implemented in C++ and the rest of the business logic will be implemented in Python.

While running --editable will create the necessary Python extension module (src/ert/_clib.cpython-*.so), changing C++ code will not take effect even when reloading ert. This requires recompilation, which means reinstalling ert from scratch.

To avoid recompiling already-compiled source files, we provide the script/build script. From a fresh virtualenv:

git clone https://github.com/equinor/ert
cd ert
script/build

This command will update pip if necessary, install the build dependencies, compile ert and install in editable mode, and finally install the runtime requirements. Further invocations will only build the necessary source files. To do a full rebuild, delete the _skbuild directory.

Note: This will create a debug build, which is faster to compile and comes with debugging functionality enabled. The downside is that this makes the code unoptimised and slow. Debugging flags are therefore not present in builds of ert that we release on Komodo or PyPI. To build a release build for development, use script/build --release.

Notes

  1. If pip reinstallation fails during the compilation step, try removing the _skbuild directory.

  2. The default maximum number of open files is normally relatively low on MacOS and some Linux distributions. This is likely to make tests crash with mysterious error-messages. You can inspect the current limits in your shell by issuing the command ulimit -a. In order to increase maximum number of open files, run ulimit -n 16384 (or some other large number) and put the command in your .profile to make it persist.

Running C++ tests

The C++ code and tests require resdata. As long as you have pip install resdata'd into your Python virtualenv all should work.

# Create and enable a virtualenv
python3 -m venv my_virtualenv
source my_virtualenv/bin/activate

# Install build dependencies
pip install pybind11 conan cmake resdata

# Build ert and tests
mkdir build && cd build
cmake ../src/clib -DCMAKE_BUILD_TYPE=Debug
make -j$(nproc)

# Run tests
ctest --output-on-failure

Example usage

Basic ert test

To test if ert itself is working, go to test-data/poly_example and start ert by running poly.ert with ert gui

cd test-data/poly_example
ert gui poly.ert

This opens up the ert graphical user interface. Finally, test ert by starting and successfully running the experiment.

ert with a reservoir simulator

To actually get ert to work at your site you need to configure details about your system; at the very least this means you must configure where your reservoir simulator is installed. In addition you might want to configure e.g. queue system in the site-config file, but that is not strictly necessary for a basic test.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ert-10.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (921.4 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.2.8-cp312-cp312-macosx_11_0_arm64.whl (724.5 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.2.8-cp312-cp312-macosx_10_15_x86_64.whl (742.5 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (909.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.2.8-cp311-cp311-macosx_11_0_arm64.whl (712.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.2.8-cp311-cp311-macosx_10_15_x86_64.whl (730.7 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (908.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.2.8-cp310-cp310-macosx_10_15_x86_64.whl (725.7 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.2.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (908.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.2.8-cp39-cp39-macosx_10_15_x86_64.whl (725.8 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.2.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (908.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.2.8-cp38-cp38-macosx_10_15_x86_64.whl (725.6 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ert-10.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03bd0bfacf3df84a5c90e1f7848f3ff01ce86c6df989a2f32f0307e2210e0938
MD5 bc57edd134d6516e25b865ed17ef6c6f
BLAKE2b-256 88880321a1eef19b7c37b6fceb5e17d3b7ff09cc34b810bb434c5e943891abf0

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 798f9fd104f74b8600c842525c51983b2abbe4d265cf0d867d96fc9cb3e1fd91
MD5 c3bc23acbde716f88051dd028102573f
BLAKE2b-256 6a8c161ac42c4331efb544df6ae0557367ddd89a65f6e8d7128bd487ad5a1418

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 490426e8c5aa8b9e5897c2a5a9af5f7dc46154614a2879480a72818e2966fda9
MD5 424f0b9737e3b3d0bc37efa0dd9ca3d9
BLAKE2b-256 3c6a694ae8da284cf1a6f55786c10888e00a35ad606d659a1beb72d79eba4eaf

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e60a039115fd2c9247be7ec6cd173f48231f991500213433573d8e07a14ce4d3
MD5 f9194ece3f10334ab23d1d3804d0d1f6
BLAKE2b-256 92100ab3c795c9d0cae2e0d2541313ba612258fa0d203b46b8ff0aaafb440f22

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e1028aef0e63f710b22285e307ddf40be2b805bab122a89610bd94247953f686
MD5 59fe1b2fb8b9d9f88d03e16e134976d4
BLAKE2b-256 48b39c3a9b8358f56ac57d96200dca45dc80aa770d8b441c40154502f51321ab

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e1e8e9f0a6c002e873182904c76099c4d09101708f0b22098ef290b798e87064
MD5 ccb5381b258f8dc4105b42b2f3f3265b
BLAKE2b-256 c4fddebba38662f4b958e0bb3fb8fccb0cd8abd8589ce1b7eb2d2ec102340a6d

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2296a7e49cac8ec8b3c8d4778f6018442e62518888154bd7e020474f839ca95
MD5 0da5d8f0331e82620c1ede2a47bccca9
BLAKE2b-256 cff618504fe7e5d04630e8af7fb7ea62cef4f63988a71b9fe68a1d8dd58b82ff

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b7298ffba2c18423c3af89baa8376ddee9f8ca78cc0e8b83a33007618bc24900
MD5 0b5cf2fc775b1972846e5e4766c1e753
BLAKE2b-256 a339e45db4fe6c4243085a720c9e568747b0ceeced8a987a1b08220cc6b0fc20

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93158736a8ca04cff3a03257128db4ed8994e8a9b1985cdab51645a97c959c6a
MD5 9a14a31a63763d8e6f82b0b24550e6fe
BLAKE2b-256 9860725eb46795e2f61d709e2c55860e666626f8279730c68f30b7708b5b1b08

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a0dd226feea30c45ceed310b25bbbe3cc3ebe6e4c9d45011366428280a14a7ee
MD5 99145c0fac44d8783aa6dc1be9ceae46
BLAKE2b-256 712807725e6dfd561f6696792ea97ed86b4fb0323e2a74404449b8fc877d4fe0

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 34c0cc54d04517cf9a568816be7bdd4c19d468ccee87de6f9d9ed697500d5ab1
MD5 a1fe083c5d25ee27c7c2cbbe048eb4ca
BLAKE2b-256 0a53c9e588014a00bfb5c665d5d504a0cf14f38e641fedf481bfffd5b4966c2a

See more details on using hashes here.

File details

Details for the file ert-10.2.8-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.8-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 33ab98a3c231876bea5c76ffda6aa47e7d4fcb6add6ceaab4386e0dbfc01b3fe
MD5 2af82eb72d94a6bc0bf2c0d6644a4a0d
BLAKE2b-256 b8cb5356902c5acafb418ed0ea50bf4c0aaf8db7be8beb94c099fe22a279b699

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page