Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consistent Restart filenames #625

Merged
merged 6 commits into from
Feb 27, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions module_fcst_grid_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ module module_fcst_grid_comp
use module_cplfields, only: realizeConnectedCplFields

use atmos_model_mod, only: setup_exportdata
use CCPP_data, only: GFS_control
!
!-----------------------------------------------------------------------
!
Expand Down Expand Up @@ -745,19 +744,8 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc)
endif
! if to write out restart at the end of forecast
restart_endfcst = .false.
if ( ANY(frestart(:) == total_inttime) ) restart_endfcst = .true.
junwang-noaa marked this conversation as resolved.
Show resolved Hide resolved
! frestart only contains intermediate restart
do i=1,size(frestart)
if(frestart(i) == total_inttime) then
frestart(i) = 0
exit
endif
enddo
if (mype == 0) print *,'frestart=',frestart(1:10)/3600, 'restart_endfcst=',restart_endfcst, &
'total_inttime=',total_inttime
! if there is restart writing during integration
intrm_rst = 0
DusanJovic-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if (frestart(1)>0) intrm_rst = 1

!------ initialize component models ------

Expand Down Expand Up @@ -1255,9 +1243,8 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

!--- intermediate restart
if (intrm_rst>0) then
call get_time(Atmos%Time - Atmos%Time_init, seconds)
if (ANY(frestart(:) == seconds)) then
call get_time(Atmos%Time - Atmos%Time_init, seconds)
if (ANY(frestart(:) == seconds)) then
if (mype == 0) write(*,*)'write out restart at n_atmsteps=',n_atmsteps,' seconds=',seconds, &
'integration length=',n_atmsteps*dt_atmos/3600.

Expand All @@ -1279,7 +1266,6 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc)
'Current model time: year, month, day, hour, minute, second'
close( unit )
endif
endif
endif

if (mype == 0) write(*,'(A,I16,A,F16.6)')'PASS: fcstRUN phase 2, n_atmsteps = ', &
Expand Down