I’ve been working with the AM3 suite for some time now and something that still confuse me is the number of rose-app-<something>.conf. For example, for the um task we have:
Initially I only looked at the main rose-app.conf and I tend to make any changes there. But I know rose-app-n512e.conf and (probably) rose-app-aeroclim.conf are being also used because I run n512 and with climatological aerosols.
My questions:
How can we check which config files are being used?
Is there an order in which these files are read? For example if I change an option in rose-app-n512e.conf but not in rose-app.conf, which one will be used?
What should I do if I want the um to use, let say, rose-app-spinup.conf? Is there any option in the main rose-app.conf file or in the suite configuration to “activate” spinup?
Is there any rule/guidelines to decide what to include in each file? I’m trying not to fall into bad practices here
I’ve tried to find any documentation, but with little luck. If anyone has answers or links to anything I can read, thanks in advance!
Add command link flag --opt-conf-key=KEY or -O KEY to rose task-run
Put a opt name in parentheses if it doesn’t matter if the file exists (commonly used to add an optional site configuration, e.g. ROSE_APP_OPT_CONF_KEYS=(nci))
If you’re making an opt file, it should be for something self-contained - opts aren’t very visible in the rose edit GUI. Changing the resolution is a good example, there’s a bunch of configs that need to be changed at the same time.
Opt files are always read after the main rose-app.conf file, and replace any value previously defined. If you wish to remove a setting or section prepend its name with a !:
# Removes this namelist
[!namelist:carbon_options]
[namelist:ancilcta]
# Removes this key
!l_amipii_ice_processing=.false.
How can we check which config files are being used?
I’m not sure how to check which configs are being used before runtime, but you can check the processed (all together) main config the model has used after run has started, located at:
~/cylc-run/[cylc-dir]/log/rose-suite-run.conf
Likewise, there is the processed suite.rc (with all of the individual .rc files processed together) at:
~/cylc-run/[cylc-dir]/suite.rc.processed
Is there an order in which these files are read? For example if I change an option in rose-app-n512e.conf but not in rose-app.conf, which one will be used?
Yes there is an order. Configuration in optional files (e.g. those located in opt folders) replace those in global configurations (e.g. rose-app.conf). But I think the actual order comes from the order the *.rc calls the option keys in e.g. ROSE_APP_OPT_CONF_KEYS =
What should I do if I want the um to use, let say, rose-app-spinup.conf? Is there any option in the main rose-app.conf file or in the suite configuration to “activate” spinup?
Scotts answer sums this up nicely. I’ll give my (lesser) experience. For one-off changes to the global configuration (rose-app.conf), I’ll create an opt/rose-suite-[KEY].conf file and call it with rose suite-run -O [KEY] (also good for reproducibility). But for more nuanced changes (e.g. if you are running multiple experiments within the same suite), I’ll set up a new file in e.g. app/um/opt/rose-app-[KEY].conf for each change and call it with ROSE_APP_OPT_CONF_KEYS = in the appropriate task definition in the *.rc configuration. Second option is trickier because you’ll have to be across the jinja interpretations in *.rc.