Repository navigation
Merge the restructured XBeach notebooks into wp5-1 - #3
Merged
Merged
Conversation
Copies the sample datasets used by the XBeach notebooks from the rompy-xbeach test data, so the notebooks run from a clone of this repository without relative paths to other repositories. Notebook outputs go to _output/ folders, which are ignored.
Seven notebooks that take a new user from a first model to a complete, running setup, and then to YAML configurations and the rompy CLI.
Seventeen self-contained examples covering grids and bathymetry, wave boundaries, wind and water levels, model components, data selection, hotstart, running XBeach and parameter sweeps.
Their content now lives in the tutorial and examples. The README maps each previous notebook to its replacement, and the files remain in the history.
BoundaryStat and BoundaryBichrom were replaced by BoundaryParams in rompy-xbeach, with an optional Tlong for bichromatic waves. The constant-waves example is renamed from waves_parametric to waves_params, since parametric is the XBeach name for JONSWAP boundaries, and shows the check that bichromatic waves need the surfbeat wave model.
Tutorial 1 now uses BoundaryParams, which replaced BoundaryStat. The list of next steps restarted at 1 while linking to tutorials 2 to 7, so the links now carry the notebook numbers.
rompy-xbeach now uses the XBeach wbctype parametric as the id of the JONSWAP boundary classes, so generated files are named parametric-*.txt.
The XBeach images are now tagged trunk-r<revision> for trunk builds, alongside release tags such as 1.24.6057-halloween-beta. The running example explains the tags.
Replace the XBeach tutorial series and the old XBeach component, data-interface and example notebooks with the tutorial/ and examples/ notebooks from the xbeach branch.
- Add rompy_notebooks metadata to the XBeach tutorial and examples. Outputs are committed, so execution_eligible is false. - Add an 'example' kind for focused, non-sequential notebooks. - Audit the XBeach tutorial and examples against their lesson template (What this shows, Prerequisites, You will learn, Data used) instead of the Learning goals / Checkpoint / Without Rompy markers. - Compare the inventory size with the tracked model notebooks instead of a fixed count.
- Translate relative links in notebook pages: .ipynb links to their pages (with Jupyter heading anchors converted to MkDocs ones), images to their staged copies, a model README to its learning tutorial page, and other repository files to GitHub. Notebooks keep links that work in Jupyter and on GitHub. - Render the previous/next lesson footer as HTML with the lesson titles; it was literal markdown with links one level too shallow. - Link the generated catalogue pages to the notebook sources; their links pointed one level too shallow for every model.
- Rewrite the XBeach learning tutorial page, overview and gallery section for the tutorial/ and examples/ notebooks, and update the coverage matrix and links from the concept pages. - List the committed XBeach data in data/example-data.json and describe committed model data in the build guide and README. - Describe the tutorial/examples/data layout and the lesson template in the conventions page, and rename the duplicated 'Tutorial' role for focused notebooks to 'Example'. - Link all three learning tutorials from the home and catalogue pages. - Remove duplicate navigation entries (index.md, tutorial-conventions.md) and stop deploying the site from the wp5-1 branch.
Links from a notebook to a page in the repository's docs/ folder now go to that page on the site instead of to GitHub.
- Add 'What rompy does': the chores rompy takes on, a without/with rompy comparison, the describe-generate-run picture with a short example, four key ideas linking to the concept pages, how the ideas map to SWAN, XBeach and SCHISM, and what stays with the modeller. This keeps the value-proposition material from the SWAN tutorial series in a place that does not depend on one model. - Group the concept pages under a Concepts section and extend them: the Python/YAML comparison on the configuration page, variants and chained runs in the run lifecycle, and 'See it in the notebooks' links for each model. - Rewrite the home page as a guide through the site, and split installation (notebook environment and model runtimes) from using the notebooks (organisation, data, outputs, own data). - Rename the Guides section to Contributing. - Point the first XBeach tutorial and the XBeach README to the new page.
The companion to 'What rompy does': a complete run with a toy wind stress model that needs no model installation. It covers the run period and grid, a data request cropped to them, a model plugin in a few lines, validation, generating the workspace, running it with a local backend, the run as YAML, and variants. The toy model and its ERA5 sample data live in notebooks/common.
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR merges the restructured XBeach notebooks (now on
xbeach) intowp5-1. It keeps all of thewp5-1site, tooling, SWAN and SCHISM work, and replaces the XBeach part.What changes for XBeach
tutorial_01–07lessons and the oldcomponents/,data-interface/andexample-*notebooks are replaced by:notebooks/xbeach/tutorial/: 7 ordered lessons, from a first model to a complete storm-impact setup and its YAML/CLI version;notebooks/xbeach/examples/: 17 focused notebooks.ghcr.io/rom-py/xbeach.notebooks/xbeach/data/(2.5 MB), so they run from a clone with no acquisition step.notebooks/xbeach/README.mdmaps every previous notebook to where its content now lives.We agreed to restructure the SWAN and SCHISM notebooks the same way next, so this layout is written up as the shared target in
docs/tutorial-conventions.md.Fitting into the wp5-1 site
rompy_notebooksmetadata.execution_eligibleis false for all of them, because their outputs are committed. Five areruntime-dependent: they run XBeach, and those cells are skipped when Docker is not available.examplekind for focused, non-sequential notebooks, alongsidetutorialandreference..ipynblinks, which work in Jupyter and on GitHub. The MkDocs hook now translates them for the site:README.mdgoes to its learning tutorial page;xbeach-tutorial.md,models/xbeach.md, the gallery, the coverage matrix and the concept-page links are updated. The home and catalogue pages now link all three learning tutorials.data/example-data.jsonlists the committed XBeach data.General introduction and concepts (from Tom's review comment)
Tom suggested keeping the high-level explanation of what rompy offers that the SWAN tutorial series gave (data, plugins, file generation). That series will be replaced when SWAN moves to the new layout, so this material now lives in the general, model-agnostic part of the site:
When SWAN and SCHISM are restructured, their first lessons can point to the same page instead of repeating the concepts.
Fixes to existing wp5-1 code (please check)
generated/all-notebooks,by-modelandby-topicpointed one level too shallow and returned 404 for all models. They now link to the notebook sources, which MkDocs resolves and checks in strict mode.tutorial-conventions.md: after "rename journeys as tutorials", both roles were called "Tutorial", andkindlistedtutorialtwice. The focused role is now "Example".mkdocs.yml:index.md(Home and Getting started) andtutorial-conventions.md(Tutorial conventions and Contributor conventions). The duplicates are removed.docs-pages.ymlno longer deploys fromwp5-1. Re-add it if you use it for previews before merging to main.Not changed here, for the SWAN and SCHISM restructure
../../data-concepts/in SWAN tutorials 01 and 04 and SCHISM tutorials 01 and 04;boundary/boundnest1/in SWAN tutorial 04;components/output/in SWAN tutorial 05.tests/data, which is only filled after the acquisition script has run. The XBeach approach (committed data next to the notebooks, read with paths relative to the notebook) would avoid both the search and the fetch step.example_*notebooks arekind: tutorialwith notutorialnumber, so the footer hook sorts them into the ordered lesson sequence. They would fit the newexamplekind.requirements.txtlistsrompy-xbeachtwice (PyPI andgit+...@output).environment.ymlandsetup.share out of date: Python 3.10, no rompy-swan or rompy-schism, and rompy-xbeach from main. The installation page usesrequirements.txt.Checks
make docs-build(quality gate plusmkdocs build --strict): passes with no warnings.pytest tests: 37 passed, including new tests for the link rewriting.outputbefore this merge; their outputs are unchanged here.