Skip to content

Modernize the MOM6 example (CMIP6 GCS data); drop the stale MLD-transform notebook - #25

Merged
hdrake merged 2 commits into
xgcm:masterfrom
hdrake:examples-03-mom6-modernize
Jun 27, 2026
Merged

hdrake merged 2 commits into
xgcm:masterfrom
hdrake:examples-03-mom6-modernize

Conversation

@hdrake

@hdrake hdrake commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

What & why

The current 03_MOM6.ipynb is un-reproducible: it pulled data from a dead THREDDS endpoint (http://35.188.34.63:8080/thredds/dodsC/OM4p5/...) and a hand-curated grid file from a personal repo. Maintainers can no longer fetch either.

This PR contains the dataset-modernization half of the tripolar-fold example work — everything that is independent of the new north-fold boundary feature (xgcm#711) — so it can merge now without waiting on an unreleased API.

Changes

  • 03_MOM6.ipynb — rewritten. Reads GFDL-CM4 historical output directly from the analysis-ready CMIP6 Zarr store on Google Cloud (read anonymously via zarr+gcsfs). Restructured around two staggered-grid operations on the modern xgcm API:
    • surface current speed — interp U/V to cell centres;
    • relative vorticity — curl of the velocity.
    • Uses only standard operators (interp/diff with periodic/extend/fill) — no new features required; runs on released xgcm.
  • Delete transform_mld_coordinates.ipynb — not in the docs nav, relies on data no longer accessible, unmaintained.
  • Add environment.yml — minimal env pinned to released xgcm for running the notebooks.

Verification

  • 03_MOM6.ipynb re-executed end-to-end: 0 cell errors, 6 code cells, 2 figures (speed + vorticity maps); GCS anon load works.
  • Statically confirmed 03 invokes no north-fold API ({"fold": ...} / other_component / face-connections).

Follow-up (separate PR, gated on xgcm#711)

The new 06_tripolar_fold.ipynb (fold demo across three models) + ClimaOcean data-generation scripts land separately, pinned to the north-fold feature branch and a Zenodo-hosted fixture.

🤖 Generated with Claude Code

The old 03_MOM6 notebook pulled data from a dead THREDDS endpoint
(http://35.188.34.63:8080/thredds/dodsC/OM4p5/...) and a hand-curated
grid file from a personal repo, so it could no longer be reproduced.

Rewrite it to read GFDL-CM4 `historical` output directly from the
analysis-ready CMIP6 Zarr store on Google Cloud (read anonymously via
zarr+gcsfs), and restructure around two staggered-grid operations on the
modern xgcm API: surface current speed (interp U/V to cell centres) and
relative vorticity (curl of the velocity). Uses only standard operators
(`interp`/`diff` with periodic/extend/fill) — no new features required.

Also delete transform_mld_coordinates.ipynb: it is not in the docs nav,
relies on data that is no longer accessible, and is unmaintained.

Add a minimal environment.yml pinned to released xgcm for running the
notebooks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@hdrake
hdrake merged commit c62d8f4 into xgcm:master Jun 27, 2026
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