h5netcdf
netCDF4 via h5py
Decision gist · record as of 2026-08-14
Yes. h5netcdf is production-stable, actively maintained, has low install friction, no known vulnerabilities, and a permissive license. Install it if you need netCDF4 support without the Unidata C library, or if you want a pure-Python reading option. The legacy API makes it a low-risk alternative to netCDF4-python for existing code.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires h5py (version 3.0+) or h5pyd installed separately; pure-Python Pyfive backend available but optional.
- Low friction: pure Python wheel with only packaging and numpy as runtime dependencies.
- Actively maintained with recent commits and production-stable status.
License · maintenance · safety
permissive license (permissive) — BSD 3-Clause permissive license allows commercial and private use with minimal restrictions—retain copyright notice and disclaimer in distributions.
last release 2026-01-23 (203 days) · last repo commit 2026-07-20 · 227 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,183,537 downloads/mo, #2,146 on PyPI
Alternatives
Verify before relying
pip install h5netcdf[h5py]
import h5netcdf
import numpy as np
with h5netcdf.File("mydata.nc", "w") as f:
f.dimensions = {"x": 5}
v = f.create_variable("hello", ("x",), float)
v[:] = np.ones(5)- Whether the reported 4x performance improvement over netCDF4-python holds for typical workflows beyond the single cited case.
- Current state of unsupported netCDF operations (rename, delete) and whether patches have been accepted since publication.
What it is and what it does
h5netcdf is a Python interface to the netCDF4 file format that reads and writes HDF5 files directly via h5py, h5pyd, or the pure-Python Pyfive backend, without requiring the Unidata netCDF C library. It offers two APIs: a modern hierarchical interface modeled on h5py, and a legacy API designed for compatibility with netCDF4-python. The package supports both NETCDF4 and NETCDF4_CLASSIC formats, unlimited dimensions, groups, and hierarchical variable access.
The main appeal is reduced installation friction—if you already have h5py, reading netCDF4 files may be simpler than installing netCDF4-python and its C dependencies. It also provides a pure-Python reading path via Pyfive, useful in restricted or hard-to-build environments. The package has been in active development since 2015 and is marked production-stable, with support for Python 3.9 through 3.14.
Use it for
- Read and write netCDF4 files in environments where the Unidata netCDF C library is difficult or impossible to install.
- Access HDF5 data via the netCDF4 interface when you already have h5py installed, avoiding duplicate binary dependencies.
- Use the pure-Python Pyfive backend to read netCDF files in restricted or containerized environments without C compilation.
- Migrate from netCDF4-python to h5netcdf using the legacy API for drop-in compatibility with minimal code changes.
- Work with hierarchical netCDF data using the modern API's h5py-like syntax for direct group and variable access.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
h5netcdf is production-stable, actively maintained, has low install friction, no known vulnerabilities, and a permissive license. Install it if you need netCDF4 support without the Unidata C library, or if you want a pure-Python reading option. The legacy API makes it a low-risk alternative to netCDF4-python for existing code.
Install
h5netcdf on PyPI
Before you install
Low friction: pure Python wheel with only packaging and numpy as runtime dependencies. Actively maintained with recent commits and production-stable status. Optional extras (h5py, h5pyd, pyfive) can be installed separately to avoid forcing a specific HDF5 backend.
Requires h5py (version 3.0+) or h5pyd installed separately; pure-Python Pyfive backend available but optional.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions—retain copyright notice and disclaimer in distributions.
Quickstart
pip install h5netcdf[h5py]
import h5netcdf
import numpy as np
with h5netcdf.File("mydata.nc", "w") as f:
f.dimensions = {"x": 5}
v = f.create_variable("hello", ("x",), float)
v[:] = np.ones(5)
Verify before relying
- Whether the reported 4x performance improvement over netCDF4-python holds for typical workflows beyond the single cited case.
- Current state of unsupported netCDF operations (rename, delete) and whether patches have been accepted since publication.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespackagingnumpy |
| Maintenance | Actively maintained 203 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,183,537 / month, #2,146 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/Engineering |
Evidence: h5netcdf-1.8.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “netcdf4 file reader writer”
- h5netcdfh5netcdf reads and writes netCDF4 files using h5py or h5pyd backends,…
- ndjsonProvides a familiar JSON Lines (ndjson) parser and writer with an API…
- libconfReads and writes configuration files in libconfig format, a format…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also h5py · netCDF4 · pydap · h5grove · hickle · mat73 · cfgrib · tables · pymatreader · kerchunk