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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.1.0b0-cp312-cp312-macosx_11_0_arm64.whl (747.0 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.1.0b0-cp312-cp312-macosx_10_15_x86_64.whl (769.1 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.1.0b0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (941.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.1.0b0-cp311-cp311-macosx_11_0_arm64.whl (734.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.1.0b0-cp311-cp311-macosx_10_15_x86_64.whl (755.7 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.1.0b0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (940.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.1.0b0-cp310-cp310-macosx_10_15_x86_64.whl (754.7 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.1.0b0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (940.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.1.0b0-cp39-cp39-macosx_10_15_x86_64.whl (754.7 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.1.0b0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (940.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.1.0b0-cp38-cp38-macosx_10_15_x86_64.whl (754.5 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ert-10.1.0b0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f5182a3f638ef65af362d6ded85e8e53c0656d3a38e63e52a296c0848c7f109
MD5 4fa81d757c7f07ec19ed0b5396357ff8
BLAKE2b-256 33f1648a67331f90fcf85fea8c1444fd8ebce3d0da0fb13b74ba7589e4ce8ab6

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5598aa2f959fb3b003e4b37b2c5ff82fb3e99f0b8546f59ec278b01f9ee242c6
MD5 e4a74acc9341a72be21b25ffce2849e1
BLAKE2b-256 3142e4103756b88a3b0af88275f23f2a4cfc301e2482afacfc8e0a6fc09479d6

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6abefb2dc5b26755ef25981bc86e1dc01274f81bca5cd3724e0a05daba534f62
MD5 6290b7853aaa9a5b3d088a766e83454d
BLAKE2b-256 b9776399e7dbd92989306d902b1fbce60354357c216d573ec1dcb3757fda6d82

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bef5bb81400d6935c71f384d3128d195bdb77bcf450ce96b17f0e02d41eafa06
MD5 0efb74b5c2e8a332e83d4b912701ee82
BLAKE2b-256 b82bd73ad287d88a9553dfdfc6199efecf43ec77bfeccb736c22909afb5c17d8

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1983e91c41d2c5bf4bda754462f89efc0397b8cb997ca395fe3c321c74fea48e
MD5 d3dac8d3e5d3d07dadbd88275870a111
BLAKE2b-256 8997287f9e08fc9a4c5a86d94c70e9ba1214fe90e0f8df68aa25d756337538ea

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 57f595fcdcd0fd42537e19ed8e1cc2760f5d71e9ed651ecfa5a164ccdd1da4b4
MD5 45b16488a3ae9a4f4438948d16542c1e
BLAKE2b-256 aac6f46f709cd8436e0ef070e31593e0fe521b9815b151d5ca89bbda55e26e2f

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a42e0fc1198083c2c49698776c81a57afb9df12796611515fcfc096d5bb5f17
MD5 4f570f0a35315d8abc87e6e9bfe8170d
BLAKE2b-256 ee9b6c51e8a570b04959c5ac3e537d8d907dbf9f1b8447498feb77830c3fb41e

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5cd3753a97090aaec73db443980c1ea285107fd9407f7bf8ede67f05fb9c8b30
MD5 cd85a0b9cae2879546ff0d6c8f106984
BLAKE2b-256 61766f0ef84272de4f43fa7fd7974c4ccf3909b0750ab666c6abecf0f78d79c6

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3fe40cd963ffc18f3774240190837b23ec5eb33ed27907cb60221e29bcd5c1f2
MD5 f17aea5fa59c13917d6c58dc5cc27c4d
BLAKE2b-256 fdfe96ff1b129b4876f6a7b07f0c94fcaeb5c91911e832e472f7ec2d42c995ee

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e5a9e4ac1d51695ac5096322d1b80d233e65b99391d9befa2a8954c4f0fbc599
MD5 70a77d31f52b8a1cd1eef5f9425d005f
BLAKE2b-256 3092c48143179d96bd56862726da96eaac6384027d1f463a6f5edc674a689ae1

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 912ca7b7cd2718a2f0e33df68b54fcf906b1167b86c9e603d5683c0b815a345b
MD5 10ba3a19f497de710be9b1c43a75fa05
BLAKE2b-256 16309428468de6f7b10e63599360cc935678c9567c7fb578efb5adc4e0c4b621

See more details on using hashes here.

File details

Details for the file ert-10.1.0b0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.1.0b0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a5a4375ed69accf39fc034fadc581f87cee69df4a033c119ef7f7b87e5c4409f
MD5 d0f58b7b0b493f4dfa01f1453cbfddac
BLAKE2b-256 7e672b0c84b5e270421b38bb31da2bcabf794efe84c9cacc6980d4b18c6eab08

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