<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_ERROR'><A href='../../html_code/reporting/da_error.inc.html#DA_ERROR' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_error( file_str, line, errors) 582,1

   !-----------------------------------------------------------------------
   ! Purpose: Standardised error reporting
   !-----------------------------------------------------------------------

   implicit none

   character(len=*), intent(in) :: file_str
   integer ,         intent(in) :: line  ! only print file and line if line &gt; 0
   character(len=*), intent(in) :: errors(:)
   character*256 :: line_str
   character*256 :: html_file
   integer       :: i

   write(line_str,'(i6)') line

   html_file=file_str(1:LEN_trim(file_str)-4)//'.html'
   
#if defined( DM_PARALLEL ) &amp;&amp; ! defined( STUBMPI )
   call wrf_message( &amp;
      '---------------------------- FATAL ERROR -----------------------' )
   ! only print file and line if line is positive
   if (line &gt; 0) then
      if (use_html) then
         call wrf_message( 'Fatal error in file: &lt;A HREF="'// &amp;
            trim(documentation_url)//'/'//trim(html_file)//'"&gt;'//file_str// &amp;
            '&lt;/a&gt;  LINE:  '//trim(line_str) )
      else
         call wrf_message( 'Fatal error in file:  '//trim(file_str)// &amp;
            '  LINE:  '//trim(line_str) )
      end if
   end if
   do i=1,size(errors)
      call wrf_message(errors(i))
   end do
   call wrf_message( &amp;
      '----------------------------------------------------------------' )
#else
   call wrf_message2( &amp;
      '---------------------------- FATAL ERROR -----------------------' )
   ! only print file and line if line is positive
   if ( line &gt; 0 ) then
      if (use_html) then
         call wrf_message( 'Fatal error in file: &lt;A HREF="'// &amp;
            trim(documentation_url)//'/'//trim(html_file)//'"&gt;'// &amp;
            trim(file_str)//'&lt;/a&gt;  LINE:  '//trim(line_str) )
      else
         call wrf_message2( 'Fatal error in file:  '//trim(file_str)// &amp;
            '  LINE:  '//trim(line_str) )
      end if
   end if
   do i=1,size(errors)
      call wrf_message(errors(i))
   end do
   call wrf_message2( &amp;
      '----------------------------------------------------------------' )
#endif
   call wrf_abort
end subroutine da_error