11diff --git a/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90 b/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90.new
2- index 3574943..f948684 100644
2+ index fab6fe1..541d7f1 100644
33--- a/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90
44+++ b/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90.new
55@@ -2,8 +2,9 @@
@@ -53,7 +53,7 @@ index 3574943..f948684 100644
5353 end type
5454
5555 !> Wrapper-derived type required to associate an internal state instance
56- @@ -408 ,6 +422 ,10 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
56+ @@ -416 ,6 +430 ,10 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
5757 type (ocean_public_type), pointer :: ocean_public => NULL()
5858 type (ocean_state_type), pointer :: ocean_state => NULL()
5959 type(ice_ocean_boundary_type), pointer :: Ice_ocean_boundary => NULL()
@@ -64,15 +64,15 @@ index 3574943..f948684 100644
6464 type(ocean_internalstate_wrapper) :: ocean_internalstate
6565 type(ocean_grid_type), pointer :: ocean_grid => NULL()
6666 type(directories) :: dirs
67- @@ -439 ,6 +457 ,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
67+ @@ -447 ,6 +465 ,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
6868 character(len=512) :: restartfile ! Path/Name of restart file
6969 character(len=2048) :: restartfiles ! Path/Name of restart files
7070 ! (same as restartfile if single restart file)
7171+ character(240) :: additional_restart_dir
7272 character(len=*), parameter :: subname='(MOM_cap:InitializeAdvertise)'
7373 character(len=32) :: calendar
7474 character(len=:), allocatable :: rpointer_filename
75- @@ -517 ,6 +536 ,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
75+ @@ -525 ,6 +544 ,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
7676 if (chkerr(rc,__LINE__,u_FILE_u)) return
7777 call MOM_infra_init(mpi_comm_mom)
7878
@@ -81,7 +81,7 @@ index 3574943..f948684 100644
8181 ! determine the calendar
8282 if (cesm_coupled) then
8383 call NUOPC_CompAttributeGet(gcomp, name="calendar", value=cvalue, &
84- @@ -648 ,13 +669 ,44 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
84+ @@ -656 ,13 +677 ,44 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
8585
8686 endif
8787
@@ -126,7 +126,7 @@ index 3574943..f948684 100644
126126
127127 ! GMM, this call is not needed in CESM. Check with EMC if it can be deleted.
128128 call ocean_model_flux_init(ocean_state)
129- @@ -721 ,6 +773 ,31 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
129+ @@ -729 ,6 +781 ,31 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
130130 Ice_ocean_boundary%hcond = 0.0
131131 endif
132132
@@ -158,7 +158,7 @@ index 3574943..f948684 100644
158158 call query_ocean_state(ocean_state, use_waves=use_waves, wave_method=wave_method)
159159 if (use_waves) then
160160 if (wave_method == "EFACTOR") then
161- @@ -789 ,6 +866 ,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
161+ @@ -797 ,6 +874 ,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
162162 endif
163163 endif
164164
@@ -174,7 +174,7 @@ index 3574943..f948684 100644
174174 !--------- export fields -------------
175175 call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_omask" , "will provide")
176176 call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_t" , "will provide")
177- @@ -800 ,6 +886 ,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
177+ @@ -808 ,6 +894 ,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
178178 call fld_list_add(fldsFrOcn_num, fldsFrOcn, "Fioo_q" , "will provide")
179179 call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_bldepth" , "will provide")
180180
@@ -183,7 +183,7 @@ index 3574943..f948684 100644
183183 do n = 1,fldsToOcn_num
184184 call NUOPC_Advertise(importState, standardName=fldsToOcn(n)%stdname, name=fldsToOcn(n)%shortname, rc=rc)
185185 if (ChkErr(rc,__LINE__,u_FILE_u)) return
186- @@ -1611 ,11 +1699 ,14 @@ subroutine ModelAdvance(gcomp, rc)
186+ @@ -1619 ,11 +1707 ,14 @@ subroutine ModelAdvance(gcomp, rc)
187187 type (ocean_public_type), pointer :: ocean_public => NULL()
188188 type (ocean_state_type), pointer :: ocean_state => NULL()
189189 type(ice_ocean_boundary_type), pointer :: Ice_ocean_boundary => NULL()
@@ -198,7 +198,7 @@ index 3574943..f948684 100644
198198 integer :: dth, dtm, dts
199199 integer :: nc
200200 type(ESMF_Time) :: MyTime
201- @@ -1627 ,12 +1718 ,13 @@ subroutine ModelAdvance(gcomp, rc)
201+ @@ -1635 ,12 +1726 ,13 @@ subroutine ModelAdvance(gcomp, rc)
202202 integer :: writeunit
203203 integer :: localPet
204204 type(ESMF_VM) :: vm
@@ -213,15 +213,15 @@ index 3574943..f948684 100644
213213 integer :: num_rest_files
214214 real(8) :: MPI_Wtime, timers
215215 logical :: write_restart
216- @@ -1673 ,6 +1765 ,7 @@ subroutine ModelAdvance(gcomp, rc)
216+ @@ -1683 ,6 +1775 ,7 @@ subroutine ModelAdvance(gcomp, rc)
217217
218218 Time_step_coupled = esmf2fms_time(timeStep)
219219 Time = esmf2fms_time(currTime)
220220+ Time_import = Time
221221
222222 !---------------
223223 ! Apply ocean lag for startup runs:
224- @@ -1748 ,8 +1841 ,39 @@ subroutine ModelAdvance(gcomp, rc)
224+ @@ -1758 ,8 +1851 ,39 @@ subroutine ModelAdvance(gcomp, rc)
225225 ! Import data
226226 !---------------
227227
@@ -261,7 +261,7 @@ index 3574943..f948684 100644
261261
262262 !---------------
263263 ! Update MOM6
264- @@ -1811 ,7 +1935 ,7 @@ subroutine ModelAdvance(gcomp, rc)
264+ @@ -1831 ,7 +1955 ,7 @@ subroutine ModelAdvance(gcomp, rc)
265265 ! determine restart filename
266266 call ESMF_ClockGetNextTime(clock, MyTime, rc=rc)
267267 if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -270,7 +270,7 @@ index 3574943..f948684 100644
270270 if (ChkErr(rc,__LINE__,u_FILE_u)) return
271271
272272 if (cesm_coupled) then
273- @@ -1869 ,6 +1993 ,14 @@ subroutine ModelAdvance(gcomp, rc)
273+ @@ -1889 ,6 +2013 ,14 @@ subroutine ModelAdvance(gcomp, rc)
274274
275275 endif
276276
@@ -285,15 +285,15 @@ index 3574943..f948684 100644
285285 if (is_root_pe()) then
286286 write(stdout,*) subname//' writing restart file ',trim(restartname)
287287 endif
288- @@ -2149 ,6 +2281 ,7 @@ subroutine ocean_model_finalize(gcomp, rc)
288+ @@ -2169 ,6 +2301 ,7 @@ subroutine ocean_model_finalize(gcomp, rc)
289289 integer :: alarmCount
290290 character(len=64) :: timestamp
291291 logical :: write_restart
292292+ character(240) :: additional_restart_dir
293293 character(len=*),parameter :: subname='(MOM_cap:ocean_model_finalize)'
294294 real(8) :: MPI_Wtime, timefs
295295
296- @@ -2182 ,6 +2315 ,18 @@ subroutine ocean_model_finalize(gcomp, rc)
296+ @@ -2202 ,6 +2335 ,18 @@ subroutine ocean_model_finalize(gcomp, rc)
297297
298298 call ocean_model_end(ocean_public, ocean_State, Time, write_restart=write_restart)
299299
0 commit comments