Skip to main content

Ensemble based Reservoir Tool (ERT)

Project description

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 experiment.

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.2.0b12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (918.2 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

ert-10.2.0b12-cp312-cp312-macosx_11_0_arm64.whl (718.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

ert-10.2.0b12-cp312-cp312-macosx_10_15_x86_64.whl (736.0 kB view details)

Uploaded CPython 3.12 macOS 10.15+ x86-64

ert-10.2.0b12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (906.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ert-10.2.0b12-cp311-cp311-macosx_11_0_arm64.whl (706.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

ert-10.2.0b12-cp311-cp311-macosx_10_15_x86_64.whl (723.6 kB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

ert-10.2.0b12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (904.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ert-10.2.0b12-cp310-cp310-macosx_10_15_x86_64.whl (722.3 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

ert-10.2.0b12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (905.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ert-10.2.0b12-cp39-cp39-macosx_10_15_x86_64.whl (722.4 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

ert-10.2.0b12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (904.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ert-10.2.0b12-cp38-cp38-macosx_10_15_x86_64.whl (722.2 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file ert-10.2.0b12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a67340c7ed3c69db0b0aa9c00a0c50c1d960b349978e2b3bf2e4ef0b970deaf3
MD5 07f8896b0e752f8e7b3dc42b06d8298f
BLAKE2b-256 428526887c548821f4ae19094dd7bb23029f4e9c05d0c528d0f5e4aae87ed2ce

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3fce8ac8d3ba1f20f461240fb7fbe576ee9bd094af2e10388c4585096133d048
MD5 7001129292b4784f9d83844d85b6fc39
BLAKE2b-256 26515af67091fce0e1c02370f28b53570d9345ef22a117c2cb0a31553d581a98

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cc2733e8d4b86f1d4691ce0144a1485368cf717a1019cab112d09147c22f0c31
MD5 5e774bfc9136a245c2e5b61405208194
BLAKE2b-256 e2b9e787bde7d145f8d9eb066a99651016b3afc31f7ddfc188c943ecd1125b35

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45e14718cb7cf66359c874eca257580161dca3359b8de0c5576c7516c4ee58c8
MD5 2ffee4c3483f52cfefeb65f4acda008e
BLAKE2b-256 19b0538f862d9f1be0b87c76ecffd6e559db463c827e8fcbc2f4aa117eb32586

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c61e7bb1a0b334338635d73b39d186dfb52dff5fcfd10d02bb37ad5d7289b400
MD5 af2e13ffdf22e90fd84df1f5630a79ce
BLAKE2b-256 f164a0647d803094de505dfe4bea7d93d7c191ff3b5b8d8e58ecf2a944acacc9

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cc25c9bfa738fac4f48fd178dddf33c0b46a6d99a94f426cbf545f108725d9b1
MD5 c5214dd3710e2eeb3d86b2c64cf9b684
BLAKE2b-256 cb58947bfaeec501c3914b3c62510853e0fa3fa3f76c763acd95e4222e71140b

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a60372e3ed4508e0a662c22a788e04bbf667cc15f1ebad238af1613b0d6c02e7
MD5 e22589f9247de65338f3d329aa7a5747
BLAKE2b-256 221d55ae9de03ec3bc37b936519a1003032e393d8d366a02714a6930de32a28a

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 faf738a6e40e432f0204e9a22183f1bc3bedf2a5f12aa20b9c2b4e53f9fc497d
MD5 e7d7dba8a8f921ee1515f9245656c2be
BLAKE2b-256 5cdccc6675b919a518d6bf428c7da37206875b6fefd0487210ec5b2c4ba4facc

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0743b46a94a95bd825a1aae6d612b10ab41d3d4712041088977cff54f1e2e2a6
MD5 ce50de52245854e0aee7b8198f21d608
BLAKE2b-256 bf9ed050d6a722cd6bc138bc204557132ca4e1be7de8316203eb5316dc940f39

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 90c5529e4f7e8207dd4ab0e1a941ced0bfa7f7ff4c615e67c429dd71c55b9e6d
MD5 b81dfde784b680f2055a0125dcfdacae
BLAKE2b-256 fac0d10fd207f90ef8beda06fb50c263cbd1e77969b5a6fd8ae3baee82301c51

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 acb5c0e5bdffda48729208fcb2c5267535801ada8c8be143ab8b85ae4d3cc355
MD5 74b9f4bce848ba13dc320a9f53660d7a
BLAKE2b-256 10bda6abfdcd8dc3f33b8f602de51895183df62dce211ec86b77e911abb3dab0

See more details on using hashes here.

File details

Details for the file ert-10.2.0b12-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for ert-10.2.0b12-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fc5faefa8149060a34af008c080c022428c081526381aef78cab7cdd2fb11066
MD5 f027eb7caa59cf306385e4bc92a58b82
BLAKE2b-256 be046fcd58303f6884424327485b1116dd5976cd155072ebc7cb8d2e7cfcc8ce

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