Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Model Specification

The ModelSpec abstraction is designed to formalize and preserve a notion of a trusted model configuration by aggregrating the information required to build and configure a particular model as a named entity.

Model specifications are defined per-model in cstar_forge/catalog/ModelSpec/<model>/model.yaml (see here). Models are discovered by scanning catalog/ModelSpec/*/model.yaml.

Each model includes:

Everything a Domain/Forcing/Output spec already owns (grid/IC/forcing source selection, output write-lists, open-boundary and tidal/river presence, grid partitioning, etc.) is deliberately not duplicated here — those values come from the selected DomainSpec//ForcingSpec//OutputSpec/ catalog entries (directories read as plain dicts; of the specs, only ModelSpec is also a Python class) and are merged in by the resolver (build_forge_blueprint) when it assembles a ForgeBlueprint.

model.yaml Schema

Here’s a view of the schema:

bgc_mode: marbl  # marbl|none -- prepopulates the wizard; resolver derives cppdefs.marbl from it
use_pio: false  # prepopulates the wizard's PIO checkbox; resolver derives cppdefs.use_pio from it

code:
  roms:
    location: https://github.com/org/repo.git
    commit: <hash>  # or 'branch: main' instead

  marbl:  # optional
    location: https://github.com/CWorthy-ocean/MARBL.git
    commit: marbl0.45.0-max-it-10

  pio:  # optional; required if use_pio can be set true
    location: https://github.com/CWorthy-ocean/ParallelIO.git
    commit: 2.7.1-fork

  # Render templates live at the forge repo root (templates/), decoupled from this
  # ModelSpec. `directory` is relative to the repo root; `templates_commit` pins the
  # forge commit they're fetched from (defaults to branch `main` if omitted).
  templates_commit: <forge-commit-sha>
  templates_compile_time:
    directory: "templates/compile-time"
    files:
      - cppdefs.opt.j2
  templates_run_time:
    directory: "templates/run-time"
    files:
      - marbl_in

model_settings:
  cppdefs:
    sponge_tune: false
    nhy_forcing: true
    nox_forcing: true
  # ...one section per model_settings namelist key (lateral_visc, vertical_mixing,
  # tracer_diff2, bottom_drag, param, bgc, blk_frc, tides, marbl_bgc, etc.)

Field Descriptions:

You can add new models by creating a new directory under cstar_forge/catalog/ModelSpec/<model>/ containing a model.yaml with the schema above.