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.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (922.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.2.0rc2-cp312-cp312-macosx_11_0_arm64.whl (725.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.2.0rc2-cp312-cp312-macosx_10_15_x86_64.whl (743.1 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.2.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (910.2 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.2.0rc2-cp311-cp311-macosx_11_0_arm64.whl (713.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.2.0rc2-cp311-cp311-macosx_10_15_x86_64.whl (731.2 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.2.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (908.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.2.0rc2-cp310-cp310-macosx_10_15_x86_64.whl (726.2 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.2.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (909.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.2.0rc2-cp39-cp39-macosx_10_15_x86_64.whl (726.3 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.2.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (908.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.2.0rc2-cp38-cp38-macosx_10_15_x86_64.whl (726.1 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ert-10.2.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68ec97933bed701a67b2746ab2b5768b78528a7ad2ad98c5e8ce9f307353f9cd
MD5 cf979b0c91f2ab235f840a7fd06c8cc9
BLAKE2b-256 8a09f3cfdd4c6b380a786c2df3caea3e71cfa3621b1449a4bb9dd1e0f4ca0568

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b0813feef280f49bc2deb77b64d0b98ba1d11432cadd1f03e73c1c2c6aa06201
MD5 edcec92ea5959f178122288934f45afc
BLAKE2b-256 d98024151d3ecdbebf98b48e20899c730147f0ead0f22906e414684f1f5172a0

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1b30c2908a0eca7e0bff9273a69f024fa9fd7f64fb65437e8885d533bb7774b0
MD5 f93d3065e1b4f6880e6048e64a1d4bce
BLAKE2b-256 0d4f62c847561e925a3c817ca328782588ea536350def6c9b65e756d5816b343

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 060bb5d481fe145955a68600a025118302f02c9ef5dc93134d4e5b770b318eae
MD5 36c14d63fc8e3480a55fcd6b5a6af850
BLAKE2b-256 5f843cef960274f1747ef753c63e67b179190ae915ef80e8106b391d8b3ffd15

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b03305b0d31982f61b04c4c8afa77e1e83ef0ac70ff42f635c5cc6fce1fa9f3c
MD5 d39f9c3bae3e48e30ec901009181ed1c
BLAKE2b-256 5714a347754599eb8a6db7c83e185e8346e2392102275e2ab1751ef813ee246f

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 73f9ca15e550357aaeef4ef657dfb4f307c1af778d058de587ac18fb5d41f1c5
MD5 bd518b87ee47ab76bb03f6b64cd066d3
BLAKE2b-256 428228f8a82cd4802bf4b376796187d44d0e549da9e838ad795b2c42f6627943

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 993bd0c1473ac5f30d8d0319226e2d18abcb6e82bc566a963425e634ffe4733f
MD5 e75104989d7a1845647b677b61a2a6bc
BLAKE2b-256 c6847b721d0fc37578d6bcf15c8e5a68f2b0a468cfd7b28332f77f2703c8efbb

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cf1eb432baa2e4119e73f5f8cd36acab0beb7061f0b22133ec96cae71718575d
MD5 195c8ede8649aac3cd62f028dbffd13d
BLAKE2b-256 1601d0f967fbd0cf993309780f072e7dd8a46d70a706aa9f52c25ab19a39497e

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b61535ae2ca0e9cc5e599b7d2c6e1b90cb53c0b98415581da17a48ca9615e83e
MD5 d02a8bf854e676dae1c0539df7d9eecd
BLAKE2b-256 f1f5f4498f7e43a6a5aca37b60a1b20f0717adc427ed9120835a73a8ffabaf43

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 00d0b71b714a58107691e61e56749a1d7ead89e81fdad60fdf8e44dec23beac9
MD5 84b13e1cc747e61b852a24e2a1afc6e7
BLAKE2b-256 3e0ad7599a9d64a3f25cd9296c736f69bd6c645f3f99df1a861d996f50e8afa5

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1cff6d28085f3fde0f2023d63c1d598fc303338a15515c1c96b41d973c8a17dd
MD5 1888a8a0689a2e8c4e58b1ce692252c3
BLAKE2b-256 feb76b1e539ed21cc0be248722873806dc2a6e7abe27dd347d3d85a379394266

See more details on using hashes here.

File details

Details for the file ert-10.2.0rc2-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0rc2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 95f4eae814a5b6af2aff261b94a4e339f4b8215da8b594f393d65bc468ba105e
MD5 d14f2efa51effb7ba9e676dececdbaed
BLAKE2b-256 64d6bc640d91c6c2b13853d00af0413427b2abcc7d81fc99527683794664556b

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