Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete implementation of optional arguments / active variables in capgen #566

Open
climbfuji opened this issue May 16, 2024 · 0 comments · Fixed by #617
Open

Complete implementation of optional arguments / active variables in capgen #566

climbfuji opened this issue May 16, 2024 · 0 comments · Fixed by #617
Assignees
Labels
capgen bugs, requests, etc. that involve ccpp_capgen enhancement

Comments

@climbfuji
Copy link
Collaborator

Description

PR #552 introduces optional arguments in ccpp_prebuild.py based on requirements described in #526. The PR discussion led to a set of requirements that go further than what is described in #526: #552 (comment). ccpp_prebuild.py implements those in #552 in the prebuild layer on top of the capgen layer.

Solution

Some of that functionality is not yet available in capgen.py and needs to be added there (with tests).

Alternatives (optional)

n/a

Related to (optional)

n/a

@climbfuji climbfuji added the capgen bugs, requests, etc. that involve ccpp_capgen label May 16, 2024
@climbfuji climbfuji moved this from To do to In progress in capgen unification Dec 9, 2024
mkavulich pushed a commit that referenced this issue Dec 9, 2024
…ts (#617)

**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.py` and `scripts/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-prebuild` allows 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
capgen bugs, requests, etc. that involve ccpp_capgen enhancement
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants