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-9.0.0rc5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (938.2 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-9.0.0rc5-cp312-cp312-macosx_11_0_arm64.whl (732.5 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-9.0.0rc5-cp312-cp312-macosx_10_15_x86_64.whl (754.2 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-9.0.0rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (927.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-9.0.0rc5-cp311-cp311-macosx_11_0_arm64.whl (720.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-9.0.0rc5-cp311-cp311-macosx_10_15_x86_64.whl (741.3 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-9.0.0rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (926.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-9.0.0rc5-cp310-cp310-macosx_11_0_arm64.whl (718.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-9.0.0rc5-cp310-cp310-macosx_10_15_x86_64.whl (740.1 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-9.0.0rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (927.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-9.0.0rc5-cp39-cp39-macosx_10_15_x86_64.whl (740.2 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-9.0.0rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (926.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-9.0.0rc5-cp38-cp38-macosx_10_15_x86_64.whl (739.9 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ert-9.0.0rc5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7997fd40c0257382d79e1027a33a0ecbc4dfb99c6d8efc109a823301fd1a0c2a
MD5 43384f321c5fe98eb9b434d20ebf3735
BLAKE2b-256 95d1fbc514fe87d6fe2fb9dbc80acfac3d187cc8860cc81dbf25777263a0424e

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4772b5136a4961a2ac4a952a6c930587507e967d0678e4cba05a476b1a7b290c
MD5 7cc2854a7b4cf52afb9f470c58bbe355
BLAKE2b-256 a70b7c05d31ca8769b4c84003720b308b7a09cc7ce571937170c2d394936d08c

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 77fbec6d3630eb5785208c8f0ed00a6422819fd93f9f61da1e617391ab0fc8af
MD5 d39595520580059320f7a39e079ec383
BLAKE2b-256 524f258784d0a5b8ed6dc75d1f2fd5262cefd3a689ecd66bca6721cde6ff8251

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31988470f8a66384e4d27fc041e176e1c4747736d9328d7de431f5bfb1a64330
MD5 22f44ac5e19bac570e57e3af70238581
BLAKE2b-256 d6c4863040464b86123ec619856c0b4affd9875fb7ece8002fc386c1752cca36

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9da75a4c8927e0772be58dba3fcce107810c323193ca8af71054de07c693137a
MD5 652b5875152f876509dc3e78645cbaa6
BLAKE2b-256 9d55e25355b643ebc3ff622b0059436c869223046ee4cc7818dbdceb14bb8a36

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c56b9a0ff3789115d8cf01af5aae758ef28dc8eb9f9dcc5287e792e511c2ff1f
MD5 5d73f206114c72a0cca37a55daecf40d
BLAKE2b-256 7f8c962ed1d8839b40f94ba3147c9c1b4a8c8abab3187c14b7f0b6eb716a0a6e

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a28b35141cc2cb4f222287290035535579b6749f64ee71066ae0d8e0a7a27435
MD5 a86f9c435dfda23e4c38341f87d5460e
BLAKE2b-256 927d9628adec2b52556a1ff03e79a1561d80544586e7c914076afd2f2e840b79

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdc8a89be9b07682fbdd13809dc4c24e73fa13c48de62230ebbcfa5145a19858
MD5 36403ff1bd3e6d1c2862bfa3dd460503
BLAKE2b-256 3718efd2765bfb03e4b1a8c3e8c5f0149e8c73f33d6f12532610000423c7b6f3

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f344b1a3d1b38e50e78f168dc1421ad1c12b6d9a58691698e13a9e33b7817791
MD5 5493aa3205e89c014aea98e6ddf32c4e
BLAKE2b-256 e2a260753be9396eca32c0d1154ecbe5e18380f5fddb2cb7fcd991496ff68bb9

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9274ffb50a6bee1218571db4dd95029464ca5032d2bc305080e4bd63d805fe1c
MD5 c9738124a21c87fe57ff15bda05f4ad9
BLAKE2b-256 8038d941347f074c5428b30b4f7256560cb8843c727cf43ec582c4f1b86853fa

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8ac87e04f02f90528e74db130ddc47a0f50bbeb53e8b429e78f34ab9537125ee
MD5 184d56337c9851f23a8c7a8a6c698045
BLAKE2b-256 692c851c3b6d372b8d0a41197994e1c28a74070d4698029335d9c7b236ee3498

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63289da7ea7a1d3fb54835f7c93c64eae80d6d886893ecef44dd366197b73685
MD5 facf40606ce1eaea311a0166b3c4a586
BLAKE2b-256 960864c20dee56b740fb73f4d16ab5ad99362806dbaa003ef2f29c85fb1ada8e

See more details on using hashes here.

File details

Details for the file ert-9.0.0rc5-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-9.0.0rc5-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 81dfb2c7b2636e79c83a222e4688bf0e8b017b319d7c20980ed81cafb60daf64
MD5 c87660a4fea9da1c78b6c5008d0b65a3
BLAKE2b-256 f7cfe9a5d47e773bada656d54b44bfd73573d11bb00d40c21ab75583aada3085

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