Subroutine to print warning header
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iounit | I/O unit to write warning to |
||
character(len=*), | intent(in) | :: | source_file | Source file where the warning was issued |
||
integer, | intent(in) | :: | line_num | Line number at which the warning was issued |
subroutine print_warning(iounit, source_file, line_num)
!> I/O unit to write warning to
integer, intent(in) :: iounit
!> Source file where the warning was issued
character(len=*), intent(in) :: source_file
!> Line number at which the warning was issued
integer, intent(in) :: line_num
integer :: ios
write(unit=iounit, fmt=*) "--------------------------------------------------------------"
write(unit=iounit, fmt=*, iostat=ios) "MiMiC Warning in: ", &
source_file, " line: ", line_num
write(unit=iounit, fmt=*) "--------------------------------------------------------------"
end subroutine print_warning