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

Implement variable action class in capgen (30 hours) #403

Closed
climbfuji opened this issue Sep 30, 2021 · 6 comments · Fixed by #504
Closed

Implement variable action class in capgen (30 hours) #403

climbfuji opened this issue Sep 30, 2021 · 6 comments · Fixed by #504
Labels
capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification enhancement

Comments

@climbfuji
Copy link
Collaborator

climbfuji commented Sep 30, 2021

Description

The variable action class (aka var_action) needs to be implemented in capgen. This class will provide the ability to manipulate variables prior to entering physics schemes and posterior to returning from physics schemes.

Solution

The var_action class must support combinations of data manipulations at the same time, for example blocking/de-blocking of arrays and unit conversions. The current implementation in ccpp_prebuild handles this explicitly for each possible combination of data manipulations, which requires a lot of redundant code and is not maintainable going into the future.

Related to (optional)

The var_action class is a requirement for implementing the following items: #314, #329, #348, #349, #325

@climbfuji climbfuji added enhancement capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification labels Sep 30, 2021
@gold2718
Copy link
Collaborator

These classes are likely to be based on the SuiteObject base class in capgen.

@gold2718 gold2718 changed the title Implement variable action class in capgen Implement variable action class in capgen (30 hours) Oct 18, 2021
@dustinswales
Copy link
Collaborator

@gold2718 @climbfuji
#410 suggests this could be closed, but I'm not uncertain if it was addressed (we still have it in our ToDo list..).
Could you please confirm?

@gold2718
Copy link
Collaborator

gold2718 commented Jul 6, 2023

@dustinswales, I believe this is still planned. @peverwhee?

@peverwhee
Copy link
Collaborator

@dustinswales @gold2718 Still planned, #410 addressed it, but the implementation still remains un-done.

@climbfuji
Copy link
Collaborator Author

@dustinswales your PR #504 will resolve this issue, I made the necessary connection.

@climbfuji climbfuji linked a pull request Dec 20, 2023 that will close this issue
climbfuji added a commit that referenced this issue Jan 16, 2024
This PR adds automatic conversions for supported unit and type transforms.
Also, included is a new ccpp variable property to indicate a scheme variables vertical orientation vertical, top_at_one.
As default, top_at_one is set to .false.(GFS ordering convention).
Adding top_at_one = .true. to a variable in a schemes metadata file will trigger automatic array flipping:

Addresses #329 and #403

Conversions supported:
https://github.com/NCAR/ccpp-framework/blob/main/scripts/conversion_tools/unit_conversion.py

---------

Co-authored-by: dustinswales <dswales@ucar.edu>
Co-authored-by: Grant Firl <grantf@ucar.edu>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
@climbfuji
Copy link
Collaborator Author

Closed via #504

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 capgen-unification enhancement
Projects
Status: main (Done)
Development

Successfully merging a pull request may close this issue.

4 participants