Skip to main content

XBGEARS

A collection of Python tools for converting between XBeach grid files (x.grd / y.grd / *.dep) and simple XYZ point files.

Installation

pip install xbgears

Features

  • xb2xyz: Convert XBeach x.grd / y.grd / *.dep grid files into a *.xyz point file
  • xyz2xb: Convert a *.xyz point file back into x.grd / y.grd / bed.dep files
  • xb2yz: Convert a 1D XBeach x.grd / *.dep profile into a two-column *.yz file
  • yz2xb: Convert a two-column *.yz profile file back into 1D x.grd / bed.dep files

Usage

Command-line

# List all available commands
xbgears-info

# Convert XBeach grid files to a *.xyz point file
xb2xyz --dep bed.dep --xgrd x.grd --ygrd y.grd --out 001.xyz

# Convert a *.xyz point file back to XBeach grid files
xyz2xb --xyz 001.xyz --outdir XBGRID

# Convert a 1D XBeach profile to a two-column *.yz file
xb2yz --dep bed.dep --xgrd x.grd --out bathy.yz

# Convert a *.yz profile back to 1D XBeach grid files
yz2xb --yz bathy.yz --outdir XBGRID

Python API

from xbgears import xb2xyz, xyz2xb, xb2yz, yz2xb

# Convert XBeach grid files to a *.xyz point file (written to XYZ/001.xyz)
xb2xyz.xb_to_xyz(dep="bed.dep", xgrd="x.grd", ygrd="y.grd", out="001.xyz")

# Convert a *.xyz point file back to XBeach grid files (written to XBGRID/)
xyz2xb.xyz_to_xb(xyz="001.xyz", outdir="XBGRID")

# Convert a 1D XBeach profile to a *.yz file (written to YZ/bathy.yz)
xb2yz.xb_to_yz(dep="bed.dep", xgrd="x.grd", out="bathy.yz")

# Convert a *.yz profile back to 1D XBeach grid files (written to XBGRID/)
yz2xb.yz_to_xb(yz="bathy.yz", outdir="XBGRID")

Notes

  • xb2xyz reads xori/yori from params.txt in the working directory (if present) and adds them to the x/y coordinates; grid rotation (alfa) is not applied.
  • xb2xyz writes its output to the XYZ/ directory by default; xyz2xb writes its output to the XBGRID/ directory by default.
  • xb2yz writes its output to the YZ/ directory by default; yz2xb writes to XBGRID/ and requires strictly increasing x values. Both use 3-decimal (%.3f) formatting.

Metadata

Release files for xbgears 0.2.0

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

Source distribution (sdist)

Source distribution for xbgears 0.2.0
File Size Uploaded
xbgears-0.2.0.tar.gz 7.9 kB Details

Built distribution (wheel)

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

Total release size: 19.1 kB

Release files / xbgears-0.2.0.tar.gz

Download URL xbgears-0.2.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
599f366f31f1ba63faf1a0886980157dac6debb4e78a951f32aabce839248aea
BLAKE2b-256 checksum
How to use checksums
0113ed2471decf4148e9ceec457a164fbd56bd5c608803f69ab9eb7d437cf4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Sep 26, 2026.

Transparency log

Release files / xbgears-0.2.0-py3-none-any.whl

Download URL xbgears-0.2.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52edae9f93c74e1c4e63729809813cb0bcf1d53617f463b672743370b4b67e21
BLAKE2b-256 checksum
How to use checksums
a437f398fee196a67831639e5620ad09222216cb204aec2c9c9b4974e43bd545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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