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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-9.0.14-cp312-cp312-macosx_11_0_arm64.whl (742.8 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-9.0.14-cp312-cp312-macosx_10_15_x86_64.whl (764.8 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-9.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-9.0.14-cp311-cp311-macosx_11_0_arm64.whl (730.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-9.0.14-cp311-cp311-macosx_10_15_x86_64.whl (751.5 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

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

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-9.0.14-cp310-cp310-macosx_11_0_arm64.whl (729.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-9.0.14-cp310-cp310-macosx_10_15_x86_64.whl (750.4 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-9.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-9.0.14-cp39-cp39-macosx_10_15_x86_64.whl (750.4 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-9.0.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-9.0.14-cp38-cp38-macosx_10_15_x86_64.whl (750.3 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e009f629f52111d04e0450547d0674ee262088e4667e0f10251a81075a57cc00
MD5 984b843a6e635e52bbc6ddb71094060d
BLAKE2b-256 5c04355caadb06a4822ce3a93ded39d8f10e71b1c1cb894925b5303d5e2e022b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2615dabc1f85cb2d5db0d7c2f755e5f56723aacfc582107027d585495740a46d
MD5 e104110c74df381d2d40d62d5d5a206c
BLAKE2b-256 7dbe976c8b8a7ad69fe6e7ea40f62e2fa5d7673d456ba7ddde97ea2ae3b0cd36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d1ee79f5f5d27b9c1808ac5ee52753dfd73d25605b02d301af99c6a94d44e110
MD5 65c09cd7ab6e15452a617069afc421a3
BLAKE2b-256 1fe81ff9d4e1a23706ede3d1a9f17a7ad0e8a7cb6ff1496465261038ef4905a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45402d24846ab60f864977647df6a492154bae6336bfaa850eb5c7cc543c65eb
MD5 2c723fdaf930f4a1ba508ebe8289bb84
BLAKE2b-256 cdd9eb31d7b5852cbc25d428ce023574f9f107c71f58f4858116af9c045fb73c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 feee7affd254c8cfb37867c7bb40e134b7100de75aceec43ce1a57bc5b8e6504
MD5 7ba7576871bbcd18db93ff1669347fe9
BLAKE2b-256 b25ef7618a55c9e48b4c09aab7a38cd1a741244a517b5bd9cc530443c1da3e9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 30ba337cc1297444d842458f1a9424536854fc008691b2a27393e542a77cfd51
MD5 66eeb3e77f7032bd4a3b7eb712c9ed84
BLAKE2b-256 92abe39c966ad8ed8a9449ab07b8c851860b6e9b40cfc7a012b65433ddcc9302

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e746d785975dfe4387b3a0824e8608bbe97070d944c5e3c434182f88216743f4
MD5 0552f5bc32325aecccdadc20dfe010f8
BLAKE2b-256 61ccb5dcdf6854067f193f2984c87a57f78566c589e0a03235434da43eb430c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52513669a244e89f50e22f00b73d4bc940e41309eb4942edd46130f05a7f61d5
MD5 79bbc0935b315b63ba608a3da032948b
BLAKE2b-256 f3ef9ba6d0d2de16f982ac5f4e714b72489d6dea2e3a09144446e8e204d68d0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4404d528c5d9a51a4f51d5949a7124f18fb31455e0e13208b476c51207231c14
MD5 7a7884da3cb5528808f4a8762e8ce0d6
BLAKE2b-256 803a33b8b2759e08b6b062f2726b984682cb62577c358234534d1c337aa67c6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21ec85860b3207222a81354eec8ccb93cc759cfe852b98e6ba08f20e43e4494f
MD5 fb6806e59b8728186d5554537fe7028d
BLAKE2b-256 da355ff67b649205130a54024af072aceade2218df92d5ef376f8e406a242ce9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f3f3f0a0e14181851a63b4e7a7d62d45fee35b4929567e171ea91d0b7c1919b0
MD5 804be09f41a73d578ec34083a15f75f5
BLAKE2b-256 fafef7d3facbab38cd571dca6131793515daa2d4c9568239ad13ab0c9d3e9a65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b2c4e7a311af41bc0bea5155ae0572ebd87df47de20798daa55bc39c0c47f45
MD5 690ce2d20159a4068fa86cc397d601f1
BLAKE2b-256 ec30eb05d8540c6738034c8bb000a863904b06f6a7163c9d12e2449fb824d340

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.14-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7ffff634a56427237edbd50d7ca5acfe6a32e9846c4aa1a34339227e82077244
MD5 040e14836ff5a64bc3de0939e7c82877
BLAKE2b-256 612f0eeeb56485a0ca91a3bb5a312625bdd386f0abadaa6121ce35ad23b6050d

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