Skip to content

cssr-tools/pycopm

Repository files navigation

Build Status Code style License: GPL v3 DOI

pycopm: An open-source coarsening framework for OPM Flow geological models

Main feature

Creation of coarser models from given input decks.

Installation

You will first need to install

To install the pycopm executable in an existing Python environment:

pip install git+https://github.com/cssr-tools/pycopm.git

If you are interested in modifying the source code, then you can clone the repository and install the Python requirements in a virtual environment with the following commands:

# Clone the repo
git clone https://github.com/cssr-tools/pycopm.git
# Get inside the folder
cd pycopm
# Create virtual environment (for higher versions of Python than the default one, e.g., python3.12 -m venv vpycopm)
python3 -m venv vpycopm
# Activate virtual environment
source vpycopm/bin/activate
# Upgrade pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel
# Install the pycopm package
pip install -e .
# For contributions/testing/linting, install the dev-requirements
pip install -r dev-requirements.txt

See the installation for further details on building OPM Flow from the master branches in Linux, Windows, and macOS, as well as the opm Python package.

Running pycopm

You can run pycopm as a single command line:

pycopm -i name_of_input_file

Run pycopm --help to see all possible command line argument options.

Getting started

See the examples in the documentation.

Citing

Publications

The following is a list of manuscripts in which pycopm is used:

  1. Sandve, T.H., Lorentzen, R.J., Landa-Marbán, D., Fossum, K., 2024. Closed-loop reservoir management using fast data-calibrated coarse models. European Association of Geoscientists & Engineers, ECMOR 2024, Volume 202, ISSN 2214-4609. https://doi.org/10.3997/2214-4609.202437071.

About pycopm

The pycopm package is being funded by the Center for Sustainable Subsurface Resources (CSSR) [project no. 331841] and by Expansion of Resources for CO2 Storage on the Horda Platform (ExpReCCS) [project no. 336294]. This is work in progress. Contributions are more than welcome using the fork and pull request approach.