From a48cb9f1a46c0ea99e7ba8b427fc50b863114971 Mon Sep 17 00:00:00 2001 From: osobh Date: Mon, 28 Sep 2026 11:15:51 -0500 Subject: [PATCH] =?UTF-8?q?docs:=20known=20issue=20=E2=80=94=20NetCDF-4=20?= =?UTF-8?q?unlimited=20dimensions=20report=20size=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found while checking the README refresh: clawhdf5-netcdf4 reads an unlimited dimension's size from its dimension-scale dataset, which netCDF-C never extends, so a dimension with 2 records reports 0. Variable shapes and values are right. To be fixed separately. Co-Authored-By: Claude Opus 5.5 (1M context) --- docs/known-issues.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/known-issues.md b/docs/known-issues.md index 43f945c..9c5bf01 100644 --- a/docs/known-issues.md +++ b/docs/known-issues.md @@ -15,6 +15,7 @@ Checked against `main` at `9b5803f` on 2026-09-28. | Issue | Kind | Since | |---|---|---| +| [NetCDF-4: an unlimited dimension reports size 0](#netcdf-4-an-unlimited-dimension-reports-size-0) | **wrong metadata** (dimension size; variable shapes and values are right) | 2026-09-28 | | [In-place modification (`FileEditor`) limits](#in-place-modification-fileeditor-limits) | refused edits (`Error::Unsupported`), space reuse per editor, no journal | 2026-09-26 | | [Python in-place editing limits](#python-in-place-editing-clawhdf5filepath-r-limits) | refused writes (`NotImplementedError`), deliberate conversion differences | 2026-09-27 | | [Selection reads that decode more than the selection](#selection-reads-that-decode-more-than-the-selection) | speed only | 2026-09-26 | @@ -399,6 +400,21 @@ always expose it. A fix belongs in `conformance/ref_bugs.py` (more or more varied reads for this object) or in documenting the file as a known refusal; neither is done. +## NetCDF-4: an unlimited dimension reports size 0 + +**Status:** open (found 2026-09-28 while verifying the README refresh). +`clawhdf5-netcdf4`'s `NetCDF4File::dimensions()` reports an unlimited +dimension's `size` as 0 when variables along it hold records. Reproducer: with +netCDF4-python, create dimension `time` (unlimited) and `x` (3), a variable +`t(time, x)`, and write 2 records; netCDF4 reports `time` = 2 and `t` shape +(2, 3). clawhdf5-netcdf4 reports `dim time size 0 unlimited true`, while +`variable("t").shape()` correctly gives `[2, 3]`. In NetCDF-4 an unlimited +dimension's length is the largest extent of the variables that use it (its +dimension-scale dataset is not extended by netCDF-C), and the size is read +from the dimension scale instead. Variable shapes and values are correct; +only `Dimension::size` of unlimited dimensions is wrong. Workaround: use the +variables' shapes. + ## The Node.js package (`packages/clawhdf5-node`) does not work **Status:** open (found 2026-09-25; re-checked 2026-09-28, unchanged).