Skip to content

feat(examples): add a zarr-globe example - #794

Open
kylebarron wants to merge 1 commit into
mainfrom
kyle/zarr-globe-example
Open

kylebarron wants to merge 1 commit into
mainfrom
kyle/zarr-globe-example

Conversation

@kylebarron

Copy link
Copy Markdown
Member

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

The globe-view prototype (#563) added a COG globe example, but nothing showed the Zarr path on a globe. This adds examples/zarr-globe, a copy of dynamical-zarr-ecmwf that animates the global ECMWF IFS ENS 2 m temperature forecast on MapLibre's globe projection with deck.gl interleaved. The shared globe render path already handles ZarrLayer, so no library changes are needed.

Changes

  • New examples/zarr-globe (package deck.gl-zarr-globe-example), with the same data pipeline and controls as dynamical-zarr-ecmwf. For the globe it follows cog-globe: projection="globe", parameters: { depthCompare: "always" } on the layer so the raster does not z-fight the basemap sphere, and a black background around the globe.
  • Uses the hosted Dark Matter style with beforeId: "boundary_country_outline", as cog-globe does, instead of copying the flat example's custom water-less style.
  • Docs examples page: a "Globe View" card in the Zarr section, with a card image.
  • pnpm-lock.yaml: adds the new importer only. The docs workflow and the pnpm workspace already pick up examples/*.

Tests

  • Example-only change, no new tests. pnpm --filter deck.gl-zarr-globe-example typecheck and build pass, pnpm install --frozen-lockfile accepts the lockfile, and pnpm check is clean.
  • Checked in Chrome: the forecast drapes on the globe with country borders and labels on top, with no z-fighting.

Notes

  • Near the globe's limb the raster can stop short, leaving slivers of basemap. The ECMWF grid is a single 721x1440 level in 320x320 chunks, so the whole globe is 15 tiles of 80°x80°, and the globe traversal's 11-point bounding box likely under-encloses tiles that large and culls partly visible ones near the limb. That would be in the shared globe path, so it is not addressed here.

Closes #568

🤖 Written by Claude Code

The globe-view prototype added a COG globe example, but nothing showed the
Zarr path on a globe. Add `examples/zarr-globe`: a copy of
`dynamical-zarr-ecmwf` that renders the global ECMWF 2 m temperature
forecast on MapLibre's globe projection with deck.gl interleaved.

It follows `cog-globe`: `projection="globe"`, `depthCompare: "always"` on
the layer so the raster does not z-fight the basemap sphere, a black
background around the globe, and the hosted Dark Matter style with
`beforeId: "boundary_country_outline"`. That style replaces the flat
example's custom water-less style, which the globe does not need.

Also list the example on the docs examples page with a card image. The
docs workflow and the pnpm workspace already pick up `examples/*`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label Oct 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add zarr-globe example

1 participant