Skip to main content

Package for reading and writing the result files from the ECLIPSE reservoir simulator

Project description

libecl Build Status

libecl is a package for reading and writing the result files from the Eclipse reservoir simulator. 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.

libecl is mainly developed on Linux and OS X, 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. libecl was initially developed as part of the Ensemble Reservoir Tool, other applications using libecl are the reservoir simulator flow and Resinsight from the OPM project.

In addition to the compiled C/C++ code there are Python wrappers which make most of the libecl functionality available from Python. For small interactive scripts, forward models e.t.c. this is the recommended way to use libecl functionality. You decide wether to build include the Python wrappers when configuring the cmake build - pass the option -DENABLE_PYTHON=ON to enable Python wrappers, by default the Python wrappers are not included.

By default cmake is configured to install to a system location like /usr/local, if you want to install to an alternative location that should be configured with -DCMAKE_INSTALL_PREFIX=/path/to/install.

Alternative 1: Building without Python

libecl uses CMake as build system:

git clone https://github.com/Equinor/libecl
cd libecl
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
make
make install

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

Alternative 2: Building with Python

To build libecl with Python wrappers you just pass the option -DENABLE_PYTHON=ON when running cmake. In addition you need to install some dependencies first. Python is not a compiled language, but the cmake configuration contains a rudimentary "build system" which does a basic Python syntax check and configures some files to correctly set up the interaction between the Python classes and the shared libraries built from the C code:

git clone https://github.com/Equinor/libecl
cd libecl
sudo pip install -r requirements.txt
mkdir build
cd build
cmake .. -DENABLE_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/path/to/install 
make
make install

After you have installed the Python wrappers 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 ecl.summary import EclSum
import sys

summary = EclSum(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

libecl-2.8.0a0-cp36-cp36m-manylinux2010_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

libecl-2.8.0a0-cp27-cp27mu-manylinux2010_x86_64.whl (1.7 MB view details)

Uploaded CPython 2.7mumanylinux: glibc 2.12+ x86-64

File details

Details for the file libecl-2.8.0a0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: libecl-2.8.0a0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6

File hashes

Hashes for libecl-2.8.0a0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7b9c91a72e07c2aa6b948fecac0bb6da32468d2269af28d8656c0e9d81d82fe5
MD5 7cdbe229ea0e6a660de7fe5501431613
BLAKE2b-256 bd70ebd2b42a06f0928e1865baca2599e5ac83f0a716bca0952e7b689465bdd5

See more details on using hashes here.

File details

Details for the file libecl-2.8.0a0-cp27-cp27mu-manylinux2010_x86_64.whl.

File metadata

  • Download URL: libecl-2.8.0a0-cp27-cp27mu-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 2.7mu, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6

File hashes

Hashes for libecl-2.8.0a0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 490d30829420118e9f01616a8ab19a2e9512c7fded0705eea77a96351949142a
MD5 0af5bcd59f89ab7fd9adf04a5748660c
BLAKE2b-256 57cd68ece66d65cc107e0eb0841d3ec1eb1068a19cc02f1c09150ea1d8b57a4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page