Writes a header for the output file(s).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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