E3SM-Project / E3SM-Project/scream
Add metadata to namelist defaults
- Dominant language
- No language data
- Stars
- 79
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Recent PRs have shaped our handling of the defaults XML file. Among other things, they added "metadata" attributes, that can be used to validate entries, both during initial generation of the intermediate XML file (e.g., at case.setup time) as well as during any call to `atmchange`.
So far, we only added a handful of metadata, to verify that the logic works. We can now think of starting to add metadata to a few more entries, to ensure robustness of inputs.
As a reminder, these are the supported metadata attributes:
- `type`: either `integer`, `logical`, `real`, `string`, or `array(X)`, with X being any of the previous ones.
- `valid_values`: list of valid values for the XML entry
- `locked`: if true, this entry cannot be altered via `atmchange`. In other words, it's a compset/res-dependent entry that cannot be arbitrarily changed.
- `constraints`: a set of logical equalities/inequalities that the entry needs to satisfy
For all of these, there are already examples in `namelist_defaults_scream.xml` as well as more documentation in the python scripts used by `buildnml` and `atmchange`.
I encourage people adding new entries to our defaults XML file to take advantage of these features, and add metadata where appropriate.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.