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

Introducing CCPP-internal variables for schemes, fix unit tests #107

Merged

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jul 23, 2018

This PR introduces three related changes:

(1) CCPP-internal variables for use in physics_schemes. These variables are members of the CCPP data structure (type ccpp_t). The corresponding metadata tables is also defined in ccpp_types.F90. The CCPP prebuild script is extended to always parse this file. The CCPP-internal variables have standard names starting with ccpp_ to distinguish them from normal variables. They are not provided by the host model and are created for every scalar instance of ccpp_t. The calls to populate the CCPP data structure with these fields (ccpp_field_add calls) are added manually in ccpp_fields.F90 -> ccpp_fields_init. This is reasonable to do, because we want to keep the number of these variables small to avoid any significant memory overhead introduced by CCPP. Currently there are three such variables: ccpp_error_message, ccpp_error_flag and ccpp_loop_cnt.

(2) The PR also fixes the Travis continuous integration errors by updating the unit tests and the build system. The testing framework is only built when ccpp-framework is compiled standalone, i.e. not from a host model's build system.

(3) GFS_surface_loop_control uses the newly introduced capability to retrieve the loop iteration counter from CCPP via the internal variable ccpp_loop_counter (currently SCM only).

Because of the changes of the standard names error_message -> ccpp_error_message and error_flag -> ccpp_error_flag, changes are required in ccpp-physics (NCAR/ccpp-physics#129), FV3 (https://github.com/NCAR/FV3/pull/40) and SCM (NCAR/ccpp-scm#62).

The changes do not modify the results for NEMSfv3gfs, tested on MacOSX+GNU and Theia+Intel, and also not for SCM, tested on MacOSX+GNU.

climbfuji added 14 commits July 23, 2018 13:58
…ssing init and finalize routines, add metadata table for cap-generation
…ile containing metadata for CCPP-internal variables needed to run schemes
…ariables with ccpp_, enable parsing of metadata tables within the main program (not just within a module or typedef)
…es (type ccpp_t) when running subcycles, remove non-functional option to specify which subcycle to run (subcycles are not unique, and the functionality is not needed)
… schemes to every instance of the CCPP data structure after initializing the fields
…e ccpp_subcycle_t%loop to ccpp_subcycle_t%loops_max, add CCPP-internal variables and their metadata to ccpp_t type
…st library libcheck and flag XML_3 test as WILL_FAIL because of errors in the SDF
@climbfuji climbfuji changed the title Introducing CCPP-internal variables for schemes, fix unit tests Introducing CCPP-internal variables for schemes, fix unit tests (PLACEHOLDER) Jul 23, 2018
@climbfuji
Copy link
Collaborator Author

Regression test logs for Intel18 (CCPP-ref) and CCPP build, standard Intel15 tests still running:

rt_ccpp_ref.log
rt_ccpp.log

@climbfuji climbfuji changed the title Introducing CCPP-internal variables for schemes, fix unit tests (PLACEHOLDER) Introducing CCPP-internal variables for schemes, fix unit tests Jul 23, 2018
@climbfuji
Copy link
Collaborator Author

This PR and the associated PRs are ready for review and merging. The output of the full regression test logs will be uploaded as soon as they are finished, right now 12/24 tests passed successfully.

@climbfuji climbfuji mentioned this pull request Jul 23, 2018
@climbfuji
Copy link
Collaborator Author

Remaining regression test log for full Intel15 test on Theia attached. Ready to merge.

rt_full.log

Copy link
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner SDFs now, thanks. Also, good job on fixing the travis stuff. Tim Brown tried to explain this stuff to me before he left, but it didn't sink in. I'll need to read up a bit on this and try to understand it in the future.

@climbfuji climbfuji merged commit 9f6e3e6 into NCAR:master Jul 24, 2018
@climbfuji climbfuji deleted the ccpp-internal-variables-and-fix-tests-20180723 branch July 24, 2018 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants