1 subroutine da_error( file_str, line, errors)
3 !-----------------------------------------------------------------------
4 ! Purpose: Standardised error reporting
5 !-----------------------------------------------------------------------
9 character(len=*), intent(in) :: file_str
10 integer , intent(in) :: line ! only print file and line if line > 0
11 character(len=*), intent(in) :: errors(:)
12 character*256 :: line_str
13 character*256 :: html_file
16 write(line_str,'(i6)') line
18 html_file=file_str(1:LEN_trim(file_str)-4)//'.html'
20 #if defined( DM_PARALLEL ) && ! defined( STUBMPI )
22 '---------------------------- FATAL ERROR -----------------------' )
23 ! only print file and line if line is positive
26 call wrf_message( 'Fatal error in file: <A HREF="'// &
27 trim(documentation_url)//'/'//trim(html_file)//'">'//file_str// &
28 '</a> LINE: '//trim(line_str) )
30 call wrf_message( 'Fatal error in file: '//trim(file_str)// &
31 ' LINE: '//trim(line_str) )
35 call wrf_message(errors(i))
38 '----------------------------------------------------------------' )
41 '---------------------------- FATAL ERROR -----------------------' )
42 ! only print file and line if line is positive
45 call wrf_message( 'Fatal error in file: <A HREF="'// &
46 trim(documentation_url)//'/'//trim(html_file)//'">'// &
47 trim(file_str)//'</a> LINE: '//trim(line_str) )
49 call wrf_message2( 'Fatal error in file: '//trim(file_str)// &
50 ' LINE: '//trim(line_str) )
54 call wrf_message(errors(i))
57 '----------------------------------------------------------------' )
60 end subroutine da_error