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

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

ert-10.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (952.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ert-10.0.2-cp312-cp312-macosx_11_0_arm64.whl (747.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ert-10.0.2-cp312-cp312-macosx_10_15_x86_64.whl (769.6 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

ert-10.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (941.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ert-10.0.2-cp311-cp311-macosx_11_0_arm64.whl (735.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ert-10.0.2-cp311-cp311-macosx_10_15_x86_64.whl (756.2 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

ert-10.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (940.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ert-10.0.2-cp310-cp310-macosx_10_15_x86_64.whl (755.1 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

ert-10.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (941.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ert-10.0.2-cp39-cp39-macosx_10_15_x86_64.whl (755.2 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

ert-10.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (940.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ert-10.0.2-cp38-cp38-macosx_10_15_x86_64.whl (754.9 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08c6428aa94476ad586fdff4d84ffb78ebcd71a0b2f231f6278085809ad5bba2
MD5 2db74d3028e635855630d3c52eac855a
BLAKE2b-256 5bfdd73aa129bd48b29766fd1ebe4a7311c6212f8d39e59d5958066c1fca7182

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fcfbc3937b09bd4c83a8509f0f93218671722b635c20dbfa59016e108fe70b5c
MD5 e61f4b4fa896470e687cda0541cc2648
BLAKE2b-256 be160ead04816df5f4263e602ba17f8ee8c7a757eb01ff0ffad1e9a9fbc37c35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1340dc2af88d349e7672722dc7d4c0a4a1ab562ce913e296b34866b8dccb138a
MD5 78087f8a01b8e75df607e39d5bbc6e57
BLAKE2b-256 a8f37579c194e44c9002ae4418425cc315f16c22006a4e2478bafe2a90f7d98c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9a725e5888382c64a79c8182cc0ac447f0750cba2f583888357a434ba6f6295
MD5 aa2f983082c7d75fe39f0ed632cadc0f
BLAKE2b-256 4707ac9a4415c7e8257a946434e3eb0c44fbfac620afd2fc7a756926e7bec5c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f530593caaf8e727272c1737fbfefd9f9c4dc5802004a340362ad9d6fffbe413
MD5 adc3d52ed4c1996cc94606dd15e38d1e
BLAKE2b-256 917147b447b22dcc321ad8b785430dcaf31177f14cc1f904c30e65d9901aa0e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 05817c246cdbf81aabd75e3e15c2e01ccd565d222f4606eb1abe761891d733d2
MD5 01d394ddb04e295cdb0176f0f57824e8
BLAKE2b-256 fc43a08ba7e637c02f7fcfaa285218bb2e9cd654176a66fbbd992f9808ff9010

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 34a56ddb306b624ddc8e29cd6b8bbb9849c4becc71f84a3548fb6e71bfae802c
MD5 b12d17b4e62ef76d9f0b3655ecf8d851
BLAKE2b-256 17d5d6d34d3be10fe1b77081673e42c4ad02898ee7538348ccbcf44d27ce4590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 732ce473bc6cc231f33692d9669e975bc3ad2622d5a883cc424c5b27d99b7941
MD5 aca7d159d7f045aa5d2fb3dcf1fb8133
BLAKE2b-256 e7e3a50c73db38db48c5b84370c4a84b7d95db32630d33c29a2d48041116258e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ce475cdfd15f3a13c803d7ec401d62355dbac47f932c4b4a1f3b6078934cf0f
MD5 fe0078a034d38dca346a64c6e869bdb6
BLAKE2b-256 8c2cd7c1a5c6ccac17313c8ce51c2a76ec6db49f57442cc10081481052f18157

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ert-10.0.2-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 755.2 kB
  • Tags: CPython 3.9, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for ert-10.0.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e4a2d386e9a3d92d915fdba646669ff96de58fca6c3010e32cd049319b855a8b
MD5 c8fb14dd6768590f5e71984a59af4637
BLAKE2b-256 1a7817a2bdfb44864682043b2721217719dee7862b1c9d3231628464e071d225

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00ff782495d408105deb6402fa0b84ac215dcba580d9fd15c5916aa7aae205ad
MD5 aa028bfc9b926914310ea2360a7fb4b4
BLAKE2b-256 b00253d1c8c6726dcfe7e717fc05080a93c263af46b3735b3442a8e0a8eff222

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ert-10.0.2-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 754.9 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for ert-10.0.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 187c9e65d7920ef848bc75324265de041ea0dea4fd2454137bac8ec8511877b1
MD5 612ebab09b31bb6d71d607526e36eb72
BLAKE2b-256 4894a5b3ff47e4f6cfe0e5c2e8317117db5308327713bf16acb14925d0664d30

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