Skip to content
Merged
Changes from all 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
4 changes: 1 addition & 3 deletions src/framework/MOM_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1136,22 +1136,20 @@ subroutine restore_state(filename, directory, day, G, CS)

! Check the remaining files for different times and issue a warning
! if they differ from the first time.
if (is_root_pe()) then
do m = n+1,num_file
call get_file_times(IO_handles(n), time_vals, ntime)
if (ntime < 1) cycle

t2 = time_vals(1)
deallocate(time_vals)

if (t1 /= t2) then
if (t1 /= t2 .and. is_root_PE()) then
write(mesg,'("WARNING: Restart file ",I2," has time ",F10.4,"whereas &
&simulation is restarted at ",F10.4," (differing by ",F10.4,").")')&
m,t1,t2,t1-t2
call MOM_error(WARNING, "MOM_restart: "//mesg)
endif
enddo
endif

! Read each variable from the first file in which it is found.
do n=1,num_file
Expand Down