Index: palm/trunk/SOURCE/check_open.f90
===================================================================
--- palm/trunk/SOURCE/check_open.f90	(revision 1310)
+++ palm/trunk/SOURCE/check_open.f90	(revision 1320)
@@ -20,5 +20,11 @@
 ! Current revisions:
 ! -----------------
-! 
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
 !
 ! Former revisions:
@@ -52,53 +58,4 @@
 ! 807 2012-01-25 11:53:51Z maronga
 ! New cpp directive "__check" implemented which is used by check_namelist_files
-!
-! Bugfix concerning opening of 3D files in restart runs in case of netCDF4
-!
-! 667 2010-12-23 12:06:00Z suehring/gryschka
-! Output of total array size was adapted to nbgp.
-!
-! 600 2010-11-24 16:10:51Z raasch
-! bugfix in opening of cross section netcdf-files (parallel opening with
-! netcdf4 only works for netcdf_data_format > 2)
-!
-! 564 2010-09-30 13:18:59Z helmke
-! start number of mask output files changed to 201, netcdf message identifiers
-! of masked output changed
-!
-! 519 2010-03-19 05:30:02Z raasch
-! netCDF4 support for particle data
-!
-! 493 2010-03-01 08:30:24Z raasch
-! netCDF4 support (parallel output)
-!
-! 410 2009-12-04 17:05:40Z letzel
-! masked data output
-!
-! 277 2009-03-31 09:13:47Z heinze
-! Output of netCDF messages with aid of message handling routine.
-! Output of messages replaced by message handling routine
-!
-! 146 2008-01-17 13:08:34Z raasch
-! First opening of unit 13 openes file _0000 on all PEs (parallel version)
-! because only this file contains the global variables,
-! myid_char_14 removed
-!
-! 120 2007-10-17 11:54:43Z raasch
-! Status of 3D-volume netCDF data file only depends on switch netcdf_64bit_3d
-!
-! 105 2007-08-08 07:12:55Z raasch
-! Different filenames are used in case of a coupled simulation,
-! coupling_char added to all relevant filenames
-!
-! 82 2007-04-16 15:40:52Z raasch
-! Call of local_getenv removed, preprocessor directives for old systems removed
-!
-! 46 2007-03-05 06:00:47Z raasch
-! +netcdf_64bit_3d to switch on 64bit offset only for 3D files
-!
-! RCS Log replace by Id keyword, revision history cleaned up
-!
-! Revision 1.44  2006/08/22 13:48:34  raasch
-! xz and yz cross sections now up to nzt+1
 !
 ! Revision 1.1  1997/08/11 06:10:55  raasch
@@ -112,45 +69,97 @@
 !------------------------------------------------------------------------------!
 
-    USE arrays_3d
-    USE control_parameters
-    USE grid_variables
-    USE indices
+    USE arrays_3d,                                                             &
+        ONLY:  zu
+
+    USE control_parameters,                                                    &
+        ONLY:  avs_data_file, avs_output, coupling_char,                       &
+               data_output_2d_on_each_pe, do3d_compress, host, iso2d_output,   &
+               message_string, mid, netcdf_data_format, nz_do3d, openfile,     &
+               return_addres, return_username, run_description_header, runnr
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxlg, nxrg, ny, nyng, nysg, nz, nzb 
+
+    USE kinds
+
     USE netcdf_control
-    USE particle_attributes
+
+    USE particle_attributes,                                                   &
+        ONLY:  max_number_of_particle_groups, number_of_particle_groups,       &
+               particle_groups
+
     USE pegrid
-    USE precision_kind
-    USE profil_parameter
-    USE statistics
+
+    USE profil_parameter,                                                      &
+        ONLY:  cross_ts_numbers, cross_ts_number_count
+
+    USE statistics,                                                            &
+        ONLY:  region, statistic_regions
+
 
     IMPLICIT NONE
 
-    CHARACTER (LEN=2)   ::  mask_char, suffix
-    CHARACTER (LEN=20)  ::  xtext = 'time in s'
-    CHARACTER (LEN=30)  ::  filename
-    CHARACTER (LEN=40)  ::  avs_coor_file, avs_coor_file_localname, &
-                            avs_data_file_localname
-    CHARACTER (LEN=80)  ::  rtext
-    CHARACTER (LEN=100) ::  avs_coor_file_catalog, avs_data_file_catalog, &
-                            batch_scp, zeile
-    CHARACTER (LEN=400) ::  command
-
-    INTEGER ::  av, anzzeile = 1, cranz, file_id, i, iaddres, iusern, &
-                j, k, legpos = 1, timodex = 1
-    INTEGER, DIMENSION(10) ::  klist
-
-    LOGICAL ::  avs_coor_file_found = .FALSE., avs_data_file_found = .FALSE., &
-                datleg = .TRUE., get_filenames, grid = .TRUE., netcdf_extend, &
-                rand = .TRUE., swap = .TRUE., twoxa = .TRUE., twoya = .TRUE.
-
-    REAL ::  ansx = -999.999, ansy = -999.999, gwid = 0.1, rlegfak = 1.5, &
-             sizex = 250.0, sizey = 40.0, texfac = 1.5
-
-    REAL, DIMENSION(:), ALLOCATABLE      ::  eta, ho, hu
-    REAL(spk), DIMENSION(:), ALLOCATABLE ::  xkoor, ykoor, zkoor  
-
-
-    NAMELIST /RAHMEN/  anzzeile, cranz, datleg, rtext, swap
-    NAMELIST /CROSS/   ansx, ansy, grid, gwid, klist, legpos, &
-                       rand, rlegfak, sizex, sizey, texfac, &
+    CHARACTER (LEN=2)   ::  mask_char               !:
+    CHARACTER (LEN=2)   ::  suffix                  !:
+    CHARACTER (LEN=20)  ::  xtext = 'time in s'     !:
+    CHARACTER (LEN=30)  ::  filename                !:
+    CHARACTER (LEN=40)  ::  avs_coor_file           !:
+    CHARACTER (LEN=40)  ::  avs_coor_file_localname !:
+    CHARACTER (LEN=40)  ::  avs_data_file_localname !:
+    CHARACTER (LEN=80)  ::  rtext                   !:
+    CHARACTER (LEN=100) ::  avs_coor_file_catalog   !:
+    CHARACTER (LEN=100) ::  avs_data_file_catalog   !:
+    CHARACTER (LEN=100) ::  batch_scp               !:
+    CHARACTER (LEN=100) ::  line                    !:
+    CHARACTER (LEN=400) ::  command                 !:
+
+    INTEGER(iwp) ::  av          !:
+    INTEGER(iwp) ::  numline = 1 !:
+    INTEGER(iwp) ::  cranz       !:
+    INTEGER(iwp) ::  file_id     !:
+    INTEGER(iwp) ::  i           !:
+    INTEGER(iwp) ::  iaddres     !:
+    INTEGER(iwp) ::  iusern      !:
+    INTEGER(iwp) ::  j           !:
+    INTEGER(iwp) ::  k           !:
+    INTEGER(iwp) ::  legpos = 1  !:
+    INTEGER(iwp) ::  timodex = 1 !:
+    
+    INTEGER(iwp), DIMENSION(10) ::  klist !:
+
+    LOGICAL ::  avs_coor_file_found = .FALSE. !:
+    LOGICAL ::  avs_data_file_found = .FALSE. !:
+    LOGICAL ::  datleg = .TRUE.               !:
+    LOGICAL ::  get_filenames                 !:
+    LOGICAL ::  grid = .TRUE.                 !:
+    LOGICAL ::  netcdf_extend                 !:
+    LOGICAL ::  rand = .TRUE.                 !:
+    LOGICAL ::  swap = .TRUE.                 !:
+    LOGICAL ::  twoxa = .TRUE.                !:
+    LOGICAL ::  twoya = .TRUE.                !:
+
+    REAL(wp) ::  ansx = -999.999 !:
+    REAL(wp) ::  ansy = -999.999 !:
+    REAL(wp) ::  gwid = 0.1      !:
+    REAL(wp) ::  rlegfak = 1.5   !:
+    REAL(wp) ::  sizex = 250.0   !:
+    REAL(wp) ::  sizey = 40.0    !:
+    REAL(wp) ::  texfac = 1.5    !:
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE      ::  eta !:
+    REAL(wp), DIMENSION(:), ALLOCATABLE      ::  ho  !:
+    REAL(wp), DIMENSION(:), ALLOCATABLE      ::  hu  !:
+    
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  xkoor !:
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  ykoor !:
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  zkoor !:  
+
+
+    NAMELIST /RAHMEN/  numline, cranz, datleg, rtext, swap
+    NAMELIST /CROSS/   ansx, ansy, grid, gwid, klist, legpos,                  &
+                       rand, rlegfak, sizex, sizey, texfac,                    &
                        timodex, twoxa, twoya, xtext
                        
@@ -169,5 +178,5 @@
           CASE ( 13, 14, 21, 22, 23, 80:85 )
              IF ( file_id == 14 .AND. openfile(file_id)%opened_before )  THEN
-                message_string = 're-open of unit ' // &
+                message_string = 're-open of unit ' //                         &
                                  '14 is not verified. Please check results!'
                 CALL message( 'check_open', 'PA0165', 0, 1, 0, 6, 0 )       
@@ -175,5 +184,5 @@
 
           CASE DEFAULT
-             WRITE( message_string, * ) 're-opening of file-id ', file_id, &
+             WRITE( message_string, * ) 're-opening of file-id ', file_id,     &
                                         ' is not allowed'
              CALL message( 'check_open', 'PA0166', 0, 1, 0, 6, 0 )    
@@ -192,5 +201,5 @@
 	      
           IF ( myid /= 0 )  THEN
-             WRITE( message_string, * ) 'opening file-id ',file_id, &
+             WRITE( message_string, * ) 'opening file-id ',file_id,            &
                                         ' not allowed for PE ',myid
              CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
@@ -202,5 +211,5 @@
           
              IF ( myid /= 0 )  THEN
-                WRITE( message_string, * ) 'opening file-id ',file_id, &
+                WRITE( message_string, * ) 'opening file-id ',file_id,         &
                                            ' not allowed for PE ',myid
                 CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
@@ -213,5 +222,5 @@
           IF ( .NOT.  data_output_2d_on_each_pe )  THEN
              IF ( myid /= 0 )  THEN
-                WRITE( message_string, * ) 'opening file-id ',file_id, &
+                WRITE( message_string, * ) 'opening file-id ',file_id,         &
                                            ' not allowed for PE ',myid
                 CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
@@ -223,5 +232,5 @@
 !
 !--       File-ids that are used temporarily in other routines
-          WRITE( message_string, * ) 'opening file-id ',file_id, &
+          WRITE( message_string, * ) 'opening file-id ',file_id,               &
                                     ' is not allowed since it is used otherwise'
           CALL message( 'check_open', 'PA0168', 0, 1, 0, 6, 0 ) 
@@ -241,13 +250,13 @@
 !--       check_namelist_files!
           IF ( check_restart == 2 ) THEN
-             OPEN ( 11, FILE='PARINF'//coupling_char, FORM='FORMATTED', &
+             OPEN ( 11, FILE='PARINF'//coupling_char, FORM='FORMATTED',        &
                         STATUS='OLD' )
           ELSE
-             OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED', &
+             OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED',         &
                         STATUS='OLD' )
           END IF
 #else
 
-          OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED', &
+          OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED',            &
                      STATUS='OLD' )
 #endif
@@ -256,5 +265,5 @@
 
           IF ( myid_char == '' )  THEN
-             OPEN ( 13, FILE='BININ'//coupling_char//myid_char, &
+             OPEN ( 13, FILE='BININ'//coupling_char//myid_char,                &
                         FORM='UNFORMATTED', STATUS='OLD' )
           ELSE
@@ -263,5 +272,5 @@
 !--          this file contains the global variables
              IF ( .NOT. openfile(file_id)%opened_before )  THEN
-                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_0000',&
+                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_0000',      &
                            FORM='UNFORMATTED', STATUS='OLD' )
              ELSE
@@ -274,5 +283,5 @@
 
           IF ( myid_char == '' )  THEN
-             OPEN ( 14, FILE='BINOUT'//coupling_char//myid_char, &
+             OPEN ( 14, FILE='BINOUT'//coupling_char//myid_char,               &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
@@ -286,5 +295,5 @@
              CALL MPI_BARRIER( comm2d, ierr )
 #endif
-             OPEN ( 14, FILE='BINOUT'//TRIM(coupling_char)//'/'//myid_char, &
+             OPEN ( 14, FILE='BINOUT'//TRIM(coupling_char)//'/'//myid_char,    &
                         FORM='UNFORMATTED' )
           ENDIF
@@ -316,5 +325,5 @@
           ENDIF
           IF ( myid_char == '' )  THEN
-             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_0000', &
+             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_0000',      &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
@@ -332,8 +341,8 @@
 
           IF ( data_output_2d_on_each_pe )  THEN
-             OPEN ( 21, FILE='PLOT2D_XY'//TRIM( coupling_char )//myid_char, &
+             OPEN ( 21, FILE='PLOT2D_XY'//TRIM( coupling_char )//myid_char,    &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
-             OPEN ( 21, FILE='PLOT2D_XY'//coupling_char, &
+             OPEN ( 21, FILE='PLOT2D_XY'//coupling_char,                       &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ENDIF
@@ -363,5 +372,5 @@
 !--          Create output file for local parameters
              IF ( iso2d_output )  THEN
-                OPEN ( 27, FILE='PLOT2D_XY_LOCAL'//coupling_char, &
+                OPEN ( 27, FILE='PLOT2D_XY_LOCAL'//coupling_char,              &
                            FORM='FORMATTED', DELIM='APOSTROPHE' )
                 openfile(27)%opened = .TRUE.
@@ -373,8 +382,8 @@
 
           IF ( data_output_2d_on_each_pe )  THEN
-             OPEN ( 22, FILE='PLOT2D_XZ'//TRIM( coupling_char )//myid_char, &
+             OPEN ( 22, FILE='PLOT2D_XZ'//TRIM( coupling_char )//myid_char,    &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
-             OPEN ( 22, FILE='PLOT2D_XZ'//coupling_char, FORM='UNFORMATTED', &
+             OPEN ( 22, FILE='PLOT2D_XZ'//coupling_char, FORM='UNFORMATTED',   &
                         POSITION='APPEND' )
           ENDIF
@@ -402,5 +411,5 @@
 !
 !--          Create output file for local parameters
-             OPEN ( 28, FILE='PLOT2D_XZ_LOCAL'//coupling_char, &
+             OPEN ( 28, FILE='PLOT2D_XZ_LOCAL'//coupling_char,                 &
                         FORM='FORMATTED', DELIM='APOSTROPHE' )
              openfile(28)%opened = .TRUE.
@@ -411,8 +420,8 @@
 
           IF ( data_output_2d_on_each_pe )  THEN
-             OPEN ( 23, FILE='PLOT2D_YZ'//TRIM( coupling_char )//myid_char, &
+             OPEN ( 23, FILE='PLOT2D_YZ'//TRIM( coupling_char )//myid_char,    &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
-             OPEN ( 23, FILE='PLOT2D_YZ'//coupling_char, FORM='UNFORMATTED', &
+             OPEN ( 23, FILE='PLOT2D_YZ'//coupling_char, FORM='UNFORMATTED',   &
                         POSITION='APPEND' )
           ENDIF
@@ -440,5 +449,5 @@
 !
 !--          Create output file for local parameters
-             OPEN ( 29, FILE='PLOT2D_YZ_LOCAL'//coupling_char, &
+             OPEN ( 29, FILE='PLOT2D_YZ_LOCAL'//coupling_char,                 &
                         FORM='FORMATTED', DELIM='APOSTROPHE' )
              openfile(29)%opened = .TRUE.
@@ -448,5 +457,5 @@
        CASE ( 30 )
 
-          OPEN ( 30, FILE='PLOT3D_DATA'//TRIM( coupling_char )//myid_char, &
+          OPEN ( 30, FILE='PLOT3D_DATA'//TRIM( coupling_char )//myid_char,     &
                      FORM='UNFORMATTED' )
 !
@@ -471,23 +480,23 @@
 
                 OPEN ( 3, FILE='OUTPUT_FILE_CONNECTIONS', FORM='FORMATTED' )
-                DO  WHILE ( .NOT. avs_coor_file_found  .OR. &
+                DO  WHILE ( .NOT. avs_coor_file_found  .OR.                    &
                             .NOT. avs_data_file_found )
 
-                   READ ( 3, '(A)', END=1 )  zeile
-
-                   SELECT CASE ( zeile(1:11) )
+                   READ ( 3, '(A)', END=1 )  line
+
+                   SELECT CASE ( line(1:11) )
 
                       CASE ( 'PLOT3D_COOR' )
-                         READ ( 3, '(A/A)' )  avs_coor_file_catalog, &
+                         READ ( 3, '(A/A)' )  avs_coor_file_catalog,           &
                                               avs_coor_file_localname
                          avs_coor_file_found = .TRUE.
 
                       CASE ( 'PLOT3D_DATA' )
-                         READ ( 3, '(A/A)' )  avs_data_file_catalog, &
+                         READ ( 3, '(A/A)' )  avs_data_file_catalog,           &
                                               avs_data_file_localname
                          avs_data_file_found = .TRUE.
 
                       CASE DEFAULT
-                         READ ( 3, '(A/A)' )  zeile, zeile
+                         READ ( 3, '(A/A)' )  line, line
 
                    END SELECT
@@ -498,8 +507,8 @@
 !--             using batch_scp
        1        CLOSE ( 3 )
-                IF ( .NOT. avs_coor_file_found  .OR. &
+                IF ( .NOT. avs_coor_file_found  .OR.                           &
                      .NOT. avs_data_file_found )  THEN
-                   message_string= 'no filename for AVS-data-file ' //       &
-                                   'found in MRUN-config-file' //            &
+                   message_string= 'no filename for AVS-data-file ' //         &
+                                   'found in MRUN-config-file' //              &
                                    ' &filename in FLD-file set to "unknown"'
                    CALL message( 'check_open', 'PA0169', 0, 1, 0, 6, 0 )
@@ -509,10 +518,10 @@
                 ELSE
                    get_filenames = .TRUE.
-                   IF ( TRIM( host ) == 'hpmuk'  .OR.  &
+                   IF ( TRIM( host ) == 'hpmuk'  .OR.                          &
                         TRIM( host ) == 'lcmuk' )  THEN
                       batch_scp = '/home/raasch/pub/batch_scp'
                    ELSEIF ( TRIM( host ) == 'nech' )  THEN
                       batch_scp = '/ipf/b/b323011/pub/batch_scp'
-                   ELSEIF ( TRIM( host ) == 'ibmh'  .OR.  &
+                   ELSEIF ( TRIM( host ) == 'ibmh'  .OR.                       &
                             TRIM( host ) == 'ibmb' )  THEN
                       batch_scp = '/home/h/niksiraa/pub/batch_scp'
@@ -520,5 +529,5 @@
                       batch_scp = '/home/nhbksira/pub/batch_scp'
                    ELSE
-                      message_string= 'no path for batch_scp on host "' // &
+                      message_string= 'no path for batch_scp on host "' //     &
                                        TRIM( host ) // '"'
                       CALL message( 'check_open', 'PA0170', 0, 1, 0, 6, 0 )
@@ -531,8 +540,8 @@
 !--                   /etc/passwd serves as Dummy-Datei, because it is not 
 !--                   really transferred.
-                      command = TRIM( batch_scp ) // ' -n -u ' // &
-                         return_username(1:iusern) // ' ' // &
-                         return_addres(1:iaddres) // ' /etc/passwd "' // &
-                         TRIM( avs_coor_file_catalog ) // '" ' // &
+                      command = TRIM( batch_scp ) // ' -n -u ' //              &
+                         return_username(1:iusern) // ' ' //                   &
+                         return_addres(1:iaddres) // ' /etc/passwd "' //       &
+                         TRIM( avs_coor_file_catalog ) // '" ' //              &
                          TRIM( avs_coor_file_localname ) // ' > REMOTE_FILENAME'
 
@@ -543,8 +552,8 @@
 !
 !--                   Determine the data file name
-                      command = TRIM( batch_scp ) // ' -n -u ' // &
-                         return_username(1:iusern) // ' ' // &
-                         return_addres(1:iaddres) // ' /etc/passwd "' // &
-                         TRIM( avs_data_file_catalog ) // '" ' // &
+                      command = TRIM( batch_scp ) // ' -n -u ' //              &
+                         return_username(1:iusern) // ' ' //                   &
+                         return_addres(1:iaddres) // ' /etc/passwd "' //       &
+                         TRIM( avs_data_file_catalog ) // '" ' //              &
                          TRIM( avs_data_file_localname ) // ' > REMOTE_FILENAME'
 
@@ -567,6 +576,6 @@
                 OPEN ( 33, FILE='PLOT3D_FLD_COOR', FORM='FORMATTED' )
                 openfile(33)%opened = .TRUE.
-                WRITE ( 33, 3300 )  TRIM( avs_coor_file ), &
-                                    TRIM( avs_coor_file ), (nx+2*nbgp)*4, &
+                WRITE ( 33, 3300 )  TRIM( avs_coor_file ),                     &
+                                    TRIM( avs_coor_file ), (nx+2*nbgp)*4,      &
                                     TRIM( avs_coor_file ), (nx+2*nbgp)*4+(ny+2*nbgp)*4
             
@@ -623,6 +632,6 @@
              WRITE ( suffix, '(''_'',I1)' )  file_id - 50
           ENDIF
-          OPEN ( file_id, FILE='PLOTTS_DATA'//TRIM( coupling_char )// &
-                               TRIM( suffix ),                        &
+          OPEN ( file_id, FILE='PLOTTS_DATA'//TRIM( coupling_char )//          &
+                               TRIM( suffix ),                                 &
                           FORM='FORMATTED', RECL=496 )
 !
@@ -638,10 +647,10 @@
              IF ( cross_ts_number_count(j) /= 0 )  cranz = cranz+1
           ENDDO
-          rtext = '\1.0 ' // TRIM( run_description_header ) // '    ' // &
+          rtext = '\1.0 ' // TRIM( run_description_header ) // '    ' //       &
                   TRIM( region( file_id - 50 ) )
 !
 !--       Write RAHMEN parameter
-          OPEN ( 90, FILE='PLOTTS_PAR'//TRIM( coupling_char )// &
-                           TRIM( suffix ),                      &
+          OPEN ( 90, FILE='PLOTTS_PAR'//TRIM( coupling_char )//                &
+                           TRIM( suffix ),                                     &
                      FORM='FORMATTED', DELIM='APOSTROPHE' )
           WRITE ( 90, RAHMEN )
@@ -669,5 +678,5 @@
 !--       series data to the bottom of that file.
           IF ( runnr == 0 )  THEN
-             WRITE ( file_id, 5000 )  TRIM( run_description_header ) // &
+             WRITE ( file_id, 5000 )  TRIM( run_description_header ) //        &
                                       '    ' // TRIM( region( file_id - 50 ) )
           ENDIF
@@ -694,6 +703,6 @@
              ENDIF
 #endif
-             OPEN ( 80, FILE='PARTICLE_INFOS'//TRIM( coupling_char )//'/'// &
-                             myid_char,                                     &
+             OPEN ( 80, FILE='PARTICLE_INFOS'//TRIM( coupling_char )//'/'//    &
+                             myid_char,                                        &
                         FORM='FORMATTED', POSITION='APPEND' )
           ENDIF
@@ -705,5 +714,5 @@
        CASE ( 81 )
 
-             OPEN ( 81, FILE='PLOTSP_X_PAR'//coupling_char, FORM='FORMATTED', &
+             OPEN ( 81, FILE='PLOTSP_X_PAR'//coupling_char, FORM='FORMATTED',  &
                         DELIM='APOSTROPHE', RECL=1500, POSITION='APPEND' )
 
@@ -715,5 +724,5 @@
        CASE ( 83 )
 
-             OPEN ( 83, FILE='PLOTSP_Y_PAR'//coupling_char, FORM='FORMATTED', &
+             OPEN ( 83, FILE='PLOTSP_Y_PAR'//coupling_char, FORM='FORMATTED',  &
                         DELIM='APOSTROPHE', RECL=1500, POSITION='APPEND' )
 
@@ -726,5 +735,5 @@
 
           IF ( myid_char == '' )  THEN
-             OPEN ( 85, FILE='PARTICLE_DATA'//TRIM(coupling_char)//myid_char, &
+             OPEN ( 85, FILE='PARTICLE_DATA'//TRIM(coupling_char)//myid_char,  &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ELSE
@@ -738,6 +747,6 @@
              CALL MPI_BARRIER( comm2d, ierr )
 #endif
-             OPEN ( 85, FILE='PARTICLE_DATA'//TRIM( coupling_char )//'/'// &
-                        myid_char,                                         &
+             OPEN ( 85, FILE='PARTICLE_DATA'//TRIM( coupling_char )//'/'//     &
+                        myid_char,                                             &
                         FORM='UNFORMATTED', POSITION='APPEND' )
           ENDIF
@@ -751,5 +760,5 @@
              rtext = 'data format version 3.0'
              WRITE ( 85 )  rtext
-             WRITE ( 85 )  number_of_particle_groups, &
+             WRITE ( 85 )  number_of_particle_groups,                          &
                            max_number_of_particle_groups
              WRITE ( 85 )  particle_groups
@@ -1110,5 +1119,5 @@
              filename = 'DATA_PRT_NETCDF' // coupling_char
           ELSE
-             filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) // '/' // &
+             filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) // '/' //   &
                         myid_char
           ENDIF
@@ -1143,7 +1152,7 @@
 !--          For runs on multiple processors create the subdirectory
              IF ( myid_char /= '' )  THEN
-                IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before ) &
+                IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  &
                 THEN    ! needs modification in case of non-extendable sets
-                   CALL local_system( 'mkdir  DATA_PRT_NETCDF' // &
+                   CALL local_system( 'mkdir  DATA_PRT_NETCDF' //              &
                                        TRIM( coupling_char ) // '/' )
                 ENDIF
@@ -1217,5 +1226,5 @@
              mid = file_id - (200+max_masks)
              WRITE ( mask_char,'(I2.2)')  mid
-             filename = 'DATA_MASK_' // mask_char // '_AV_NETCDF' // &
+             filename = 'DATA_MASK_' // mask_char // '_AV_NETCDF' //           &
                   coupling_char
              av = 1
@@ -1230,5 +1239,5 @@
 !
 !--          Open an existing netCDF file for output
-             CALL open_write_netcdf_file( filename, id_set_mask(mid,av), &
+             CALL open_write_netcdf_file( filename, id_set_mask(mid,av),       &
                                           .TRUE., 456 )
 !
@@ -1282,18 +1291,18 @@
 !
 !-- Formats
-3300 FORMAT ('#'/                                                   &
-             'coord 1  file=',A,'  filetype=unformatted'/           &
-             'coord 2  file=',A,'  filetype=unformatted  skip=',I6/ &
-             'coord 3  file=',A,'  filetype=unformatted  skip=',I6/ &
+3300 FORMAT ('#'/                                                              &
+             'coord 1  file=',A,'  filetype=unformatted'/                      &
+             'coord 2  file=',A,'  filetype=unformatted  skip=',I6/            &
+             'coord 3  file=',A,'  filetype=unformatted  skip=',I6/            &
              '#')
 4000 FORMAT ('# ',A)
-5000 FORMAT ('# ',A/                                                          &
-             '#1 E'/'#2 E*'/'#3 dt'/'#4 u*'/'#5 th*'/'#6 umax'/'#7 vmax'/     &
-             '#8 wmax'/'#9 div_new'/'#10 div_old'/'#11 z_i_wpt'/'#12 z_i_pt'/ &
-             '#13 w*'/'#14 w''pt''0'/'#15 w''pt'''/'#16 wpt'/'#17 pt(0)'/     &
+5000 FORMAT ('# ',A/                                                           &
+             '#1 E'/'#2 E*'/'#3 dt'/'#4 u*'/'#5 th*'/'#6 umax'/'#7 vmax'/      &
+             '#8 wmax'/'#9 div_new'/'#10 div_old'/'#11 z_i_wpt'/'#12 z_i_pt'/  &
+             '#13 w*'/'#14 w''pt''0'/'#15 w''pt'''/'#16 wpt'/'#17 pt(0)'/      &
              '#18 pt(zp)'/'#19 splptx'/'#20 splpty'/'#21 splptz')
-8000 FORMAT (A/                                                            &
-             '  step    time  # of parts   lPE sent/recv  rPE sent/recv  ',&
-             'sPE sent/recv  nPE sent/recv  max # of parts'/               &
+8000 FORMAT (A/                                                                &
+             '  step    time  # of parts   lPE sent/recv  rPE sent/recv  ',    &
+             'sPE sent/recv  nPE sent/recv  max # of parts'/                   &
              103('-'))
 
