ResInsight/ThirdParty/Ert
2024-08-12 11:13:57 +02:00
..
.github #4266 Update libecl 2019-05-09 08:40:32 +02:00
applications Rename to resdata 2024-04-22 19:56:10 +02:00
bin #4266 Update libecl 2019-05-09 08:40:32 +02:00
cmake Update ecllib from statoil master repo commit 0188b08081eb1ac4ade89ac224b8128b4c9b0481 2018-05-04 14:24:53 +02:00
debian #4266 Update libecl 2019-05-09 08:40:32 +02:00
external/catch2 Cmake cleanup and selected Qt6 adjustments 2024-04-17 15:06:51 +02:00
install #4266 Update libecl 2019-05-09 08:40:32 +02:00
lib Support skipping invalid IWEL records without shutting down ResInsight 2024-08-12 11:13:57 +02:00
python #4266 Update libecl 2019-05-09 08:40:32 +02:00
redhat #4266 Update libecl 2019-05-09 08:40:32 +02:00
script #4266 Update libecl 2019-05-09 08:40:32 +02:00
test-data #4266 Update libecl 2019-05-09 08:40:32 +02:00
VisualStudio #804 Updated ERT based on 6287acdb0d039ce13eb9956b67035280a3de9539 2016-10-13 13:40:43 +02:00
.gitattributes ERT: Updated to nnc-export branch from Joakim b933117d4e 2013-12-12 22:17:51 +01:00
.gitignore #4266 Update libecl 2019-05-09 08:40:32 +02:00
.gitmodules #4266 Update libecl 2019-05-09 08:40:32 +02:00
.travis.yml #4266 Update libecl 2019-05-09 08:40:32 +02:00
appveyor.yml #4266 Update libecl 2019-05-09 08:40:32 +02:00
CMakeLists.txt Rename to resdata 2024-04-22 19:56:10 +02:00
config.sh #4266 Update libecl 2019-05-09 08:40:32 +02:00
COPYING Updated Ert to e2a5a9cc20705537d07822958d925e092a323367 to include new accesss to well rates 2017-02-07 13:44:59 +01:00
MANIFEST.in #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
README.md #4266 Update libecl 2019-05-09 08:40:32 +02:00
release-notes.txt #2011 Update libecl to 89f6c44aa0 to fix RFT file reading and missing dyn nnc handling 2017-10-26 17:16:36 +02:00
requirements.txt #4266 Update libecl 2019-05-09 08:40:32 +02:00
setup.py #4266 Update libecl 2019-05-09 08:40:32 +02:00
WINDOWS.md #4266 Update libecl 2019-05-09 08:40:32 +02:00

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.