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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-9.0.1-cp312-cp312-macosx_11_0_arm64.whl (737.0 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-9.0.1-cp312-cp312-macosx_10_15_x86_64.whl (758.6 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-9.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-9.0.1-cp311-cp311-macosx_11_0_arm64.whl (724.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-9.0.1-cp311-cp311-macosx_10_15_x86_64.whl (745.8 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-9.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-9.0.1-cp310-cp310-macosx_11_0_arm64.whl (723.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

ert-9.0.1-cp310-cp310-macosx_10_15_x86_64.whl (744.6 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-9.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-9.0.1-cp39-cp39-macosx_10_15_x86_64.whl (744.6 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-9.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-9.0.1-cp38-cp38-macosx_10_15_x86_64.whl (744.4 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c9873e35925cea6c2b7c2b7006eb00df1cebbbf1ca8477f12846fee91ed0efe
MD5 412d41ee8bdd9ff3319402c2585e1e35
BLAKE2b-256 343f24dc947c59cc3563f3cabdaeb8102dcd54984a6225715c52c80fb247946c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1dbdc5b60d688791d9f420b2706ec54b6e95eb63c5d688cbfb7f4b7a089a596
MD5 da710893086ae471445e183af179f80b
BLAKE2b-256 88960131bc266bd98273ab17e1c3fe6de2ed802364fff11c9a513410a46f013e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2a82940e01b5f85b8b5e15b4df5d4e1662464fcedf93b8c5fabda2e546dcc02a
MD5 46949f308da5a6da12ffb76ea5b6ee73
BLAKE2b-256 7e6f6b950cbfb6ab3e60093511f0830d502137dfc2553e69081c9fc052aefe90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc834260e4fe1570f5dc7803557ad4dcb0ca39e7eadfccd8d5a0b669a4895470
MD5 5da45a3fa3bf525f2aa99762fa9dedd3
BLAKE2b-256 39b7bc79eb311e8caaf7887fc64ec24e633cbd1c8066d573223f259284ea296a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab7610198796ae3676b2f75c785b9145862d5ebbecfaca5bbf0d5e77fdbe0163
MD5 bee1fb8fb209a75c3b9d44a380ad171c
BLAKE2b-256 4452a3c2bc04ae32d48f1126f2142c6cdc08cc395728e70c004fd6d4726b091a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3fd8b0e01ef8a25e6c54db3d679a5a183f21aed724524cd55e84d8d5951d21f7
MD5 48e5bfbcc360824f927a96127825fc42
BLAKE2b-256 5f990d18a75fd094fd7df204a1c2e70ee936ff2e6fd2da37361d351d22506bf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6b51dd8dbe9321d64bd583e550ce0deb13f48d7dc9e6432349ac5fb36de2959
MD5 d18f09ec789a5ec151c0f5a259dd89ca
BLAKE2b-256 7830ff454d096080d73c07be65629050c5b3217447b5291c515a8c27a8cbb9fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 981ab8d08df1ff0aef70aea97e80a8cc1eb92424aa85a5b657513a42f507d940
MD5 f29f70a9cd29b1821c627aa04269d293
BLAKE2b-256 367ef5f689db9ddc2cb841585a35f3465bef3f075f46005a04d03339f4021930

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 65832ac4a44ad9d97b3fb181a144c94d29ba37aae0ef9336b9c77cf9c99b6391
MD5 4ae1c4135158fa4e92cad722527ef04b
BLAKE2b-256 a47bdde859721603d79eea110ca96493a149c13ba45f3c864e899e5093b8c693

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a5ec8229c043e8745575d814362c4dbe9cc60e3a93bce3d0515961b18afbcf6
MD5 65d3753db6821f87921167c54631ccfd
BLAKE2b-256 02f1ac62df0c532adbd3f662bf216d012737995b136db57332305d3cb7dfbb13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 257f077ee4ba919c632fc906374e4f4b38bdd246a506af8e7a4a9a12b33b0198
MD5 13a4c41ca5d63525a0fd1c2f5f671d32
BLAKE2b-256 3b3f47aab7da713aeaa834f2b15e9ab5ae9313100ad722b42ab1b0810c56c3ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7df671c189030c0ae4efa146e54fc87fe7e2651ba4a08c35c9266bd595391150
MD5 e229a545b48d4b285c0505bbe6c7700f
BLAKE2b-256 11e7f3de74bf0a2ae1c59ef1a857a2417d4c88f0fb42368ced52b5a3f47252e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8de28431e2af635e8b8dfdc2dbf1708f6b93aac1a7726b83843d92f7c831fb30
MD5 99fef6d73b0ffca409cecb2e5f323238
BLAKE2b-256 d4a522e3f5e9de9ef9a40a00a6c5bd41c94f11d31dbba38546b4566ebfade27e

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