@@ -44,9 +44,7 @@ module GFS_phys_time_vary
4444
4545 private
4646
47- public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_timestep_finalize, GFS_phys_time_vary_finalize
48-
49- logical :: is_initialized = .false.
47+ public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize
5048
5149 real (kind= kind_phys), parameter :: con_hr = 3600.0_kind_phys
5250 real (kind= kind_phys), parameter :: con_99 = 99.0_kind_phys
@@ -95,7 +93,8 @@ subroutine GFS_phys_time_vary_init (
9593 smcwtdxy , deeprechxy , rechxy , snowxy , snicexy , snliqxy , tsnoxy , smoiseq , zsnsoxy , &
9694 slc , smc , stc , tsfcl , snowd , canopy , tg3 , stype , con_t0c , lsm_cold_start , nthrds , &
9795 lkm , use_lake_model , lakefrac , lakedepth , iopt_lake , iopt_lake_clm , iopt_lake_flake , &
98- lakefrac_threshold , lakedepth_threshold , ozphys , h2ophys , errmsg , errflg )
96+ lakefrac_threshold , lakedepth_threshold , ozphys , h2ophys , is_initialized , errmsg , &
97+ errflg )
9998
10099 implicit none
101100
@@ -193,6 +192,7 @@ subroutine GFS_phys_time_vary_init (
193192 real (kind_phys), intent (in ) :: con_t0c
194193
195194 integer , intent (in ) :: nthrds
195+ logical , intent (inout ) :: is_initialized
196196 character (len=* ), intent (out ) :: errmsg
197197 integer , intent (out ) :: errflg
198198
@@ -713,7 +713,8 @@ subroutine GFS_phys_time_vary_timestep_init (
713713 tsfc , tsfco , tisfc , hice , fice , facsf , facwf , alvsf , alvwf , alnsf , alnwf , zorli , zorll , &
714714 zorlo , weasd , slope , snoalb , canopy , vfrac , vtype , stype ,scolor , shdmin , shdmax , snowd , &
715715 cv , cvb , cvt , oro , oro_uf , xlat_d , xlon_d , slmsk , landfrac , ozphys , h2ophys , &
716- do_ugwp_v1 , jindx1_tau , jindx2_tau , ddy_j1tau , ddy_j2tau , tau_amf , errmsg , errflg )
716+ do_ugwp_v1 , jindx1_tau , jindx2_tau , ddy_j1tau , ddy_j2tau , tau_amf , is_initialized , &
717+ errmsg , errflg )
717718
718719 implicit none
719720
@@ -762,6 +763,7 @@ subroutine GFS_phys_time_vary_timestep_init (
762763 real (kind_phys), intent (inout ), optional :: smois(:,:), sh2o(:,:), tslb(:,:), tref(:)
763764 integer , intent (inout ) :: vtype(:), stype(:),scolor(:), slope(:)
764765
766+ logical , intent (in ) :: is_initialized
765767 character (len=* ), intent (out ) :: errmsg
766768 integer , intent (out ) :: errflg
767769
@@ -931,36 +933,17 @@ subroutine GFS_phys_time_vary_timestep_init (
931933 end subroutine GFS_phys_time_vary_timestep_init
932934! > @}
933935
934- ! > \section arg_table_GFS_phys_time_vary_timestep_finalize Argument Table
935- ! ! \htmlinclude GFS_phys_time_vary_timestep_finalize.html
936- ! !
937- ! >\section gen_GFS_phys_time_vary_timestep_finalize GFS_phys_time_vary_timestep_finalize General Algorithm
938- ! > @{
939- subroutine GFS_phys_time_vary_timestep_finalize (errmsg , errflg )
940-
941- implicit none
942-
943- ! Interface variables
944- character (len=* ), intent (out ) :: errmsg
945- integer , intent (out ) :: errflg
946-
947- ! Initialize CCPP error handling variables
948- errmsg = ' '
949- errflg = 0
950-
951- end subroutine GFS_phys_time_vary_timestep_finalize
952- ! > @}
953-
954936! > \section arg_table_GFS_phys_time_vary_finalize Argument Table
955937! ! \htmlinclude GFS_phys_time_vary_finalize.html
956938! !
957- subroutine GFS_phys_time_vary_finalize (errmsg , errflg )
939+ subroutine GFS_phys_time_vary_finalize (is_initialized , errmsg , errflg )
958940
959941 implicit none
960942
961943 ! Interface variables
962- character (len=* ), intent (out ) :: errmsg
963- integer , intent (out ) :: errflg
944+ logical , intent (inout ) :: is_initialized
945+ character (len=* ), intent (out ) :: errmsg
946+ integer , intent (out ) :: errflg
964947
965948 ! Initialize CCPP error handling variables
966949 errmsg = ' '
0 commit comments