Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,17 @@ on:
jobs:
run-expreccs-local:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.11

- name: Install Flow Simulator
run: |
Expand Down Expand Up @@ -57,7 +51,7 @@ jobs:

- name: Run the tests
run: |
pytest --cov=expreccs --cov-report term-missing tests/
pytest -x --cov=expreccs --cov-report term-missing tests/

- name: Build documentation
run: |
Expand Down
19 changes: 1 addition & 18 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,6 @@ results
cssr

# Extra files
tests/output
regional_rpr-3.png
reference_sgas_i,j,1_t90.png
/tests/regional/FIPNUM_EXPRECCS.INC
/tests/regional/OPERNUM_EXPRECCS.INC
/tests/regional/REGIONAL.DBG
/tests/regional/REGIONAL.EGRID
/tests/regional/REGIONAL.ESMRY
/tests/regional/REGIONAL.INIT
/tests/regional/REGIONAL.PRT
/tests/regional/REGIONAL.SMSPEC
/tests/regional/REGIONAL.UNRST
/tests/regional/REGIONAL.UNSMRY
/tests/site/SITE.DBG
/tests/site/SITE.EGRID
/tests/site/SITE.ESMRY
/tests/site/SITE.INIT
/tests/site/SITE.PRT
/tests/site/SITE.SMSPEC
/tests/site/SITE.UNRST
/tests/site/SITE.UNSMRY
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
disable=R0801
72 changes: 54 additions & 18 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ The following steps work installing the dependencies in Linux via apt-get or in
While using package managers such as Anaconda, Miniforge, or Mamba might work, these are not tested.
The supported Python versions are 3.11 to 3.14.

`ResInsight <https://resinsight.org>`_ and `plopm <https://github.com/cssr-tools/plopm>`_ can be used for the visualization of the results.

.. note::

There are binary packages for Linux and Windows to install Resinsight, see the `ResInsight Documentation <https://resinsight.org/releases/>`_. For macOS users, you could try to install it using `brew <https://brew.sh>`_ by executing:

.. code-block:: bash

brew install cssr-tools/opm/resinsight

Then, you should be able to open resinsight by typing in the terminal **resinsight**.

.. _vexpreccs:

Python package
Expand Down Expand Up @@ -43,12 +55,27 @@ install the Python requirements in a virtual environment with the following comm

Typing **git tag -l** writes all available specific versions.

.. note::

For not macOS users, to install the (optional but recommended) dependencies used for the figure's LaTeX formatting, execute

**sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super**

For macOS users, the LaTeX dependency can be installed from https://www.tug.org/mactex/.

OPM Flow
--------
You also need to install:

* OPM Flow (https://opm-project.org, Release 2025.10 or current master branches)

Binary packages
+++++++++++++++

See the `downloading and installing <https://opm-project.org/?page_id=36>`_ OPM Flow online documentation for
instructions to install the binary packages in Ubuntu and Red Hat Enterprise Linux, and for other platforms which are
supported either via source builds or through running a virtual machine.

.. tip::

See the `CI.yml <https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml>`_ script
Expand Down Expand Up @@ -86,30 +113,40 @@ in the terminal the following lines (which in turn should build flow in the fold

.. _macOS:

Brew formula for macOS
++++++++++++++++++++++
For macOS, there are no available binary packages, so OPM Flow needs to be built from source. Recently, a formula to build flow using brew has
been added in `https://github.com/cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm>`_.
Then, you can try to install flow (v2025.10) by simply typing:

.. code-block:: console

brew install cssr-tools/opm/opm-simulators

You can check if the installation of OPM Flow succeded by typing in the terminal **flow \-\-help**.

.. tip::
See the actions in the `cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm/actions>`_ repository.

Source build in macOS
+++++++++++++++++++++
For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries and the OPM Python
package (see the `prerequisites <https://opm-project.org/?page_id=239>`_, which can be installed using macports or brew).
For example, with brew the prerequisites can be installed by:
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:

.. code-block:: console

brew install boost openblas suite-sparse python@3.14 cmake

In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
worked for macOS Tahoe 26.1 with Apple clang version 17.0.0).
After the prerequisites are installed and the vexpreccs Python environment is created (see :ref:`vexpreccs`),
then building OPM Flow can be achieved with the following bash lines:
worked for macOS Tahoe 26.2.0 with Apple clang version 17.0.0).
After the prerequisites are installed, then building OPM Flow can be achieved with the following bash lines:

.. code-block:: console

CURRENT_DIRECTORY="$PWD"

deactivate
source vexpreccs/bin/activate

for module in common geometry grid istl
do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1
do git clone https://gitlab.dune-project.org/core/dune-$module.git
cd dune-$module && git checkout v2.10.0 && cd ..
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
./dune-common/bin/dunecontrol --only=dune-$module make -j5
done
Expand All @@ -118,8 +155,7 @@ then building OPM Flow can be achieved with the following bash lines:

for repo in common grid simulators
do git clone https://github.com/OPM/opm-$repo.git
mkdir build/opm-$repo
cd build/opm-$repo
mkdir build/opm-$repo && cd build/opm-$repo
cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
if [[ $repo == simulators ]]; then
make -j5 flow
Expand All @@ -129,11 +165,11 @@ then building OPM Flow can be achieved with the following bash lines:
cd ../..
done

echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> $CURRENT_DIRECTORY/vexpreccs/bin/activate
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
source ~/.zprofile

deactivate
source vexpreccs/bin/activate
This builds OPM Flow, and it exports the path to the flow executable. You can check if the installation of OPM Flow succeded by typing in the terminal **flow \-\-help**.

This builds OPM Flow, and it exports the path to the flow executable (i.e., executing in the terminal **which flow** should print the path).

For macOS, the (optional but recommended) LaTeX dependency can be installed from https://www.tug.org/mactex/.
.. tip::
See `this repository <https://github.com/daavid00/OPM-Flow_macOS>`_ dedicated to build OPM Flow from source in the latest macOS (GitHub actions).
If you still face problems, raise an issue in the GitHub repository, or you could also send an email to the maintainers.
1 change: 0 additions & 1 deletion docs/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ where
-b Set the number of entries to skip the bc projections on the site, where 'j=0,i=nx-1,j=ny-1,i=0', e.g., '[0,2,0,0]' would skip all cells with i=nx and i=nx-1; this becomes handly for models where all cells in a given site are inactive along a side ('[0,0,0,0]' by default).
-f Frequency to evaluate the boundary pressures on the site between report steps in the site. Write an array, e.g., '2,7,3', to set the frequency in each site report step ('1' by default).
-a Exponential 'a' coefficient for the telescopic time-discretization for the given frequency '-f'. Write an array, e.g., '2.2,0,3.1', to set the coefficient in each site report step ('3.2' by default, use 0 for an equidistance partition).
-w Set to 1 to print warnings ('0' by default).
-e Set to 0 to write the pressure increase on the site bc from the regional values ('1' by default, i.e., the pressure values on the boundaries correspond to the explicit values on the regional simulations).
-z Set to 1 to project the regional pressures per fipnum zones, i.e., the pressure maps to the site bcs are written for equal fipnum numbers in the whole xy layer ('0' by default, i.e., the projections include the z location offset between regional and site models).
-s Set to 0 to not create the subfolders preprocessing, output, and postprocessing, i.e., to write all generated files in the output directory ('1' by default).
Expand Down
2 changes: 1 addition & 1 deletion docs/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1>About expreccs<a class="headerlink" href="#about-expreccs" title="Link to th
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h2>expreccs<a class="headerlink" href="#expreccs" title="Link to this heading">
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ <h2>Simulation results<a class="headerlink" href="#simulation-results" title="Li
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h2>Seek support<a class="headerlink" href="#seek-support" title="Link to this h
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h3>Non-regular boundaries<a class="headerlink" href="#non-regular-boundaries" t
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.core.expreccs.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.core.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.backcoupling.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.inputvalues.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.mapboundaries.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.mapproperties.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.reg_sit_given_decks.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.runs.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.utils.writefile.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.visualization.maps2d.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.visualization.plotting.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/expreccs.visualization.reading.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
2 changes: 1 addition & 1 deletion docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ <h2 id="W">W</h2>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023-2025, NORCE Research AS.</p>
<p>&#169; Copyright 2023-2026, NORCE Research AS.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
Loading