Skip to main content

Banner

Lightweight Python Library for Static Reservoir Modeling

Documentation • Installation • Quick Start

License Python Version Documentation

Introduction

Petres is a lightweight, open-source Python library for corner-point reservoir grid generation, property modeling, and visualization. It provides a fully code-driven workflow for static reservoir modeling.

For complete documentation, see the Petres documentation.

Stability Notice
Petres is currently in early development. The API is not yet stable and may change without notice.

Why Petres?

  • Open Access: Free alternative for engineers and students without access to expensive commercial softwares.

  • Scriptable Modeling: Avoid UI complexity and work with code-driven workflows.

  • Fully Customizable: Integrate your own code alongside built-in methods.

  • AI Integration: Use the Python ecosystem to apply AI and Machine Learning techniques.

Features

  • Grid Generation: Construct Corner-Point, Rectilinear, and Regular grids.
    Apply boundary polygons to deactivate cells outside the target region.

  • Structural Modeling: Generate horizon and zone surfaces from well tops to support grid construction.

  • Property Modeling: Assign petrophysical properties to grid cells using stochastic or deterministic methods, derived attributes, or interpolation from well data.

  • Import & Export Grids: Handle Eclipse grids (SLB reservoir simulator) using the .GRDECL file format. Visualize and export modeled Corner-Point grids.

  • Visualization: Interactive 2D and 3D rendering of Corner-Point grids, structural zones, horizons, and spatial property distributions.

Installation

Full installation instructions are available in the documentation.

Quickstart

Import and visualize a corner-point grid from a .GRDECL file:

from petres.grids import CornerPointGrid

# Define the path to the ".GRDECL" file containing the grid data
path = r"https://raw.githubusercontent.com/jamalbaylit/petres/v0.1.0/data/opm/norne/grdecl/norne_with_props.grdecl"

# Import corner-point grid from a ".GRDECL" file, including specified properties
grid = CornerPointGrid.from_grdecl(
  path, 
  properties=["PORO", "PERMX"]
)

# Visualize grid
grid.show(scalars="depth", z_scale=5)

# Visualize property
grid.show(scalars="PORO", z_scale=5)

Technical Architecture

Component Implementation
Grid Operations High-performance, vectorized array computations using NumPy
2D Plotting Visualization via Matplotlib
3D Visualization Interactive rendering and mesh handling via PyVista
Kriging Interpolation Ordinary and Universal Kriging via PyKrige
RBF Interpolation Multi-dimensional Radial Basis Function interpolation via SciPy
IDW Interpolation In-house implementation of Inverse Distance Weighting

Contact

For questions, bug reports, or collaboration opportunities contact via jamalbaylit@gmail.com or connect via LinkedIn.

Metadata

Release files for petres 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petres 0.1.2
File Size Uploaded Provenance Actions
petres-0.1.2.tar.gz 6.4 MB With provenance Details for petres-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for petres 0.1.2
File Interpreter ABI Platform Actions
petres-0.1.2-py3-none-any.whl Python 3 none any Details for petres-0.1.2-py3-none-any.whl

Total release size: 6.5 MB

Release files / petres-0.1.2.tar.gz

Download URL petres-0.1.2.tar.gz
Size 6.4 MB
Tags Source
SHA-256 checksum
How to use checksums
ec6b077a73651bb9e87e6d8c3595d895856050def4f6d50ec05b68110eff44bd
BLAKE2b-256 checksum
How to use checksums
2d23070080340709dcd61faaab8e6b538ae7bb1fd59ad8c8713c5c82a95be8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release files / petres-0.1.2-py3-none-any.whl

Download URL petres-0.1.2-py3-none-any.whl
Size 143.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83205e308a4ce4f22985412e01cc8d315d0e8766c80d9559fb52763f6f57d903
BLAKE2b-256 checksum
How to use checksums
3a23199746831348c28c4815179fb654ce8f390b0db49c4ab1ffeb0cae2804fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Security for petres 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for petres-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page