Skip to content

Commit fbc3bbd

Browse files
authored
Merge pull request #20 from daavid00/dev
toml format
2 parents 4e00ca2 + 331ca06 commit fbc3bbd

File tree

167 files changed

+2879
-6527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+2879
-6527
lines changed

.github/workflows/CI.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ['3.8']
15+
python-version: ['3.11']
1616
os: [ubuntu-latest]
1717

1818
runs-on: ${{ matrix.os }}
@@ -49,9 +49,9 @@ jobs:
4949
5050
- name: Check code style and linting
5151
run: |
52-
black --check src/ tests/
53-
pylint src/ tests/
54-
mypy --ignore-missing-imports src/ tests/
52+
black --check src/ tests/ examples/
53+
pylint src/ tests/ examples/
54+
mypy --ignore-missing-imports src/ tests/ examples/
5555
5656
- name: Run the tests
5757
run: |

.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,8 @@ opm-models/
144144
opm-simulators/
145145

146146
# Extra folders
147-
tests/configs/back
148-
tests/configs/compare
149-
tests/configs/output
150-
tests/configs/rotate
151-
tests/configs/rotate_2d
152-
examples/output
147+
**/tests/configs/*/
148+
examples/hello_world
153149
developing
154150
playground
155151
debugging

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Build Status](https://github.com/cssr-tools/expreccs/actions/workflows/CI.yml/badge.svg)](https://github.com/cssr-tools/expreccs/actions/workflows/CI.yml)
2-
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.8%20to%203.12-blue.svg"></a>
2+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11%20to%203.12-blue.svg"></a>
33
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
44
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
55
[![DOI](https://zenodo.org/badge/760077220.svg)](https://zenodo.org/doi/10.5281/zenodo.12100600)
@@ -48,22 +48,20 @@ You can run _expreccs_ as a single command line:
4848
```
4949
expreccs -i name(s)_of_input_file(s)
5050
```
51-
Run `expreccs --help` to see all possible command line argument options. Inside the `configuration_file.txt` file you provide the path to the
51+
Run `expreccs --help` to see all possible command line argument options. Inside the `configuration_file.toml` file you provide the path to the
5252
flow executable and simulation parameters. To write dynamic boundary conditions from a given regional model to a site model, this can be achieved by giving the path to the models (i.e., without a configuration file). See the [_examples_](https://github.com/cssr-tools/expreccs/tree/main/examples) and [_tests_](https://github.com/cssr-tools/expreccs/tree/main/tests/configs) folders.
5353

5454
## Getting started
5555
See the [_examples_](https://cssr-tools.github.io/expreccs/examples.html) in the [_documentation_](https://cssr-tools.github.io/expreccs/introduction.html).
5656

5757
## Citing
58-
If you would like to cite this repository:
59-
6058
* Landa-Marbán, D. 2024. expreccs: A Python framework using OPM Flow to simulate regional and site reservoirs for CO2 storage. https://doi.org/10.5281/zenodo.12100600.
6159

6260
## Publications
6361
The following is a list of manuscripts in which _expreccs_ is used:
6462

65-
1. Tveit, S., Gasda, S.E., Landa-Marbán, D., Sandve, T.H., submitted. A hierarchical approach for modeling regional pressure interference in multi-site CO2 operations. http://dx.doi.org/10.2139/ssrn.5005237.
66-
1. Gasda, S.E., et al., 2024. Quantifying the impact of regional-scale pressure interference on commercial CO2 storage targets for multiple licenses. http://dx.doi.org/10.2139/ssrn.5053633.
63+
1. Tveit, S., Gasda, S.E., Landa-Marbán, D., Sandve, T.H., 2025. A hierarchical approach for modeling regional pressure interference in multi-site CO2 operations. Geoenergy Science and Engineering 248, 13733. https://doi.org/10.1016/j.geoen.2025.213733.
64+
1. Gasda, S., Sandve, T.H., Tveit, S., Landa-Marbán, D., Pettersson, P., Krumscheid, S., Mykkeltvedt, T.S., Dahle, H., 2024. Quantifying the impact of regional-scale pressure interference on commercial CO2 storage targets for multiple licenses. Proceedings of the 17th Greenhouse Gas Control Technologies Conference (GHGT-17) 20-24 October 2024. http://dx.doi.org/10.2139/ssrn.5053633.
6765

6866
## About expreccs
6967
The _expreccs_ package is funded by Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].

docs/_images/pycopm.gif

-3.19 MB
Binary file not shown.

docs/_images/pycopm.png

1.44 MB
Loading

docs/_sources/about.rst.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ About expreccs
77

88
The **expreccs** tool is funded by
99
Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].
10-
11-
This is work in progress.
10+
1211
`Here <https://www.norceresearch.no/en/projects/expansion-of-resources-for-co2-storage-on-the-horda-platform-expreccs>`_ is the link to the project details.
1312

1413
Contributions are more than welcome using the fork and pull request approach.

docs/_sources/configuration_file.rst.txt

+102-111
Large diffs are not rendered by default.

docs/_sources/examples.rst.txt

+17-17
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@ Via configuration files
99
Hello world
1010
-----------
1111

12-
We consider the configuration file `example1.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/example1.txt>`_ in the
12+
We consider the configuration file `example1.toml <https://github.com/cssr-tools/expreccs/blob/main/examples/example1.toml>`_ in the
1313
examples folder (the animation in the `GitHub home page <https://github.com/cssr-tools/expreccs>`_ was based on this configuration file).
1414
If the results are to be saved in a folder called 'hello_world', this is achieved by the following command:
1515

1616
.. code-block:: bash
1717
18-
expreccs -i example1.txt -o hello_world
18+
expreccs -i example1.toml -o hello_world
1919
20-
Then we can change in line 14 the BC projections from the regional simulations from
20+
Then we can change in line 25 the BC type for the site from
2121
'flux' to 'pres', and run the following command to only simulate the site model:
2222

2323
.. code-block:: bash
2424
25-
expreccs -i example1_pres.txt -o hello_world -m site
25+
expreccs -i example1_pres.toml -o hello_world -m site
2626
27-
We can do the same to add the pore volumes from the regional reservoir on the site boundaries by setting in line 14
28-
'porvproj', and to also visualize the results in PNGs figures, we run the following command:
27+
We can do the same to add the pore volumes from the regional reservoir on the site boundaries by setting in line 25
28+
'porvproj':
2929

3030
.. code-block:: bash
3131
32-
expreccs -i example1_porvproj.txt -o hello_world -m site
32+
expreccs -i example1_porvproj.toml -o hello_world -m site
3333
3434
Finally, we consider the case where we add injector/producers on the site boundary, and to also visualize the results
3535
in PNGs figures, we run the following command:
3636

3737
.. code-block:: bash
3838
39-
expreccs -i example1_wells.txt -o hello_world -m site -p yes
39+
expreccs -i example1_wells.toml -o hello_world -m site -p yes
4040
4141
Below are some of the figures generated inside the postprocessing folder:
4242

@@ -64,39 +64,39 @@ Below are some of the figures generated inside the postprocessing folder:
6464
Layered model
6565
-------------
6666

67-
The configuration file example2.txt set a more complex geological model with more grid cells (1 417 500). This was used
67+
The configuration file example2.toml set a more complex geological model with more grid cells (1 417 500). This was used
6868
to generate the animation (using ResInsight) in the :doc:`introduction section <./introduction>` by running
6969

7070
.. code-block:: bash
7171
72-
expreccs -i example2.txt -m reference
72+
expreccs -i example2.toml -m reference
7373
7474
.. tip::
7575

7676
This example shows how **expreccs** can be used to generate the requiered input files to run OPM Flow for heterogenous
7777
layered models at different grid sizes, which can be used for further studies such as optimization. Regarding the configuration
78-
files in `examples/newcases <https://github.com/cssr-tools/expreccs/tree/main/examples/newcases>`_, these are explained in
79-
`this manuscript <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5005237>`_.
78+
files in `examples/paper_2025 <https://github.com/cssr-tools/expreccs/tree/main/examples/paper_2025>`_, these are explained in
79+
`this manuscript <https://doi.org/10.1016/j.geoen.2025.213733>`_.
8080

8181
.. _back_coupling:
8282

8383
Back-coupling (under development)
8484
---------------------------------
8585

86-
We consider the configuration file `example1_back.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.txt>`_ in the examples folder.
86+
We consider the configuration file `example1_back.toml <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.toml>`_ in the examples folder.
8787
The plan is to update properties (e.g., transmissibility multipliers) in the regional model from features (e.g., faults) in the site model (i.e., not included in the regional model).
8888
By running:
8989

9090
.. code-block:: bash
9191
92-
expreccs -i example1_back.txt -o back-coupling -m all -p yes
92+
expreccs -i example1_back.toml -o back-coupling -m all -p yes
9393
9494
This is one of the generated figures in the back-coupling/postprocessing folder (named as back-coupling_summary_BPR_regional_reference.png):
9595

9696
.. image:: ./figs/back-coupling_summary_BPR_regional_reference.png
9797

9898
The figures in the postprocessing includes the results for the first two iterations and the last one (in this case 9 since the number of
99-
iteration is set to 10 in line 22 of the `configuration_file <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.txt>`_).
99+
iteration is set to 10 in the `configuration_file <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.toml>`_, "iterations = 10" in line 20).
100100

101101
For example, to show the difference in the spatial maps for pressure between iteration 4 and 7 at the third restart, this can be achieved using
102102
`plopm <https://github.com/cssr-tools/plopm>`_ by executing:
@@ -124,7 +124,7 @@ and to show the comparison for the summary vector FPR for iterations 1, 5, 7, an
124124
Via OPM Flow decks
125125
==================
126126

127-
See/run the `test_generic_deck.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_generic_deck.py>`_
127+
See/run the `test_2_generic_deck.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_2_generic_deck.py>`_
128128
for an example where **expreccs** is used in two given models (regional and site, in this case they are created using
129129
the **expreccs** package, but in general can be any given geological models), generating a new input deck where
130130
the pressures are projected.
@@ -138,7 +138,7 @@ For example, to run the test, this can be achieved by executing:
138138

139139
.. code-block:: bash
140140
141-
pytest --cov=expreccs --cov-report term-missing tests/test_generic_deck.py
141+
pytest --cov=expreccs --cov-report term-missing tests/test_2_generic_deck.py
142142
143143
To visualize/compare results between the model with static (input) and dynamic (generated by expreccs) boundary conditions,
144144
we can use our friend `plopm <https://github.com/cssr-tools/plopm>`_:

docs/_sources/installation.rst.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Installation
33
============
44

55
The following steps work installing the dependencies in Linux via apt-get or in macOS using brew or macports.
6-
While using package managers such as Anaconda, Miniforge, or Mamba might work, these are not tested.
6+
While using package managers such as Anaconda, Miniforge, or Mamba might work, these are not tested. In addition, the current
7+
supported Python versions are 3.11 to 3.12. We will update the documentation when Python3.13 is supported (e.g., the resdata Python
8+
package is not yet available via pip install in Python 3.13).
79

810
Python package
911
--------------
@@ -149,8 +151,5 @@ package (see the `prerequisites <https://opm-project.org/?page_id=239>`_, which
149151
150152
This builds OPM Flow as well as the opm Python package, and it exports the required PYTHONPATH. Then after execution, deactivate and activate the Python virtual environment.
151153

152-
Regarding the resdata Python package, it might not be available depending on the Python version (e.g., it is not found using Python 3.9, but it is installed using Python 3.10).
153-
Then, for macOS users, you need to use a Python version equal or higher than 3.10.
154-
155154
For macOS, the LaTeX dependency can be installed from https://www.tug.org/mactex/. If after installation you still face an error due to LaTeX
156155
when executing expreccs, then add the flag **-latex 0** to expreccs.

docs/_sources/introduction.rst.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,23 @@ The current implementation supports the following executable with the argument o
3232
3333
where
3434

35-
-i The base name of the :doc:`configuration file <./configuration_file>`; or paths (space between them and quotation marks) to the regional and site models ('input.txt' by default).
35+
-i The base name of the :doc:`configuration file <./configuration_file>`; or paths (space between them and quotation marks) to the regional and site models ('input.toml' by default).
3636
-o The base name of the :doc:`output folder <./output_folder>` ('output' by default).
3737
-m Run the whole framework ('all'), only the reference ('reference'), only the site ('site'), or only regional and site models ('noreference') ('all' by default).
3838
-c Generate metric plots for the current outputed folders ('compare') ('' by default).
3939
-p Create nice figures in the postprocessing folder ('no' by default).
40-
-r Using the 'opm' or 'resdata' python package ('resdata' by default).
4140
-u Using 'gasoil' or 'gaswater' co2store implementation ('gaswater' by default).
41+
-r Using the 'opm' or 'resdata' python package ('resdata' by default).
4242
-t Grades to rotate the site geological model ('0' by default).
4343
-b Set the number of entries to skip the bc projections on the site, where 'j=0,i=nx,j=ny,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).
4444
-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).
4545
-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).
4646
-w Set to 1 to print warnings ('0' by default).
4747
-l Set to 0 to not use LaTeX formatting ('1' by default).
4848

49+
The valid flags for toml **configuration file** are -i, -o, -m, -c, -p, -u, -r, -t, -w, and -l.
50+
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, and -w.
51+
4952
In the **configuration file** the geological model is defined by generation
50-
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults), wells, and defining schedules for the
53+
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults, hysteresis), wells, and defining schedules for the
5154
operations (see the :doc:`configuration file <./configuration_file>` section).

docs/_sources/related.rst.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@ pyopmspe11
1313

1414
`A Python framework using OPM Flow for the CSP SPE11 benchmark project <https://github.com/OPM/pyopmspe11>`_.
1515

16-
*************
17-
pyopmnearwell
18-
*************
19-
20-
.. image:: ./figs/pyopmnearwell.gif
21-
:scale: 50%
22-
23-
`A framework to simulate near well dynamics using OPM Flow <https://github.com/cssr-tools/pyopmnearwell>`_.
24-
2516
******
2617
pycopm
2718
******
2819

29-
.. image:: ./figs/pycopm.gif
30-
:scale: 60%
20+
.. image:: ./figs/pycopm.png
21+
:scale: 32%
3122

32-
`Simplified and flexible framework for coarsening geological models <https://github.com/cssr-tools/pycopm>`_.
23+
`An open-source tool to tailor OPM Flow geological models <https://github.com/cssr-tools/pycopm>`_.
3324

3425
*****
3526
plopm
3627
*****
3728

3829
.. image:: ./figs/plopm.png
3930

40-
`Quick generation of PNG figures from a simulation model given any 2D slide <https://github.com/cssr-tools/plopm>`_.
31+
`Quick generation of PNGs, GIFs, and VTKs from a OPM Flow type model <https://github.com/cssr-tools/plopm>`_.
32+
33+
*************
34+
pyopmnearwell
35+
*************
36+
37+
.. image:: ./figs/pyopmnearwell.gif
38+
:scale: 50%
39+
40+
`A framework to simulate near well dynamics using OPM Flow <https://github.com/cssr-tools/pyopmnearwell>`_.
4141

4242
*******
4343
ad-micp

docs/about.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ <h1>About expreccs<a class="headerlink" href="#about-expreccs" title="Link to th
8585
</a>
8686
<p>The <strong>expreccs</strong> tool is funded by
8787
Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].</p>
88-
<p>This is work in progress.
89-
<a class="reference external" href="https://www.norceresearch.no/en/projects/expansion-of-resources-for-co2-storage-on-the-horda-platform-expreccs">Here</a> is the link to the project details.</p>
88+
<p><a class="reference external" href="https://www.norceresearch.no/en/projects/expansion-of-resources-for-co2-storage-on-the-horda-platform-expreccs">Here</a> is the link to the project details.</p>
9089
<p>Contributions are more than welcome using the fork and pull request approach.</p>
9190
<p>For new features, please request them raising an issue.</p>
9291
</section>
@@ -101,7 +100,7 @@ <h1>About expreccs<a class="headerlink" href="#about-expreccs" title="Link to th
101100
<hr/>
102101

103102
<div role="contentinfo">
104-
<p>&#169; Copyright 2025, NORCE Norwegian Research Centre AS.</p>
103+
<p>&#169; Copyright 2023-2025, NORCE Norwegian Research Centre AS.</p>
105104
</div>
106105

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

docs/api.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ <h2>expreccs<a class="headerlink" href="#expreccs" title="Link to this heading">
142142
<hr/>
143143

144144
<div role="contentinfo">
145-
<p>&#169; Copyright 2025, NORCE Norwegian Research Centre AS.</p>
145+
<p>&#169; Copyright 2023-2025, NORCE Norwegian Research Centre AS.</p>
146146
</div>
147147

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

0 commit comments

Comments
 (0)