Metadata-Version: 2.4
Name: rompy-swan
Version: 0.12.0
Summary: SWAN wave model plugin for rompy
Author-email: Rompy Contributors <developers@rompy.com>
Maintainer-email: Rompy Contributors <developers@rompy.com>
License: Apache Software License 2.0
Project-URL: bugs, https://github.com/rom-py/rompy-swan/issues
Project-URL: changelog, https://github.com/rom-py/rompy-swan/blob/master/changelog.md
Project-URL: homepage, https://github.com/rom-py/rompy-swan
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: AUTHORS.rst
Requires-Dist: rompy
Requires-Dist: pydantic-numpy
Provides-Extra: dev
Requires-Dist: coverage; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: requests; extra == "dev"
Requires-Dist: envyaml; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: requests; extra == "test"
Requires-Dist: envyaml; extra == "test"
Provides-Extra: docs
Requires-Dist: rompy-docs>=0.1; extra == "docs"
Dynamic: license-file

# rompy-swan

[![PyPI version](https://img.shields.io/pypi/v/rompy-swan.svg)](https://pypi.org/project/rompy-swan/)
[![Tests](https://github.com/rom-py/rompy-swan/actions/workflows/testing.yml/badge.svg)](https://github.com/rom-py/rompy-swan/actions/workflows/testing.yml)
[![Documentation](https://github.com/rom-py/rompy-swan/actions/workflows/build-docs.yml/badge.svg)](https://rom-py.github.io/rompy-swan/)
[![Python versions](https://img.shields.io/pypi/pyversions/rompy-swan)](https://pypi.org/project/rompy-swan/)

rompy-swan sets up and runs the [SWAN](https://swanmodel.sourceforge.io/) spectral wave model from Python or YAML. It is the SWAN plugin of [rompy](https://rom-py.github.io/rompy/), which provides the run period, data sources, model runs and backends shared by all models.

SWAN reads a command file, `INPUT`, whose commands come in a fixed order. rompy-swan describes each SWAN command as a validated Python object and writes the command file and its input files:

- **One component per SWAN command**: `CGRID`, `BOUNDSPEC`, `GEN3`, `BLOCK` and the others, with the same names and options as in the SWAN user manual.
- **Input grids and boundaries from data**: bathymetry, wind, currents and water levels from gridded datasets, and boundary spectra from wave model output.
- **Checks before SWAN runs**: invalid options and combinations SWAN refuses are caught when the configuration is built.
- **Times from the run**: in nonstationary mode, computation and output times come from the run period.

## Documentation

- Documentation: https://rom-py.github.io/rompy-swan/
- Tutorial and examples (notebooks): https://rom-py.github.io/rompy-notebooks/swan-tutorial/
- Changelog: [HISTORY.rst](https://github.com/rom-py/rompy-swan/blob/main/HISTORY.rst)

## Installation

```bash
pip install rompy-swan
```

SWAN itself is not included. The public Docker image `ghcr.io/rom-py/swan` runs the generated workspaces, with NetCDF output; see [Running SWAN](https://rom-py.github.io/rompy-swan/user-guide/running/).

## Contributing

See the [contributing guide](https://rom-py.github.io/rompy-swan/development/contributing/).

## License

Apache Software License 2.0. See [LICENSE](https://github.com/rom-py/rompy-swan/blob/main/LICENSE).
