pycopm#
Tailor OPM Flow geological models by coarsening, refining, extracting submodels, and transforming grids.
pycopm creates modified, simulation-ready OPM Flow models from existing
.DATA decks. Generic deck workflows are the active development path.
Legacy TOML workflows remain available for existing Norne and Drogon
coarsening and ERT studies.
Understand the deck-first workflow and choose a model operation.
Install pycopm, OPM Flow, and visualization tools.
Work through the complete Hello World deck workflow.
Look up options, defaults, formats, and compatibility rules.
Quick installation#
Install the current development version:
pip install git+https://github.com/cssr-tools/pycopm.git
See Installation for supported Python versions, OPM Flow, visualization tools, virtual environments, platform-specific dependencies, and installation from source.
Quick start#
Coarsen the bundled Hello World deck and run the complete workflow:
pycopm -i examples/decks/HELLO_WORLD.DATA -c 5,5,1 -m all -o output
Display the available command-line options:
pycopm --help
See Tutorial for a guided workflow, Examples for larger applications, and Command-line reference for exact syntax, accepted values, defaults, and option compatibility.
What can pycopm do?#
Remove selected pillars and grid lines, aggregate continuous and discrete properties, preserve pore volume, and optionally upscale transmissibilities and non-neighbouring connections.
Add cells globally or in selected x, y, and z intervals while mapping properties, regions, wells, faults, and other indexed deck data to the refined grid.
Select cells by region values, xy polygons, or well-centred box, diamond, and diamondxy neighbourhoods, with configurable boundary pore-volume handling.
Translate, scale, or rotate OPM Flow grids to reposition models, modify dimensions, or align geological descriptions from different sources.
Write modified OPM Flow decks and supporting include files, run preparation and dry-run stages, and control names, precision, initialization, and completion rewriting.
Control active-cell aggregation, region and property upscaling, fluid-in-place correction, fault-related jump handling, and dual net/non-net coarsening.
Use generated decks directly with OPM Flow or adapt them for ERT, PET, visualization tools, history matching, optimization, proxy modelling, and uncertainty studies.
Continue existing Norne and Drogon coarsening and ERT workflows through the retained TOML configuration interface while new development focuses on generic deck input.