scream
scream copied to clipboard
EAMxx namelist/buildnml/atmchange remaining tasks and wishlist
I am opening this issue to track stuff that still needs to be done for our handling of namelist in v1. Feel free to add items that you think are needed or simply desirable.
In the following, def.xml is the XML file with our defaults, while eam.xml is the intermediate xml file generated by buildnml.
- [x] Store the timestamp of the case XML files in
eam.xmlfile. When buildnml runs, compare the current timestamp of those files with the one stored ineam.xml(if this file is already present). If some timestamp differ, nukeeam.xmland re-generate it. Bonus: store all the atmchange issued by the user ineam.xml, so that, if we have to re-generate it, we can re-issue them. - [x] Currently,
atm_procs_listfor the whole atm is a "locked" entry, meaning it can be changed viaatmchange. However, one may want to swap a parametrization for another, without having to create a new compset. Or one might want to remove a parametrization, without the need to add a new compset. It might be therefore desirable to allow to modify this entry. However, modifying it, one might add an atm proc that was not there, and whose params didn't make it toeam.xml. Therefore, if one modifies this entry, we should re-generate the sectionatmosphere_processes, parsingdef.xmlto grab all needed defaults. - [ ] As EAMxx grows, it is possible that some parameters don't make it into
eam.xml, but they are still used. This is probably a bug in buildnml, but in some corner cases, it might be needed. E.g., during development, one may want to try to make a new parameter configurable for a certain parametrization. Of course, the cleanest way to do this, would be to add the parameter todef.xml, but maybe for initial development, it's ok to just let the param in the input files without changing the defaults file. So we may consider adding a feature toatmchangeto add entries, along the line ofatmchange --add [ns1::ns2..::nsN::]param_name=XYZ, where[ns1::...::nsN::]is needed only ifparam_namedoes not uniquely identify the parameter ineam.xml(just like it is already the case inatmchangeandatmquery). I'm not clear ifatmchangeshould error out if the parameter already exists, or simply revert to a normalatmchangecall in that case. - [ ] Maybe add a
--removetoatmchange, to remove some parameters. I'm not sure if this would make any difference, or, more correctly, whether it should. It would make a difference if the code already implements some default behavior if a parameter/parameterList is not found, in which case, removing the entry fromeam.xmlmight allow to achieve that. But if that's the case, maybe we have a confusing code, where thedef.xmlis not prescribing the "default" behavior of the code. - [ ] Allow to use atm parameters as selectors, to avoid injecting ATM vars in the CIME xml settings. That is, allow the following snippet in our xml defaults file
<param_1>one</param_1>
<param_2 param_1="one">foo</param_2>
<param_2 param_1="two">bar</param_2>
Edit: perhaps the 2nd point can be fixed (at least for the atm_proc_list part) by keeping the defaults of all atm procs in the intermediate file.