Skip to content

Commit a2a374b

Browse files
committed
add stochy_restart writing to mom_cap
1 parent 0c15f4c commit a2a374b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

config_src/nuopc_driver/mom_cap.F90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module MOM_cap_mod
9191
use NUOPC_Model, only: model_label_SetRunClock => label_SetRunClock
9292
use NUOPC_Model, only: model_label_Finalize => label_Finalize
9393
use NUOPC_Model, only: SetVM
94+
use get_stochy_pattern_mod, only: write_stoch_restart_ocn
9495

9596
implicit none; private
9697

@@ -1584,6 +1585,16 @@ subroutine ModelAdvance(gcomp, rc)
15841585

15851586
! write restart file(s)
15861587
call ocean_model_restart(ocean_state, restartname=restartname)
1588+
1589+
! write stochastic physics restart file if active
1590+
if (ESMF_AlarmIsRinging(stop_alarm, rc=rc)) then
1591+
write(restartname,'(A)')"ocn_stoch.res.nc")
1592+
else
1593+
write(restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,A)') &
1594+
"oc_stoch.res.", year, month, day, hour, minute, seconds,".nc"
1595+
endif
1596+
call ESMF_LogWrite("MOM_cap: Writing restart : "//trim(restartname), ESMF_LOGMSG_INFO)
1597+
call write_stoch_restart_ocn('RESTART/'//trim(timestamp)//'.ocn_stoch.res.nc')
15871598
endif
15881599

15891600
if (is_root_pe()) then

0 commit comments

Comments
 (0)