The source_data.py module manages the acquisition, preparation, and caching of model input datasets required for ROMS/MARBL domain generation and simulation.
These datasets are documented in ROMS Tools here.
source_data.py provides a registry-driven system for handling diverse data sources, allowing for flexible workflows whether datasets are streamed or locally cached.
Dataset Preparation Logic¶
SRTM15: Downloads topography from Scripps (version controlled, e.g.
SRTM15_V2.7). Returns a single Path.GLORYS: Global or regional ocean initial conditions; subset and time-extract logic depends on system type. Returns a single Path (for single day) or List[Path] (for multiple days).
UNIFIED_BGC: Unified biogeochemistry forcing & initial conditions from ROMS Tools. Returns a single Path.
ERA5: Atmospheric surface forcing (streamable, no local download needed). Handler is a placeholder.
TPXO: Tidal harmonics data must be provided by user. The handler verifies required files exist and returns a dictionary with keys
"grid","h", and"u"mapping to file paths. This dictionary is stored insrc.paths["TPXO"].
Each preparation routine ensures datasets are up to date and correctly subsetted for the target domain/grid.