libres
is part of the ERT
project: Ensemble based Reservoir Tool.
Build and install libecl at the version that .libecl_version
specifies. When configuring
libecl
you should used the option -DCMAKE_INSTALL_PREFIX
to tell cmake
where to install libecl
. The value passed to CMAKE_INSTALL_PREFIX
will be
needed when running cmake to configure libres
in point 4 below. For now let us
assume that the prefix /local/ert/install
was used.
pip install -r requirements.txt
To ensure that the build system correctly finds the ecl
Python package you
need to set the environment variables PYTHONPATH
and LD_LIBRARY_PATH
to
include the libecl
installation:
bash% export LD_LIBRARY_PATH=/local/ert/install/lib64:$LD_LIBRARY_PATH
bash% export PYTHONPATH=/local/ert/install/lib/python2.7/site-packages:$PYTHONPATH
Observe that path components lib64
and lib/python2.7/site-packages
will
depend on your Python version and which Linux distribution you are using. The
example given here is for RedHat based distributions.
When running cmake
you must tell cmake
where the libecl
code is located
with -DCMAKE_PREFIX_PATH
, i.e. in addition to other possible arguments you
must at least add:
-DCMAKE_PREFIX_PATH=/local/ert/install
in addition you probably want to pass -DCMAKE_INSTALL_PREFIX
to configure where
the libres
distribuion should be installed, normally that will be the same
location where you have already installed libecl
.
After you have run cmake you should run make
and make install
to build and install libres
:
bash% make
bash% make install
As part of the installation process libres
will install a file called
site-config
in $prefix/share/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.
There are three possible ways to do this:
-
You can just edit the installed file manually -
libres
will not install it's version of thesite-config
file if one is already present. -
The path to
site-config
file is compiled into thelibres
library, if you pass thecmake
option-DSITE_CONFIG_FILE=/path/to/site/config
when configuringcmake
; that way your own personalsite-config
file is built in. -
If you set the environment variable
ERT_SITE_CONFIG
to point to an alternative file that will be used when bootstrapping. This can be a handy way to debug thesite-config
settings.
For a start you can probably just use the shipped default version of the
site-config
file.
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
:
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.
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.