Skip to content

Commit 70edfda

Browse files
committed
Updating the docs
1 parent 567b2af commit 70edfda

File tree

87 files changed

+2162
-413
lines changed

Some content is hidden

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

87 files changed

+2162
-413
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Contributions are more than welcome using the fork and pull request approach
1717
1. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
1818
1. **mypy --ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
1919
1. **pytest --cov=pyopmspe11 --cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request)
20-
1. **pushd docs & make html** (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then copy all content from the docs/_build/html/ folder and replace the files in the [_docs_](https://github.com/cssr-tools/pyopmspe11/tree/main/docs) folder)
20+
1. **pushd docs & make html** (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then delete all content from the [_docs_](https://github.com/cssr-tools/pyopmspe11/tree/main/docs) folder except [_Makefile_](https://github.com/OPM/pyopmspe11/blob/main/docs/Makefile), [_text_](https://github.com/OPM/pyopmspe11/blob/main/docs/text), and [_.nojekyll_](https://github.com/OPM/pyopmspe11/blob/main/docs/.nojekyll), after copy all contents from the docs/_build/html/ folder, and finally paste them in the [_docs_](https://github.com/cssr-tools/pyopmspe11/tree/main/docs) folder)
2121
* Tip: See the [_CI.yml_](https://github.com/cssr-tools/pyopmspe11/blob/main/.github/workflows/CI.yml) script and the [_Actions_](https://github.com/cssr-tools/pyopmspe11/actions) for installation of pyopmspe11, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.10.
2222
1. Squash your commits into a single commit (see this [_nice tutorial_](https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa) if you are not familiar with this)
2323
1. Push your commit and make a pull request

docs/_sources/about.rst.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ About pyopmspe11
77

88
This **pyopmspe11** package is being funded by the `HPC Simulation Software for the Gigatonne Storage Challenge project <https://www.norceresearch.no/en/projects/hpc-simulation-software-for-the-gigatonne-storage-challenge>`_
99
[project number 622059] and `Center for Sustainable Subsurface Resources (CSSR) <https://cssr.no>`_ [project no. 331841].
10-
This is work in progress. `Here <https://www.spe.org/en/csp/>`_ is the link to the spe11 details.
11-
Contributions are more than welcome using the fork and pull request approach.
10+
11+
`Here <https://www.spe.org/en/csp/>`_ is the link to the spe11 details.
12+
13+
Contributions are more than welcome using the fork and pull request approach.
14+
15+
For a new feature, please request this by raising an issue.

docs/_sources/benchmark.rst.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ Spatial maps
145145

146146
.. code-block:: bash
147147
148-
plopm -v xco2l -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm r2 Cart 1cm capmax 2500 Pa r3 cp 1cmish capmax 2500 Pa r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
149-
plopm -v xco2l -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m r2 cp 10mish r3 cp 10mish convective r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
150-
plopm -v xco2l -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m] r2 cp [50m,50m,8mish] r3 cp [50m,50m,8mish] convective r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,' -u opm
148+
plopm -v xco2l -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 300 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm r2 Cart 1cm capmax 2500 Pa r3 cp 1cmish capmax 2500 Pa r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
149+
plopm -v xco2l -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 300 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m r2 cp 10mish r3 cp 10mish convective r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
150+
plopm -v xco2l -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 300 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m] r2 cp [50m,50m,8mish] r3 cp [50m,50m,8mish] convective r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,' -u opm
151151
152152
.. tip::
153153
You can install `plopm <https://github.com/cssr-tools/plopm>`_ by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git.

docs/_sources/contributing.rst.txt

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
************
2+
Contributing
3+
************
4+
5+
Contributions are more than welcome using the fork and pull request approach 🙂 (if you are not familiar with this approach,
6+
please visit `GitHub Docs PRs <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests>`_ for an extended
7+
documentation about collaborating with pull request; also, looking at previous merged pull requests helps to get familiar with this).
8+
9+
============
10+
Ground Rules
11+
============
12+
13+
- We use Black code formatting
14+
- We use Pylint
15+
- We document our code
16+
17+
==========================
18+
Contribute to the software
19+
==========================
20+
21+
#. Work on your own fork of the main repo
22+
#. In the main repo execute:
23+
24+
#. **pip install -r dev-requirements.txt** (this installs the `dev-requirements.txt <https://github.com/cssr-tools/pyopmspe11/blob/main/dev-requirements.txt>`_; in addition, both opm Python and LaTeX are required, then for not macOs users run **pip install opm** and **sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super**, or else follow the instructions in `macOS installation <https://cssr-tools.github.io/pyopmspe11/installation.html#source-build-in-macos>`_)
25+
#. **black src/ tests/** (this formats the code)
26+
#. **pylint src/ tests/** (this analyses the code, and might rise issues that need to be fixed before the pull request)
27+
#. **mypy --ignore-missing-imports src/ tests/** (this is a static checker, and might rise issues that need to be fixed before the pull request)
28+
#. **pytest --cov=pyopmspe11 --cov-report term-missing tests/** (this runs locally the tests, and might rise issues that need to be fixed before the pull request; to save the files, add the flag **--basetemp=test_outputs**)
29+
#. **pushd docs & make html** (this generates the documentation, and might rise issues that need to be fixed before the pull request; if the build succeeds and if the contribution changes the documentation, then delete all content from the `docs <https://github.com/cssr-tools/pyopmspe11/tree/main/docs>`_ folder except `Makefile <https://github.com/OPM/pyopmspe11/blob/main/docs/Makefile>`_, `text <https://github.com/OPM/pyopmspe11/blob/main/docs/text>`_, and `.nojekyll <https://github.com/OPM/pyopmspe11/blob/main/docs/.nojekyll>`_, after copy all contents from the docs/_build/html/ folder, and finally paste them in the `docs <https://github.com/cssr-tools/pyopmspe11/tree/main/docs>`_ folder)
30+
31+
.. tip::
32+
See the `CI.yml <https://github.com/cssr-tools/pyopmspe11/blob/main/.github/workflows/CI.yml>`_ script and the `Actions <https://github.com/cssr-tools/pyopmspe11/actions>`_ for installation of pyopmspe11, OPM Flow (binary packages), and dependencies, as well as the execution of the six previous steps in Ubuntu 24.10.
33+
34+
#. Squash your commits into a single commit (see this `nice tutorial <https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa>`_ if you are not familiar with this)
35+
#. Push your commit and make a pull request
36+
#. The maintainers will review the pull request, and if the contribution is accepted, then it will be merge to the main repo
37+
38+
============================
39+
Reporting issues or problems
40+
============================
41+
42+
#. Issues or problems can be raised by creating a `new issue <https://github.com/cssr-tools/pyopmspe11/issues>`_ in the repository GitHub page (if you are not familiar with this approach, please visit `GitHub Docs Issues <https://docs.github.com/en/issues/tracking-your-work-with-issues>`_).
43+
#. We will try to answer as soon as possible, but also any user is more than welcome to answer.
44+
45+
============
46+
Seek support
47+
============
48+
49+
#. The preferred approach to seek support is to raise an Issue as described in the previous lines.
50+
#. We will try to answer as soon as possible, but also any user is more than welcome to answer.
51+
52+
- An alternative approach is to send an email to any of the `mantainers <https://github.com/cssr-tools/pyopmspe11/blob/main/pyproject.toml>`_.

docs/_sources/examples.rst.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ Hello world
77
===========
88

99
The `examples/hello_world <https://github.com/OPM/pyopmspe11/blob/main/examples/hello_world>`_ folder contains configuration files
10-
with low grid resolution and shorter injetion times (for initial testing of the framework). For example, by executing:
10+
with low grid resolution and shorter injection times (for initial testing of the framework). For example, by executing:
1111

1212
.. code-block:: bash
1313
1414
pyopmspe11 -i spe11b.txt -o spe11b -m all -g all -t 5 -r 50,1,15 -w 1
1515
16-
The following is one of the figures generated related to the CO2 mass in the domain over time (i.e., the simulations results from
17-
the corner-point grid mapped to the equidistance reporting grid of 50 x 15 as defined by the -r flag):
16+
The following is the figure `spe11b_tco2_2Dmaps`, which shows the CO2 mass in the domain over time (i.e., the simulations results from
17+
the corner-point grid mapped to the equidistance reporting grid of 50 x 15 as defined by the -r flag). You can
18+
compare your example results to this figure to evaluate if your example ran correctly:
1819

1920
.. figure:: figs/spe11b_tco2_2Dmaps.png
2021

@@ -155,4 +156,4 @@ SPE11C
155156

156157
.. figure:: figs/spe11c_sparse_data_new.png
157158

158-
.. image:: ./figs/animationspe11c.gif
159+
.. image:: ./figs/animationspe11c.gif

docs/_sources/index.rst.txt

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Welcome to pyopmspe11's documentation!
1313
benchmark
1414
api
1515
output_folder
16+
contributing
1617
related
1718
about
1819

docs/_sources/installation.rst.txt

+34-12
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
Installation
33
============
44

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

8-
To install the **pyopmspe11** executable in an existing Python environment:
14+
To install the **pyopmspe11** executable from the development version:
915

1016
.. code-block:: bash
1117
1218
pip install git+https://github.com/opm/pyopmspe11.git
1319
14-
If you are interested in modifying the source code, then you can clone the repository and
20+
If you are interested in a specific version (e.g., v2024.04) or in modifying the source code, then you can clone the repository and
1521
install the Python requirements in a virtual environment with the following commands:
1622

1723
.. code-block:: console
@@ -20,7 +26,9 @@ install the Python requirements in a virtual environment with the following comm
2026
git clone https://github.com/opm/pyopmspe11.git
2127
# Get inside the folder
2228
cd pyopmspe11
23-
# Create virtual environment
29+
# For a specific version (e.g., v2024.04), or skip this step (i.e., edge version)
30+
git checkout v2024.04
31+
# Create virtual environment (to specific Python, python3.12 -m venv vpyopmspe11)
2432
python3 -m venv vpyopmspe11
2533
# Activate virtual environment
2634
source vpyopmspe11/bin/activate
@@ -31,27 +39,39 @@ install the Python requirements in a virtual environment with the following comm
3139
# For contributions/testing/linting, install the dev-requirements
3240
pip install -r dev-requirements.txt
3341
42+
.. tip::
43+
44+
Typing **git tag -l** writes all available specific versions.
45+
3446
.. note::
3547

36-
Regarding the reading of OPM Flow output files (i.e., .EGRID, .INIT, .UNRST), it is possible to use the OPM python library instead of resdata (e.g., it seems the OPM Python library
37-
is faster than resdata to read large simulation files). For not macOS users, to install the Python OPM package, execute in the terminal **pip install opm**.
38-
For macOS, see :ref:`macOS`.
48+
For not macOS users, to install the Python opm package (this is an alternative
49+
to `resdata <https://github.com/equinor/resdata>`_, both are use to read OPM output files; while resdata is easier to
50+
install in macOS, opm seems to be faster), execute in the terminal
51+
52+
**pip install opm**
53+
54+
For not macOS users, to install the dependencies used for the figure's LaTeX formatting, execute
55+
56+
**sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super**
57+
58+
For macOS users, see :ref:`macOS`.
3959

4060
OPM Flow
4161
--------
4262
You also need to install:
4363

44-
* OPM Flow (https://opm-project.org, Release 2024.04 or current master branches)
64+
* OPM Flow (https://opm-project.org, Release 2024.10 or current master branches)
4565

4666
.. tip::
4767

4868
See the `CI.yml <https://github.com/opm/pyopmspe11/blob/main/.github/workflows/CI.yml>`_ script
49-
for installation of OPM Flow (binary packages) and the pyopmspe11 package in Linux.
69+
for installation of OPM Flow (binary packages) and the pyopmspe11 package in Ubuntu.
5070

5171
Source build in Linux/Windows
5272
+++++++++++++++++++++++++++++
5373
If you are a Linux user (including the Windows subsystem for Linux), then you could try to build Flow (after installing the `prerequisites <https://opm-project.org/?page_id=239>`_) from the master branches with mpi support by running
54-
in the terminal the following lines (which in turn should build flow in the folder ./build/opm-simulators/bin/flow.):
74+
in the terminal the following lines (which in turn should build flow in the folder ./build/opm-simulators/bin/flow):
5575

5676
.. code-block:: console
5777
@@ -132,6 +152,8 @@ package (see the `prerequisites <https://opm-project.org/?page_id=239>`_, which
132152
133153
This builds OPM Flow as well as the OPM Python library, and it exports the required PYTHONPATH. Then after execution, deactivate and activate the Python virtual environment.
134154

135-
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).
136-
Then, it is recommended to use a Python version equal or higher than 3.10; otherwise, remove resdata from the requirements in the `pyproject.toml <https://github.com/opm/pyopmspe11/blob/main/pyproject.toml>`_,
137-
and when executing **pyopmspe11** always set the flag **-u opm** (resdata is the default package for reading the simulation files, see the :ref:`overview`).
155+
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).
156+
Then, for macOS users, you need to use a Python version equal or higher than 3.10.
157+
158+
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
159+
when executing pyopmspe11, then add the flag **-l 0** to pyopmspe11.

docs/_sources/introduction.rst.txt

+2
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ where
4242
-u Using the 'opm' or 'resdata' python package ('resdata' by default).
4343
-w Time interval for the sparse and performance data (spe11a [h]; spe11b/c [y]) ('0.1' by default).
4444
-c Generate a common plot for the current folders for 'spe11a', 'spe11b', or 'spe11c' ('' by default).
45+
-s Set to 1 to show Python warnings ('0' by default).
46+
-l Set to 0 to not use LaTeX formatting ('1' by default).

docs/_sources/pyopmspe11.rst.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Subpackages
99

1010
pyopmspe11.core
1111
pyopmspe11.utils
12+
pyopmspe11.visualization
1213

1314
Module contents
1415
---------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pyopmspe11.visualization.data module
2+
====================================
3+
4+
.. automodule:: pyopmspe11.visualization.data
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:private-members:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pyopmspe11.visualization.plotting module
2+
========================================
3+
4+
.. automodule:: pyopmspe11.visualization.plotting
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:private-members:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pyopmspe11.visualization package
2+
================================
3+
4+
Submodules
5+
----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
pyopmspe11.visualization.data
11+
pyopmspe11.visualization.plotting
12+
13+
Module contents
14+
---------------
15+
16+
.. automodule:: pyopmspe11.visualization
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
:private-members:

docs/_sources/related.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ expreccs
3737
.. image:: ./figs/expreccs.gif
3838
:scale: 50%
3939

40-
`Expansion of ResourCes for CO2 Storage on the Horda Platform <https://github.com/cssr-tools/expreccs>`_.
40+
`A Python framework using OPM Flow to simulate regional and site reservoirs for CO2 storage <https://github.com/cssr-tools/expreccs>`_.
4141

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

docs/_static/basic.css

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
/*
2-
* basic.css
3-
* ~~~~~~~~~
4-
*
52
* Sphinx stylesheet -- basic theme.
6-
*
7-
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
8-
* :license: BSD, see LICENSE for details.
9-
*
103
*/
114

125
/* -- main layout ----------------------------------------------------------- */
@@ -115,15 +108,11 @@ img {
115108
/* -- search page ----------------------------------------------------------- */
116109

117110
ul.search {
118-
margin: 10px 0 0 20px;
119-
padding: 0;
111+
margin-top: 10px;
120112
}
121113

122114
ul.search li {
123-
padding: 5px 0 5px 20px;
124-
background-image: url(file.png);
125-
background-repeat: no-repeat;
126-
background-position: 0 7px;
115+
padding: 5px 0;
127116
}
128117

129118
ul.search li a {

0 commit comments

Comments
 (0)