-
Notifications
You must be signed in to change notification settings - Fork 64
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
Introducing CCPP-internal variables for schemes, fix unit tests #107
Conversation
…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)
…ribute target, add to debug_print
…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
…ccpp-internal-variables-and-fix-tests-20180723
…riable definition file
…build (currently identified by project 'Unknown')
Regression test logs for Intel18 (CCPP-ref) and CCPP build, standard Intel15 tests still running: |
…f manual surface iteration loops
…S_surface_loop_control.F90
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. |
Remaining regression test log for full Intel15 test on Theia attached. Ready to merge. |
There was a problem hiding this 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.
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.