surfio
Surfio is a library for reading and writing surface files. Currently only supports the irap format.
Installation
pip install .
Usage
Irap surfaces can be imported using the from_ascii_file, from_ascii_string, from_binary_file and from_binary_buffer methods of IrapSurface.
import surfio
surface = surfio.IrapSurface.from_ascii_file("./file.irap")
print(surface.header.ncol, surface.header.nrow) # 10, 11
print(surface.values.shape) # (10, 11)
from_ascii_file is equivalent to
with open("./file.irap") as f:
surface = surfio.IrapSurface.from_ascii_string(f.read())
but is more performant.
Exporting irap surfaces can be done with
surface = surfio.IrapSurface(
surfio.IrapHeader(
ncol=3,
nrow=2,
xori=0.0,
yori=0.0,
xinc=2.0,
yinc=2.0,
xmax=2.0,
ymax=2.0,
rot=0.0,
xrot=0.0,
yrot=0.0,
),
values=np.zeros((3, 2)),
)
surface.to_ascii_file("./file.txt")
which is equivalent to:
with open("./file.irap", mode="w") as f:
f.write(surface.to_ascii_file())
Development
We use uv to manage the development environment and its dependencies. See installing uv. We recommend installing uv using your system's package manager, or into a small dedicated virtual environment.
Once uv is installed, you can get a development environment by running:
git clone https://github.com/equinor/surfio
cd surfio
uv sync --all-groups
This builds the C++ extension and installs surfio, together with its test and
development dependencies, into a .venv.
We use just as a command runner for common development tasks. The most useful recipes are:
uv run just build-python # (Re)build and install the surfio python package
uv run just test # Run both the C++ and python test suites
uv run just test-python # Run only the python test suite
uv run just lint # Run all linters/formatters via pre-commit
Style is enforced via pre-commit. To have it run automatically on each commit:
uv run just install-pre-commit-hooks
C++ development
The C++ project can also be configured, built and tested independently of
building/installing the Python package, using just:
uv run just configure-cpp
uv run just build-cpp
uv run just test-cpp
which is equivalent to running the underlying cmake/ctest commands
directly, e.g.
cmake --preset release-posix
cmake --build --preset release-posix
ctest --preset test-posix
Metadata
Release files for surfio 0.0.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| surfio-0.0.24-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 | Details |
| surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 26.0+ ARM64 | Details |
| surfio-0.0.24-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 | Details |
| surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 26.0+ ARM64 | Details |
| surfio-0.0.24-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 | Details |
| surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 26.0+ ARM64 | Details |
Total release size: 12.6 MB
Release files / surfio-0.0.24-cp314-cp314-win_amd64.whl
| Download URL | surfio-0.0.24-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 411.9 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
133c5d52e4076bf582080381ef5da34f9dcda67bace2c6b77b3d19cc2c21f47c
|
|
BLAKE2b-256 checksum How to use checksums |
3a8ae31b816e23e8697409a4d4761c75d17e80d5bbb42c939ad229686a9819ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | surfio-0.0.24-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 341.4 kB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
78d63f3db3f1285fd1d61b02d5f4e7123f13b60de8d15c5fc96fb68c587db49e
|
|
BLAKE2b-256 checksum How to use checksums |
b4c9bfcc4cac63da577809e47a3786c7a1d6af737f73dabe126f39da6be50044
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | surfio-0.0.24-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 307.8 kB |
| Tags | CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
a04d258a4bfb804aed24305e60e32b22e5ef30590fde86ffea4fb6e4faeed0f8
|
|
BLAKE2b-256 checksum How to use checksums |
11c89f734314b03bdb573812cf6541006dfa1a403be516b5b135ce09b5e359a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | surfio-0.0.24-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
135cd303002a4b927564d91c4249ae7dd18ba744368c34fd9cf43b9966f450ba
|
|
BLAKE2b-256 checksum How to use checksums |
d1a33027a22a4c8ff94e517447a801432eab5af81eedfe4b135c5bbc4db03e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp313-cp313-win_amd64.whl
| Download URL | surfio-0.0.24-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 400.5 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8babca5496762b9b432461af04a4ac1df4842ec2af96dd26f2ed03798a503f1d
|
|
BLAKE2b-256 checksum How to use checksums |
85d3ebef58ea386682d6827b2fef7ed3f373d38c88d621025bdc3695699cfa0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | surfio-0.0.24-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 341.2 kB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
eb734ccd762967c3e5579bff7759a6d9cc511ca61aea2a75bf368cca89e877a7
|
|
BLAKE2b-256 checksum How to use checksums |
f29109498a04900876e85dbd19c0fed0317a44f4e07818c9c021304a0942b107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | surfio-0.0.24-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 307.4 kB |
| Tags | CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
2a8272af7f89aca736188b5f40b9e2b0d05318fdf11b905062fb83c0a5438c1b
|
|
BLAKE2b-256 checksum How to use checksums |
47e6902cd3af455e56f9bff53c0dfbcd503f94d08fe2ab8a14e002f02285ea22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | surfio-0.0.24-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f796d65bcc9417d94359707f04450006db0a147b567d443590575430ef177d10
|
|
BLAKE2b-256 checksum How to use checksums |
f6ab9699a1d11e2086f13bed719a4521d8f67406b34f1aa1e01252f519416174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp312-cp312-win_amd64.whl
| Download URL | surfio-0.0.24-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 400.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
df4a1396bba3a297ff89dfb664fb44bd43fbbb03b14c99d0be0f3f284a2dc3d7
|
|
BLAKE2b-256 checksum How to use checksums |
a3f982227c6dc160648529a628324c78a3728e6261e3ff26553bd6d708578f3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | surfio-0.0.24-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 341.4 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6e2493a241d2f1144bc3e4a3b7df9ebc1a31c5b65c9cade4ee715ba6a3272f75
|
|
BLAKE2b-256 checksum How to use checksums |
589cd9c6ee04f9cf2ca1c08fa4a266adb6f813df4754cfaaf0a7261d30a69f9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | surfio-0.0.24-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 306.5 kB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7d5063c9ff49ddc3049cae12b6f3586dd8bc0ee5caed8444873b5e8dbd7f5f56
|
|
BLAKE2b-256 checksum How to use checksums |
aeeb50804da9ac825728141b447d63fd67140afc4ffb243054920efbbdec1d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency logRelease files / surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | surfio-0.0.24-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
287e1c6a54d76eaf09a4d5d8a001591b489978ae5d9ca167278bdf1737c2649b
|
|
BLAKE2b-256 checksum How to use checksums |
a35b53f47c4b2827aa54afcc331e90c58744b1469ae54ad740acf1b06d3e551e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 14, 2026.
Transparency log