resfo
A (lazy) parser and writer for reservoir simulator fortran output format.
What it is and what it does
resfo is a parser for the binary and ASCII output formats used by reservoir simulators, particularly opm flow. It reads files with extensions like .UNRST, .EGRID, .INIT (binary) and .FUNRST, .FEGRID, .FINIT (ASCII), extracting them as a sequence of named arrays. The package does not interpret the semantic meaning of array names—it simply returns tuples of name and numpy array, leaving interpretation to the caller.
The package depends only on numpy and typing_extensions, making it lightweight to install. It is classified as Mature and supports Python 3.10 through 3.14. The repository is actively maintained with recent commits, and the package carries no known security vulnerabilities.
Use it for:
- Extract grid geometry and properties from opm flow simulation output for post-processing or visualization
- Read reservoir simulator results into numpy arrays for numerical analysis or machine learning workflows
- Parse historical or archived simulation output files in binary or ASCII format for data recovery
- Integrate simulator output into automated workflows that require programmatic access to simulation results
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
resfo parses binary and ASCII output files from reservoir simulators (such as opm flow), extracting named arrays as numpy arrays for programmatic access.
Yes. resfo is a specialized, actively maintained parser with low install friction and no security issues. If you work with reservoir simulator output files (especially from opm flow), it directly solves the problem of extracting binary/ASCII data into usable arrays. The LGPL-3.0-or-later license requires attention if you plan proprietary distribution, but poses no barrier to internal or open-source use.
Install
resfo on PyPI
pip
pip install resfouv
uv add resfopoetry
poetry add resfoInstalling resfo
Before you install
Low friction: pure Python wheel with only numpy and typing_extensions as runtime dependencies. Actively maintained with a recent release and ongoing repository activity.
License in practice
Licensed under LGPL-3.0-or-later (copyleft). Derivative works and modifications must be distributed under compatible terms; proprietary use requires careful licensing review.
Quickstart
pip install resfo
import resfo
for kw, arr in resfo.read("my_grid.egrid"):
print(kw, arr.shape)
Verify before relying
- Whether the package handles all variants of reservoir simulator output formats beyond opm flow
- Performance characteristics when parsing large binary files
- Availability of lazy-loading features mentioned in the summary
Package facts
| License | LGPL-3.0-or-later (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, typing_extensions |
| Maintenance | actively maintained — 245 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,715/month — #11,698 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: resfo-5.0.1-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
resdataResData reads and writes result files from…
copyleft · top 15,000 on PyPI
resfo-utilitiesresfo-utilities parses and processes output…
copyleft · top 15,000 on PyPI
oil-reservoir-synthesizerGenerates synthetic oil reservoir simulator…
copyleft · top 15,000 on PyPI
FlowIOFlowIO reads and writes Flow Cytometry Standard…
permissive · top 15,000 on PyPI
f90nmlf90nml reads, writes, and modifies Fortran…
permissive · top 15,000 on PyPI
xtgeoXTGeo manipulates subsurface reservoir…
copyleft · top 15,000 on PyPI
RoffIORoffio reads and writes Roxar Open File Format…
copyleft · top 15,000 on PyPI
fparserfparser parses Fortran source code (Fortran 77…
permissive · top 15,000 on PyPI
numpy-minmaxFinds the minimum and maximum values in a NumPy…
permissive · top 15,000 on PyPI
stanioStanIO converts Python dictionaries to…
permissive · top 5,000 on PyPI