From 4dcfc8d7af9a4d1cfa6742286268991ca3282f03 Mon Sep 17 00:00:00 2001 From: bzhao Date: Fri, 13 Oct 2023 19:55:41 -0400 Subject: [PATCH 1/2] add passing optional time stamp to ice_checkpoint --- cicecore/drivers/mapl/geos/CICE_FinalMod.F90 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 b/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 index f28dca6cf..fe18b1689 100644 --- a/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 +++ b/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 @@ -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 @@ -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 @@ -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 From 71e0f344322bc4ca83e4101cddeecb21838c1dbd Mon Sep 17 00:00:00 2001 From: bzhao Date: Mon, 16 Oct 2023 14:13:18 -0400 Subject: [PATCH 2/2] make ice_checkpoint accessible by the plug --- cicecore/drivers/mapl/geos/CICE_FinalMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 b/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 index fe18b1689..5ed6d6397 100644 --- a/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 +++ b/cicecore/drivers/mapl/geos/CICE_FinalMod.F90 @@ -20,7 +20,7 @@ module CICE_FinalMod implicit none private - public :: CICE_Finalize + public :: CICE_Finalize, ice_checkpoint !=======================================================================