Merge two workarounds for ccpp-prebuild for handling optional arguments#617
Conversation
…y due to ccpp-physics not being updated at the same time as ccpp-framework (optional argument changes are missing)
|
@climbfuji Is the intention of merging directly to main that this branch should be tested by all parties prior to merge? If so I can run the SCM and UFS RTs (unless @dustinswales has already done so?) I don't know if @peverwhee's approval means that the tests have been run on the SIMA side, but since this is a prebuild-only change then those tests are theoretically unnecessary (though it doesn't give me a great taste in my mouth to skip testing). Maybe this was discussed at Thursday's meeting, let me know if I'm out of the loop. |
Let's merge this into develop and then bring it to main when @dustinswales needs it, if that is ok with you. |
mkavulich
left a comment
There was a problem hiding this comment.
@climbfuji Sounds good, I'll add my approval for posterity and merge the PR.
|
Thanks everyone for merging this so quickly! @dustinswales I'll leave it up to you to create a PR from develop to main when you need this particular update for prebuild for the UFS. |
This PR affects ccpp-prebuild only. It can be merged into develop (or main), but it must come to main as soon as possible for use in UFS/SCM.
This PR adds workarounds for handling optional arguments the right way (finally!) in
scripts/ccpp_prebuild.pyandscripts/mkcap.py. This update is already in use in NEPTUNE and is required for @dustinswales' work to update/revert the optional arguments in ccpp-physics in the UFS and the SCM.The workaround for
ccpp-prebuildallows us to treat only those arguments as optional that are truly optional for a CCPP scheme. In the past, any argument that was conditionally allocated by any of the host models had to be declared as optional, even if it was required by the physics.User interface changes?: Yes and No. This can be merged without making any changes (it won't break the previous functionality where any conditionally allocated variable had to be declared as optional in the physics). But it will allow to declare many CCPP physics variables as non-optional if they aren't really optional.
This finally resolves #566 (by making ccpp-prebuild behave the same as capgen, which is the correct way to handle optional arguments).
Testing:
test removed: none
unit tests: all pass
system tests: all pass
manual testing: implemented and tested thoroughly in NEPTUNE