ESMCI / ESMCI/cime

Many entries in drv's config_component should be moved to a shared location

Open
#3,509 11 comments 0 reactions 0 assignees View on GitHub
Low Priority tp: drv mct ty: enhancement
Dominant language
Python
Stars
174
Forks
225
Avg merge
1d 16h
Merged PRs (30d)
14

Description

Motivated by #3508 and the need to open a similar PR for a subset of that in the cmeps repository (https://github.com/ESCOMP/CMEPS/pull/62): I noticed that there are a lot of xml variables defined in the driver's config_component.xml file that are really not specific to a particular driver, and end up needing to be duplicated for all drivers. For example, various directories (`CIME_OUTPUT_ROOT`, `EXEROOT`, etc.). The decision to put these in the driver's config_component.xml was okay when we only had one driver. But now that we have three drivers, one of which is in a completely different repository, this leads to error-prone duplication and friction when making any changes to this file. This problem is made worse by the fact that `case.get_value` calls appear to silently return some default value rather than failing if a variable isn't defined: this could lead to subtle buggy behavior if someone adds a variable in the mct driver but forgets to add this new variable to cmeps.

This is not just a theoretical issue: I found that the NONLOCAL variable hadn't been added to CMEPS's config_component (and I wouldn't be surprised if there are others).

I suggest that we pull all non-driver-specific variables out of the driver's config_component file into some other file that is shared between all drivers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.