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 in cson_forge/models.yml (see here).

Each model includes:

models.yml Schema

Here’s a view of the schema:

model_name:
  templates:
    compile_time:
      location: "{{ config.path.model_configs }}/{{ model.name }}/templates/compile-time"
      filter:
        files:
          - cppdefs.opt.j2
          - param.opt.j2
          - tracers.opt.j2
          - Makefile
    run_time:
      location: "{{ config.path.model_configs }}/{{ model.name }}/templates/run-time"
      filter:
        files:
          - roms.in.j2
          - marbl_in

  settings:
    properties:
      n_tracers: 34
    compile_time:
      _default_config_yaml: "{{ config.path.model_configs }}/{{ model.name }}/templates/compile-time-defaults.yml"
    run_time:
      _default_config_yaml: "{{ config.path.model_configs }}/{{ model.name }}/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 top-level key in the YAML file with the same schema as above.