NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Rename --debug flag to --verbose, add new debugging capability to detect array size mismatches, pretty-print auto-generated caps #404

Closed climbfuji closed 2 years ago

climbfuji commented 2 years ago

Description

This PR renames the existing --debug flag for ccpp_prebuild.py to --verbose, because this is what it does (enable verbose output from the script).

It then repurposes the --debug flag to assist debugging efforts with array size comparisons in the auto-generated caps. These comparisons are based on the actual size of the arrays versus the dimensions specified in the CCPP metadata. The comparisons are skipped for arrays whose active attribute evaluates to .false., and altogether if the command line argument --debug is not specified.

Also: Updates to formatting of auto-generated caps (no code changes) so that they look "nicer".

Fixes https://github.com/NCAR/ccpp-framework/issues/405

Associated PRs:

https://github.com/NCAR/ccpp-physics/pull/749 https://github.com/NCAR/ccpp-framework/pull/404 https://github.com/NOAA-EMC/fv3atm/pull/407/files https://github.com/noaa-psd/stochastic_physics/pull/48 https://github.com/ufs-community/ufs-weather-model/pull/850

For regression testing, see

https://github.com/ufs-community/ufs-weather-model/pull/850