This subroutine closes the restart dump file and writes the last header.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_restart_type) | :: | me | the restart information |
subroutine tem_restart_closeRead( me )
! -------------------------------------------------------------------- !
!> the restart information
type(tem_restart_type) :: me
! -------------------------------------------------------------------- !
! temporary buffer array for empty reads
real(kind=rk) :: chunk(1)
integer :: iChunk
! -------------------------------------------------------------------- !
! If local process has performed less reads than global maximum required,
! we need to complete as many empty reads as the difference to maxnChunks
! to satisfy collective MPI-IO operations.
me%nChunkElems = 0
do iChunk = me%read_file%nChunks+1, me%read_file%maxnChunks
call tem_restart_readData(restart = me, chunk = chunk)
end do
! Invoke the routine to close current variable system file
call tem_restart_closeRead_single(me)
write(logUnit(1),*)' Closed Read.'
end subroutine tem_restart_closeRead