Skip to content

added gribberish codec support#689

Merged
lazarusA merged 6 commits into
mainfrom
la/icechunk_s3_debug
Jul 18, 2026
Merged

added gribberish codec support#689
lazarusA merged 6 commits into
mainfrom
la/icechunk_s3_debug

Conversation

@lazarusA

Copy link
Copy Markdown
Member

This PR adds support to Read GRIB files via icechunk by using the @mattnucc/gribberish package and registering a new code for zarrita.js. Codec conventions were translated from https://github.com/mpiannucci/gribberish/blob/main/python/gribberish/zarr/codec.py

This will allow users to get access to:

Further reading:

Screenshot 2026-07-18 at 21 09 14

Caution

For local dev is not enough to simple do npm install because the codec comes as a wasm asset.
Note that in production we are using pnpm as the package manager. The new wasm asset gets resolved with the pnpm-workspace.yaml file. So, before you do npm run dev, is necessary to do

pnpm install

and that's it. Now you have the needed wasm in node_modules. Now do

npm run dev

as usual. These instructions should go into a new file, CONTRIBUTING.md. Will do in another PR.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates the @mattnucc/gribberish package to decode GRIB2 messages, introducing a custom Zarrita codec (GribberishCodec), configuring WASM loader patching, and updating the dimension mapping logic in useDataFetcher.tsx. Feedback highlights critical improvements: explicitly freeing WebAssembly-backed Rust objects to prevent memory leaks, guarding BigInt conversions against non-finite values to avoid runtime crashes, and adding defensive checks on targetDim to prevent TypeError exceptions on small or empty dimensions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/codecs/gribberish.ts Outdated
Comment thread src/codecs/gribberish.ts Outdated
Comment thread src/hooks/useDataFetcher.tsx
@lazarusA
lazarusA merged commit d7c7e86 into main Jul 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant