Namelist Refactor#218
Conversation
Simplifying Namelist + inheriting from f90nml.Namelist Modifying workflow tests until namelist refactor is completed
… to point to jjuyeonkim fork
|
General question (maybe should be raised to status of issue if need be): do we want to enforce a format for producing namelist files? |
|
General question: what's the status of this PR? Are the review requests indicating that this is ready for show or is it more of a first round of feedback? In any case, we are happy to have a look and provide feedback. |
I'd very much like a first round of feedback. The pace unit tests, pyFV3 translate tests and pySHiELD translate tests pass locally for me, but I've been unsuccessful so far in getting the CI workflows modified to pass here. That's why it's still in draft status. |
Description
This is the first of multiple PRs to refactor the NDSL's
NamelistandNamelistDefaultsso that submodules have more ownership over configuration parameters and corresponding default values.ndsl.Namelistclass has been modified in the following ways:f90nml.Namelist. This allows for the preservation for the group information coming from Fortran-based namelist (*.nml) files. We expect that this will be useful when initializing dycore and physics config objects that have the same member variable name but different values.namelist_groups_to_flatish_dictthat will allow for target group names to be pulled out and returned in a flat-ishdictform. This will facilitate the creation of submodule config files based on certain groups of the ndsl.Namelist.ndsl/stencils/testing/conftest.pyhas been modified so that the Namelist is instantiated directly fromf90nml.readrather than using a 'from_f90nml' function call.NamelistDefaultsmembers have been moved to PyFV3'sDynamicalCoreConfigand PyShield'sPhysicsConfig. (Related PRs are forthcoming.)jjuyeonkim's pace and submodule forks. These will be reverted back to their original state once this issue (NDSL should provide a framweork for physics namelists instead of specifying the namlist members and default values for specific physics models #64) has been resolved.Fixes: #64 (partial refactor)
How Has This Been Tested?
PyFV3 and PySHiELD translate tests run as expected compared to develop. Pace unit tests also pass as expected.
Checklist: