Loosen restriction on optional arguments.#248
Conversation
… into feature/optional_args_again
climbfuji
left a comment
There was a problem hiding this comment.
This is too much to review line by line. We will need to rely on the UFS regression testing. As long as all tests pass with b4b identical results, this is good. Thanks for all your efforts!
@climbfuji Agreed. |
|
@dustinswales I've finished my review. It looks like perhaps there is a mistake in the changes to |
|
@grantfirl Let me look into what's going on. |
… into feature/optional_args_again
|
@dustinswales Let me know when you get a chance to look into the cu_gf_driver thing. I'm hesitant to put this in the UFS merge queue until it's sorted out. |
|
@grantfirl Sorry, I forgot to ping you, but I figured the issue out last week and this is all ready to go. All RTs pass on Hera: |
@dustinswales But, the inconsistency between the Fortran and metadata still exists. aod_gf is optional in the Fortran but not in the metadata. maxmf is not optional in the Fortran but is optional in the metadata. Maybe RTs pass, but isn't this still wrong? |
|
@dustinswales Added small metadata-only bugfix coming from another PR after it was already merged into ufs/dev and caught upon merge into NCAR/main: NCAR@0d4b4b9 |
de7d232 to
b3f86f8
Compare
… into feature/optional_args_again
|
all tests are done at ufs-community/ufs-weather-model#2573. @rhaesung @grantfirl can you merge this pr? |
When optional arguments were added back into the CCPP as part of #189, all variables that were conditionally allocated on the host side were required to be defined as
optionalwithin the schemes. This restriction required host-model logic to be implicitly built into the schemes and metadata. For example, scheme variables that wereoptionalin the context of the host model, but always required within the context scheme, still needed to be defined as optional within the scheme. This resulted in schemes having an arbitrary/confusing mis-match of required/optional arguments.Alongside this PR is a PR into the CCPP Framework that removes this restriction.
The changes contained within here revert nearly all of the optional argument changes introduced by #189 to the primary schemes.
The UFS interstitial schemes are untouched in this PR, as these schemes are designed to flexible (optional arg heavy) in order to couple to many primary schemes.
@climbfuji