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.yml (see here). Models are discovered by scanning catalog/ModelSpec/*/model.yml.

Each model includes:

model.yml Schema

Here’s a view of the schema:

templates:
  compile_time:
    location: "templates/compile-time"
    filter:
      files:
        - cppdefs.opt.j2
  run_time:
    location: "templates/run-time"
    filter:
      files:
        - marbl_in

settings:
  properties:
    n_tracers: 34
  compile_time:
    _default_config_yaml: "templates/compile-time-defaults.yml"
  run_time:
    _default_config_yaml: "templates/run-time-defaults.yml"

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

inputs: # default keyword arguments to input generation functions
  grid:
    topography_source: ETOPO5  # or SRTM15

  initial_conditions:
    source:
      name: GLORYS
    bgc_source:  # optional
      name: UNIFIED
      climatology: true

  forcing:
    surface:
      - source:
          name: ERA5
        type: physics
        correct_radiation: true
      - source:
          name: UNIFIED
          climatology: true
        type: bgc
    boundary:
      - source:
          name: GLORYS
        type: physics
      - source:
          name: UNIFIED
          climatology: true
        type: bgc
    tidal:  # optional
      - source:
          name: TPXO
        ntides: 15
    river:  # optional
      - source:
          name: DAI
          climatology: false
        include_bgc: true

Field Descriptions:

Source Specifications:

Each source in the inputs can be:

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