C-Star Forge turns a set of reusable catalog specs (plus optional wizard input) into
a ForgeBlueprint, then processes that blueprint into ROMS-MARBL input files, rendered
ROMS code (cppdefs.opt, namelist.nml), and a downstream roms_marbl blueprint that
C-Star builds and runs. See docs/architecture-details.md
for the full module map and call chains; this page covers the workflow at a high level.
Workflow¶
The C-Star Forge workflow progresses through distinct steps, transforming catalog specs into an executable simulation:
Model defaults (namelist sections, cppdefs, code refs) live directly in each model’s
model.yaml under cstar_forge/catalog/ModelSpec/<model>/ — there is no separate
settings-defaults.yaml; the resolver overlays domain-, forcing-, and output-derived
values on top of that single file.
Workflow Steps¶
Steps 0–3 are what cstar blueprint run (or cstar forge run) performs;
compilation and execution happen separately, when C-Star runs the emitted
blueprint.
Resolve (
build_forge_blueprint(),cstar_forge/forge_blueprint_resolve.py)Assemble a
ForgeBlueprintfrom the catalog specs (ModelSpec,DomainSpec,ForcingSpec,OutputSpec) plus any wizard-supplied domain/forcing/run overridesThis step, and everything before it, is dependency-light: no ROMS/MARBL build and no roms-tools needed (
cstar-oceanis a hard dependency —ForgeBlueprintsubclassescstar.orchestration.models.Blueprint;roms_toolsis lazily imported only whendtis left unset), so a UI backend can call it directly
Initialize (
model_post_init()/_initialize_roms_marbl_blueprint())Construct a
ForgeExecutorfrom the resolvedForgeBlueprint(ForgeExecutor.from_forge_blueprint), invoked viacstar blueprint run forge_blueprint.yamlInitialize grid object from
grid_kwargsCreate the in-memory roms_marbl blueprint structure with placeholder data
Load default settings from the resolved
ForgeBlueprint.model_settingsNothing is persisted yet
Generate inputs (
generate_inputs())Prepare source datasets (
ensure_source_data())Generate all input files:
Grid NetCDF files
Initial conditions
Surface forcing
Boundary forcing
Tidal forcing
River forcing
CDR forcing
Nesting data (when a child grid is configured)
Update the in-memory roms_marbl blueprint with actual file paths
Update in-memory settings with input-specific values
Nothing is persisted yet
Configure build (
configure_build())Render Jinja2 templates (fetched via C-Star’s
AdditionalCodefrom the forge git ref):Compile-time template →
cppdefs.optRun-time →
namelist.nml(via f90nml) +marbl_in
Update the roms_marbl blueprint with rendered code locations
Persist the roms_marbl blueprint to
B_{name}.yaml(+settings_B_{name}.yamlsidecar) — the only time it is written to diskCompilation is done by C-Star (
RomsMarblRunner) when the emittedB_{name}.yamlis run — not by Forge
Run (
run())Set C-Star’s environment (SLURM account/queue/walltime, clobber flag,
PATH) viaprep_cstar_environment()Hand
B_{name}.yaml’s path to C-Star and execute the model simulation