Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
a11411c
Add docstrings
rafa-guedes Oct 3, 2025
51440ab
Run ruff across the repo
rafa-guedes Oct 3, 2025
3922593
Add enum for all output variables
rafa-guedes Oct 3, 2025
11f7a3a
Fix column length
rafa-guedes Oct 3, 2025
1411029
Make output variables case-sensitive
rafa-guedes Oct 3, 2025
6950d40
Fix cases in docstrings too
rafa-guedes Oct 3, 2025
78dff56
Run ruff
rafa-guedes Oct 3, 2025
30693d1
Implement the prototype output component in the config and template, …
rafa-guedes Oct 3, 2025
3e35dbd
Add output component, not finished yet
rafa-guedes Oct 6, 2025
780f325
Changes to test params file
rafa-guedes Oct 6, 2025
56a8010
Make ncfilename part of the output component
rafa-guedes Oct 6, 2025
6a60632
Make outputformat a parameter of the output object
rafa-guedes Oct 6, 2025
daa8552
Generalise variable length validator
rafa-guedes Oct 7, 2025
2cd396c
Generalise the parsing of the variable types definitions
rafa-guedes Oct 7, 2025
934dddf
Simplify the serialisation procedure
rafa-guedes Oct 7, 2025
7a18bf5
Add the full list of output parameters to the Output object
rafa-guedes Oct 7, 2025
227176d
Add docstring to Output component
rafa-guedes Oct 7, 2025
5ce5488
Implement the npoints definition
rafa-guedes Oct 7, 2025
cec41aa
Ongoing work
rafa-guedes Oct 7, 2025
74113f1
Implement rgauges specification
rafa-guedes Oct 7, 2025
a230fc6
Rename return dicts to params to match the params.txt file
rafa-guedes Oct 7, 2025
b920bbc
Add validator to send warning if output times for the same type are d…
rafa-guedes Oct 8, 2025
654f23b
Ensure variables are not repeated in the Output definition
rafa-guedes Oct 8, 2025
6f6d78f
Add output tests
rafa-guedes Oct 8, 2025
e3faf49
Import the hability to fetch timing files
rafa-guedes Oct 9, 2025
9d61272
Integrate output.get into the config call method
rafa-guedes Oct 9, 2025
cacf848
Add tests for the get method
rafa-guedes Oct 9, 2025
b0142c2
Ruff formatting
rafa-guedes Oct 9, 2025
4d05c0d
Fix linting issues
rafa-guedes Oct 9, 2025
a4f6c08
Implement the physics component
rafa-guedes Oct 9, 2025
cb51fcf
Implement the physics component
rafa-guedes Oct 9, 2025
a277167
Log DEBUG messages if physics parameter enabled in XBeach by default …
rafa-guedes Oct 10, 2025
057b30c
New validator to ensure swave is False if nonh is activated
rafa-guedes Oct 10, 2025
bc2b63f
Add some boilerplate
rafa-guedes Oct 10, 2025
b3c4a0a
Define wavemodel as custom types
rafa-guedes Oct 10, 2025
4478adb
Move wci and break into the Physics object
rafa-guedes Oct 10, 2025
20c5ae2
Ruff formatting
rafa-guedes Oct 10, 2025
45bc4c4
Make break part of the wavemodel types
rafa-guedes Oct 10, 2025
acaf854
Nesting the breaking options with respective parameters
rafa-guedes Oct 10, 2025
e51a45d
Ensure dictionary flattening is done recursively to handle nested pyd…
rafa-guedes Oct 10, 2025
0193add
Define a new base class that includes the serialization and params de…
rafa-guedes Oct 10, 2025
956ce14
Ruff formatting
rafa-guedes Oct 10, 2025
bd55440
Reorganise modules to split sub-components
rafa-guedes Oct 10, 2025
2f1a660
Use absolute imports
rafa-guedes Oct 10, 2025
621d8a9
Make wavemodel a public module
rafa-guedes Oct 12, 2025
bec2eeb
Implement the roller pydantic model
rafa-guedes Oct 12, 2025
e8cefaa
Implement the vegetation model
rafa-guedes Oct 13, 2025
f2f9076
Attempt to implement recursive calls to get so files can be fetched a…
rafa-guedes Oct 13, 2025
4e7cbfc
Ongoing work on the general components api
rafa-guedes Oct 13, 2025
6abbb24
Working version general components api
rafa-guedes Oct 13, 2025
c1e3b12
Stop relying on model_type if not using discriminated union, implemen…
rafa-guedes Oct 13, 2025
96a609f
Connect the new ShortWaveFriction model into the Physics component
rafa-guedes Oct 13, 2025
4e131bf
Fix issues with fields not rendered as a key-value pair
rafa-guedes Oct 14, 2025
5180daa
Add validator for turbulence
rafa-guedes Oct 14, 2025
1867d8a
Fix all broken tests
rafa-guedes Oct 14, 2025
2382ddd
Ruff formatting
rafa-guedes Oct 14, 2025
b25b4e9
New Breaking base class to specify other common breaking parameters
rafa-guedes Oct 14, 2025
561eace
Implement friction and flow modules
rafa-guedes Oct 14, 2025
4501a91
Ruff formatting
rafa-guedes Oct 14, 2025
37c0e39
Ensure either coeff or file is provided
rafa-guedes Oct 14, 2025
9fed9d1
Better structuring bedfriction classes
rafa-guedes Oct 14, 2025
6c4e036
remdryoutput parameter added to the output class
rafa-guedes Oct 14, 2025
c8933d4
First cut implementation of the full physics and sediment components
rafa-guedes Oct 15, 2025
65645cd
Ruff formatting
rafa-guedes Oct 15, 2025
47b0a6a
rearranging some definitions in Physics
rafa-guedes Nov 13, 2025
0e4107d
Move wavefric into the dissipation models
rafa-guedes Nov 13, 2025
05e9351
Move HorizontalViscosity into the fictrion module
rafa-guedes Nov 13, 2025
7593c82
Rename Dissipation into WaveDissipation
rafa-guedes Nov 13, 2025
d8e50dd
Group together the two wci fields
rafa-guedes Nov 13, 2025
f5d89a3
Consolidating numerics
rafa-guedes Nov 13, 2025
7ce37f8
Move constants out of config
rafa-guedes Nov 13, 2025
5531a77
Rename physics.boundary into wbc.boundary to avoid confusion
rafa-guedes Nov 13, 2025
8602c5c
Rename flow module into wci
rafa-guedes Nov 13, 2025
9687f59
Ruff formatting
rafa-guedes Nov 13, 2025
508f3e7
Remove waveform from physics, already in the sediment component
rafa-guedes Nov 13, 2025
0de3f5f
Sort fields alphabetically
rafa-guedes Nov 13, 2025
e78cd77
Merge sediment transport classes
rafa-guedes Nov 13, 2025
2d9470a
Move the Quasi3D class
rafa-guedes Nov 13, 2025
41d7a03
Make q3d switch part of the Quadi3D model
rafa-guedes Nov 13, 2025
043ed80
Remove extra arguments
rafa-guedes Nov 13, 2025
85766c7
Merge Morhpology and Avalanching classes into one single one
rafa-guedes Nov 13, 2025
e662526
Merge together Bathy and Bed classes
rafa-guedes Nov 13, 2025
91ec0fa
Add model for the groundwater parameters
rafa-guedes Nov 13, 2025
7ea1015
Implement missing nonh parameters
rafa-guedes Nov 13, 2025
afef8f9
Add the mpi componentA
rafa-guedes Nov 13, 2025
3657765
Add missing projection parameters
rafa-guedes Nov 14, 2025
3900c5f
Remove some parameters from config
rafa-guedes Nov 14, 2025
373ffbd
Fix several broken tests
rafa-guedes Nov 14, 2025
3b4fb57
Fix remaining broken tests
rafa-guedes Nov 14, 2025
00cb5b1
Restructured the data modules into a subpackage
rafa-guedes Nov 23, 2025
56f474c
Split forcing into wave and waterlevel modules
rafa-guedes Nov 23, 2025
292dea5
Add method to serialise the boundary component classes
rafa-guedes Nov 23, 2025
4f3a199
Fix typos
rafa-guedes Nov 24, 2025
2a15a2e
Rename the wave_boundary field in Physics to wbc
rafa-guedes Nov 24, 2025
7893f22
Restructured boundary code, boundary writers now defined in data
rafa-guedes Nov 24, 2025
be94803
Restructured boundary conditions classes
rafa-guedes Nov 24, 2025
579b011
Lots of changes with ongoing boundary conditions refactoring
rafa-guedes Nov 24, 2025
cfc06fd
Remove deprecated module wbc.py
rafa-guedes Jan 4, 2026
40bfe79
Update documentations
rafa-guedes Jan 4, 2026
f2826b1
Update docstrings
rafa-guedes Jan 4, 2026
d44b921
Remove legacy turb from Physics
rafa-guedes Jan 4, 2026
04662fe
Remove duplicated Nonh numerics parameters
rafa-guedes Jan 4, 2026
9a504d3
Consolidate the viscosity field in Physics
rafa-guedes Jan 5, 2026
34472a6
Remove the legacy nonh parameter from Physics
rafa-guedes Jan 5, 2026
d591a52
Add rhoa parameter to Constants class
rafa-guedes Jan 5, 2026
f581df8
Add ARC and freewave parameters to the boundary parameters component
rafa-guedes Jan 5, 2026
bcc40f5
Add missing flow numerics parameters
rafa-guedes Jan 5, 2026
a6af827
Add new Wind component to allow setting wind related parameters
rafa-guedes Jan 5, 2026
5c27793
Add new components for bed composition in sediment
rafa-guedes Jan 5, 2026
3a27d23
Tests for the the bed composition component
rafa-guedes Jan 5, 2026
5b46223
Add new wind component module
rafa-guedes Jan 5, 2026
0035ee3
Add the ws_nonh parameter
rafa-guedes Jan 5, 2026
f83cb82
Fix value for sedtrans
rafa-guedes Jan 5, 2026
cf34934
Move wave boundary direction parameters from Config into the boundary…
rafa-guedes Jan 6, 2026
7aa9383
Move the cfl field out of Config
rafa-guedes Jan 6, 2026
2621d04
Move the order parameter
rafa-guedes Jan 6, 2026
8fb95c0
New flow_boundary component
rafa-guedes Jan 6, 2026
8b75d4f
Implement the tide boundary component
rafa-guedes Jan 6, 2026
f6ef09c
Handle the new components in Config
rafa-guedes Jan 6, 2026
879c33b
Implement hotstart capability
rafa-guedes Jan 6, 2026
822fd5b
Ruff formatting
rafa-guedes Jan 6, 2026
fd65ff2
More formatting
rafa-guedes Jan 6, 2026
91de5de
mkdocs started
rafa-guedes Jan 6, 2026
738aa5e
Changes to deploy the docs
rafa-guedes Jan 6, 2026
f7ba181
Remove strict flag from docs build
rafa-guedes Jan 7, 2026
e9c167e
Add missing extensions for icons to display
rafa-guedes Jan 7, 2026
616edfe
Fixes and improvements to the home page
rafa-guedes Jan 7, 2026
9bb2784
Add sections to home, fix links, and other small improvements
rafa-guedes Jan 7, 2026
4a6185d
Add hyperlinks to the parameter mapping table
rafa-guedes Jan 7, 2026
8028d3e
Improve api reference to show fields and descriptions
rafa-guedes Jan 7, 2026
07c42b8
Ongoing improvement
rafa-guedes Jan 7, 2026
df33249
Link to attributes
rafa-guedes Jan 7, 2026
08cc9d9
Improvements to the parameter-reference tables
rafa-guedes Jan 7, 2026
b18c74b
Add Data Driven parameters
rafa-guedes Jan 7, 2026
86e3008
Fix hardcoded path in test
rafa-guedes Jan 7, 2026
361f8c4
Linting fix
rafa-guedes Jan 7, 2026
3eb99dc
Set populate_by_name in XBeachBaseModel to allow using either name or…
rafa-guedes Jan 7, 2026
98e0599
Attepmt to address broken examples in docs
rafa-guedes Jan 7, 2026
e7e18d2
Fix several docs examples
rafa-guedes Jan 7, 2026
ee49aee
Remove missing sediment-demo.ipynb from nav and examples index
rafa-guedes Jan 7, 2026
07b6a53
Improvements to the bathy section in the docs
rafa-guedes Jan 7, 2026
05f7eb4
Move the bathy objects into a new bathy module
rafa-guedes Jan 8, 2026
fbc4e94
Ruff formatting
rafa-guedes Jan 8, 2026
ec901ff
Remove docs version pinning
rafa-guedes Jan 8, 2026
c5337d4
Install in dev mode to fix remote build issue
rafa-guedes Jan 8, 2026
96abb6e
Add mising new module
rafa-guedes Jan 8, 2026
14d775c
Ruff formatting
rafa-guedes Jan 8, 2026
0209831
Small improvement to docs
rafa-guedes Jan 8, 2026
da09285
Commit docs files for the data_interface section
rafa-guedes Jan 8, 2026
f4193fa
New sources subsections in data-interface
rafa-guedes Jan 8, 2026
3630dcd
Add and link missing boundary classes
rafa-guedes Jan 8, 2026
03e8f78
Add more cross-linking
rafa-guedes Jan 8, 2026
4c53cc7
Ruff formatting
rafa-guedes Jan 8, 2026
5a1f868
Large refactor to attempt to simplify the wave boundary definition
rafa-guedes Jan 9, 2026
2093cdb
Define an id field for the new nonspectral boundary classes with the …
rafa-guedes Jan 9, 2026
63230f2
Define id fields in all boundary data classes
rafa-guedes Jan 9, 2026
fb9a315
Generalise directory fetch class, use it in hotstart and reuse classes
rafa-guedes Jan 9, 2026
7a04e62
Remove NonSpectralWaveBoundaryParams class to simplify things
rafa-guedes Jan 9, 2026
ee64c2d
Allow setting boundary params in reuse and off classes
rafa-guedes Jan 9, 2026
f4eac59
New file-based classes for spectral boundary types
rafa-guedes Jan 9, 2026
1693be7
Fix warnings due to field shadowing
rafa-guedes Jan 9, 2026
eb786f4
Fix linting errors
rafa-guedes Jan 9, 2026
eaa2738
Refactored wave boundary docs:
rafa-guedes Jan 9, 2026
5c348b0
More docs tidying up
rafa-guedes Jan 9, 2026
049d60b
A few more changes for consistency
rafa-guedes Jan 10, 2026
59525a3
Handle sediment list based inputs better
rafa-guedes Jan 10, 2026
bbc3dc5
A few changes to the codebase structure
rafa-guedes Jan 10, 2026
b06f94d
Ensure base data fields won't be serialized
rafa-guedes Jan 10, 2026
b62d7c1
Updates to examples section
rafa-guedes Jan 11, 2026
dd92e4b
Ruff formatting
rafa-guedes Jan 11, 2026
349c952
Ensure notebooks from subfolder are fetched when building the docs
rafa-guedes Jan 11, 2026
de32516
Implement a combined waterlevel object
rafa-guedes Jan 12, 2026
7f09b4e
Update the docs and run ruff
rafa-guedes Jan 12, 2026
63d821f
Add missing dependency
rafa-guedes Mar 8, 2026
3347d5a
Fix boundary params serialization
rafa-guedes Mar 8, 2026
ddad88e
Ruff formatting
rafa-guedes Mar 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Documentation

on:
push:
branches:
- output # Change to main after merge
paths:
- 'docs/**'
- 'src/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- '.github/workflows/docs.yml'
pull_request:
branches:
- output # Change to main after merge
paths:
- 'docs/**'
- 'src/**'
- 'mkdocs.yml'
workflow_dispatch: # Allow manual trigger

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

env:
PYTHON_VERSION: "3.11"

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout rompy-xbeach
uses: actions/checkout@v4

- name: Checkout rompy-notebooks
uses: actions/checkout@v4
with:
repository: rom-py/rompy-notebooks
ref: xbeach
path: rompy-notebooks

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-docs-

- name: Cache MkDocs Material
uses: actions/cache@v4
with:
path: ~/.cache/mkdocs
key: mkdocs-material-${{ github.run_id }}
restore-keys: |
mkdocs-material-

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gdal-bin libgdal-dev

- name: Install package with docs dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"

- name: Sync notebooks
run: |
mkdir -p docs/examples/components docs/examples/data-interfaces
# Copy main workflow notebooks
cp rompy-notebooks/notebooks/xbeach/*.ipynb docs/examples/ || true
cp rompy-notebooks/notebooks/xbeach/*.yml docs/examples/ || true
# Copy component tutorials
cp rompy-notebooks/notebooks/xbeach/components/*.ipynb docs/examples/components/ || true
# Copy data interface tutorials
cp rompy-notebooks/notebooks/xbeach/data-interface/*.ipynb docs/examples/data-interfaces/ || true
ls -la docs/examples/
ls -la docs/examples/components/
ls -la docs/examples/data-interfaces/

- name: Build documentation
run: mkdocs build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/

# Deployment job (only on push to output branch - change to main after merge)
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/output'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
name: Install dependencies
run: |
python -m pip install --upgrade pip build
pip install .[dev]
pip install -e .[dev]
-
name: Run tests
run: pytest -s -v tests
-
name: Run linting
run: |
pip install ruff
ruff check .
ruff check src/ tests/
-
name: Build package
run: python -m build
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ ENV/
# mkdocs documentation
/site

# Synced notebooks (from rompy-notebooks repo)
docs/examples/*.ipynb
docs/examples/*.yml

# mypy
.mypy_cache/

Expand Down
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

224 changes: 224 additions & 0 deletions docs/api-reference/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Components API

API reference for all rompy-xbeach components.

## Physics

### Physics (Aggregator)

::: rompy_xbeach.components.physics.Physics
options:
show_root_heading: true
show_source: false

### Wave Models

::: rompy_xbeach.components.physics.wavemodel.Stationary
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.Surfbeat
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.Nonh
options:
show_root_heading: true
show_source: false

### Breaker Formulations

::: rompy_xbeach.components.physics.wavemodel.Roelvink1
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.Roelvink2
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.RoelvinkDaly
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.Baldock
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.wavemodel.Janssen
options:
show_root_heading: true
show_source: false

### Friction

::: rompy_xbeach.components.physics.friction.BedFriction
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.friction.Cf
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.friction.Chezy
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.friction.Manning
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.friction.WhiteColebrook
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.friction.WhiteColebrookGrainsize
options:
show_root_heading: true
show_source: false

### Viscosity

::: rompy_xbeach.components.physics.friction.Viscosity
options:
show_root_heading: true
show_source: false

### Vegetation

::: rompy_xbeach.components.physics.vegetation.Vegetation
options:
show_root_heading: true
show_source: false

### Numerics

::: rompy_xbeach.components.physics.numerics.WaveNumerics
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.numerics.FlowNumerics
options:
show_root_heading: true
show_source: false

### Constants

::: rompy_xbeach.components.physics.constants.PhysicalConstants
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.physics.constants.Coriolis
options:
show_root_heading: true
show_source: false

---

## Sediment

### Sediment (Aggregator)

::: rompy_xbeach.components.sediment.Sediment
options:
show_root_heading: true
show_source: false

### Transport

::: rompy_xbeach.components.sediment.transport.SedimentTransport
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.sediment.transport.TransportNumerics
options:
show_root_heading: true
show_source: false

::: rompy_xbeach.components.sediment.transport.Quasi3D
options:
show_root_heading: true
show_source: false

### Morphology

::: rompy_xbeach.components.sediment.morphology.Morphology
options:
show_root_heading: true
show_source: false

### Bed Composition

::: rompy_xbeach.components.sediment.composition.BedComposition
options:
show_root_heading: true
show_source: false

### Groundwater

::: rompy_xbeach.components.sediment.groundwater.GroundwaterFlow
options:
show_root_heading: true
show_source: false

---

## Output

::: rompy_xbeach.components.output.Output
options:
show_root_heading: true
show_source: false

---

## Boundaries

### Flow Boundaries

::: rompy_xbeach.components.boundary.parameters.FlowBoundaryConditions
options:
show_root_heading: true
show_source: false

### Tide Boundaries

::: rompy_xbeach.components.boundary.parameters.TideBoundaryConditions
options:
show_root_heading: true
show_source: false

### Wave Boundaries

For manual wave boundary specification, see [Wave Boundaries Data API](../data.md#wave-boundaries).

---

## Hotstart

::: rompy_xbeach.components.hotstart.Hotstart
options:
show_root_heading: true
show_source: false

---

## MPI

::: rompy_xbeach.components.mpi.Mpi
options:
show_root_heading: true
show_source: false
Loading