ResInsight/ThirdParty/Ert
2018-10-30 13:30:44 +01:00
..
.github Update libecl to 2e36798b43. For better memory usage reading wells 2017-10-02 17:11:36 +02:00
applications #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
bin #2661 Update ecllib from statoil master repo 2018-04-09 08:48:36 +02:00
cmake Update ecllib from statoil master repo commit 0188b08081eb1ac4ade89ac224b8128b4c9b0481 2018-05-04 14:24:53 +02:00
debian #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
docs #2661 Update ecllib from statoil master repo 2018-04-09 08:48:36 +02:00
external/catch2 Update ecllib from statoil master repo commit a165d636552fa0c0f96219d341f7f2c17c08dc9d 2018-08-13 14:00:26 +02:00
install #804 Updated ERT based on 6287acdb0d039ce13eb9956b67035280a3de9539 2016-10-13 13:40:43 +02:00
lib #3576 Apply patch install-ert.patch after upgrading ecllib 2018-10-30 13:30:44 +01:00
python #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
redhat #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
script #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
test-data Update ecllib from statoil master repo commit a165d636552fa0c0f96219d341f7f2c17c08dc9d 2018-08-13 14:00:26 +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 #1396 Update libEcl to 06a39878636af0bc52582430ad0431450e51139c 2017-05-08 13:37:39 +02:00
.travis.yml #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
appveyor.yml Update ecllib from statoil master repo commit a165d636552fa0c0f96219d341f7f2c17c08dc9d 2018-08-13 14:00:26 +02:00
CMakeLists.txt #3576 Apply patch install-ert.patch after upgrading ecllib 2018-10-30 13:30:44 +01: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 #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01: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 Update ecllib from statoil master repo commit 0188b08081eb1ac4ade89ac224b8128b4c9b0481 2018-05-04 14:24:53 +02:00
setup.py #3576 ecllib upgrade from statoil repo 7f93730c08a4d981a4b738b42146d099977572ce 2018-10-30 13:21:11 +01:00
Windows.txt #804 Updated ERT based on 6287acdb0d039ce13eb9956b67035280a3de9539 2016-10-13 13:40:43 +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/Statoil/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/Statoil/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")

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