NCAR / ccpp-physics

GFS physics for CCPP
Other
56 stars 144 forks source link

lprnt won't stay .true. #1027

Open michalakes opened 11 months ago

michalakes commented 11 months ago

Description

Setting Model%lprnt to .true. in data/GFS_typedefs_module.F90 (around line 4895) gets reset when physics run because certain subroutines in the physics directory turn it off again. The routines in question, both named GFS_time_vary_pre_timestep_init, are defined in GFS_time_vary_pre.fv3.F90 and GFS_time_vary_pre.scm.F90. They define lprnt as intent(out) in their argument lists and then set these to false, overriding whatever value lprnt had when the routine was called.

Steps to Reproduce

Set Model%lprnt to .true. in data/GFS_typedefs_module.F90 (around line 4895) and then do a run expecting to see debug output from routines in physics that have write or print statements inside if (lprnt) blocks. These expectations will soar at first but then be crushed.

Additional Context

Commenting out the lprnt = .false. statements in the two routines rewards expectations.

Output

NA