init_exit_reason_unit Subroutine

private subroutine init_exit_reason_unit(open_it)

Open exit_reason file and record associated lun/unit

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: open_it

If true, open the file, otherwise do nothing


Contents

Source Code


Source Code

  subroutine init_exit_reason_unit (open_it)
    implicit none
    !> If true, open the file, otherwise do nothing
    logical, intent (in) :: open_it
    exit_reason_unit_no = 0
    if (run_name /= "unknown" .and. open_it) then
       call open_output_file (exit_reason_unit_no, ".exit_reason")
       ! TT: exit_reason_unit_no is overwritten for .exit_reason file
    end if
  end subroutine init_exit_reason_unit