Skip to main content

A collection of tools for converting HDF5 model files to other mesh/model formats

Project description

H5GEARS

A collection of Python tools for converting HDF5 model/mesh files to other mesh/model formats.

Installation

pip install h5gears

Or from source:

pip install -e .

Features

  • h52nc: Convert an SRH-2D mesh file (.h5) to a Delft3D FM (D-Flow FM) UGRID net.nc mesh file

Usage

Command-line

# List all available commands
h5gears-info

# Convert every mesh in a single SRH-2D mesh file
h52nc -i mesh.h5

# Convert every mesh in all matching files (glob expansion supported)
h52nc -i *.h5

# Convert only a specific mesh by name
h52nc -i mesh.h5 -n Mesh001

# Write outputs to a specific directory, including node elevation (z)
h52nc -i mesh.h5 -o out/ -d 3

Python API

from h5gears import h52nc

# List the mesh names contained in an SRH-2D file
h52nc.list_meshes("mesh.h5")

# Convert every mesh in a file to net.nc, returning the output paths
h52nc.convert_file("mesh.h5", out_dir="out/", dim=2)

Notes

  • h52nc reads mesh geometry from the 2DMeshModule group of SRH-2D HDF5 mesh files (node coordinates and element connectivity) and writes it out as a UGRID-style net.nc file compatible with Delft3D FM / D-Flow FM.
  • By default, every mesh found in an input file is converted; use -n/--name to restrict conversion to specific mesh names.
  • Output files are written alongside each input file by default; use -o/--outdir to choose a different destination directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h5gears-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

h5gears-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file h5gears-0.1.0.tar.gz.

File metadata

  • Download URL: h5gears-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for h5gears-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a469a43ac43a17b3ba59b3ed93d2b9479950d8486864c353c9b281d5aa719750
MD5 6a3c282ae92e534f9c6824e8de4269ce
BLAKE2b-256 cbd50375902ab2427e7e53e93cec53668c3bf21f0ee807afa187d1d21f96b710

See more details on using hashes here.

Provenance

The following attestation bundles were made for h5gears-0.1.0.tar.gz:

Publisher: publish.yml on AaronOET/h5gears

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file h5gears-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: h5gears-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for h5gears-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cab43e0c2dbff208a69dc34fe26de13d3f7f1c3981635ee7c89000ed72799e9
MD5 b82b72553ef5d12cb4fb150d7316606f
BLAKE2b-256 b63767d97e17f23bae079ee3a1e5f4313add353e37550c5bc3399175d41e2959

See more details on using hashes here.

Provenance

The following attestation bundles were made for h5gears-0.1.0-py3-none-any.whl:

Publisher: publish.yml on AaronOET/h5gears

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page