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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ert-9.0.11-cp312-cp312-macosx_11_0_arm64.whl (742.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ert-9.0.11-cp312-cp312-macosx_10_15_x86_64.whl (764.0 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

ert-9.0.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ert-9.0.11-cp311-cp311-macosx_11_0_arm64.whl (729.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ert-9.0.11-cp311-cp311-macosx_10_15_x86_64.whl (750.7 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

ert-9.0.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ert-9.0.11-cp310-cp310-macosx_11_0_arm64.whl (728.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ert-9.0.11-cp310-cp310-macosx_10_15_x86_64.whl (749.6 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

ert-9.0.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ert-9.0.11-cp39-cp39-macosx_10_15_x86_64.whl (749.6 kB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

ert-9.0.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ert-9.0.11-cp38-cp38-macosx_10_15_x86_64.whl (749.5 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 174b8b04b989c34afa4ea2653ee97c710abf80887ed67ec88c35c5223d9f906f
MD5 d137bbb007021adeef2a4d972b204abf
BLAKE2b-256 f5b2ddca99287d00440637672b29c5260cf12eef5ac4aadf7005df891016d567

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3de29320ef0e145531c4bdef49e9d3d32a7644a5559989fb4ef00cede369615
MD5 8eb5ff76b4a9fdd283b24da2f4f3dbbc
BLAKE2b-256 ea17cbca2f057d9632a1574fe77918e40a4745ee7cdfd92c29de28b761d3a8f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c8988c81f29c3903a33aae51ebebe1702b30f97c3aef83788ae775281aa2e05d
MD5 25444263905298815a93e03192ad708c
BLAKE2b-256 1fbe0c79a2bb4c39a2213afca41d3bd5fcdad0d73f011101d9d1e2841f40f31a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 62ddbd175f67038de9fd36a677ab159d506c8760e7fd1f4ba7460e70adeac22f
MD5 fd9acd79f2b35edeeb2982870fd70514
BLAKE2b-256 27b0d9007a7f53c411ff43bafd6aed5cdbde322434ad7adb84aef3d1ed8045c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3df0115386c6caf43424164f901d107a45f7ff66cc82c22b1b92f108719776fb
MD5 bbfb8e3b7043ecd639efe65f31cd66ab
BLAKE2b-256 096eff0f7d382d0031b5fa659eb5917a6431afb472b59ce7991386298ae6b715

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1fc99dd1e839530d871bb08f71058475972257096c156f7961eed7efca03e77d
MD5 95098f05239188a33018bec629a3f306
BLAKE2b-256 b0c6d0268ab765d01d9346e7481ebcba20aa824d7db73ed077db0c2abd408b5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 985762cf8c017353822372c2711e6ae5fa16e6d919e48e4b5ded123125a46ea8
MD5 83285b7fa59554c459e555ff0a29aa03
BLAKE2b-256 bfdb6ae22756160b575930efbca561245c922a2f02457972561e696a12395faa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 444fc2d76790c0b74876959b710c5d6bb50d8c52904e6841438ee84900b6954b
MD5 c47025901e8639c961b3099a5ddf0af7
BLAKE2b-256 e7881ed22fb460eeeea5536120987ed553d4804a9673f61020098d1d285de1d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f28cdece7addb09483036fbd3b51918d86231f541069daf5bf3a8c1f0d6c2b77
MD5 1408d481e7593674ab935583ba76383b
BLAKE2b-256 1e9e8bca2df84d159f18e2255e36dc0695f1d00510feaaf68ad0cc86e6cc6105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec0ad2a316d633f922b185ed334722a84821130c7a203a3acf8053d310447f4f
MD5 867e214226e67e9e5b11ef25a2046e67
BLAKE2b-256 259e57b2bd8cdc7ee9f1ad572dd20b37363d2cdfc6e23cb454d5b8b502100c3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ert-9.0.11-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 749.6 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-9.0.11-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 563c6cc59012bf1af076a49600a11d0ca63ae66ab0b969644db28bc1e1487e0a
MD5 f7d129bba150a0d0da81804140c1bf6c
BLAKE2b-256 afef692efc4c21194b62457333457ea378c269cb61bb3ced3351430da5c5813b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ert-9.0.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e0f67433481a20fc1e4feb01a05f22aa6f08d2b3b689d7b37348af538276d86
MD5 58096e1d2123f30d6b83e253b3dadcb5
BLAKE2b-256 2e4565aea61991a3aa68e692c26307ede0747e861e0ca572d0a3e507847d6877

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ert-9.0.11-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 749.5 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-9.0.11-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f2c8042bd201082a183ca194d3fe6150720fd68a7953576fe0055494367725aa
MD5 cee4904f1d0c92c93254359408255df2
BLAKE2b-256 96544805f30b7c8bb4ef09b62aa457c2f533699af27deb7d4b638359e7d24ff4

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