FAQ: How to debug in CCPP?

Submitted by dom.heinzeller on Thu, 09/17/2020 - 10:27

How to debug in CCPP?

CCPP is equipped with tools to facilitate debugging.

First, depending on the host model, an option to compile the model with debugging flags may be available. For the UFS, this is possible by adding DEBUG=Y to the compile options for compile.sh/compile_cmake.sh. For the SCM, set -DCMAKE_BUILD_TYPE=Debug during the cmake step.

Second, CCPP comes with several debugging schemes that can be inserted in one or more places in the suite definition file. These debugging schemes are specific to models using the GFS derived data types and can be found in ccpp-physics’ physics/GFS_debug.F90. Each module corresponds to a scheme that can be used and customized, and users are encouraged to inspect the Fortran code in these modules. For the UFS and SCM host models, the debugging schemes can be added in the radiation, physics and stochastic_physics groups, but not in the fast_physic and time_vary groups. When calls to the debugging schemes are added, removed or moved, the code needs to be recompiled.

For further information, see section 11 of the CCPP technical documentation: https://ccpp-techdoc.readthedocs.io/en/latest/