A (lazy) parser and writer for reservoir simulator fortran output format.
Project description
resfo
resfo (Reservoir simulator fortran output) is a parser for the output format used by several reservoir simulators such as opm flow, such as found in files with extensions .UNRST, .EGRID, .INIT, etc. and also the corresponding ascii files with extension .FUNRST, .FEGRID, .FINIT, etc.
Installation
resfo can be installed with pip:
pip install resfo
Getting started
Reservoir simulator output files consist of a sequence of named arrays. resfo does not interpret the names, but simply give you a tuple of the name and a numpy array with the read function:
import resfo
for kw, arr in resfo.read("my_grid.egrid"):
print(kw)
>>> "FILEHEAD"
>>> "GRIDHEAD"
>>> "COORD"
>>> "ZCORN"
>>> "ACTNUM"
>>> "MAPAXES"
For more information, see the docs.
How to contribute
The easiest way to set up a nice development environment for resfo is to use tox (can be installed via pip install tox
or
sudo apt install tox
on ubuntu), then all testing and linting can be ran with
tox
You can also set up pre-commit
to ensure style checks are done as you commit:
pip install pre-commit
pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file resfo-4.2.0.tar.gz
.
File metadata
- Download URL: resfo-4.2.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7972f425175375c1e76186c59341decdc1ed61105d16e43e761fd2806a145116 |
|
MD5 | fca648faff687cf1816a7411d2e84498 |
|
BLAKE2b-256 | 017141a074b2be1285cc7bd8683d7fd4cb89ccdc07ccf90041ae16304cea6742 |
File details
Details for the file resfo-4.2.0-py3-none-any.whl
.
File metadata
- Download URL: resfo-4.2.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ddb4b97b3420d7de5db155295925970d88241335d5f036675d905e1e83c9c8 |
|
MD5 | 4a1ae4a99ecce238019056d0d2e79b71 |
|
BLAKE2b-256 | 2693cd71e09ba28f5c46d2d0e1e740d0ad1b0846e0b8ce1cbfc4578bbce77e6a |