Skip to content

Commit

Permalink
add stochy_restart writing to mom_cap
Browse files Browse the repository at this point in the history
  • Loading branch information
pjpegion committed Dec 14, 2020
1 parent 0c15f4c commit a2a374b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config_src/nuopc_driver/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ module MOM_cap_mod
use NUOPC_Model, only: model_label_SetRunClock => label_SetRunClock
use NUOPC_Model, only: model_label_Finalize => label_Finalize
use NUOPC_Model, only: SetVM
use get_stochy_pattern_mod, only: write_stoch_restart_ocn

implicit none; private

Expand Down Expand Up @@ -1584,6 +1585,16 @@ subroutine ModelAdvance(gcomp, rc)

! write restart file(s)
call ocean_model_restart(ocean_state, restartname=restartname)

! write stochastic physics restart file if active
if (ESMF_AlarmIsRinging(stop_alarm, rc=rc)) then
write(restartname,'(A)')"ocn_stoch.res.nc")
else
write(restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,A)') &
"oc_stoch.res.", year, month, day, hour, minute, seconds,".nc"
endif
call ESMF_LogWrite("MOM_cap: Writing restart : "//trim(restartname), ESMF_LOGMSG_INFO)
call write_stoch_restart_ocn('RESTART/'//trim(timestamp)//'.ocn_stoch.res.nc')
endif

if (is_root_pe()) then
Expand Down

0 comments on commit a2a374b

Please sign in to comment.