ufs-community / ccpp-physics

UFS fork for CCPP
Other
4 stars 33 forks source link

Enforce CCPP requirements for using 'implicit none' #206

Open climbfuji opened 4 months ago

climbfuji commented 4 months ago

Description

The CCPP requirements state that every scheme must use implicit none. This is not followed through consistently, for example subroutine neg_check in GF deep convection doesn't declare its loop variables i and k:

https://github.com/ufs-community/ccpp-physics/blob/1c2a898e97f069eeeb930cfb542db67ed349b72c/physics/CONV/Grell_Freitas/cu_gf_deep.F90#L3938

Solution

2 steps:

  1. Change the build system such that it adds compiler flags that enforece implicit none, whether it is set in the code or not.
  2. Identify all schemes that do not have implicit none and set it on the module level (if modules are used - better be); remove at the individual subroutine level. If no modules are used (bad), set at the subroutine level. Or fix to use modules!

Alternatives (optional)

Keep violating CCPP requirements

Related to (optional)

n/a