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 authored and kshedstrom committed Jan 28, 2022
1 parent 5f6973b commit 36ce2d1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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

!$use omp_lib , only : omp_set_num_threads

Expand Down Expand Up @@ -1749,9 +1750,17 @@ subroutine ModelAdvance(gcomp, rc)
call ESMF_LogWrite("MOM_cap: Writing restart : "//trim(restartname), ESMF_LOGMSG_INFO)

! write restart file(s)
call ocean_model_restart(ocean_state, restartname=restartname, &
stoch_restartname=stoch_restartname)
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 36ce2d1

Please sign in to comment.