Skip to content

feat: Zarr temporal animation - #445

Merged
kylebarron merged 48 commits into
mainfrom
kyle/zarr-dynamical-ecmwf
Apr 20, 2026
Merged

kylebarron merged 48 commits into
mainfrom
kyle/zarr-dynamical-ecmwf

Conversation

@kylebarron

@kylebarron kylebarron commented Apr 20, 2026 •

Copy link
Copy Markdown
Member
Screen.Recording.2026-04-20.at.4.29.11.PM.mov

Change list

  • Update ZarrLayer:
    • Force users to open the zarrita store themselves. They must pass in a zarr.Array or zarr.Group
    • Force users to pass a selection for all non-spatial dimensions.
      • Validate that user has explicitly selected all non-spatial dimensions.
      • For now, the contract is that deck.gl will automatically select spatial dimensions, and will automatically select across multiscale arrays (groups?). But the user must explicitly select all non-spatial dimensions. If they want an entire dimension, they must still explicitly pass dimensionName: null.
  • Fix raster-tileset to clamp wgs84bounds to web mercator range.
  • Create example app to animate ECMWF Zarr data
    • UI offers a choice of colormap options from the default Matplotlib colormap sprite added in feat: Sprite-based colormap #447
    • The getTileData loads chunks into a Texture2dArray GPU texture, which has height, width, plus the depth of the number of time chunks in the given forecast.
    • Hard-code GeoZarr attributes
    • Render pipeline which applies filtering, linear rescaling, colormap
    • Selection that fetches the Zarr chunk at the given init_time and ensemble_member (defaulting to 0)
    • GPU modules to filter within a range and load a texture2darray (these will go into library code in the future, but for now live as part of the example)
    • claude-written UI control panel, enabling animation

Closes #403

kylebarron and others added 23 commits April 17, 2026 12:11
Design for visualizing ECMWF IFS ENS forecast data via an animated
Texture2DArray pipeline, including planned ZarrLayer refactor to
generalize the getTileData/renderTile contract and add a `selection`
prop for non-spatial dimension indexing.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ontract

BREAKING CHANGE: ZarrLayer no longer ships a default ImageData pipeline.
Callers must provide getTileData and renderTile. Adds required 'selection'
prop and optional 'metadata' override. zarr-sentinel2-tci example migrated
to the new API.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Bumps workspace zarrita to ^0.7 across deck.gl-zarr, geozarr, and
zarr-sentinel2-tci to avoid a structural version mismatch with the
new ECMWF example.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@kylebarron kylebarron changed the title wip: Zarr example feat: Zarr temporal animation Apr 20, 2026
@github-actions github-actions Bot added the feat label Apr 20, 2026
Comment on lines +44 to +56
// Accept the spec's "y"/"x" (case-insensitive) as well as the common
// CF-style names "latitude"/"longitude". Matching is purely label-based;
// positional inference is not used.
const Y_LABELS = new Set(["y", "latitude", "lat"]);
const X_LABELS = new Set(["x", "longitude", "lon"]);
const yAxisIndex = axes.findIndex((a) => Y_LABELS.has(a.toLowerCase()));
const xAxisIndex = axes.findIndex((a) => X_LABELS.has(a.toLowerCase()));

if (yAxisIndex === -1 || xAxisIndex === -1) {
throw new Error(
`spatial:dimensions must contain "x" and "y" (case-insensitive), got: ${JSON.stringify(axes)}`,
`spatial:dimensions must contain a Y axis ("y"/"latitude"/"lat") and ` +
`an X axis ("x"/"longitude"/"lon") (case-insensitive), got: ` +
`${JSON.stringify(axes)}`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure this is correct, but to be followed up in #451

@kylebarron
kylebarron marked this pull request as ready for review April 20, 2026 20:27
@kylebarron
kylebarron enabled auto-merge (squash) April 20, 2026 20:28
@kylebarron
kylebarron merged commit e51f75d into main Apr 20, 2026
4 checks passed
@kylebarron
kylebarron deleted the kyle/zarr-dynamical-ecmwf branch April 20, 2026 20:29
@ds-release-bot ds-release-bot Bot mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zarr: AbortSignal support

1 participant