Skip to main content

Ensemble based Reservoir Tool (ERT)

Project description

ert

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 simulation.

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.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (955.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.1.1-cp312-cp312-macosx_11_0_arm64.whl (750.2 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.1.1-cp312-cp312-macosx_10_15_x86_64.whl (772.3 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (944.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.1.1-cp311-cp311-macosx_11_0_arm64.whl (737.8 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.1.1-cp311-cp311-macosx_10_15_x86_64.whl (758.8 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (943.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.1.1-cp310-cp310-macosx_10_15_x86_64.whl (757.8 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (944.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.1.1-cp39-cp39-macosx_10_15_x86_64.whl (757.8 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (943.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.1.1-cp38-cp38-macosx_10_15_x86_64.whl (757.6 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 991a2d6ab953ef20c733fa40dbcad52206dfc1609babe4b47d9ae348858188ce
MD5 6ff3ffe2cf243442c8967170db5ceb9d
BLAKE2b-256 20fdf20f1f14161336225d98b46a97ba0267e01efdf3166497ec1d2197207ee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d3e6d04e5564f5ab065a3bcc697ff99685d1de1085789f6c58cbd4b34b7eec9
MD5 0938bdb2e5d7f8e7b73c8965b4e31ca8
BLAKE2b-256 8ab9898016abcb057d1aed9a85b065099a128941e1f11b3b447da57a58879808

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2e6693454f9769a73e03a6d23a865c99a1ade9267b3fec7576fbd18185916571
MD5 99fb21d88d1db5197672642ff68d6508
BLAKE2b-256 474a8e04761a294e228e0cc94cd25993bc54413bce0059c3b92266a26306a70b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 554dd6072695a3dc3824b8e152df023d55c0f027f2fe9493285b8eae7041a1db
MD5 d8cd577d50ed900d35eb9d58c0528c63
BLAKE2b-256 634f553fe5f15b300838e66fbc186ed925414710ce421998eee19ebb5de1acf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d1f8940f2fa0ffc675a607516c2427729e9169a751de78bda4fa69b453187ee
MD5 a684f865bcd0acb2f5a9986155851790
BLAKE2b-256 c277cafd3cba0beba2f2b7071a991c73727db90b2e419a0aa03afee028796f17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2fb0f76a8ebe5aa7df4214ce525a6c2b8a9a0ce8c053962344862a198ea40e10
MD5 89bb41532df01d19f67fbe3b783ae0ee
BLAKE2b-256 e70a8de5c5b632cfddbba6af86678ea251dade6f6cd988e3278191ccaf6afc80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f224392c1c4d8ae61edfe4d30a7173b14cf8e48944c1e61cb2fcaa534384cb3
MD5 fb4d2db279b630263dd6d583ed595392
BLAKE2b-256 9a7578198251306121f576ec42d029ec3c498fee689023407bea294d19dc424f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c64855ebd53047f8649d436471f0cdeadb0b984de60bf22bba088d8b31306cdf
MD5 c553c6fcac9d4a9106eea756ef393a34
BLAKE2b-256 edd2d2add704d8a94a402fc61bc3e2041b2f987882cf690d29ec7bc63c3df270

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7cead1bc7dd13acd2f0cd8f18239a70e3f46a307dfe93327f074812ce3bef9ed
MD5 3a13b4b97aaf99350ce7c6e036f3328d
BLAKE2b-256 c74fe7adba36f217c97a5073fac23c6dc06653fd5b3f6d2723f806161694b938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 022a18ec5671eb42460899712940ce312eeafc6c206aab8839526f276d2d0d27
MD5 cba7cc28889a8c12c41ccc70094f6738
BLAKE2b-256 00a87ab8467178b4073c629ea50075d0e5a2d90e7a5afe8e5e57fb8cc35f04b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 312962bf3d4c1dc4db1368311405e910bd697429605107bd203087b52a1e8486
MD5 aad6713bc0d9f63d3c828dfda4591a74
BLAKE2b-256 6344c3a608239197ccdc2d9dfdf3a3bccb65355df37ff81ac15e892666fb57e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0f1bd0c99c30fa3437239e40d976101c542c6f61676248dc8107571bc663624b
MD5 8eef7ffcfe2882b475e56d047f82b8cf
BLAKE2b-256 dac3f47212494b78f167076d3731d320cff67d07f981c0d289045f8bb9bad608

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