Models
Overview
ROMPY provides model-specific implementations for various ocean, wave, and hydrodynamic models. Each model implementation includes configuration classes, grid definitions, data handling, and execution backends.
Supported Models
ROMPY currently supports the following models:
- SWAN - Spectral Wave Nearshore model
- SCHISM - Semi-implicit Cross-scale Hydroscience Integrated Modeling System
Model Architecture
Each model implementation follows a consistent architecture:
Configuration
Model-specific configuration classes that define model parameters, grid settings, and data sources.
Grid
Grid definitions that specify the model domain, resolution, and coordinate system.
Data
Data handling classes for preparing model input data from various sources.
Execution
Backend configurations for running the model in different environments (local, Docker, HPC).
Postprocessing
Classes for analyzing and visualizing model output.
Extending ROMPY
To add support for a new model:
- Create a new model package in the
rompynamespace - Implement the required base classes:
BaseModel- Model configuration and executionBaseGrid- Grid definition and handlingDataSource- Data input handling- Add backend support for execution environments
- Implement postprocessing capabilities
- Add documentation and examples
Model Integration
Models integrate with ROMPY's core framework through:
- Pydantic-based configuration classes for type safety
- XArray accessors for data manipulation
- Intake drivers for data catalog integration
- Cookiecutter templates for model setup
- Unified execution backends for consistent deployment
Best Practices
When working with models:
- Use Type Safety: Leverage Pydantic models for configuration validation
- Modular Design: Keep model components modular and reusable
- Documentation: Document model-specific parameters and usage
- Testing: Include comprehensive tests for model implementations
- Examples: Provide clear examples for common use cases
Model-Specific Documentation
For detailed information about each supported model, see:
- SWAN Model - Spectral Wave Nearshore model documentation
- SCHISM Model - Semi-implicit Cross-scale Hydroscience Integrated Modeling System documentation