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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Contributions are more than welcome using the fork and pull request approach
1. **pycopm -i examples/decks/HELLO_WORLD.DATA -c 5,5,1 -m all -o output** (this runs the hello world example, which succeeds if the file output/HELLO_WORLD_PYCOPM.EGRID is created)
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/pycopm/tree/main/docs) folder)
* Tip for Linux users: See the [_ci_pycopm_ubuntu.yml_](https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml) script and the [_Actions_](https://github.com/cssr-tools/pycopm/actions) for installation of pycopm, OPM Flow (binary packages), and dependencies, as well as the execution of the seven previous steps in Ubuntu 24.04 using Python 3.12.
* Tip for macOS users: See the [_ci_pycopm_macos_.yml_](https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml) script and the [_OPM-Flow_macOS Actions_](https://github.com/cssr-tools/pycopm/actions) for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.13. Note that if you do not add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pycopm/build/opm-simulators/bin), then you can pass this in the execution of the tests and pycopm using the flags **-f/--flow** (see [_ci_pycopm_macos.yml_](https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml#L76)).
* Tip for macOS users: See the [_ci_pycopm_macos_.yml_](https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml) script and the [_OPM-Flow_macOS Actions_](https://github.com/cssr-tools/pycopm/actions) for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.14. Note that if you do not add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pycopm/build/opm-simulators/bin), then you can pass this in the execution of the tests and pycopm using the flags **-f/--flow** (see [_ci_pycopm_macos.yml_](https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml#L76)).
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)
1. Push your commit and make a pull request
1. The maintainers will review the pull request, and if the contribution is accepted, then it will be merge to the main repo
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://github.com/cssr-tools/pycopm/actions/workflows/ci_pycopm_ubuntu.yml/badge.svg)](https://github.com/cssr-tools/pycopm/actions/workflows/ci_pycopm_ubuntu.yml)
[![Build Status](https://github.com/daavid00/OPM-Flow_macOS/actions/workflows/ci_pycopm_macos.yml/badge.svg)](https://github.com/daavid00/OPM-Flow_macOS/actions/workflows/ci_pycopm_macos.yml)
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11%20to%203.13-blue.svg"></a>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11%20to%203.14-blue.svg"></a>
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
<img src="docs/text/figs/pycopm.png" width="900" height="380">
Expand All @@ -12,7 +12,7 @@ Creation of OPM Flow geological models from provided input decks with options fo

## Installation
You will first need to install
* OPM Flow (https://opm-project.org, Release 2025.10 or current master branches)
* OPM Flow (https://opm-project.org, Release 2026.04 or current master branches)

To install the _pycopm_ executable from the development version:

Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/contributing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Contribute to the software

.. tip::
See the `ci_pycopm_ubuntu.yml <https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml>`_ script and the `Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (binary packages), and dependencies, as well as the execution of the seven previous steps in Ubuntu 24.04 using Python 3.12.
For macOS users, see the `ci_pycopm_macos.yml <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml>`_ script and the `OPM-Flow_macOS Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.13.
For macOS users, see the `ci_pycopm_macos.yml <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml>`_ script and the `OPM-Flow_macOS Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.14.
Note that if you do not add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pycopm/build/opm-simulators/bin), then you can pass this in the execution of the tests and pycopm using the flags **-f/--flow** (see `this script <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml#L72>`_).

#. Squash your commits into a single commit (see this `nice tutorial <https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa>`_ if you are not familiar with this)
Expand Down
14 changes: 11 additions & 3 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Installation

The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using `brew <https://brew.sh>`_ or `macports <https://www.macports.org>`_.
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.13. We will update the documentation when Python3.14 is supported
(e.g., the ert Python package is not yet available via pip install in Python 3.14).
The supported Python versions are 3.11 to 3.14.

.. note::

Expand Down Expand Up @@ -52,13 +51,22 @@ install the Python requirements in a virtual environment with the following comm

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

.. note::

The ert dependency in Python 3.14 and macOS requires building some wheels; then execute the following commands before installing pycopm:

.. code-block:: bash

brew install openblas hdf5 pkg-config
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"

.. _opmflow:

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

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

Binary packages
+++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>Contribute to the software<a class="headerlink" href="#contribute-to-the-sof
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml">ci_pycopm_ubuntu.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pycopm/actions">Actions</a> for installation of pycopm, OPM Flow (binary packages), and dependencies, as well as the execution of the seven previous steps in Ubuntu 24.04 using Python 3.12.
For macOS users, see the <a class="reference external" href="https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml">ci_pycopm_macos.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pycopm/actions">OPM-Flow_macOS Actions</a> for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.13.
For macOS users, see the <a class="reference external" href="https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml">ci_pycopm_macos.yml</a> script and the <a class="reference external" href="https://github.com/cssr-tools/pycopm/actions">OPM-Flow_macOS Actions</a> for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.14.
Note that if you do not add the directory containing the OPM Flow executable to your system’s PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pycopm/build/opm-simulators/bin), then you can pass this in the execution of the tests and pycopm using the flags <strong>-f/–flow</strong> (see <a class="reference external" href="https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml#L72">this script</a>).</p>
</div>
</div></blockquote>
Expand Down
6 changes: 4 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,15 @@ <h2 id="C">C</h2>
</li>
<li><a href="pycopm.utils.mapping_methods.html#pycopm.utils.mapping_methods.coarsening_dir">coarsening_dir() (in module pycopm.utils.mapping_methods)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pycopm.utils.files_writer.html#pycopm.utils.files_writer.coarser_files">coarser_files() (in module pycopm.utils.files_writer)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pycopm.utils.grid_builder.html#pycopm.utils.grid_builder.coarser_grid">coarser_grid() (in module pycopm.utils.grid_builder)</a>
</li>
<li><a href="pycopm.utils.properties_builder.html#pycopm.utils.properties_builder.coarser_properties">coarser_properties() (in module pycopm.utils.properties_builder)</a>
</li>
<li><a href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.comment_endbox">comment_endbox() (in module pycopm.utils.parser_deck)</a>
</li>
<li><a href="pycopm.utils.generate_files.html#pycopm.utils.generate_files.compact_format">compact_format() (in module pycopm.utils.generate_files)</a>
</li>
Expand Down
13 changes: 10 additions & 3 deletions docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
<p>The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using <a class="reference external" href="https://brew.sh">brew</a> or <a class="reference external" href="https://www.macports.org">macports</a>.
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.13. We will update the documentation when Python3.14 is supported
(e.g., the ert Python package is not yet available via pip install in Python 3.14).</p>
The supported Python versions are 3.11 to 3.14.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In Ubuntu, one also needs to install freeglut3-dev:</p>
Expand Down Expand Up @@ -134,12 +133,20 @@ <h1>Installation<a class="headerlink" href="#installation" title="Link to this h
<p class="admonition-title">Tip</p>
<p>Typing <strong>git tag -l</strong> writes all available specific versions.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The ert dependency in Python 3.14 and macOS requires building some wheels; then execute the following commands before installing pycopm:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew<span class="w"> </span>install<span class="w"> </span>openblas<span class="w"> </span>hdf5<span class="w"> </span>pkg-config
<span class="nb">export</span><span class="w"> </span><span class="nv">PKG_CONFIG_PATH</span><span class="o">=</span><span class="s2">&quot;/opt/homebrew/opt/openblas/lib/pkgconfig&quot;</span>
</pre></div>
</div>
</div>
</section>
<section id="opm-flow">
<span id="opmflow"></span><h2>OPM Flow<a class="headerlink" href="#opm-flow" title="Link to this heading"></a></h2>
<p>You also need to install:</p>
<ul class="simple">
<li><p>OPM Flow (<a class="reference external" href="https://opm-project.org">https://opm-project.org</a>, Release 2025.10 or current master branches)</p></li>
<li><p>OPM Flow (<a class="reference external" href="https://opm-project.org">https://opm-project.org</a>, Release 2026.04 or current master branches)</p></li>
</ul>
<section id="binary-packages">
<h3>Binary packages<a class="headerlink" href="#binary-packages" title="Link to this heading"></a></h3>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
1 change: 1 addition & 0 deletions docs/pycopm.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pycopm.utils.parser_deck.html">pycopm.utils.parser_deck module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.comment_endbox"><code class="docutils literal notranslate"><span class="pre">comment_endbox()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.get_wells_for_vicinity"><code class="docutils literal notranslate"><span class="pre">get_wells_for_vicinity()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.handle_aquancon"><code class="docutils literal notranslate"><span class="pre">handle_aquancon()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.handle_aqucon"><code class="docutils literal notranslate"><span class="pre">handle_aqucon()</span></code></a></li>
Expand Down
1 change: 1 addition & 0 deletions docs/pycopm.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pycopm.utils.parser_deck.html">pycopm.utils.parser_deck module</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.comment_endbox"><code class="docutils literal notranslate"><span class="pre">comment_endbox()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.get_wells_for_vicinity"><code class="docutils literal notranslate"><span class="pre">get_wells_for_vicinity()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.handle_aquancon"><code class="docutils literal notranslate"><span class="pre">handle_aquancon()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="pycopm.utils.parser_deck.html#pycopm.utils.parser_deck.handle_aqucon"><code class="docutils literal notranslate"><span class="pre">handle_aqucon()</span></code></a></li>
Expand Down
6 changes: 6 additions & 0 deletions docs/pycopm.utils.parser_deck.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
<section id="module-pycopm.utils.parser_deck">
<span id="pycopm-utils-parser-deck-module"></span><h1>pycopm.utils.parser_deck module<a class="headerlink" href="#module-pycopm.utils.parser_deck" title="Link to this heading"></a></h1>
<p>Methods to parser the input OPM deck.</p>
<dl class="py function">
<dt class="sig sig-object py" id="pycopm.utils.parser_deck.comment_endbox">
<span class="sig-prename descclassname"><span class="pre">pycopm.utils.parser_deck.</span></span><span class="sig-name descname"><span class="pre">comment_endbox</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nrwo</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pycopm.utils.parser_deck.comment_endbox" title="Link to this definition"></a></dt>
<dd><p>Do not include the file if ENDBOX (this is handleded from the .INIT)</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pycopm.utils.parser_deck.get_wells_for_vicinity">
<span class="sig-prename descclassname"><span class="pre">pycopm.utils.parser_deck.</span></span><span class="sig-name descname"><span class="pre">get_wells_for_vicinity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pycopm.utils.parser_deck.get_wells_for_vicinity" title="Link to this definition"></a></dt>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/text/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Contribute to the software

.. tip::
See the `ci_pycopm_ubuntu.yml <https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml>`_ script and the `Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (binary packages), and dependencies, as well as the execution of the seven previous steps in Ubuntu 24.04 using Python 3.12.
For macOS users, see the `ci_pycopm_macos.yml <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml>`_ script and the `OPM-Flow_macOS Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.13.
For macOS users, see the `ci_pycopm_macos.yml <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml>`_ script and the `OPM-Flow_macOS Actions <https://github.com/cssr-tools/pycopm/actions>`_ for installation of pycopm, OPM Flow (source build), and dependencies, as well as running the tests and the hello world example in macOS 26 using Python3.14.
Note that if you do not add the directory containing the OPM Flow executable to your system's PATH environment variable (e.g., export PATH=$PATH:/Users/yourname/pycopm/build/opm-simulators/bin), then you can pass this in the execution of the tests and pycopm using the flags **-f/--flow** (see `this script <https://github.com/daavid00/OPM-Flow_macOS/blob/main/.github/workflows/ci_pycopm_macos.yml#L72>`_).

#. Squash your commits into a single commit (see this `nice tutorial <https://gist.github.com/lpranam/4ae996b0a4bc37448dc80356efbca7fa>`_ if you are not familiar with this)
Expand Down
14 changes: 11 additions & 3 deletions docs/text/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Installation

The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using `brew <https://brew.sh>`_ or `macports <https://www.macports.org>`_.
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.13. We will update the documentation when Python3.14 is supported
(e.g., the ert Python package is not yet available via pip install in Python 3.14).
The supported Python versions are 3.11 to 3.14.

.. note::

Expand Down Expand Up @@ -52,13 +51,22 @@ install the Python requirements in a virtual environment with the following comm

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

.. note::

The ert dependency in Python 3.14 and macOS requires building some wheels; then execute the following commands before installing pycopm:

.. code-block:: bash

brew install openblas hdf5 pkg-config
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"

.. _opmflow:

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

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

Binary packages
+++++++++++++++
Expand Down
Loading
Loading