E3SM-Project / scream

Fork of E3SM used to develop exascale global atmosphere model written in C++
https://e3sm-project.github.io/scream/
Other
74 stars 54 forks source link

Add metadata to namelist defaults #1603

Open bartgol opened 2 years ago

bartgol commented 2 years ago

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:

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.

AaronDonahue commented 1 year ago

We have all of this now, right @bartgol ? So I think we can close this issue.

bartgol commented 1 year ago

Well, the issue was not about implementing metadata, but rather about adding metadata info to most of namelist_defaults_scream.xml entries. The vast majority of our XML defaults does not have any metadata, so technically this is still not done.

I feel like the type metadata should be added to all our fields, as a sort of inline documentation. In a way, it would serve a portion of the purpose of namelist_definitions.xml in EAM.