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

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

If you're not sure about the file name format, learn more about wheel file names.

ert-8.4.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (947.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ert-8.4.10-cp312-cp312-macosx_11_0_arm64.whl (740.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ert-8.4.10-cp312-cp312-macosx_10_15_x86_64.whl (774.3 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

ert-8.4.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ert-8.4.10-cp311-cp311-macosx_11_0_arm64.whl (727.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ert-8.4.10-cp311-cp311-macosx_10_15_x86_64.whl (761.3 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

ert-8.4.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ert-8.4.10-cp310-cp310-macosx_11_0_arm64.whl (726.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ert-8.4.10-cp310-cp310-macosx_10_15_x86_64.whl (759.8 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

ert-8.4.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ert-8.4.10-cp39-cp39-macosx_10_15_x86_64.whl (759.9 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

ert-8.4.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ert-8.4.10-cp38-cp38-macosx_10_15_x86_64.whl (760.0 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 feec3bcd0b518bfc63b625c7c282cf9ff517dab07911e218c499e93edf90b5aa
MD5 5713822bbdad22ce3a0e12087ec7da99
BLAKE2b-256 dc0ea6f256001436c9e341e5a8fe9a659ececba92b91a0a99545dd247c2ab222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4a4259e7599bdffb95a697b4ed073d787504eec9426862a18567d8977c5be5c
MD5 05e50abfebd551ef3891ef70942e77ff
BLAKE2b-256 2072d5f44e641f53edfa1b221554764a64cf12c795121e62f783c80c6b5b4449

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2ddecc3ce8cc3ea1434e7a88b578382d693fefd30fd59eb9f6dd3b7bb98ef81d
MD5 fb556cd0d836dad0275995aa0d97fdce
BLAKE2b-256 0742ad010aa55ff1324488591fdc470c6e6975a897c28d57da27bfa393d14bae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f95f52110f7f7cf15cc787c04530eaffc7d1ac1b4ad8817ec2bd93650d9b2cf5
MD5 6a88bad6ecf64f3ba73de1d21a4ac414
BLAKE2b-256 57f4fe5d8f3ca7343b967e5f6cb8bfe6cd21274d1b6332f9dc3169985206dab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4e28f72145f27658df4e2ca40d49d40aea173de0ff20622640d5ec3db70e03f
MD5 399da040faee9b6d16e8c257eafedc9d
BLAKE2b-256 229f0ec1a6240655a711d99fa8460201644b2b0541b13fe569302e6c0314f986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 da823574b15da3369f8bfaa50c80d52002779404e695f37d034fed08894bdebd
MD5 6ba877b07e3027671fa4e2ebb1f41518
BLAKE2b-256 f789f9fed851d14e03f7d00ce6128df0983c74670f84f69a83ae2a8d38b7b381

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8662c2da2f01f069a2754aad988fad47e46697334d5496a936a30cbfbe10545
MD5 e7cbd1242fc09aafcf9ce84d061bc759
BLAKE2b-256 d91395825f772ec44f3712645cefb51a29d044368053064718e7f9e1ffdc802e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 33d86a9bef4c7eb0f0038f83a9f6e0a360c933fbc30c21e1b7e6c28054def588
MD5 8d1235fec359956f6ea31fe3faa66964
BLAKE2b-256 d4ec5c27a14eed0e76557dc711d8ef718ec9101f1dd03f70603380b49f1a0ec9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c72aaf6d45d6a2d14fc6068f287bc02fb1a92d07a70202234dd4effd869ad353
MD5 9ac4e4f2b9ba4ba5d8f8badf75ff2448
BLAKE2b-256 464a077bbacdb5852c373555e3a9614e4d846450cedf946c1da0bfbf658cd0e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09c81f2e2302a042847195785cd46d3f59a3e5d71f45e5d46941d9c710a28adb
MD5 1f5d73d78b1e1ea0bd9333609d6aefd3
BLAKE2b-256 5d7c86e3c9dc09f47275c3ec7326f995e1076f8fdf2153bd4f250ec6205ab201

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f946c0f222a3d6fb2b3f6cd4178ec4459912f713cd10257adfaaa0b4fdb661b8
MD5 bb9511908a87f9849f597ec878268c56
BLAKE2b-256 fa833e8a134da742b228c3bba0468e967fd5bdef3e3087284114e4ac5db3b55d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb93737c54e28251ae8afc8d55312d050b25f89e2be97ce057c6dd06fd1f442d
MD5 bd6892716eda451ea2ab9112cc9b06ee
BLAKE2b-256 61092f100db4183e565d7e330de7f401ce63cb1008bfbcd1161f3b2392e01590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-8.4.10-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6366bcf5da4f069b907ca37722b1f57ba67d30343100df331809b35a0ab393a6
MD5 bdfee8444c7d31e6d7901a9c5dfe6802
BLAKE2b-256 f853d9fb7ba028e894724333254f83d3f8b921d376ff4c7aeeadbe384cfde800

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page