Skip to content

Zarr bug fix and improvements#1566

Merged
lesserwhirls merged 3 commits into
Unidata:maint-5.xfrom
lesserwhirls:gh-1542
Jun 17, 2026
Merged

Zarr bug fix and improvements#1566
lesserwhirls merged 3 commits into
Unidata:maint-5.xfrom
lesserwhirls:gh-1542

Conversation

@lesserwhirls

@lesserwhirls lesserwhirls commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description of Changes

Avoid relying on file sorting order when reading data from a chunk. Instead, look up each chunk's byte offset directly from the new chunkStarts to remove dependency on file sort order. Fixes #1542.

Additionally, fix a bug related to computing the number of chunks in a dimension (calls to Math.ceil were effectively no-ops, as int/int produces an
int, which was then passed to the ceil method.)

PR Checklist

  • Link to any issues that the PR addresses
  • Add labels
  • Open as a draft PR
    until ready for review
  • Make sure GitHub tests pass
  • Mark PR as "Ready for Review"

In ZarrLayoutBB, look up each chunk's byte offset directly from
chunkStarts to remove dependency on file sort order. Fixes
Unidata#1542
The calls to Math.ceil were effectively no-ops, as int/int produces an
int, which was then passed to the ceil method.
@lesserwhirls lesserwhirls added the iosp: zarr zarr format label Jun 17, 2026
@lesserwhirls lesserwhirls marked this pull request as ready for review June 17, 2026 23:29
@lesserwhirls lesserwhirls merged commit 5f5bb97 into Unidata:maint-5.x Jun 17, 2026
15 checks passed
@lesserwhirls lesserwhirls deleted the gh-1542 branch June 17, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iosp: zarr zarr format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allocation size must be greater than zero" in Panoply when reading Zarr 2 with chunked depth dimension

1 participant