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.4

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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-8.4.4-cp312-cp312-macosx_11_0_arm64.whl (739.7 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-8.4.4-cp312-cp312-macosx_10_15_x86_64.whl (773.9 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-8.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-8.4.4-cp311-cp311-macosx_10_15_x86_64.whl (761.0 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-8.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-8.4.4-cp310-cp310-macosx_11_0_arm64.whl (726.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-8.4.4-cp310-cp310-macosx_10_15_x86_64.whl (759.5 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-8.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-8.4.4-cp39-cp39-macosx_10_15_x86_64.whl (759.6 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-8.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-8.4.4-cp38-cp38-macosx_10_15_x86_64.whl (759.6 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0acbd0212d19e662d8b71523a7c3d60f5f2969daef6fd317c7bb9724a9b7c32a
MD5 27be87bbb8d8f71416942c61e42d2efd
BLAKE2b-256 f1115c8dbbd610f2e6cb11d9606dabf0ab393f5722bd9759761e937c3ee52f20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f1700c000013432d11db16b4fdd1875a2ae0601349ce11b101c01ff36ce2364
MD5 9028fbbb493677369dc9633ed0f4c386
BLAKE2b-256 b49627832762afeaf8517faae41234bb888562b8efe565409f53f5c30088295a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7d641d8205d305e59ec059cbcf0b6abbf42535b6023ef5834e4590a76fcd5db8
MD5 55f9d7b6a29144b224c5180b2a6e253b
BLAKE2b-256 793deae965fc9c59b4dbd047b9fff5f15fa7430a47bafcfaf054bb89de74c306

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a97a8cf5158cb93da220896c47431dc05d2e26ef35588d6ae4b6ae712369efde
MD5 2272d112b2275b20be0529f570ea4875
BLAKE2b-256 f882c8922d8b9513f383667d6a55890aaaa00c4136c01ff1312b7cc3c5fcd7b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e01d47894f5aff194211a63d3eeb25a74c29a6fcc47e335f1c4b08383b95082
MD5 f2e6daf8ae57ed6148676cce3debf3c0
BLAKE2b-256 a12a4590236bb2ad11fc1f208835f1cb71182921a65700f02509abdfef38217f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c58a91a1b2de6f172ec83ec2d175979e79408f247d7636c96e487914f5144476
MD5 d3c2d84b1f5e3f21cda0aeffaa6a2115
BLAKE2b-256 720c1c8b85fe103549d9d740ba7b1a491e1ab9cf3c4bb4bdf4264e92155558f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ab2680a12e474c2f813859ed2c0821db79c719c3f9990a91686e0658cb5b4da
MD5 e534ddfe124ddf8ba10828a3c210ab64
BLAKE2b-256 433c9290a4e754d6cef17375817ad1abaf30c3b52b8df8024d267e1e78406639

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4094ff13fcebd9d6648d58d7d06371ec86f9f4f764d0731c0bbb973d890341e0
MD5 e19d76abed05f267c35e3df1d01fcdfd
BLAKE2b-256 037d0789fc97f39e9bee1d7f2e67a560740e735d7c091ec7fdfa603fc4d1345c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 190c6bd10eda2bd4aa2bb079a1dd12050b50e84c8105ec92634822f9edc9e8c5
MD5 70899dd6ba584f5ca51ac78c0039b277
BLAKE2b-256 25d2665e5702626bfd12afc6477e45ac993759e66a3a561d50ba3ebaa1e7aa70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c98705f58fed5c934ce8d9125b5ab3950859676dcdeb5b5d49f8773413332ce0
MD5 cf60715820fc26311ec79d4ebd231b8e
BLAKE2b-256 3b43af2117ba3e3821e504ed6aea762f2cd63bb94555286a9b837bb8985accab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 87012f7532f183398927f78db1b961dc213eebf09872c6eff9f2d1989260e28b
MD5 b9df68f47d082bafdd2a8d2fe497cf08
BLAKE2b-256 10620944210ce0a7be563b05b514ecbff7d10e1556037908cc8d27378c373c5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8b28dcd38b3e385cdd91f889067bada77f2c4fa388e989d8fb566ac96b7e657
MD5 d5e55cadef20d6deb566b093fb62747e
BLAKE2b-256 10e6479a6286ec70a3ec34328d962d27a26f96b0cb1c63530f5b6fb2bbe10113

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.4-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 64f09eb1f07a65b708f71020220aca7b31b5f2644173b29af03ee7bc1a920b74
MD5 1fd72878d3a4d3c6d4fd1b92f4e238a4
BLAKE2b-256 459a42ba0b829351b4bb38e8d5f033207f37269d56357683994b48fcaf32b005

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