Skip to main content

Part of the Ensemble based Reservoir Tool (ERT)

Project description

libres Build Status

libres is part of the ERT project: Ensemble based Reservoir Tool.

$ pip install equinor-libres

Building libres

libres is now a Python-only package. It does, however, have a C++ library component. As such, a C++11-compatible compiler is required to be installed as well as CMake 3.

1. Building and installing

If you have pip >= 19, you may simply do the following to build and install libres:

$ pip install .

Otherwise, you may install the requirements manually.

$ pip install -r requirements.txt
$ pip install wheel
$ python setup.py bdist_wheel  # Build a "wheel" and place it in dist/
$ pip install dist/*

2. Building for development

If you have pip >= 19, you may do the following to build and install libres into the source directory. Installing into the source directory allows Python to use the Python module immediately.

$ pip install --edit .  # "-e ." is also valid

Otherwise, you may install the requirements manually.

$ pip install -r requirements.txt
$ pip install -r test_requirements.txt
$ python setup.py develop

To use this development version, have the PYTHONPATH environment variable point to the python/ directory.

$ PYTHONPATH=$PWD/python pytest python/tests

To test the C library:

$ mkdir build
$ cd build
$ cmake .. -DBUILD_TESTS=ON
$ cmake --build .
$ ctest --output-on-failure

3. postinstall configuration

3.1. The site_config file

As part of the installation process libres will install a file called site-config in the res-module's .data/ert/site-config; when ert starts this file will be loaded before the users personal config file. For more extensive use of ert it might be benefical to customize the site-config file to your personal site. To do so, you must set the environment variable ERT_SITE_CONFIG to point to an alternative file that will be used when bootstrapping.

The default site-config is perfectly acceptable to start with, however.

3.2 Forward models

The libres code contains basic functionality for forward models to run the reservoir simulators Eclipse/flow and the geomodelling program RMS. Exactly how these programs depend on the setup on your site and you must make some modifications to two files installed with libres:

3.2.1. Eclipse/flow configuration

In the Python distribution installed by libres there is a file: res/fm/ecl/ecl_config.yml which is used to configure the eclipse/flow versions are available at the location. You should edit this file to correspond to the conditions at your site; alternatively you can store an alternative configuration file elsewhere and set the environment variable ECL_SITE_CONFIG to point to the alternative file.

3.2.2. RMS configuration

In the Python distribution installed by libres there is a file: res/fm/rms/rms_config.yml which contains some site specific RMS configuration. You should update this file with your local path to the rms wrapper script supplied by Roxar; alternatively you can store an alternative configuration file elseswhere and set the environment variable RMS_SITE_CONFIG to point to the alternative file.

Project details


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

equinor_libres-3.3.1a1-cp38-cp38-manylinux2010_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

equinor_libres-3.3.1a1-cp37-cp37m-manylinux2010_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

equinor_libres-3.3.1a1-cp36-cp36m-manylinux2010_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

equinor_libres-3.3.1a1-cp27-cp27mu-manylinux2010_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 2.7mu manylinux: glibc 2.12+ x86-64

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