Skip to content

Commit af8915b

Browse files
Merge pull request #7 from climbfuji/bugfix_b4b_identical_restarts
Bugfix for bit-for-bit identical restart runs
2 parents 0dcce97 + a15f74b commit af8915b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

atmos_model.F90

+12-10
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,6 @@ subroutine update_atmos_radiation_physics (Atmos)
276276
call atmos_phys_driver_statein (IPD_data, Atm_block, flip_vc)
277277
call mpp_clock_end(getClock)
278278

279-
#ifdef CCPP
280-
if (IPD_Control%first_time_step) then
281-
! Initialize the CCPP framework and physics
282-
call CCPP_step (step="init", nblks=Atm_block%nblks, ierr=ierr)
283-
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP init step failed')
284-
call CCPP_step (step="physics_init", nblks=Atm_block%nblks, ierr=ierr)
285-
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP physics_init step failed')
286-
end if
287-
#endif
288-
289279
!--- if dycore only run, set up the dummy physics output state as the input state
290280
if (dycore_only) then
291281
do nb = 1,Atm_block%nblks
@@ -686,6 +676,18 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
686676
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain)
687677
#endif
688678

679+
#ifdef CCPP
680+
! Populate the IPD_Data%Statein container with the prognostic state
681+
! in Atm_block, which contains the initial conditions/restart data.
682+
call atmos_phys_driver_statein (IPD_data, Atm_block, flip_vc)
683+
! Initialize the CCPP framework
684+
call CCPP_step (step="init", nblks=Atm_block%nblks, ierr=ierr)
685+
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP init step failed')
686+
! Initialize the CCPP physics
687+
call CCPP_step (step="physics_init", nblks=Atm_block%nblks, ierr=ierr)
688+
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP physics_init step failed')
689+
#endif
690+
689691
!--- set the initial diagnostic timestamp
690692
diag_time = Time
691693
if (output_1st_tstep_rst) then

ccpp/physics

0 commit comments

Comments
 (0)