Skip to content

Commit

Permalink
restart_fh using shr_is_restart_fh_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSzapiro-NOAA committed Oct 16, 2024
1 parent 5e57a89 commit 0a76110
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ module ice_comp_nuopc
use ice_mesh_mod , only : ice_mesh_init_tlon_tlat_area_hm, ice_mesh_create_scolumn
use ice_prescribed_mod , only : ice_prescribed_init
use ice_scam , only : scol_valid, single_column
#ifndef CESMCOUPLED
use shr_is_restart_fh_mod, only : init_is_restart_fh, is_restart_fh, write_restartfh
#endif

implicit none
private
Expand Down Expand Up @@ -1175,6 +1178,11 @@ subroutine ModelAdvance(gcomp, rc)
endif
endif

#ifndef CESMCOUPLED
write_restartfh = is_restart_fh(clock)
if (write_restartfh) force_restart_now = .true.
#endif

!--------------------------------
! Unpack import state
!--------------------------------
Expand Down Expand Up @@ -1289,6 +1297,7 @@ subroutine ModelSetRunClock(gcomp, rc)
character(len=256) :: stop_option ! Stop option units
integer :: stop_n ! Number until stop interval
integer :: stop_ymd ! Stop date (YYYYMMDD)
integer :: dtime
type(ESMF_ALARM) :: stop_alarm
character(len=128) :: name
integer :: alarmcount
Expand Down Expand Up @@ -1379,6 +1388,12 @@ subroutine ModelSetRunClock(gcomp, rc)

end if

#ifndef CESMCOUPLED
call ESMF_TimeIntervalGet( dtimestep, s=dtime, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call init_is_restart_fh(mcurrTime, dtime, my_task == master_task)
#endif

!--------------------------------
! Advance model clock to trigger alarms then reset model clock back to currtime
!--------------------------------
Expand Down

0 comments on commit 0a76110

Please sign in to comment.