set_restart_file Subroutine

public subroutine set_restart_file(file)

Sets the base of the restart file to be used when writing/reading files.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: file

Contents

Source Code


Source Code

  subroutine set_restart_file (file)
    use constants, only: run_name_size
    use mp, only: proc0
    use file_utils, only: error_unit
    implicit none
    character(len=*), intent (in) :: file
    if (proc0 .and. len_trim(file) > run_name_size) then
       write( error_unit(), '("Argument to set_restart_file exceeds restart_file size so truncating")')
    end if
    restart_file = file(1:min(len_trim(file), run_name_size))
  end subroutine set_restart_file