Index: palm/trunk/UTIL/inifor/src/inifor_io.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_io.f90	(revision 3779)
+++ palm/trunk/UTIL/inifor/src/inifor_io.f90	(revision 3785)
@@ -177,5 +177,5 @@
           CALL inifor_abort('get_netcdf_variable', message)
 
-       END IF
+       ENDIF
 
        CALL check(nf90_close(ncid))
@@ -221,5 +221,5 @@
           CALL inifor_abort('get_netcdf_variable', message)
 
-       END IF
+       ENDIF
 
        CALL check(nf90_close(ncid))
@@ -259,5 +259,5 @@
           CALL inifor_abort('get_netcdf_dim_vector', message)
 
-       END IF
+       ENDIF
 
     END SUBROUTINE get_netcdf_dim_vector
@@ -291,5 +291,5 @@
                                              name = in_var % dimname(i),       &
                                              len  = in_var % dimlen(i) ))
-       END DO
+       ENDDO
 
     END SUBROUTINE get_input_dimensions
@@ -318,5 +318,5 @@
           CALL inifor_abort('get_netcdf_start_and_count', message)
 
-       END IF
+       ENDIF
 
        start = (/ 1, 1, 1 /)
@@ -329,5 +329,5 @@
 !--       Start reading from second level, e.g. depth = 0.005 instead of 0.0
           start(3) = 2
-       END IF
+       ENDIF
 
        IF (in_var % ndim .EQ. 2)  THEN
@@ -358,5 +358,5 @@
         IF ( var % lod .GE. 0 )  THEN
            CALL check(nf90_put_att(ncid, var % varid, "lod",           var % lod))
-        END IF 
+        ENDIF 
         CALL check(nf90_put_att(ncid, var % varid, "source",        var % source))
         CALL check(nf90_put_att(ncid, var % varid, "_FillValue",    NF90_FILL_REAL))
@@ -383,5 +383,5 @@
                                              name = null, &
                                              len  = var % dimlen(i)  ) )
-        END DO
+        ENDDO
 
     END SUBROUTINE netcdf_get_dimensions
@@ -538,5 +538,5 @@
              i = i + 1
 
-          END DO
+          ENDDO
 
        ELSE
@@ -545,5 +545,5 @@
           CALL report('parse_command_line_arguments', message)
 
-       END IF
+       ENDIF
 
    END SUBROUTINE parse_command_line_arguments
@@ -574,5 +574,5 @@
                           TRIM(date_string) // TRIM(suffix) // '.nc'
 
-      END DO
+      ENDDO
 
    END SUBROUTINE get_datetime_file_list
@@ -594,8 +594,6 @@
       LOGICAL, OPTIONAL, INTENT(IN)    ::  nocheck
 
-      INTEGER             ::  number_of_intervals, hour, i
-      CHARACTER(LEN=DATE) ::  date_string
-      CHARACTER(LEN=PATH) ::  file_name
-      LOGICAL             ::  check_files
+      INTEGER ::  i
+      LOGICAL ::  check_files
 
       CALL get_datetime_file_list( start_date_string, start_hour, end_hour,    &
@@ -606,5 +604,5 @@
       IF ( PRESENT ( nocheck ) )  THEN
          IF ( nocheck )  check_files = .FALSE.
-      END IF
+      ENDIF
 
       IF ( check_files )  THEN
@@ -615,7 +613,7 @@
          DO i = 1, SIZE(file_list)
              CALL verify_file(file_list(i), 'input', tip)
-         END DO
-
-      END IF
+         ENDDO
+
+      ENDIF
 
    END SUBROUTINE get_input_file_list
@@ -645,11 +643,11 @@
             IF (PRESENT(tip))  THEN
                message = TRIM(message) // " " // TRIM(tip)
-            END IF
-
-         END IF
+            ENDIF
+
+         ENDIF
 
          CALL inifor_abort('verify_file', message)
 
-      END IF
+      ENDIF
 
       message = "Set up input file name '" // TRIM(file_name) // "'"
@@ -691,5 +689,5 @@
       IF (TRIM(cfg % static_driver_file) .NE. '')  THEN
          CALL verify_file(cfg % static_driver_file, 'static driver')
-      END IF
+      ENDIF
 
       SELECT CASE( TRIM(cfg % ic_mode) )
@@ -739,5 +737,5 @@
                    "wind. Please specify either both or none."
          CALL inifor_abort( 'validate_config', message )
-      END IF
+      ENDIF
 
    END SUBROUTINE validate_config
@@ -958,9 +956,8 @@
 !> Defines the netCDF variables to be written to the dynamic driver file
 !------------------------------------------------------------------------------!
-    SUBROUTINE setup_netcdf_variables(filename, output_variable_table, debug)
+    SUBROUTINE setup_netcdf_variables(filename, output_variable_table)
 
        CHARACTER (LEN=*), INTENT(IN)        ::  filename
        TYPE(nc_var), INTENT(INOUT), TARGET  ::  output_variable_table(:)
-       LOGICAL, INTENT(IN)                  ::  debug
 
        TYPE(nc_var), POINTER                ::  var
@@ -988,7 +985,7 @@
              CALL netcdf_define_variable(var, ncid)
              CALL netcdf_get_dimensions(var, ncid)
-          END IF
+          ENDIF
            
-       END DO
+       ENDDO
 
        CALL check(nf90_enddef(ncid))
@@ -1043,5 +1040,5 @@
                        TRIM( str(SIZE(group % in_var_list)) ) // "."
              CALL inifor_abort('read_input_variables | accumulation', message)
-          END IF
+          ENDIF
 
 !
@@ -1095,5 +1092,5 @@
                 input_var % name = TRIM( get_pressure_varname(input_file) )
  CALL run_control('time', 'read')
-             END IF
+             ENDIF
 
              CALL get_netcdf_variable(input_file, input_var, buffer(ivar) % array)
@@ -1102,6 +1099,6 @@
  CALL run_control('time', 'comp')
 
-          END DO
-       END IF
+          ENDDO
+       ENDIF
 
     END SUBROUTINE read_input_variables
@@ -1159,5 +1156,5 @@
           CALL inifor_abort('get_pressure_var', message)
 
-       END IF
+       ENDIF
 
        CALL check(nf90_close(ncid))
@@ -1189,5 +1186,5 @@
           CALL inifor_abort('get_netcdf_attribute', message)
 
-       END IF
+       ENDIF
 
     END FUNCTION get_netcdf_attribute
@@ -1252,5 +1249,5 @@
                  SIZE(array, 2), ")."
              STOP
-          END IF
+          ENDIF
           
 
@@ -1303,5 +1300,5 @@
                                       start=start(1:ndim+1),                   &
                                       count=count(1:ndim) ) )
-          END IF
+          ENDIF
 
        CASE ( 'large-scale scalar forcing', 'large-scale w forcing' )
@@ -1336,5 +1333,5 @@
                     TRIM( nf90_strerror(status) )
           CALL inifor_abort('io.check', message)
-       END IF
+       ENDIF
 
     END SUBROUTINE check
