Index: palm/trunk/SOURCE/message.f90
===================================================================
--- palm/trunk/SOURCE/message.f90	(revision 4580)
+++ palm/trunk/SOURCE/message.f90	(revision 4677)
@@ -1,20 +1,19 @@
 !> @file message.f90
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! This file is part of the PALM model system.
 !
-! PALM is free software: you can redistribute it and/or modify it under the
-! terms of the GNU General Public License as published by the Free Software
-! Foundation, either version 3 of the License, or (at your option) any later
-! version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with
-! PALM. If not, see <http://www.gnu.org/licenses/>.
+! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
+! Public License as published by the Free Software Foundation, either version 3 of the License, or
+! (at your option) any later version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+! Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with PALM. If not, see
+! <http://www.gnu.org/licenses/>.
 !
 ! Copyright 1997-2020 Leibniz Universitaet Hannover
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Current revisions:
@@ -25,6 +24,9 @@
 ! -----------------
 ! $Id$
+! file re-formatted to follow the PALM coding standard
+!
+! 4580 2020-06-29 07:54:21Z raasch
 ! bugfix for aborts in case of nested runs
-! 
+!
 ! 4578 2020-06-25 15:43:32Z gronemeier
 ! bugfix : do not save input values from last call of routines debug_message and location_message
@@ -45,6 +47,6 @@
 !
 ! 3885 2019-04-11 11:29:34Z kanani
-! Changes related to global restructuring of location messages and introduction
-! of additional debug messages
+! Changes related to global restructuring of location messages and introduction of additional debug
+! messages
 !
 ! 3655 2019-01-07 16:51:22Z knoop
@@ -64,9 +66,9 @@
 !> file_id: 6 - stdout (*)
 !> flush_file: 0 - no action, 1 - flush the respective output buffer
-!------------------------------------------------------------------------------!
- SUBROUTINE message( routine_name, message_identifier, requested_action, &
-                     message_level, output_on_pe, file_id, flush_file )
-
-    USE control_parameters,                                                    &
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE message( routine_name, message_identifier, requested_action, message_level,            &
+                     output_on_pe, file_id, flush_file )
+
+    USE control_parameters,                                                                        &
         ONLY:  abort_mode, message_string
 
@@ -75,5 +77,5 @@
     USE pegrid
 
-    USE pmc_interface,                                                         &
+    USE pmc_interface,                                                                             &
         ONLY:  cpl_id, nested_run
 
@@ -112,6 +114,5 @@
 !-- Create the complete output string, starting with the message level
     IF ( message_level == 0 )  THEN
-       header_string = '--- informative message' // TRIM(nest_string) //       &
-                       ' ---'
+       header_string = '--- informative message' // TRIM(nest_string) // ' ---'
     ELSEIF ( message_level == 1 )  THEN
        header_string = '+++ warning message' // TRIM(nest_string) // ' ---'
@@ -119,27 +120,25 @@
        header_string = '+++ error message' // TRIM(nest_string) // ' ---'
     ELSE
-       WRITE( header_string,'(A,I2)' )  '+++ unknown message level' //         &
-                                        TRIM(nest_string) // ': ',             &
-                                        message_level
+       WRITE( header_string,'(A,I2)' )  '+++ unknown message level' //                             &
+                                        TRIM(nest_string) // ': ', message_level
     ENDIF
 
 !
 !-- Add the message identifier and the generating routine
-    header_string_2 = 'ID: ' // message_identifier // &
+    header_string_2 = 'ID: ' // message_identifier //                                              &
                       '  generated by routine: ' // TRIM( routine_name )
 
     information_string_1 = 'Further information can be found at'
-    IF(message_identifier(1:2) == 'NC') THEN
-       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc' // &
-                              '/app/errmsg#NC'
+    IF ( message_identifier(1:2) == 'NC' )  THEN
+       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc/app/errmsg#NC'
     ELSE
-       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc' // &
-                              '/app/errmsg#' // message_identifier
-    ENDIF
-
-
-!
-!-- Output the output string and the corresponding message string which had
-!-- been already assigned in the calling subroutine.
+       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc/app/errmsg#' //       &
+                              message_identifier
+    ENDIF
+
+
+!
+!-- Output the output string and the corresponding message string which had been already assigned in
+!-- the calling subroutine.
 !
 !-- First find out if output shall be done on this PE.
@@ -210,8 +209,6 @@
        IF ( pe_out_of_range )  THEN
           WRITE ( *, '(A)' )  '+++ WARNING from routine message:'
-          WRITE ( *, '(A,I6,A)' )  '    PE ', output_on_pe, &
-                                   ' choosed for output is larger '
-          WRITE ( *, '(A,I6)' )  '    than the maximum number of used PEs', &
-                                 numprocs-1
+          WRITE ( *, '(A,I6,A)' )  '    PE ', output_on_pe, ' choosed for output is larger '
+          WRITE ( *, '(A,I6)' )  '    than the maximum number of used PEs', numprocs-1
           WRITE ( *, '(A)' )  '    Output is done on PE0 instead'
        ENDIF
@@ -224,6 +221,6 @@
        abort_mode = requested_action
 !
-!--    Since nested runs always use MPI_ABORT, let only the PE which output a message initiate
-!--    the abort. Others just wait.
+!--    Since nested runs always use MPI_ABORT, let only the PE which output a message initiate the
+!--    abort. Others just wait.
        IF ( nested_run  .AND.  requested_action == 1  .AND.  .NOT. do_output )  THEN
 #if defined( __parallel )
@@ -342,12 +339,12 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Abort routine for failures durin reading of namelists
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE parin_fail_message( location, line )
 
-    USE control_parameters,                                                    &
+    USE control_parameters,                                                                        &
         ONLY:  message_string
 
@@ -372,8 +369,6 @@
     ENDDO
 
- 20 WRITE( message_string, '(A,I3,A)' )                                        &
-                   'Error(s) in NAMELIST '// TRIM(location) //                 &
-                   '&Reading fails on line ', line_counter,                    &
-                   ' at&' // line
+ 20 WRITE( message_string, '(A,I3,A)' ) 'Error(s) in NAMELIST '// TRIM(location) //                &
+                                        '&Reading fails on line ', line_counter, ' at&' // line
     CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0 )
 
