Repository navigation
Restructure the SWAN notebooks into a tutorial and examples - #4
Merged
Merged
Conversation
ETOPO 2022 bathymetry off Perth at 15 arc-seconds (NOAA ERDDAP), and the ERA5 winds and WAVEWATCH III spectra shared with the XBeach notebooks, with an intake catalogue and a README.
Seven lessons from a first stationary model to a nonstationary hindcast and its YAML configuration, all off Perth, running SWAN in the ghcr.io/rom-py/swan image.
Twelve focused notebooks: grid types, input grids, parametric and spectral boundaries, nesting, physics, numerics, output, stationary and nonstationary computations, hotstarts, running SWAN and physics sensitivity.
The README maps each previous notebook to where its content now lives.
- Rewrite the SWAN learning tutorial page, overview and gallery section, and update the coverage matrix, concept-page links and conventions. - List the SWAN data in data/example-data.json. - Install rompy-swan from main, which has the fixes the notebooks need. - Point the hands-on notebook to the new SWAN tutorial.
rompy-swan now defines the single computation of stationary mode as COMPUTE, and rejects COMPUTE_STAT in that mode instead of rewriting it (rom-py/rompy-swan#20). Tutorial 1 and Running SWAN use it, and the stationary and nonstationary example shows it with the check in both directions. Tutorial 3 is re-run for the new error message.
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 replaces the SWAN notebooks with a new collection in the tutorial/examples layout of the XBeach notebooks, as agreed.
Builds on #3, now merged into
wp5-1. The branch includes the latestwp5-1, with the hook import fix.The collection
All notebooks model the coast off Perth on 1 January 2023, with ETOPO 2022 bathymetry, ERA5 winds and WAVEWATCH III boundary spectra. Every notebook that needs it runs SWAN, and the results are committed.
notebooks/swan/tutorial/, 7 ordered lessons:rompy run.notebooks/swan/examples/, 12 focused notebooks:notebooks/swan/data/, 2 MB committed:It is listed in
data/example-data.json.notebooks/swan/README.mdis the index, including a table of where each previous notebook's content went.The notebooks explain the SWAN concepts they use (computational vs input grids, spectral resolution, conventions, defaults, time steps, how to check
PRINT) and link to the SWAN 41.51 manual. The model-agnostic value of rompy is covered bydocs/why-rompy.mdandcommon/rompy_hands_on.ipynbfrom #3, so the notebooks don't repeat it.Removed
The previous SWAN notebooks and their YAML files:
tutorial_01–07,example_*,boundary/*andcomponents/output. Their content is covered as listed in the README.Site and tooling
rompy_notebooksmetadata on every notebook, the same convention as XBeach.swan-tutorial.md,models/swan.md, the gallery, the coverage matrix and the concept-page links are updated. The conventions page now lists XBeach and SWAN on the shared layout.requirements.txtinstalls rompy-swan frommain, because the notebooks need the fixes in Fix stationary runs, boundary spreading and several rendering bugs rompy-swan#20. Change it to a release once one is published.Dependencies in rompy-swan
ghcr.io/rom-py/swan:41.51, SWAN with NetCDF. The officialdelftwaves/swanimage writes.ncoutput as text. The notebooks use this image; it must be published and made public before the notebooks run for users.Checks
make docs-build(audit andmkdocs build --strict) passes with no warnings.pytest testspasses.