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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-9.0.7-cp312-cp312-macosx_11_0_arm64.whl (741.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-9.0.7-cp312-cp312-macosx_10_15_x86_64.whl (763.9 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-9.0.7-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-9.0.7-cp311-cp311-macosx_11_0_arm64.whl (729.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-9.0.7-cp311-cp311-macosx_10_15_x86_64.whl (750.7 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-9.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-9.0.7-cp310-cp310-macosx_11_0_arm64.whl (728.5 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-9.0.7-cp310-cp310-macosx_10_15_x86_64.whl (749.6 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-9.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-9.0.7-cp39-cp39-macosx_10_15_x86_64.whl (749.6 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-9.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-9.0.7-cp38-cp38-macosx_10_15_x86_64.whl (749.4 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 04bbe4f622d4075a7b8fd310d485f64d433f12bdbf4784b49364f35b83dbe92e
MD5 eab831bc59239c1e8436fd1b9ba16c10
BLAKE2b-256 cb390de07f51a20a0b79fa24456f9a03cde4a769ba1c824163e91bd5bac353f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 187e4e3b0b6999c6e3e27c8ef81f97636ad2e8f3fae2eac75c5cfa8071086199
MD5 e30b467291908f6242a590017f239c7f
BLAKE2b-256 4863e8a8a173080e399f12f1ae745d8d258b61416fc18db1cc9e89b4e2aa4564

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a05a38ede3745bf4e153300ae2d50ffd8e85b756a7ef72ecbfdd5236b769854d
MD5 563bf228354cc4bee04adee6b139a34f
BLAKE2b-256 48b0859eec477d84d10f6367c1ececf4b45548bba562c3597299b63bd17884cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 889ddd303af67763c982678751cd11ee579bbfd3d6052b65f87072de4edaa680
MD5 26bca54e20c31796b4848929d399ae37
BLAKE2b-256 dc59c4c8ad3784fcde1861ce6df16234b9a5b620be28f25e7a9a9558f0c0863e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f2b057b6b45c75bcd5c524d5fb9ab8c0830e450fa056ee1f7abcbe7d646f554
MD5 0f654649d9d98caee8823e89323a7cd4
BLAKE2b-256 b4d0b4ade643a9ae6d99f54c4bae4b57750b0a9089f98153e3cb14621ea81e72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0cedbee13a516ea6b101c6775e1c11046e3ed49bca33f91166244e3c5fef0b24
MD5 b223ee30d59c5f3352ba7fd04e12b118
BLAKE2b-256 deaaaca55a3be63b23bbcae68b387bcabdf09cd434cd9b13f0c6bf228a07c3b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7d6922921ee391864ac3538a9bbcad9a6ef06419bb8211ab08244eceeae0f73
MD5 b9db04da14726f46280929d79aeed71b
BLAKE2b-256 7509c0cca0b35bb30ae23dfb57e3a4cb956ae1758701bdf7c3a833838940ab46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc2b27fd093d95e96d54c4ed8ddaf5c3abde1b36e4209a8956982ee66c28e573
MD5 6cf540a7d50addd6410fe7c7a7934f23
BLAKE2b-256 dbb9d3db145a9b05d1a80f2c8aeba5db16ba9b26249bca49d793565556816eac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fed0f81a8aa8fc40f6467d400d101d33fc2a2260c4d4dddb99ab3e641d814573
MD5 15c52eda4b60fc2719cc5311ff6b428e
BLAKE2b-256 661a245bed1add7d9d0481a07a31d90a50f5c32b1f543b2e879456d1b38296c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f5451b5735f7c8b5a31cf153c705f2f225bc419f94898a226a6d0a773291710
MD5 23c2850f61462177dfaea3f779290e14
BLAKE2b-256 fc3cbd159b62281534daae61670e2a0db22983b9c128dda9fcd2593e4eaf66f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 dbb7914edf36293dc1dcae9ee21381a03159bd6323a00abd598f8985a64d0a41
MD5 2799753cc1a006a0ca82a0fd92e3f42f
BLAKE2b-256 f16c49dac51b02d52d9bc3c729e75c6760424ca2a106b9d7295a28c5ff8e9a00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d62551062666505ead68267103d388d9b0894bc191a8ae8f430faa1c089666a
MD5 c075129240d910c910d357c6823cbeee
BLAKE2b-256 f3106ebb7ac77415448a3da5eb7fe169757cd006dde8c9bc270a019cc37eda16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 17381dd429160779a531d7c65db2a86a9161a20b53049554f77afe86d7eaf16d
MD5 ee3439d25ba6cde057c035b7ce7915ce
BLAKE2b-256 3debda98651bad732248e6af417829e5a13dcb40c26f5e61fb013e1e2f79a2cd

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