From 364e17794ba11009f87ef986bcd6a4e87c3e0f65 Mon Sep 17 00:00:00 2001 From: John Michalakes Date: Fri, 3 Nov 2023 14:09:54 -0600 Subject: [PATCH 1/2] Update GFS_rrtmg_setup.F90 Move statement testing the is_initialized variable until after control variables in the argument list have been set. This is needed to make sure that the control variables are set for multiple instances of physics. --- physics/GFS_rrtmg_setup.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index 384d5252d..80c033bf1 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -171,8 +171,6 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 - - if (is_initialized) return if (do_RRTMGP) then write(errmsg,'(*(a))') "Logic error: do_RRTMGP must be set to .false." @@ -213,6 +211,8 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & print *, 'lextop=',lextop, ' ltp=',ltp endif + if (is_initialized) return + ! Call initialization routines call sol_init ( me, isol, solar_file, con_solr_2008,con_solr_2002,& con_pi ) From 0140c17d9e6a09561df87173feb329fc3e2b0c91 Mon Sep 17 00:00:00 2001 From: John Michalakes Date: Fri, 3 Nov 2023 15:15:22 -0600 Subject: [PATCH 2/2] Update GFS_rrtmgp_setup.F90 Moved is_initialized test to after the input flags have been set --- physics/GFS_rrtmgp_setup.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 76db14279..3e90cc96b 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -74,8 +74,6 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 - - if (is_initialized) return ! Consistency checks if (.not. do_RRTMGP) then @@ -125,6 +123,8 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, iyear0 = 0 monthd = 0 + if (is_initialized) return + ! Call initialization routines.. call sol_init ( me, isol, solar_file, con_solr_2008, con_solr_2002, con_pi ) call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, con_t0c, &