Skip to main content

pyodim

pyodim is a Python library for reading ODIM H5 radar files, transforming them into xarray datasets with geographic coordinates. This library is designed for users needing direct access to ODIM H5 files, providing tools to read and process radar data.

Table of Contents

Overview

The pyodim library provides essential functions for handling ODIM H5 radar data. It reads radar sweeps and converts them into xarray datasets, handling various metadata and radar coordinates transformations. The main function, read_odim, enables easy access to radar data in a format compatible with Python's data analysis ecosystem.

Installation

pyodim is available on PyPI:

pip install pyodim

It requires the following packages: h5py pyproj pandas numpy xarray dask.

Usage

The main entry point for pyodim is read_odim, which reads one or more sweeps from an ODIM H5 file and returns xarray datasets.

Read sweeps (default)

from pyodim import read_odim

# Read all sweeps lazily (default backend='dask')
sweeps = read_odim("radar_file.h5")

# Compute the first sweep when needed
first = sweeps[0].compute()
print(first)

Read one sweep eagerly

from pyodim import read_odim

# Read one sweep immediately as an xarray.Dataset
sweeps = read_odim("radar_file.h5", nslice=0, backend="numpy")
print(sweeps[0])

Keep the file handle open (edit workflows)

from pyodim import read_odim

# Get datasets + open h5py handle
sweeps, hfile = read_odim(
    "radar_file.h5",
    backend="numpy",
    mode="r+",
    return_handle=True,
)

try:
    ds0 = sweeps[0]
    # ... update content through hfile as needed ...
finally:
    hfile.close()

read_odim key parameters:

  • odim_file (str): Path to the ODIM H5 file.
  • nslice (int, optional): Sweep index to read; if omitted, reads all sweeps.
  • backend (str, optional): "dask" (lazy) or "numpy" (eager).
  • compute (bool, optional): If backend="dask", compute before returning.
  • mode (str, optional): HDF5 mode ("r", "r+", etc.).
  • return_handle (bool, optional): Return (sweeps, hfile) if True.
  • include_fields (List[str], optional): Fields to include.
  • exclude_fields (List[str], optional): Fields to exclude.
  • check_nyq (bool, optional): Check Nyquist parameter consistency.
  • use_dask_arrays (bool, optional): Dask-backed field arrays (requires return_handle=True and backend="numpy").

Deprecations

read_write_odim is deprecated in favor of:

read_odim(..., return_handle=True, mode="r"|"r+")

See CHANGELOG.md for the deprecation timeline.

Feel free to contribute to pyodim by submitting issues or pull requests.

Download files

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

Source Distribution

pyodim-0.6.2.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

pyodim-0.6.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pyodim-0.6.2.tar.gz.

File metadata

  • Download URL: pyodim-0.6.2.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyodim-0.6.2.tar.gz
Algorithm Hash digest
SHA256 9b8308532d9fe058afa078971c0b532845336c316d4d4df0d9df061d39bb49a1
MD5 6cdf50ce1007a84bf73f2174dee8429e
BLAKE2b-256 e7d63f250282a05cfcab08892b02b4423e0bfd28fffa74ff76912dfa11cd6184

See more details on using hashes here.

File details

Details for the file pyodim-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: pyodim-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyodim-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81729a1b47071d28d4602a45909ecf58d042e39476ec7d1f4dcf817de0e3cb5f
MD5 e37ba68c1ad1c8d80903f57716c1a56b
BLAKE2b-256 c83e69cb62c8b156b8a13182bee0cf67ceb6402b1bc5cafac2f30468708a0023

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 files

0.6.1

2 files

0.6.0

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.0

2 files

0.4

1 file

Supported by

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