Add PFS example: spectral wave nesting#954
Draft
ecomodeller wants to merge 1 commit into
Draft
Conversation
Add a new docs example showing how to programmatically add a spectral output to a MIKE SW setup file for model nesting. The example reads the North Sea mesh and setup, copies an existing line output, modifies it for spectral output across the Thames Estuary, and writes the updated setup. Also renames template.sw to NorthSea.sw for clarity (no test references).
ecomodeller
marked this pull request as draft
March 28, 2026 15:50
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.
Summary
The docs/examples section has no PFS examples. The PFS user guide covers the mechanics but only with a generic
concat.mztfile — there's no real-world example showing how to automate setup file modifications.This adds an example that reads a North Sea spectral wave setup, copies an existing line output, modifies it for spectral output across the Thames Estuary (for model nesting), and writes the updated setup. The mesh is plotted with the nesting boundary overlaid.
Before merging
The modified
.swfile needs to be loaded and run in MIKE Zero to verify that the output type/format values (type=4, format=1) and line coordinates produce a valid spectral line output.