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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-9.0.16-cp312-cp312-macosx_11_0_arm64.whl (743.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-9.0.16-cp312-cp312-macosx_10_15_x86_64.whl (765.3 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-9.0.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-9.0.16-cp311-cp311-macosx_11_0_arm64.whl (730.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-9.0.16-cp311-cp311-macosx_10_15_x86_64.whl (752.0 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-9.0.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-9.0.16-cp310-cp310-macosx_11_0_arm64.whl (729.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-9.0.16-cp310-cp310-macosx_10_15_x86_64.whl (750.9 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-9.0.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-9.0.16-cp39-cp39-macosx_10_15_x86_64.whl (751.0 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-9.0.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-9.0.16-cp38-cp38-macosx_10_15_x86_64.whl (750.8 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf0af6e8b699f702ed06d338f2ea7f2c330c5977736cedf268c9c8525fe5673f
MD5 2ec0d852d6a343acb8d9534311d841d9
BLAKE2b-256 01c06396146146515c6bfb8c5bc1da8a57d9762578082daf099e4b754b22ff07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa65ec953a33efad45bde72d8452efab93acaa62fd9e874ae995194f2fdaf50e
MD5 e9cf71d8084a060e04bf78d7bee7e757
BLAKE2b-256 68e716474012b8a1a924e8d5c33780070d38f7333fe151aee01dd1ab816351e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 633219594745d06d74ba000a16105648694f89172774280abd95e33bec40dcfa
MD5 199939be132ec3b799a5971aadfdaafe
BLAKE2b-256 d5ff663e15c98302656ca004212f413f5024e3ea5e857c804da481ba2169d53d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2308ac7e6afac7142ab358d02b4c34fd2ddb80cf81e31fbba2d582797a5dfacb
MD5 ea07f4afee06a20074f26c6753643e85
BLAKE2b-256 516fb7c99507c1222ae1e708484d58ce89b817c057f305e60e2f14c0b1e335d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13fd509674ab33ac9af3ee41f8c6bffc498aaab3d5872f1f31dedac18b3f9325
MD5 9ff97dacf7d26614e33b8598c44003f3
BLAKE2b-256 1fecd6c6823fa7189fc8a3e80cc00adfec6a522c80c1f327eb59255a6c61c8d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9f489f2b14d29eff859ce337751f60ec1b554be59462c331bdf63654b2b5822c
MD5 e6257367a102965b7a9b7766c6a3cafd
BLAKE2b-256 70332bda92199c9f6db69323c011a88d9e920439dfd531ae52bebf9fc2a26116

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb0773f523df23d637c6efdc8c7f13a55fdaae7c860325034b84f2cbb21b2eee
MD5 a510dd75702edca58dd68bf3eefa6202
BLAKE2b-256 6c634db1c0de7d6a2723cd2f7970cbe56c083958fbd0b6d2cffacfa0ec52481f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bddb3b9ef3cf7ece6c798f0a0d7640f238edc942b5d092870766898a26a9709b
MD5 cf376c94a49cb3fb61b237ab27db498f
BLAKE2b-256 8ed063b7efd91866af2f5dd7a2edc1d1edd76d4674bbb76d46f9dc845ca2ad82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 aaa5efcdbfa01a55e4fb1ecbbe707e8236145172ecdd9c0db965011ee859a17a
MD5 c75abbf1632f839496059a0554e99e64
BLAKE2b-256 689925343d31f1b8c3690533d7b80d3bd9ac0d720daa1c334bb0b6800544fabb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4c963f28d37ae527a989cc1554474df88e55c34d10efb41dcea9f5c1e4c742f
MD5 f48f033de35aeb77569f1e1640c13869
BLAKE2b-256 b7564c67b1afd58a3646e96bdaa896845fc185d2bbbe7b6963a84fefd7452234

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 bd7222c4cdf70414c7c9bc8e2b8083d0f3db0c3438f79affd6cfe82fd239e945
MD5 7a641a9ca087d711c7b82ef861be4acc
BLAKE2b-256 e529816701b62d160eb5e810f62b7bedc03c49b8ea0e2d53440ddc8f0d799799

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 922d2c17ad49d8b0c2b5c0872bad8251fd9d11fc3f6490445bf0e51019d70bf5
MD5 1ac66524ba7d504a780455d550c64995
BLAKE2b-256 78f5cdd3121a6c755d0a849b86fcba637cee502e68d815aa829670e6a926a4b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.16-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 dd143fb1e802ee7992db212e5a8b599299965c91f41578d26ffbf743a73383b2
MD5 aaa71bac5ef5f6e51e45563eae4992e0
BLAKE2b-256 8809c4ef31fae233534ef3d8e97a2e4a19e87ed432463248aba3e747cc250422

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