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 "ert[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. This means that, for example, Eigen computations will be checked and will abort if preconditions aren't met (eg. when inverting a matrix, it will explicitly check that the matrix is square). 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

This version

8.4.3

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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-8.4.3-cp312-cp312-macosx_11_0_arm64.whl (739.6 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-8.4.3-cp312-cp312-macosx_10_15_x86_64.whl (773.8 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-8.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-8.4.3-cp311-cp311-macosx_11_0_arm64.whl (727.5 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-8.4.3-cp311-cp311-macosx_10_15_x86_64.whl (760.9 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-8.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-8.4.3-cp310-cp310-macosx_11_0_arm64.whl (726.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-8.4.3-cp310-cp310-macosx_10_15_x86_64.whl (759.4 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-8.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-8.4.3-cp39-cp39-macosx_10_15_x86_64.whl (759.5 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-8.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-8.4.3-cp38-cp38-macosx_10_15_x86_64.whl (759.5 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c50e7a49960b5913e15841b524dd30d1e035e760746852e0f491b8f4e463ee0f
MD5 782a8efd93e1bb379c3e8b4b7f15687d
BLAKE2b-256 81540e21883461b8279ac80f62a9cc868c99501dec69532670f436afd46771f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be237eabc90dab1342b3e6bc1608ec1cd565a8c31930c0ad421279ea0c51eae3
MD5 38a6af24814c30b5242d77971643c960
BLAKE2b-256 afeda83f724079c7ff16b7cc3410b88291d7b655cead22416f617003cff4f237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e267fa6689004472805e2e0bad4f940349a78f3d878a9dfe0f3973b7d48c425f
MD5 aff7c62594e10a19ad7e43a6478d9254
BLAKE2b-256 89b2a5c27fd4c68716aac34863fa1bf426aa83d33dcdc7217afb2d7f4f8bed7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca1e7d8586cf5bea8a3dbaf1bdc7a89694f8c7b7f83d16ec23429905fedc18ab
MD5 e368083bcbcf5a1783775b81c6666c18
BLAKE2b-256 dcc5b06827e5aa2631271f2a3ea1e589d55352c6c249ad879345696c1e0d0bae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb31ae4149c01a87e91bcf3205346626966f61a0ddc80beb4c49736d1c163ab7
MD5 e2540479575b3a3825218a996f59b8a2
BLAKE2b-256 17c9ebbd05f794398670164a9690e85b75ecbc32a3ef65183fe551b5db793b06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 75b8aead8e4dec1013f65eddbfef4a279d20038bd546c57b3eac31badcc0fb93
MD5 49c337eb74343ea9c57795f6eacac621
BLAKE2b-256 a4a9758281c74e829e58b2c79d8f67785c94d0047e51ac739159274ab5778d81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aeb5f8053d43a5773d7353db82affd7c2e92a84ecb81618ad10259b97ea2717e
MD5 f7b14282dffa022c9d97717cb0130c61
BLAKE2b-256 5872b1238b24cbfe959e26ca70641162e77e56cebdee3a3ecc31ecd60dea4427

See more details on using hashes here.

File details

Details for the file ert-8.4.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-8.4.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ec7b332403765f846cc953523fa1a61252af4063cfd41f1ff998858b064af0e1
MD5 47f96364e023c93828ce2fee6996c684
BLAKE2b-256 0292d7b8135a830385fe91afce6fd92902506d578b5cf16e3b225efa655431de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fea11cab7106a0afa7d1a5c4f76f284f093f8902f120931b618074166f36bd50
MD5 df8378340c32aecd3e95e41cd3d32a91
BLAKE2b-256 d189d395e1ff201f3c46a9e44c9bca5f78571459f083d7da0ebb179caa1ba8ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 822a156dbbc1f2a407a27ebfea1533258ab5b3057d1c4fb06ef8a97f9158dff1
MD5 fe76ad36a2b8a683744aa2a5d88b1f56
BLAKE2b-256 5239712f45a1a1e57b6b6122f8606e88ce3d0abb355da7e50cccb5aa3aa955d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e977aae5eed583effe53149e56db6f9a5f6d7ab0c6454f4bcf31f3448f470106
MD5 23d57c83d2c48d9c969c0f1a5353057a
BLAKE2b-256 b4cb4b19c8352cc58b610f27af08ab17560cc73371b07a36d8ad4e18e5571385

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e650f3cc5b0444abac8d62e1540cb2de90455fc7189368634117dd69bc0f797
MD5 40302001b3475e21ae80b86d84501df1
BLAKE2b-256 35e8f74d2dcf7d03d83de48039c065861cbd2bd9f9d348c5de7ebf09b772d7be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.3-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6a9d1da7ddadb834824a8de1e82c1c0e37e9e705bb545a1fe6c2380efa7f32b7
MD5 fe76c9b108498d4718ecc3bf32ee7fe6
BLAKE2b-256 cd97f5e8ee1efb2f35e049340b98d1f9b875c1b7f7ef2b414f892109174b83a9

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