Skip to content

Examples

These notebooks demonstrate common rompy-swan workflows.

Getting Started

  • Declarative Configuration


    Configure SWAN simulations using YAML files for reproducible workflows.

    View notebook

  • Procedural Configuration


    Build SWAN configurations programmatically using Python for dynamic setups.

    View notebook

  • Sensitivity Analysis


    Run parameter sensitivity studies by varying configuration values.

    View notebook

Boundary Conditions

  • BOUNDSPEC Side


    Apply boundary conditions to entire domain sides.

    View notebook

  • BOUNDSPEC Segment


    Apply boundary conditions to specific segments.

    View notebook

  • BOUNDNEST1


    Nested boundary conditions from coarser SWAN runs.

    View notebook

Components

  • Output


    Configure SWAN output options (BLOCK, TABLE, SPECOUT).

    View notebook

  • CGRID


    Define computational grids (REGULAR, CURVILINEAR, UNSTRUCTURED).

    View notebook

  • Startup


    Initialize SWAN runs (PROJECT, SET, MODE, COORDINATES).

    View notebook

  • Physics


    Configure physical processes (generation, breaking, friction).

    View notebook

  • Numerics


    Set numerical schemes and iteration settings (PROP, NUMERIC).

    View notebook

  • INPGRID


    Define input grids for forcing data (bathymetry, wind, currents).

    View notebook

Running the Examples

To run these notebooks locally:

# Clone the notebooks repository
git clone https://github.com/rom-py/rompy-notebooks.git

# Install dependencies
pip install rompy-swan jupyter

# Navigate to SWAN examples
cd rompy-notebooks/notebooks/swan

# Start Jupyter
jupyter notebook

SWAN Executable Required

These examples require a working SWAN installation. See the installation guide for setup instructions.