Skip to content

The cascade config structure

Guoqing Ge edited this page Nov 8, 2025 · 9 revisions

The config cascade structure

Use a cascade structure to separate concerns so that a task/job only need to define required environmental variables in runtime

config.${MACHINE} -> config.meshdep -> config.base -> [config.chemistry if do_chemistry] -> [config.realtime if it is a realtime run] -> [config.override if exists]
NOTE:

  1. [ ] means optional
  2. Many resource-related configurations (queue/account,etc) are only visible in the workflow setup process and are not needed in runtime
  3. task-specific resource settings are through variable cascade in config.base. For example, we define WALLTIME for all tasks first. If we want to set a different WALLTIME for spinup fcst, we can add a variable WALLTIME_FCST_SPINUP in config/resources/config.base. setup_xml.py has a function called get_cascade_env to retrieve the correct environmental setting in a reverse cascade way. Examples:
export NODES=${NODES:-"<nodes>1:ppn=1</nodes>"} #the NODES variable has to include the tag <nodes> or <cores>
........
........
# fcst
export NODES_FCST=${NODES_FCST:-"<nodes>3:ppn=40</nodes>"}
export WALLTIME_FCST=${WALLTIME_FCST:-"00:50:00"}

exp.setup

Set up top-level options for an experiment, such as directories, VERSION, TAG, days for a realtime run or retro period for a retro run.

config.meshdep

Set mesh dependent settings in this file

config.${MACHINE}

Define high-level common machine-dependent settings

config.base

Most default system settings go into this file

config.realtime

This file defines DEADLINE and STARTTIME for rocoto-based realtime runs, not needed by and does not affect NCO

config.override

This file is optional and will NOT be included in rrfs-workflow. But users can link their own config.override to workflow/config_resources and setup_rocoto.py will use all variables in this file to override their previous settings. This file is useful for running other meshes not maintained by the authoritative rrfs-workflow (such as ar3.5km, ea5km, eu12km, etc)

Clone this wiki locally