Skip to main content

"Relocatable Ocean Modelling in PYthon (rompy)"

DOI GitHub Pages PyPI version GitHub Workflow Status (with event) PyPI - Downloads Code style: black PyPI - Python Version

Introduction

Relocatable Ocean Modelling in PYthon (rompy) is a modular Python library that aims to streamline the setup, configuration, execution, and analysis of coastal ocean models. Rompy combines templated model configuration with powerful xarray-based data handling and pydantic validation, enabling users to efficiently generate model control files and input datasets for a variety of ocean and wave models. The architecture centers on high-level execution control (ModelRun) and flexible configuration objects, supporting both persistent scientific model state and runtime backend selection. Rompy provides unified interfaces for grids, data sources, boundary conditions, and spectra, with extensible plugin support for new models and execution environments. Comprehensive documentation, example Jupyter notebooks, and a robust logging/formatting framework make rompy accessible for both research and operational workflows. Current model support includes SWAN and SCHISM, with ongoing development for additional models and cloud/HPC backends.

Key Features:

  • Modular architecture with clear separation of configuration and execution logic
  • Templated, reproducible model configuration using pydantic and xarray
  • Unified interfaces for grids, data, boundaries, and spectra
  • Extensible plugin system for models, data sources, backends, and postprocessors
  • Pydantic-based postprocessor configuration with CLI support
  • Robust logging and formatting for consistent output and diagnostics
  • Example notebooks and comprehensive documentation for rapid onboarding
  • Support for local, Docker, and HPC execution backends

rompy is under active development—features, model support, and documentation are continually evolving. Contributions and feedback are welcome!

Documentation

See https://rom-py.github.io/rompy/

Postprocessor Configuration

ROMPY now supports Pydantic-based postprocessor configuration via YAML/JSON files.

Usage

Postprocess with a config file

rompy postprocess model_config.yml --processor-config processor.yml

Pipeline with postprocessor config

rompy pipeline model_config.yml --processor-config processor.yml

Validate a postprocessor config

rompy backends validate --processor-type noop processor.yml

Example Configuration

type: noop
validate_outputs: true
timeout: 3600
env_vars:
  DEBUG: "1"

See examples/backends/postprocessor_configs/ for more examples.

Code Formatting and Pre-commit Hooks

This repository enforces Python code formatting using black via the pre-commit framework.

To set up pre-commit hooks locally (required for all contributors)::

pip install pre-commit
pre-commit install

This will automatically check code formatting before each commit. To format your code manually, run::

pre-commit run --all-files

All code must pass black formatting before it can be committed or merged.

Versioning and Release

This project uses tbump for version management.

To bump the version, run::

tbump <new_version>

This will update the version in src/rompy/__init__.py, commit the change, and optionally create a git tag.

tbump is included in the development requirements (requirements_dev.txt).

For more advanced configuration, see tbump.toml in the project root.

Relevant packages

Metadata

Release files for rompy 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rompy 0.6.4
File Size Uploaded
rompy-0.6.4.tar.gz 148.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rompy 0.6.4
File Interpreter ABI Platform
rompy-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 269.5 kB

Release files / rompy-0.6.4.tar.gz

Download URL rompy-0.6.4.tar.gz
Size 148.9 kB
Tags Source
SHA-256 checksum
How to use checksums
adcac26a5540e3ae72c18335bac8059ff057a56b275d86c281aa2473a68a141e
BLAKE2b-256 checksum
How to use checksums
85952c4da325337f2548a62e699a79027e9f6c1d1ff1ca63f5d7c4fa240aac5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / rompy-0.6.4-py3-none-any.whl

Download URL rompy-0.6.4-py3-none-any.whl
Size 120.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
852f7713bf1a73318f19c4a91988b34c546ba0c8ac75ecab8edef7c0ac2b35d8
BLAKE2b-256 checksum
How to use checksums
9935663a8ea37a6ae2103a4c815d506d25ced61286b0098d373bd64ea2fd59fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page