Workflow¶
The C-SON Forge workflow progresses through distinct stages, transforming a model specification into an executable simulation:
Workflow Stages¶
PRECONFIG (Initialization)
Load
ModelSpecfrommodels.ymlCreate
CstarSpecBuilderwith domain configurationInitialize grid object from
grid_kwargsCreate blueprint structure with placeholder data
Load default settings from model configuration
Persist blueprint to
B_{name}_preconfig.yml
POSTCONFIG (Input Generation)
Prepare source datasets (
ensure_source_data())Generate all input files (
generate_inputs()):Grid NetCDF files
Initial conditions
Surface forcing
Boundary forcing
Tidal forcing
River forcing
Update blueprint with actual file paths
Update settings with input-specific values
Persist blueprint to
B_{name}_postconfig.yml
BUILD (Configuration)
Render Jinja2 templates (
configure_build()):Compile-time templates →
*.optfilesRun-time templates →
roms.in,marbl_in
Update blueprint with rendered code locations
Create
ROMSSimulationinstancePersist blueprint to
B_{name}_build.ymlCompile model executable (
build())
RUN (Execution)
Prepare run directory (
pre_run())Execute model simulation (
run())Clean up (
post_run())Persist blueprint to
B_{name}_run_{datestr}.yml