-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Description
Certain self-contained physics schemes (like PUMAS) have their own kinds. If one is developing interstitial schemes, then there might be situations where the interstitial might need access to that kind, and the ability to pass a variable of that kind through the CCPP cap. However, this requires a way to expose the kind definition to the cap itself.
Solution
The scheme-defined kind can be added to the auto-generated ccpp_kinds, which will make it available to all variables and phases in the CCPP cap. It also means interstitial schemes can use ccpp_kinds directly instead of needing to define dependencies to the core scheme (although this isn't required).
The kind definitions themselves can be added to the generated code by expanding the kind_type argument passed into capgen to take in a dictionary that defines the kind name (as seen by the CCPP), the Fortran module where the kind definition is located, and the name of the kind definition in that module.
A PR is incoming that provides this capability (including a test example).
Alternatives (optional)
I am sure other alternatives can be developed, this was just the first one I came up with (and seemed relatively non-invasive).