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 docs/_sources/about.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ and by `Expansion of Resources for CO2 Storage on the Horda Platform (ExpReCCS)

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

For a new feature, please request this raising an issue.
For a new feature, please request this raising an issue.
2 changes: 1 addition & 1 deletion docs/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ grid refinement, grid coarsening, submodels, and transformations.

Files in the pyocpm package.

.. include:: modules.rst
.. include:: modules.rst
2 changes: 1 addition & 1 deletion docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation
The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using brew or macports.
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 resdata Python package is not yet available via pip install in Python 3.14).
(e.g., the ert Python package is not yet available via pip install in Python 3.14).

.. _vpycopm:

Expand Down
3 changes: 1 addition & 2 deletions docs/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,5 @@ where
-e Use 'utf8' or 'ISO-8859-1' encoding to read the deck ('ISO-8859-1' by default).
-ijk Given i,j,k indices in the input model, return the modified i,j,k corresponding positions ('' by default; if not empty, e.g., '1,2,3', then there will not be generation of modified files, only the i,j,k mapped indices in the terminal).
-d Options to transform the x,y,z coordinates: 'translate [10,-5,4]' adds the values in meters to the coordinates, 'scale [1,2,3]' multiplies the coordinates by the given values respectively, and 'rotatexy 45' applies a rotation in degrees in the xy plane (rotatexz and rotateyz applies a rotation around the y and x axis respectively) ('' by default).
-u Use the resdata or opm Python libraries ('opm' by default).
-explicit Set to 1 to explicitly write the cell values in the SOLUTION section in the deck ('0' by default).
-warnings Set to 1 to show Python warnings ('0' by default).
-warnings Set to 1 to show Python warnings ('0' by default).
2 changes: 1 addition & 1 deletion docs/_sources/output_folder.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ favourite history matching/optimization tool (e.g., `ERT <https://ert.readthedoc
For input decks that include other files without giving the full path (e.g., './include/summary...'), then we recommend
to use the default output folder (-o .), i.e., the modified deck and files would be generated in the same location as
the input deck and no errors would appear for not finding the include files; otherwise, you might need to copy all needed folders
with the include files to the output folder, or set the correct path to the include files in the generated deck.
with the include files to the output folder, or set the correct path to the include files in the generated deck.
2 changes: 1 addition & 1 deletion docs/_sources/related.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ pymm
.. image:: ./figs/pymm.gif
:scale: 15%

`An open-source image-based framework for CFD in microsystems <https://github.com/cssr-tools/pymm>`_.
`An open-source image-based framework for CFD in microsystems <https://github.com/cssr-tools/pymm>`_.
2 changes: 1 addition & 1 deletion docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1>Installation<a class="headerlink" href="#installation" title="Link to this h
<p>The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using brew or macports.
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 resdata Python package is not yet available via pip install in Python 3.14).</p>
(e.g., the ert Python package is not yet available via pip install in Python 3.14).</p>
<section id="python-package">
<span id="vpycopm"></span><h2>Python package<a class="headerlink" href="#python-package" title="Link to this heading"></a></h2>
<p>To install the <strong>pycopm</strong> executable from the development version:</p>
Expand Down
3 changes: 0 additions & 3 deletions docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ <h2>Roadmap<a class="headerlink" href="#roadmap" title="Link to this heading">
<dt><kbd><span class="option">-d</span></kbd></dt>
<dd><p>Options to transform the x,y,z coordinates: ‘translate [10,-5,4]’ adds the values in meters to the coordinates, ‘scale [1,2,3]’ multiplies the coordinates by the given values respectively, and ‘rotatexy 45’ applies a rotation in degrees in the xy plane (rotatexz and rotateyz applies a rotation around the y and x axis respectively) (’’ by default).</p>
</dd>
<dt><kbd><span class="option">-u</span></kbd></dt>
<dd><p>Use the resdata or opm Python libraries (‘opm’ by default).</p>
</dd>
<dt><kbd><span class="option">-e<var>xplicit</var></span></kbd></dt>
<dd><p>Set to 1 to explicitly write the cell values in the SOLUTION section in the deck (‘0’ by default).</p>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion docs/pycopm.utils.generate_files.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<dl class="py function">
<dt class="sig sig-object py" id="pycopm.utils.generate_files.initialize_variables">
<span class="sig-prename descclassname"><span class="pre">pycopm.utils.generate_files.</span></span><span class="sig-name descname"><span class="pre">initialize_variables</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.generate_files.initialize_variables" title="Link to this definition"></a></dt>
<dd><p>Use resdata or opm to read the dry run</p>
<dd><p>Use opm to read the dry run</p>
<dl class="simple">
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
</dd>
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/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ and by `Expansion of Resources for CO2 Storage on the Horda Platform (ExpReCCS)

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

For a new feature, please request this raising an issue.
For a new feature, please request this raising an issue.
2 changes: 1 addition & 1 deletion docs/text/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ grid refinement, grid coarsening, submodels, and transformations.

Files in the pyocpm package.

.. include:: modules.rst
.. include:: modules.rst
2 changes: 1 addition & 1 deletion docs/text/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation
The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using brew or macports.
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 resdata Python package is not yet available via pip install in Python 3.14).
(e.g., the ert Python package is not yet available via pip install in Python 3.14).

.. _vpycopm:

Expand Down
3 changes: 1 addition & 2 deletions docs/text/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,5 @@ where
-e Use 'utf8' or 'ISO-8859-1' encoding to read the deck ('ISO-8859-1' by default).
-ijk Given i,j,k indices in the input model, return the modified i,j,k corresponding positions ('' by default; if not empty, e.g., '1,2,3', then there will not be generation of modified files, only the i,j,k mapped indices in the terminal).
-d Options to transform the x,y,z coordinates: 'translate [10,-5,4]' adds the values in meters to the coordinates, 'scale [1,2,3]' multiplies the coordinates by the given values respectively, and 'rotatexy 45' applies a rotation in degrees in the xy plane (rotatexz and rotateyz applies a rotation around the y and x axis respectively) ('' by default).
-u Use the resdata or opm Python libraries ('opm' by default).
-explicit Set to 1 to explicitly write the cell values in the SOLUTION section in the deck ('0' by default).
-warnings Set to 1 to show Python warnings ('0' by default).
-warnings Set to 1 to show Python warnings ('0' by default).
2 changes: 1 addition & 1 deletion docs/text/output_folder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ favourite history matching/optimization tool (e.g., `ERT <https://ert.readthedoc
For input decks that include other files without giving the full path (e.g., './include/summary...'), then we recommend
to use the default output folder (-o .), i.e., the modified deck and files would be generated in the same location as
the input deck and no errors would appear for not finding the include files; otherwise, you might need to copy all needed folders
with the include files to the output folder, or set the correct path to the include files in the generated deck.
with the include files to the output folder, or set the correct path to the include files in the generated deck.
2 changes: 1 addition & 1 deletion docs/text/related.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ pymm
.. image:: ./figs/pymm.gif
:scale: 15%

`An open-source image-based framework for CFD in microsystems <https://github.com/cssr-tools/pymm>`_.
`An open-source image-based framework for CFD in microsystems <https://github.com/cssr-tools/pymm>`_.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies = [
"ert==13.0.4",
"h5py<=3.14.0",
"mako<=1.3.10",
"resdata<=6.0.1",
"opm<=2025.10"
]
requires-python = ">=3.11"
Expand Down
21 changes: 1 addition & 20 deletions src/pycopm/core/pycopm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
from pycopm.utils.runs_executer import simulations, plotting
from pycopm.utils.generate_files import create_deck

has_opm = False
try:
has_opm = bool(__import__("opm"))
except ImportError:
pass


def pycopm():
"""Main function for the pycopm executable"""
Expand All @@ -44,7 +38,6 @@ def pycopm():
dic["label"] = cmdargs["label"].strip() # Prefix to the generted inc files
dic["ijk"] = cmdargs["ijk"].strip() # ijk indices to map to the modified model
dic["remove"] = int(cmdargs["remove"].strip()) # Remove CONFACT and KH
dic["resdata"] = (cmdargs["use"].strip()).lower() == "resdata" # Use resdata or opm
dic["encoding"] = cmdargs["encoding"].strip() # Use utf8 or ISO-8859-1
dic["pvcorr"] = int(cmdargs["pvcorr"]) # Correct for removed pore volume
dic["fipcorr"] = int(cmdargs["fipcorr"]) # Correct for total mass of fluids
Expand Down Expand Up @@ -97,7 +90,7 @@ def pycopm():
if not os.path.exists(f"{dic['fol']}"):
os.system(f"mkdir {dic['fol']}")

# When a deck, only coarser/refined/submodel/transformed files are generated
# When a deck, only coarsened/refined/submodel/transformed files are generated
if "DATA" in file:
# if "/" in file:
dic["deck"] = file.split("/")[-1][:-5]
Expand Down Expand Up @@ -371,12 +364,6 @@ def load_parser():
"(rotatexz and rotateyz applies a rotation around the y and x axis respectively) "
"('' by default).",
)
parser.add_argument(
"-u",
"--use",
default="opm",
help="Use the resdata or opm Python libraries ('opm' by default).",
)
parser.add_argument(
"-explicit",
"--explicit",
Expand Down Expand Up @@ -410,12 +397,6 @@ def check_cmdargs(cmdargs):
"valid extensions are .DATA or .toml\n"
)
sys.exit()
if (cmdargs["use"].strip()).lower() == "opm" and not has_opm:
print(
"\nThe Python package opm cannot be import. Either try to install it "
"following the pycopm documentation, or remove the flag '-u opm'.\n"
)
sys.exit()
if (cmdargs["input"].strip()).endswith(".DATA"):
if (
subprocess.call(
Expand Down
Loading