Skip to content

Commit

Permalink
Merge pull request #1462 from nikizadehgfdl/bugfix_ifRootPe
Browse files Browse the repository at this point in the history
Bug fix for FMS2 issue #761, broadcast from root pe
  • Loading branch information
marshallward committed Aug 11, 2021
2 parents 77175fe + 3223bba commit e88cdaa
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit e88cdaa

Please sign in to comment.