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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.1.14-cp312-cp312-macosx_11_0_arm64.whl (752.8 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.1.14-cp312-cp312-macosx_10_15_x86_64.whl (775.0 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (949.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.1.14-cp311-cp311-macosx_11_0_arm64.whl (740.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.1.14-cp311-cp311-macosx_10_15_x86_64.whl (761.5 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (947.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.1.14-cp310-cp310-macosx_10_15_x86_64.whl (760.7 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.1.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (947.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.1.14-cp39-cp39-macosx_10_15_x86_64.whl (760.7 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (947.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.1.14-cp38-cp38-macosx_10_15_x86_64.whl (760.5 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbeaaebd7cdfa1ca77b59c5b27b9b5783048b6309f773477ffce5d3a7f420175
MD5 f291853c62c0af720ac3a901dacd3cfc
BLAKE2b-256 5e9d5053030484db91dc19d70fe2973b2ccdf66879ed79ae0dc1fc4815245895

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53a59c0717a2ae95a3f3d784bb3c57a15cbbcdb39d7a8ada17f3c6f80e1acc96
MD5 8a22d061f55a6ca4351eca55e2449815
BLAKE2b-256 1ef0d8d1fca911d31af4dd5e73523301d6201657ff73efd8f09eb120dc61143e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6a2463ab0ee62f9b40aab8d924182ae9fbd719aa8bdedd99d90fb31874164827
MD5 1bcd33ba5996ea038725be0d16042862
BLAKE2b-256 7f516c501a268603755c11192eb04c0f0c3bc530008d7906231baec0f58114e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d4130e6a5eae5980d5ca62adf71687228030485f54d0e3855899cb6de5d7dae
MD5 f4a8e8788c5e7344d84d06426115916e
BLAKE2b-256 a523e6f472d1239b3a3fed863f0cc7aef25ac707e86f62a05b179a942d64098a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea1d4b3fc5c1f95b51477c72165d5b807fa6876aa92de9c46813e1f2d4076a58
MD5 75ccf1e5e6af971287075f0aee4b89ac
BLAKE2b-256 3ba6f051510bd413b62bb1a1a0045c5b1dc34a297c3aa1173c521316fb369a9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 aa5fe9ee654c46c15c5864f96d53b4eeff9e80e0f69073d521a9d71e8795cce9
MD5 f27cd95d10f1b83a8bc338a6158f341d
BLAKE2b-256 6d35a7baac9000a0b8126b96e7dfe38bde5bd6527298f0f0d29685b59aaae1c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d92b9811092b87335555776da647ee0cf0e6b449618c3e9a075503106523697
MD5 3ac2226777f287af691e8d9322402f9c
BLAKE2b-256 ee2cf6e3b2404f99d4381582a4a896958add13416147dc1449fc0c72c2bf40ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 647ed2e7a04005c7631b8cb17884d06b459e573f808eed8f516d1c5f577cdb3c
MD5 51382af8920c88e10b1064430701e761
BLAKE2b-256 09ef3746f1374ead4f28f0683832ee0f77a96cb70f4821a8362ea5e66564fb5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25565df1bb22604601ddc4f521de33b6f7099c077f1dd9768f0c7d88401f8033
MD5 789f5385df192901a9e046aef6cc4e48
BLAKE2b-256 aca09bc3f3cd1524321e8cf3b37a259ce3d0b8730df14cea6d3fd7b3ed6211cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9431e40fb3dad6e76884811fac162a4383f7fd6f6a2dfbb7140b304b8fff5fbb
MD5 66d93d3645902f1a6f2c5bcbf01ae094
BLAKE2b-256 9a557905671a635ad803c968b200b6036b4864af1dc76e654cd231204d71e45e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dc1e0a68a2120564a4f05b4bb86cae961deaa3e71bb51e7a9a9a2e56f36564a4
MD5 da54101f457d5c5097caeb7ffc5b408a
BLAKE2b-256 f22380c28903ab795038b58202dad93f1b6dd8fc342feb04b0706c39891c0a9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-10.1.14-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4ede5fd4869919c58bd169c8d1aefc28ac8a4c798b98784180fe1d5b7955e333
MD5 a8baa3aed8bc31ce608528d0a43d015f
BLAKE2b-256 7dc081e89e9a7ca0f9bb030a90eb3a23e180a4e789803b4e0c7031db096d6d99

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