Skip to main content

Package for reading and writing the fortran result files from reservoir simulators

Project description

resdata testing

resdata is a package for reading and writing the result files from the reservoir simulators. The file types covered are the restart, init, rft, summary and grid files. Both unified and non-unified and formatted and unformatted files are supported.

resdata is mainly developed on Linux and macOS, in addition there is a portability layer which ensures that most of the functionality is available on Windows. The main functionality is written in C/C++, and should typically be linked in in other compiled programs. resdata was initially developed as part of the Ensemble Reservoir Tool, other applications using resdata are the reservoir simulator flow and Resinsight from the OPM project.

Dependencies

Regardless of how you build resdata, it will depend on the following system-level components.

Software Debian / Ubuntu RHEL / Fedora macOS
libz zlib1g-dev zlib-devel builtin
Conan N/A N/A conan (Homebrew)
pipx (Optional) pipx pipx pipx (Homebrew)

Note: The Conan package manager is not available for most Linux systems. Conan recommends installing it via pip. If using pipx, simply pipx install conan and it'll be availabe for your user regardless if you're using a virtualenv or not.

Alternative 1: Python only

For small interactive scripts, such as forward models, the recommended way to use resdata is by installing it from PyPI. This method doesn't require setting PYTHONPATH or LD_LIBRARY_PATH environment variables:

$ pip install resdata

Alternative 2: C library only

This is for when you need to link directly with the resdata C library, but don't need the Python bindings. resdata requires a conforming C++11 or later compiler such as GNU GCC, the CMake build system and, optionally, zlib.

$ git clone https://github.com/Equinor/resdata
$ mkdir resdata/build
$ cd resdata/build
$ cmake ..
$ make
$ make install

To install resdata in a non-standard location, add -DCMAKE_INSTALL_PREFIX=/path/to/install to the first cmake command. Remember to set LD_LIBRARY_PATH=/path/to/install/lib64:$LD_LIBRARY_PATH if you do use a non-standard location for your program to find resdata.so.

If you intend to develop and change resdata you should build the tests by passing -DBUILD_TESTS=ON and run the tests with ctest.

Alternative 3: C library with Python bindings

It is also possible to install both the C library and Python bindings using CMake. Note that this alternative is incompatible with resdata installed from PyPI (Alternative 1). As before, we require a conforming C++11 or later compiler, CMake and, optionally, zlib.

$ git clone https://github.com/Equinor/resdata
$ mkdir resdata/build
$ cd resdata/build
$ pip install -r ../requirements.txt
$ cmake .. -DENABLE_PYTHON=ON
$ make
$ make install

You will most likely want to install resdata into a Python virtual environment. First activate the virtualenv, then add the argument -DCMAKE_INSTALL_PREFIX=$(python -c "import sys; print(sys.prefix)") to the cmake command when building.

Then, you must tell Python where to find the package[1]:

$ export PYTHONPATH=/path/to/install/lib/python2.7/site-packages:$PYTHONPATH
$ export LD_LIBRARY_PATH=/path/to/install/lib64:$LD_LIBRARY_PATH

Then you can fire up your Python interpreter and try it out:

>>> from resdata.summary import Summary
>>> import sys

>>> summary = Summary(sys.argv[1])
>>> fopt = summary.numpy_vector("FOPT")

The installation with Python enabled is described in a YouTube video by Carl Fredrik Berg.

[1]: The exact paths here will depend on your system and Python version. The example given is for a RedHat system with Python version 2.7.

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

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

resdata-4.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

resdata-4.2.2-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

resdata-4.2.2-cp312-cp312-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

resdata-4.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

resdata-4.2.2-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

resdata-4.2.2-cp311-cp311-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

resdata-4.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

resdata-4.2.2-cp310-cp310-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

resdata-4.2.2-cp310-cp310-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

resdata-4.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

resdata-4.2.2-cp39-cp39-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

resdata-4.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

resdata-4.2.2-cp38-cp38-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file resdata-4.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5596e4bfe4ca7e1eeaa6558e05922254d0d4182215b0c03f7007f85b17607aa
MD5 6e4b163af3da467443d6edd7262f5307
BLAKE2b-256 1350bb003490ae4db80903685f64899dd50a3f49c038020cdf81383d1254d78e

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a43ee62c9436db86582a2c30bf0fdec9c7d4a63d17670b3fb87d9f1b4c3f70a2
MD5 e379bc7f29b4d01b0600d56c82634944
BLAKE2b-256 555f30f77ccb691ad8b23f78549eabb0dcea4ae62d01e18504640e5655382033

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 41dd7d4dab6fd98dd0c9b7646be6cf58c957b6483c2a159b7e71e85855607180
MD5 0b35fd8ac70b8ab0e5cf7115af24c697
BLAKE2b-256 67afdbe669eb14cecb15454e74c3cdf0b75a55646a32e5c1202a20eb2446cc04

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 405479b5e4b9f6cee41f6c72f7ab7e6ce11fe915065a5cb7939ac747f80471a9
MD5 3d263d07f07d9827a2403611089f547d
BLAKE2b-256 ac3eb92e02ea3b3d106f650d2ac5c46f9aae2e822488dec63fb083acb5c90fb8

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9437a4d28d3588a0d59581741f96355576d6b4e0732a54bebe47c0d7fa1dec36
MD5 ddaf24ecb36f7317def3306b7e5c81df
BLAKE2b-256 b5dedcc37ca178c8f8dfebabfb5dd9bc5f878a33c9552086274084d44a02aab2

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 73cfc9bb462bd2f9f14343e18d5e71e9e673eaece4eb19fb15cbda75de822726
MD5 d80434708ce7291d7c0e09bc3c39bcc6
BLAKE2b-256 499bc3eed9ee1709c263fe30630239d4a56c7af9ee1862c42d776dbc470b1be2

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3db56414d46808a9c582c6be19474ecfbce43a37116fb0431fa963d4f668564
MD5 444d43e9321cff34ac0fc348685072bc
BLAKE2b-256 c9380692682b9a22f982e30154c735de76c4ff62be7498a4177102337c5944d7

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9716b092a6d88d5c597ece68b6714a94e54b805e8ae17eee79ffb1fd104d3ce4
MD5 bf92d7dd9707ca1097447e41341b7b46
BLAKE2b-256 9a607a1a064647893ee63de253999f56acce55cfb04da403f64d7984d1583ecd

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cf028b5225f020e093e9893cf603d7dd16c4cc48b6af14e748d6640432d8302b
MD5 e4788c1c3903b881ef0c16bfcc7395d5
BLAKE2b-256 098b74d0ba4d721edbbab707cc4c7e5ea002be6c8e418fe82b398211b02dc946

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4003800f228a8087f2eec485442731f2a36ba55774b2268dc4b291a71c43eb4e
MD5 cb248e6a4fc142eef2112b7555e48bcf
BLAKE2b-256 bf5091e0e3fbbfe874c6ffb0fcdb3dce99ef6265abd29b81a5666893b69e6385

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7cad71f9f1bb249889a0cc7c5b054edd492fc3265a329e8ae70b6c394adbe374
MD5 dc2822ad6162bb1855321736088578e8
BLAKE2b-256 dd6bfa73d9ad52c49ede8ee47a046e276ea30d6fd2782bc77ea66ba9e4a25dca

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ed483ed9af60e90f84ebfb56b758b57436ad87e88816a33c97d39e867e8f75f
MD5 cbcf3d4f36e65ac2c8fe5e96a20678da
BLAKE2b-256 c2cf8fb14b4019fdfc8ca56d82e0bf3fdef93a90b10236a3ea5d8d9b5e89366c

See more details on using hashes here.

File details

Details for the file resdata-4.2.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for resdata-4.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 605373545c5cd67e80604f738f567c6993b1a00c8d36b10c3310acc32b560538
MD5 4666a4a1aed2dba040bd05cfc7507496
BLAKE2b-256 180d153f1f2aeebe3782bf259004dd4f8a7c29ebfcf6ee5a7c0d61517db6560f

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