internal_write_header Subroutine

private subroutine internal_write_header(outdat_unit, commentline)

Writes a header for the output file(s).

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: outdat_unit

Integer with the output file unit. The file must be already open.

character(len=*) :: commentline

no intent? String with the comment taken from the output, to be written on the output


Calls

proc~~internal_write_header~~CallsGraph proc~internal_write_header internal_write_header proc~io_date io_date proc~internal_write_header->proc~io_date

Called by

proc~~internal_write_header~~CalledByGraph proc~internal_write_header internal_write_header proc~geninterp_main geninterp_main proc~geninterp_main->proc~internal_write_header

Contents

Source Code


Source Code

  subroutine internal_write_header(outdat_unit, commentline)
    !! Writes a header for the output file(s).

    integer, intent(in) :: outdat_unit
    !! Integer with the output file unit. The file must be already open.
    character(len=*)    :: commentline !! no intent?
    !! String with the comment taken from the output, to be written on the output

    character(len=9)   :: cdate, ctime

    call io_date(cdate, ctime)
    write (outdat_unit, '(A)') "# Written on "//cdate//" at "//ctime ! Date and time
    ! I rewrite the comment line on the output
    write (outdat_unit, '(A)') "# Input file comment: "//trim(commentline)

    if (geninterp_alsofirstder) then
      write (outdat_unit, '(A)') "#  Kpt_idx  K_x (1/ang)       K_y (1/ang)        K_z (1/ang)       Energy (eV)"// &
        "      EnergyDer_x       EnergyDer_y       EnergyDer_z"
    else
      write (outdat_unit, '(A)') "#  Kpt_idx  K_x (1/ang)       K_y (1/ang)        K_z (1/ang)       Energy (eV)"
    end if
  end subroutine internal_write_header