Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions cicecore/drivers/mapl/geos/CICE_FinalMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module CICE_FinalMod

implicit none
private
public :: CICE_Finalize
public :: CICE_Finalize, ice_checkpoint

!=======================================================================

Expand Down Expand Up @@ -62,7 +62,7 @@ end subroutine CICE_Finalize
!=======================================================================

!=======================================================================
subroutine ice_checkpoint
subroutine ice_checkpoint(time_stamp)

use ice_boundary, only: ice_HaloUpdate
use ice_calendar, only: dt, dt_dyn, ndtd, diagfreq, write_restart, istep
Expand All @@ -84,6 +84,10 @@ subroutine ice_checkpoint
timer_readwrite
use ice_communicate, only: MPI_COMM_ICE


character(len=*), intent(in), optional :: &
time_stamp

integer (kind=int_kind) :: &
iblk , & ! block index
k , & ! dynamics supercycling index
Expand Down Expand Up @@ -114,7 +118,11 @@ subroutine ice_checkpoint

call ice_timer_start(timer_readwrite) ! reading/writing

filename = trim(restart_dir) // trim(restart_file)
if(present(time_stamp)) then
filename = trim(restart_dir) // trim(restart_file) // '.' // trim(time_stamp)
else
filename = trim(restart_dir) // trim(restart_file)
endif

call dumpfile(filename_spec=trim(filename)) ! core variables for restarting
if (tr_iage) call write_restart_age
Expand Down