Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 1807)
+++ palm/trunk/SOURCE/Makefile	(revision 1808)
@@ -20,5 +20,5 @@
 # Current revisions:
 # ------------------
-# 
+# -local_flush, -local_getenv
 # 
 # Former revisions:
@@ -256,6 +256,6 @@
 	init_grid.f90 init_masks.f90 init_ocean.f90 \
 	init_pegrid.f90 init_pt_anomaly.f90 init_rankine.f90 init_slope.f90 \
-	interaction_droplets_ptq.f90 land_surface_model.f90 local_flush.f90 \
-	local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \
+	interaction_droplets_ptq.f90 land_surface_model.f90 \
+	local_stop.f90 local_system.f90 local_tremain.f90 \
 	local_tremain_ini.f90 lpm.f90 lpm_advec.f90 lpm_boundary_conds.f90 \
 	lpm_calc_liquid_water_content.f90 lpm_collision_kernels.f90 \
@@ -409,6 +409,4 @@
 interaction_droplets_ptq.o: modules.o mod_kinds.o
 land_surface_model.o: modules.o mod_kinds.o radiation_model.o
-local_flush.o: mod_kinds.o
-local_getenv.o: modules.o mod_kinds.o
 local_stop.o: modules.o mod_kinds.o pmc_interface.o
 local_tremain.o: modules.o cpulog.o mod_kinds.o
Index: palm/trunk/SOURCE/cpulog.f90
===================================================================
--- palm/trunk/SOURCE/cpulog.f90	(revision 1807)
+++ palm/trunk/SOURCE/cpulog.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! cpu measurements are done with standard FORTRAN routine on every machine
 ! 
 ! Former revisions:
@@ -182,13 +182,6 @@
        TYPE(logpoint)    ::  log_event          !< 
 
-#if defined( __lc ) || defined( __decalpha )
        INTEGER(idp)     ::  count        !< 
        INTEGER(idp)     ::  count_rate   !< 
-#elif defined( __nec )
-       INTEGER(iwp)      ::  count       !< 
-       INTEGER(iwp)      ::  count_rate  !< 
-#elif defined( __ibm )
-       INTEGER(idp)     ::  IRTC         !< 
-#endif
 
 
@@ -224,13 +217,6 @@
 !
 !--    Take current time
-#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
        CALL SYSTEM_CLOCK( count, count_rate )
        mtime = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
-#elif defined( __ibm )
-       mtime = IRTC( ) * 1E-9_wp
-#else
-       message_string = 'no time measurement defined on this host'
-       CALL message( 'cpu_log', 'PA0175', 1, 2, 0, 6, 0 )
-#endif
 
 !
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 1807)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! test output removed
 !
 ! Former revisions:
@@ -223,6 +223,4 @@
        ENDIF
     ENDIF
-    WRITE(9,*) '___hier4'
-    CALL local_flush(9)
 
 !
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 1807)
+++ palm/trunk/SOURCE/header.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! routine local_flush replaced by FORTRAN statement
 !
 ! Former revisions:
@@ -1976,5 +1976,5 @@
 !
 !-- Write buffer contents to disc immediately
-    CALL local_flush( io )
+    FLUSH( io )
 
 !
Index: palm/trunk/SOURCE/init_1d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_1d_model.f90	(revision 1807)
+++ palm/trunk/SOURCE/init_1d_model.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_flush replaced by FORTRAN statement
 ! 
 ! Former revisions:
@@ -830,5 +830,5 @@
 !
 !--    Write buffer contents to disc immediately
-       CALL local_flush( 15 )
+       FLUSH( 15 )
 
     ENDIF
@@ -977,5 +977,5 @@
 !
 !--    Write buffer contents to disc immediately
-       CALL local_flush( 17 )
+       FLUSH( 17 )
 
     ENDIF
Index: palm/trunk/SOURCE/init_coupling.f90
===================================================================
--- palm/trunk/SOURCE/init_coupling.f90	(revision 1807)
+++ palm/trunk/SOURCE/init_coupling.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_getenv replaced by standard FORTRAN routine
 ! 
 ! Former revisions:
@@ -71,5 +71,5 @@
 !-- This method is currently not used because the mpiexec command is not
 !-- available on some machines
-!    CALL local_getenv( 'coupling_mode', 13, coupling_mode, i )
+!    CALL GET_ENVIRONMENT_VARIABLE( 'coupling_mode', coupling_mode, i )
 !    IF ( i == 0 )  coupling_mode = 'uncoupled'
 !    IF ( coupling_mode == 'ocean_to_atmosphere' )  coupling_char = '_O'
Index: palm/trunk/SOURCE/init_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/init_dvrp.f90	(revision 1807)
+++ palm/trunk/SOURCE/init_dvrp.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_getenv replaced by standard FORTRAN routine
 ! 
 ! Former revisions:
@@ -783,5 +783,6 @@
 !
 !-- Find out, if dvrp output shall be done by a dedicated PE
-    CALL local_getenv( 'use_seperate_pe_for_dvrp_output', 31, chr, idummy )
+    CALL GET_ENVIRONMENT_VARIABLE( 'use_seperate_pe_for_dvrp_output', chr,     &
+                                   idummy )
     IF ( chr == 'true' )  THEN
 
Index: palm/trunk/SOURCE/local_flush.f90
===================================================================
--- palm/trunk/SOURCE/local_flush.f90	(revision 1807)
+++ 	(revision )
@@ -1,59 +1,0 @@
-!> @file local_flush.f90
-!--------------------------------------------------------------------------------!
-! This file is part of PALM.
-!
-! 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-2014 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------!
-!
-! Current revisions:
-! -----------------
-! 
-! 
-! Former revisions:
-! -----------------
-! $Id$
-!
-! 1682 2015-10-07 23:56:08Z knoop
-! Code annotations made doxygen readable
-!
-! 1320 2014-03-20 08:40:49Z raasch
-! kind-parameters added to all INTEGER and REAL declaration statements,
-! kinds are defined in new module kinds,
-! comment fields (!:) to be used for variable explanations added to
-! all variable declaration statements
-!
-! 1036 2012-10-22 13:43:42Z raasch
-! code put under GPL (PALM 3.9)
-!
-! Initial revision (raasch 12/04/07)
-!
-!
-! Description:
-! ------------
-!> Flush calls for different operating systems
-!------------------------------------------------------------------------------!
- SUBROUTINE local_flush( file_id )
- 
-
-    USE kinds
-
-    INTEGER(iwp) ::  file_id !<
-
-#if defined( __ibm )
-    CALL FLUSH_( file_id )
-#elif defined( __lc )  ||  defined( __nec )
-    CALL FLUSH( file_id )
-#endif
-
- END SUBROUTINE local_flush    
Index: palm/trunk/SOURCE/local_getenv.f90
===================================================================
--- palm/trunk/SOURCE/local_getenv.f90	(revision 1807)
+++ 	(revision )
@@ -1,82 +1,0 @@
-!> @file local_getenv.f90
-!--------------------------------------------------------------------------------!
-! This file is part of PALM.
-!
-! 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-2014 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------!
-!
-! Current revisions:
-! -----------------
-! 
-! 
-! Former revisions:
-! -----------------
-! $Id$
-!
-! 1682 2015-10-07 23:56:08Z knoop
-! Code annotations made doxygen readable
-! 1320 2014-03-20 08:40:49Z raasch $
-! ONLY-attribute added to USE-statements,
-! kind-parameters added to all INTEGER and REAL declaration statements,
-! kinds are defined in new module kinds,
-! revision history before 2012 removed,
-! comment fields (!:) to be used for variable explanations added to
-! all variable declaration statements 
-!
-! 1036 2012-10-22 13:43:42Z raasch
-! code put under GPL (PALM 3.9)
-!
-! Revision 1.1  1997/08/11 06:21:01  raasch
-! Initial revision
-!
-!
-! Description:
-! ------------
-!> Getting the values of environment-variabls (for different operating-systems)
-!------------------------------------------------------------------------------!
- SUBROUTINE local_getenv( var, ivar, value, ivalue )
- 
-
-    USE kinds
-        
-#if defined( __lcmuk )
-    USE pegrid
-#endif
-    CHARACTER (LEN=*) ::  value  !<
-    CHARACTER (LEN=*) ::  var    !<
-    
-    INTEGER(iwp)      ::  ivalue !<
-    INTEGER(iwp)      ::  ivar   !<
-#if defined( __lcmuk )
-    INTEGER(iwp)      ::  i      !<
-    INTEGER(iwp)      ::  ia(20) !<
-#endif
-
-    CALL GETENV( var(1:ivar), value )
-    ivalue = LEN_TRIM( value )
-
-#if defined( __lcmuk )  &&  defined( __parallel )
-    ia = IACHAR( ' ' )
-    IF ( myid == 0 )  THEN
-       DO  i = 1, ivalue
-          ia(i) = IACHAR( value(i:i) )
-       ENDDO
-    ENDIF
-    CALL MPI_BCAST( ia(1), 20, MPI_INTEGER, 0, comm2d, ierr )
-    DO  i = 1, 20
-       IF ( ACHAR( ia(i) ) /= ' ' )  value(i:i) = ACHAR( ia(i) )
-    ENDDO
-    ivalue = LEN_TRIM( value )
-#endif
- END SUBROUTINE local_getenv    
Index: palm/trunk/SOURCE/local_tremain.f90
===================================================================
--- palm/trunk/SOURCE/local_tremain.f90	(revision 1807)
+++ palm/trunk/SOURCE/local_tremain.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! cpu measurements are done with standard FORTRAN routine on every machine
 ! 
 ! Former revisions:
@@ -68,21 +68,9 @@
     IMPLICIT NONE
 
-    REAL(wp)     ::  remaining_time        !<
-#if defined( __ibm )
-    INTEGER(idp) ::  IRTC                  !<
-    REAL(wp)     ::  actual_wallclock_time !<
-#elif defined( __lc )
     INTEGER(idp) ::  count                 !<
     INTEGER(idp) ::  count_rate            !<
+
     REAL(wp)     ::  actual_wallclock_time !<
-#endif
-
-#if defined( __ibm )
-
-    actual_wallclock_time = IRTC( ) * 1E-9_wp
-    remaining_time = maximum_cpu_time_allowed - &
-                     ( actual_wallclock_time - initial_wallclock_time )
-
-#elif defined( __lc )
+    REAL(wp)     ::  remaining_time        !<
 
     CALL SYSTEM_CLOCK( count, count_rate )
@@ -91,16 +79,3 @@
                      ( actual_wallclock_time - initial_wallclock_time )
 
-#elif defined( __nec )
-    
-    CALL TREMAIN( remaining_time )
-    remaining_time = remaining_time / tasks_per_node
-
-#else
-
-!
-!-- No stop due to running out of cpu-time on other machines
-    remaining_time = 9999999.9_wp
-
-#endif
-
  END SUBROUTINE local_tremain
Index: palm/trunk/SOURCE/local_tremain_ini.f90
===================================================================
--- palm/trunk/SOURCE/local_tremain_ini.f90	(revision 1807)
+++ palm/trunk/SOURCE/local_tremain_ini.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! cpu measurements are done with standard FORTRAN routine on every machine
 ! 
 ! Former revisions:
@@ -63,28 +63,11 @@
     IMPLICIT NONE
 
-#if defined( __ibm )
-    INTEGER(idp)     ::  IRTC       !<
-#elif defined( __lc )
     INTEGER(idp)     ::  count      !<
     INTEGER(idp)     ::  count_rate !<
-#endif
-
 
 !
 !-- Get initial wall clock time
-#if defined( __ibm )
-
-    initial_wallclock_time = IRTC( ) * 1E-9_wp
-
-#elif defined( __lc )
-
     CALL SYSTEM_CLOCK( count, count_rate )
     initial_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
 
-#else
-!
-!-- So far, nothing is done on these machines
-#endif
-
-
  END SUBROUTINE local_tremain_ini
Index: palm/trunk/SOURCE/message.f90
===================================================================
--- palm/trunk/SOURCE/message.f90	(revision 1807)
+++ palm/trunk/SOURCE/message.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_flush replaced by FORTRAN statement
 !
 ! Former revisions:
@@ -64,8 +64,8 @@
 !> output_on_pe: -1 - all, else - output on specified PE
 !> file_id: 6 - stdout (*)
-!> flush: 0 - no action, 1 - flush the respective output buffer
+!> 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 )
+                     message_level, output_on_pe, file_id, flush_file )
  
     USE control_parameters,                                                    &
@@ -89,5 +89,5 @@
 
     INTEGER(iwp) ::  file_id                             !<
-    INTEGER(iwp) ::  flush                               !<
+    INTEGER(iwp) ::  flush_file                          !<
     INTEGER(iwp) ::  i                                   !<
     INTEGER(iwp) ::  message_level                       !<
@@ -203,5 +203,5 @@
 !
 !--       Flush buffer, if requested
-          IF ( flush == 1 )  CALL local_flush( file_id )
+          IF ( flush_file == 1 )  FLUSH( file_id )
        ENDIF
 
@@ -261,5 +261,5 @@
                 TRIM( location )
        ENDIF
-       CALL local_flush( OUTPUT_UNIT )
+       FLUSH( OUTPUT_UNIT )
     ENDIF
 
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 1807)
+++ palm/trunk/SOURCE/modules.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! MPI module used by default on all machines
 ! 
 ! Former revisions:
@@ -1177,8 +1177,8 @@
 
 #if defined( __parallel )
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
 #endif
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 1807)
+++ palm/trunk/SOURCE/palm.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! routine local_flush replaced by FORTRAN statement
 !
 ! Former revisions:
@@ -278,5 +278,5 @@
 !-- TEST OUTPUT (TO BE REMOVED)
     WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"'
-    CALL LOCAL_FLUSH( 9 )
+    FLUSH( 9 )
     IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
        PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
Index: palm/trunk/SOURCE/pmc_client.f90
===================================================================
--- palm/trunk/SOURCE/pmc_client.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_client.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -60,8 +60,8 @@
     use, intrinsic :: iso_c_binding
 
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
     USE  kinds
Index: palm/trunk/SOURCE/pmc_general.f90
===================================================================
--- palm/trunk/SOURCE/pmc_general.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_general.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -55,8 +55,8 @@
    USE kinds
 
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
 
Index: palm/trunk/SOURCE/pmc_handle_communicator.f90
===================================================================
--- palm/trunk/SOURCE/pmc_handle_communicator.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_handle_communicator.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -62,8 +62,8 @@
     USE kinds
 
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
 
Index: palm/trunk/SOURCE/pmc_interface.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_interface.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -110,8 +110,8 @@
 
 #if defined( __parallel )
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
 
Index: palm/trunk/SOURCE/pmc_mpi_wrapper.f90
===================================================================
--- palm/trunk/SOURCE/pmc_mpi_wrapper.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_mpi_wrapper.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -45,8 +45,8 @@
    use, intrinsic :: iso_c_binding
 
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
    USE  kinds
Index: palm/trunk/SOURCE/pmc_server.f90
===================================================================
--- palm/trunk/SOURCE/pmc_server.f90	(revision 1807)
+++ palm/trunk/SOURCE/pmc_server.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -60,8 +60,8 @@
    use, intrinsic :: iso_c_binding
 
-#if defined( __lc )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
     USE MPI
-#else
-    INCLUDE "mpif.h"
 #endif
    USE  kinds
Index: palm/trunk/SOURCE/progress_bar.f90
===================================================================
--- palm/trunk/SOURCE/progress_bar.f90	(revision 1807)
+++ palm/trunk/SOURCE/progress_bar.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_flush replaced by FORTRAN statement
 ! 
 ! Former revisions:
@@ -148,5 +148,5 @@
           WRITE ( 117, FMT='(F5.2,1X,F5.2)' ) remaining_time_in_percent,       &
                                               remaining_time_in_percent_total
-          CALL local_flush( 117 )
+          FLUSH( 117 )
 
        ELSE
@@ -170,5 +170,5 @@
                                   100.0_wp )
 #endif
-          CALL local_flush( OUTPUT_UNIT )
+          FLUSH( OUTPUT_UNIT )
 
        ENDIF
Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 1807)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! test output removed
 ! 
 ! Former revisions:
@@ -288,24 +288,4 @@
           
        IF ( j > 0 )  overlap_count(files_to_be_opened) = j
-
-!
-!--    Test output, to be removed later
-       IF ( j > 0 )  THEN
-          WRITE (9,*) '*** reading from file: ', i, j, ' times'
-          WRITE (9,*) '    nxl = ', nxl, ' nxr = ', nxr, ' nys = ', & 
-                                    nys, ' nyn = ', nyn
-          WRITE (9,*) ' '
-          DO  k = 1, j
-             WRITE (9,*) 'k = ', k
-             WRITE (9,'(6(A,I4))') 'nxlfa = ', nxlfa(files_to_be_opened,k),&
-                     ' nxrfa = ', nxrfa(files_to_be_opened,k), &
-                     ' offset_xa = ', offset_xa(files_to_be_opened,k), &
-                     ' nysfa = ', nysfa(files_to_be_opened,k), &
-                     ' nynfa = ', nynfa(files_to_be_opened,k), &
-                     ' offset_ya = ', offset_ya(files_to_be_opened,k)
-          ENDDO
-          CALL local_flush( 9 )
-       ENDIF
-
           
     ENDDO
@@ -314,13 +294,5 @@
 !-- Save the id-string of the current process, since myid_char may now be used
 !-- to open files created by PEs with other id.
-          myid_char_save = myid_char
-
-!
-!-- Test output (remove later)
-         
-    DO i = 1, numprocs_previous_run
-       WRITE (9,*) 'i=',i-1, ' ibs= ',hor_index_bounds_previous_run(1:4,i-1)
-    ENDDO
-    CALL local_flush( 9 )
+    myid_char_save = myid_char
 
     IF ( files_to_be_opened /= 1  .OR.  numprocs /= numprocs_previous_run ) &
@@ -340,6 +312,4 @@
 !--    Set the filename (underscore followed by four digit processor id)
        WRITE (myid_char,'(''_'',I6.6)')  j
-       WRITE (9,*) 'myid=',myid,' opening file "',myid_char,'"'
-       CALL local_flush( 9 )
 
 !
@@ -348,9 +318,5 @@
 !--    first.
        CALL check_open( 13 )
-       WRITE (9,*) 'before skipping'
-       CALL local_flush( 9 )
        IF ( j == 0 )  CALL skip_var_list
-       WRITE (9,*) 'skipping done'
-       CALL local_flush( 9 )
 
 !
@@ -468,7 +434,4 @@
              nync = nynfa(i,k) + offset_ya(i,k)
 
-
-             WRITE (9,*) 'var = ', field_chr
-             CALL local_flush( 9 )
 
              SELECT CASE ( TRIM( field_chr ) )
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 1807)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! test output removed
 !
 ! Former revisions:
@@ -739,9 +739,5 @@
 !
 !--    Read next string
-       WRITE(9,*) 'var1 ', variable_chr
-       CALL local_flush(9)
        READ ( 13 )  variable_chr
-       WRITE(9,*) 'var2 ', variable_chr
-       CALL local_flush(9)
 
     ENDDO
@@ -800,6 +796,4 @@
     CALL check_open( 13 )
 
-    WRITE (9,*) 'rpovl: after check open 13'
-    CALL local_flush( 9 )
     READ ( 13 )  version_on_file
 
@@ -887,6 +881,4 @@
 !
 !-- Now read and check some control parameters and skip the rest
-    WRITE (9,*) 'wpovl: begin reading variables'
-    CALL local_flush( 9 )
     READ ( 13 )  variable_chr
 
@@ -988,24 +980,14 @@
 
 
-    WRITE (9,*) 'skipvl #1'
-    CALL local_flush( 9 )
     READ ( 13 )  version_on_file
 
-    WRITE (9,*) 'skipvl before variable_chr'
-    CALL local_flush( 9 )
-    READ ( 13 )  variable_chr
-    WRITE (9,*) 'skipvl after variable_chr'
-    CALL local_flush( 9 )
+    READ ( 13 )  variable_chr
 
     DO  WHILE ( TRIM( variable_chr ) /= '*** end ***' )
 
-    WRITE (9,*) 'skipvl chr = ', variable_chr
-    CALL local_flush( 9 )
        READ ( 13 )  cdum
        READ ( 13 )  variable_chr
 
     ENDDO
-    WRITE (9,*) 'skipvl last'
-    CALL local_flush( 9 )
 
 
Index: palm/trunk/SOURCE/run_control.f90
===================================================================
--- palm/trunk/SOURCE/run_control.f90	(revision 1807)
+++ palm/trunk/SOURCE/run_control.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! routine local_flush replaced by FORTRAN statement
 !
 ! Former revisions:
@@ -135,5 +135,5 @@
 !
 !--    Write buffer contents to disc immediately
-       CALL local_flush( 15 )
+       FLUSH( 15 )
 
     ENDIF
Index: palm/trunk/SOURCE/spectrum.f90
===================================================================
--- palm/trunk/SOURCE/spectrum.f90	(revision 1807)
+++ palm/trunk/SOURCE/spectrum.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-!
+! MPI module used by default on all machines
 !
 ! Former revisions:
@@ -291,8 +291,8 @@
        USE kinds
 
-#if defined( __lc )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#else
        USE MPI
-#else
-       INCLUDE "mpif.h"
 #endif
        USE pegrid,                                                             &
@@ -393,8 +393,8 @@
        USE kinds
 
-#if defined( __lc )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#else
        USE MPI
-#else
-       INCLUDE "mpif.h"
 #endif
        USE pegrid,                                                             &
@@ -534,8 +534,8 @@
        USE kinds
 
-#if defined( __lc )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#else
        USE MPI
-#else
-       INCLUDE "mpif.h"
 #endif
        USE pegrid,                                                             &
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 1807)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-!
+! output message in case unscheduled radiation calls removed
 !
 ! Former revisions:
@@ -839,7 +839,4 @@
                 IF ( .NOT. force_radiation_call )  THEN
                    time_radiation = time_radiation - dt_radiation
-                ELSE
-                   WRITE(9,*) "Unscheduled radiation call at ", simulated_time
-                   CALL LOCAL_FLUSH ( 9 )
                 ENDIF
 
Index: palm/trunk/SOURCE/tridia_solver.f90
===================================================================
--- palm/trunk/SOURCE/tridia_solver.f90	(revision 1807)
+++ palm/trunk/SOURCE/tridia_solver.f90	(revision 1808)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! test output removed
 ! 
 ! Former revisions:
@@ -509,7 +509,4 @@
 !--    the exchanged loops create bank conflicts. The following directive
 !--    prohibits loop exchange and the loops perform much better.
-!       tn = omp_get_thread_num()
-!       WRITE( 120+tn, * ) '+++ id=',myid,' nx=',nx,' thread=', omp_get_thread_num()
-!       CALL local_flush( 120+tn )
 !CDIR NOLOOPCHG
        DO  k = 0, nz-1
@@ -519,6 +516,4 @@
           ENDDO
        ENDDO
-!       WRITE( 120+tn, * ) '+++ id=',myid,' end of first tridia loop   thread=', omp_get_thread_num()
-!       CALL local_flush( 120+tn )
 
        IF ( j <= nnyh )  THEN
Index: palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- palm/trunk/UTIL/combine_plot_fields.f90	(revision 1807)
+++ palm/trunk/UTIL/combine_plot_fields.f90	(revision 1808)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! cpu measurements are done with standard FORTRAN routine on every machine
 ! 
 ! Former revisions:
@@ -107,11 +107,5 @@
                      ze, zza, zze
 
-#if defined( __lc ) || defined( __decalpha )
-    INTEGER(8)                  ::  count, count_rate
-#elif defined( __nec )
-    INTEGER(iwp)                ::  count, count_rate
-#elif defined( __ibm )
-    INTEGER(8)                  ::  IRTC
-#endif
+    INTEGER(8)                        ::  count, count_rate
 
     INTEGER(iwp), DIMENSION(0:1)      ::  current_level, current_var,          &
@@ -180,12 +174,6 @@
 !
 !--       Take current time
-#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
           CALL SYSTEM_CLOCK( count, count_rate )
           cpu_start_time = REAL( count ) / REAL( count_rate )
-#elif defined( __ibm )
-          cpu_start_time = IRTC( ) * 1E-9
-#else
-          PRINT*,  '+++ INFORMATIVE: no time measurement defined on this host'
-#endif
 
           netcdf_parallel = .FALSE.
@@ -553,16 +541,8 @@
 !--       Output required cpu time
           IF ( danz /= 0  .AND.  .NOT. netcdf_parallel )  THEN
-#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
              CALL SYSTEM_CLOCK( count, count_rate )
              cpu_end_time = REAL( count ) / REAL( count_rate )
              WRITE (*,'(5X,A,F9.3,A)')  'Required cpu-time: ', &
                                         cpu_end_time-cpu_start_time, ' sec'
-#elif defined( __ibm )
-             cpu_end_time = IRTC( ) * 1E-9
-             WRITE (*,'(5X,A,F9.3,A)')  'Required cpu-time: ', &
-                                        cpu_end_time-cpu_start_time, ' sec'
-#else
-             CONTINUE
-#endif
           ENDIF
 
@@ -592,12 +572,6 @@
 !
 !--    Take current time
-#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
        CALL SYSTEM_CLOCK( count, count_rate )
        cpu_start_time = REAL( count ) / REAL( count_rate )
-#elif defined( __ibm )
-       cpu_start_time = IRTC( ) * 1E-9
-#else
-       PRINT*,  '+++ INFORMATIVE: no time measurement defined on this host'
-#endif
 
 !
@@ -885,14 +859,8 @@
 !
 !--       Output required cpu time
-#if defined( __lc ) || defined( __decalpha ) || defined( __nec )
           CALL SYSTEM_CLOCK( count, count_rate )
           cpu_end_time = REAL( count ) / REAL( count_rate )
           WRITE (*,'(5X,A,F9.3,A)')  'Required cpu-time: ', &
                                      cpu_end_time-cpu_start_time, ' sec'
-#elif defined( __ibm )
-          cpu_end_time = IRTC( ) * 1E-9
-          WRITE (*,'(5X,A,F9.3,A)')  'Required cpu-time: ', &
-                                     cpu_end_time-cpu_start_time, ' sec'
-#endif
 
        ENDIF
