Index: palm/trunk/SCRIPTS/.mrun.config.default
===================================================================
--- palm/trunk/SCRIPTS/.mrun.config.default	(revision 1401)
+++ palm/trunk/SCRIPTS/.mrun.config.default	(revision 1402)
@@ -33,10 +33,10 @@
 %compiler_name     mpif90                                        <hi> parallel
 %compiler_name_ser ifort                                         <hi> parallel
-%cpp_options       -cpp:-D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   <hi> parallel
+%cpp_options       -cpp:-D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__intel_compiler   <hi> parallel
 %netcdf_inc        -I:<replace by netcdf include path>           <hi> parallel
 %netcdf_lib        -L<replace by netcdf library path>:-lnetcdf   <hi> parallel
 %mopts             -j:4                                          <hi> parallel
-%fopts             -xS:-r8:-nbs:-convert:little_endian:-I:<replace by mpi include path>   <hi> parallel
-%lopts             -xS:-r8:-nbs:-Vaxlib:-L:<replace by mpi library path>                  <hi> parallel
+%fopts             -xS:-nbs:-convert:little_endian:-I:<replace by mpi include path>   <hi> parallel
+%lopts             -xS:-nbs:-Vaxlib:-L:<replace by mpi library path>                  <hi> parallel
 # if you want to use your own hostfile, uncomment next line
 #%hostfile          $base_directory/.hostfile                    <hi> parallel
@@ -52,10 +52,10 @@
 %compiler_name     mpif90                                        <hi> parallel trace
 %compiler_name_ser ifort                                         <hi> parallel trace
-%cpp_options       -cpp:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   <hi> parallel trace
+%cpp_options       -cpp:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__intel_compiler   <hi> parallel trace
 %netcdf_inc        -I:<replace by netcdf include path>           <hi> parallel trace
 %netcdf_lib        -L<replace by netcdf library path>:-lnetcdf   <hi> parallel trace
 %mopts             -j:4                                          <hi> parallel trace
-%fopts             -C:-check:nooutput_conversion:-fpe0:-debug:-traceback:-g:-w:-xT:-O0:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-convert:little_endian  <hi> parallel trace
-%lopts             -C:-check:nooutput_conversion:-fpe0:-debug:-traceback:-g:-w:-xT:-O0:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-Vaxlib  <hi> parallel trace
+%fopts             -C:-check:nooutput_conversion:-fpe0:-debug:-traceback:-g:-w:-xT:-O0:-cpp:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-convert:little_endian  <hi> parallel trace
+%lopts             -C:-check:nooutput_conversion:-fpe0:-debug:-traceback:-g:-w:-xT:-O0:-cpp:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-Vaxlib  <hi> parallel trace
 # if you want to use your own hostfile, uncomment next line
 #%hostfile          $base_directory/.hostfile                    <hi> parallel trace
Index: palm/trunk/SCRIPTS/.mrun.config.imuk
===================================================================
--- palm/trunk/SCRIPTS/.mrun.config.imuk	(revision 1401)
+++ palm/trunk/SCRIPTS/.mrun.config.imuk	(revision 1402)
@@ -23,5 +23,5 @@
 %compiler_name     ifort                                                       lcmuk
 %compiler_name_ser ifort                                                       lcmuk
-%cpp_options       -cpp:-D__netcdf                                             lcmuk
+%cpp_options       -cpp:-D__netcdf:-D__intel_compiler                          lcmuk
 %netcdf_inc        -I:/muksoft/packages/netcdf/3.6.3/include                   lcmuk
 %netcdf_lib        -L/muksoft/packages/netcdf/3.6.3/lib:-lnetcdf               lcmuk
@@ -35,5 +35,5 @@
 %compiler_name     mpif90                                                      lcmuk parallel
 %compiler_name_ser ifort                                                       lcmuk parallel
-%cpp_options       -cpp:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf  lcmuk parallel
+%cpp_options       -cpp:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__intel_compiler  lcmuk parallel
 %netcdf_inc        -I:/muksoft/packages/netcdf/3.6.3/include                   lcmuk parallel
 %netcdf_lib        -L/muksoft/packages/netcdf/3.6.3/lib:-lnetcdf               lcmuk parallel
@@ -48,5 +48,5 @@
 %compiler_name     mpif90                                                      lcmuk parallel trace
 %compiler_name_ser ifort                                                       lcmuk parallel trace
-%cpp_options       -DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   lcmuk parallel trace
+%cpp_options       -DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__intel_compiler   lcmuk parallel trace
 %netcdf_inc        -I:/muksoft/packages/netcdf/3.6.3/include            lcmuk parallel trace
 %netcdf_lib        -L/muksoft/packages/netcdf/3.6.3/lib:-lnetcdf        lcmuk parallel trace
Index: palm/trunk/SCRIPTS/.mrun.config.kiaps
===================================================================
--- palm/trunk/SCRIPTS/.mrun.config.kiaps	(revision 1401)
+++ palm/trunk/SCRIPTS/.mrun.config.kiaps	(revision 1402)
@@ -35,6 +35,6 @@
 %netcdf_lib          -L/opt/kiaps/apps/netcdf/4.1.3/pgi/11.10/lib:-lnetcdf:-lnetcdff  lckiaps parallel
 %mopts               -j:4                              lckiaps parallel
-%fopts               -fastsse:-r8                      lckiaps parallel
-%lopts               -fastsse:-r8                      lckiaps parallel
+%fopts               -fastsse                          lckiaps parallel
+%lopts               -fastsse                          lckiaps parallel
 %remote_username     <replace by your kiaps username>  lckiaps parallel
 %memory              1500                              lckiaps parallel
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 1401)
+++ palm/trunk/SCRIPTS/mrun	(revision 1402)
@@ -22,5 +22,5 @@
 # Current revisions:
 # ------------------
-# 
+# batch_job added to envpar-NAMELIST
 # 
 # Former revisions:
@@ -1758,6 +1758,8 @@
  if [[ "$ENVIRONMENT" = BATCH ]]
  then
+    batch_job=.TRUE.
     jobmo=BATCH
  else
+    batch_job=.FALSE.
     jobmo=INTERACTIVE
  fi
@@ -3180,5 +3182,6 @@
           maximum_cpu_time_allowed = ${cpumax}.,
           revision = '$global_revision',
-          local_dvrserver_running = $local_dvrserver_running /
+          local_dvrserver_running = $local_dvrserver_running,
+          batch_job = $batch_job /
 
 %%END%%
Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 1401)
+++ palm/trunk/SOURCE/Makefile	(revision 1402)
@@ -20,5 +20,5 @@
 # Current revisions:
 # ------------------
-# 
+# progress_bar added
 # 
 # Former revisions:
@@ -207,6 +207,6 @@
 	mod_particle_attributes.f90 netcdf.f90 nudging.f90 \
 	package_parin.f90 palm.f90 parin.f90 plant_canopy_model.f90 poisfft.f90 \
-	poismg.f90 prandtl_fluxes.f90 pres.f90 print_1d.f90 \
-	production_e.f90 prognostic_equations.f90 random_function.f90 \
+	poismg.f90 prandtl_fluxes.f90 pres.f90 print_1d.f90 production_e.f90 \
+	prognostic_equations.f90 progress_bar.f90 random_function.f90 \
 	random_gauss.f90 random_generator_parallel.f90 read_3d_binary.f90 \
 	read_var_list.f90 run_control.f90 \
@@ -372,5 +372,5 @@
 package_parin.o: modules.o mod_kinds.o
 palm.o: modules.o cpulog.o ls_forcing.o mod_kinds.o nudging.o
-parin.o: modules.o cpulog.o mod_kinds.o
+parin.o: modules.o cpulog.o mod_kinds.o progress_bar.o
 plant_canopy_model.o: modules.o mod_kinds.o
 poisfft.o: modules.o cpulog.o fft_xy.o mod_kinds.o tridia_solver.o
@@ -402,5 +402,5 @@
 time_integration.o: modules.o advec_ws.o buoyancy.o calc_mean_profile.o \
 	cpulog.o interaction_droplets_ptq.o ls_forcing.o mod_kinds.o \
-	nudging.o production_e.o prognostic_equations.o user_actions.o
+	nudging.o production_e.o prognostic_equations.o progress_bar.o user_actions.o
 time_to_string.o: mod_kinds.o
 timestep.o: modules.o cpulog.o mod_kinds.o
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 1401)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! location messages modified
 ! 
 ! Former revisions:
@@ -268,5 +268,5 @@
 
 
-    CALL location_message( 'checking parameters' )
+    CALL location_message( 'checking parameters', .FALSE. )
 
 !
@@ -3702,5 +3702,5 @@
     ENDIF
 
-    CALL location_message( 'finished' )
+    CALL location_message( 'finished', .TRUE. )
 
 !
Index: palm/trunk/SOURCE/cpulog.f90
===================================================================
--- palm/trunk/SOURCE/cpulog.f90	(revision 1401)
+++ palm/trunk/SOURCE/cpulog.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! location messages added
 !
 ! Former revisions:
@@ -293,4 +293,6 @@
 
 
+       CALL location_message( 'calculating cpu statistics', .FALSE. )
+
 !
 !--    Compute cpu-times in seconds
@@ -532,4 +534,5 @@
        ENDIF
 
+       CALL location_message( 'finished', .TRUE. )
 
    100 FORMAT (A/11('-')//'CPU measures for ',I5,' PEs (',I5,'(x) * ',I5,'(y', &
Index: palm/trunk/SOURCE/fft_xy.f90
===================================================================
--- palm/trunk/SOURCE/fft_xy.f90	(revision 1401)
+++ palm/trunk/SOURCE/fft_xy.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! fortran bugfix for r1392
 ! 
 ! Former revisions:
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 1401)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! location messages modified
 ! 
 ! Former revisions:
@@ -234,5 +234,5 @@
 
 
-    CALL location_message( 'allocating arrays' )
+    CALL location_message( 'allocating arrays', .FALSE. )
 !
 !-- Allocate arrays
@@ -612,5 +612,5 @@
     intermediate_timestep_count = 1  ! needed when simulated_time = 0.0
        
-    CALL location_message( 'finished' )
+    CALL location_message( 'finished', .TRUE. )
 !
 !-- Initialize model variables
@@ -622,5 +622,5 @@
        IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
 
-          CALL location_message( 'initializing with 1D model profiles' )
+          CALL location_message( 'initializing with 1D model profiles', .FALSE. )
 !
 !--       Use solutions of the 1D model as initial profiles,
@@ -741,10 +741,10 @@
           ENDIF
 
-          CALL location_message( 'finished' )
+          CALL location_message( 'finished', .TRUE. )
 
        ELSEIF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 ) &
        THEN
 
-          CALL location_message( 'initializing with constant profiles' )
+          CALL location_message( 'initializing with constant profiles', .FALSE. )
 !
 !--       Overwrite initial profiles in case of nudging
@@ -855,19 +855,20 @@
           IF ( sloping_surface )  CALL init_slope
 
-          CALL location_message( 'finished' )
+          CALL location_message( 'finished', .TRUE. )
 
        ELSEIF ( INDEX(initializing_actions, 'by_user') /= 0 ) &
        THEN
 
-          CALL location_message( 'initializing by user' )
+          CALL location_message( 'initializing by user', .FALSE. )
 !
 !--       Initialization will completely be done by the user
           CALL user_init_3d_model
 
-          CALL location_message( 'finished' )
-
-       ENDIF
-
-       CALL location_message( 'initializing statistics, boundary conditions, etc.' )
+          CALL location_message( 'finished', .TRUE. )
+
+       ENDIF
+
+       CALL location_message( 'initializing statistics, boundary conditions, etc.', &
+                              .FALSE. )
 
 !
@@ -1158,5 +1159,5 @@
        ENDIF
        
-       CALL location_message( 'finished' )
+       CALL location_message( 'finished', .TRUE. )
 
     ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data'  .OR.    &
@@ -1164,5 +1165,6 @@
     THEN
 
-       CALL location_message( 'initializing in case of restart / cyclic_fill' )
+       CALL location_message( 'initializing in case of restart / cyclic_fill', &
+                              .FALSE. )
 !
 !--    When reading data for cyclic fill of 3D prerun data files, read
@@ -1349,5 +1351,5 @@
        IF ( ocean )  tsa_m = 0.0_wp
 
-       CALL location_message( 'finished' )
+       CALL location_message( 'finished', .TRUE. )
 
     ELSE
@@ -1520,10 +1522,10 @@
          TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
 
-       CALL location_message( 'creating initial disturbances' )
+       CALL location_message( 'creating initial disturbances', .FALSE. )
        CALL disturb_field( nzb_u_inner, tend, u )
        CALL disturb_field( nzb_v_inner, tend, v )
-       CALL location_message( 'finished' )
-
-       CALL location_message( 'calling pressure solver' )
+       CALL location_message( 'finished', .TRUE. )
+
+       CALL location_message( 'calling pressure solver', .FALSE. )
        n_sor = nsor_ini
        !$acc data copyin( d, ddzu, ddzw, nzb_s_inner, nzb_u_inner )            &
@@ -1534,5 +1536,5 @@
        !$acc end data
        n_sor = nsor
-       CALL location_message( 'finished' )
+       CALL location_message( 'finished', .TRUE. )
 
     ENDIF
@@ -1908,5 +1910,5 @@
     DEALLOCATE( ngp_2dh_l, ngp_2dh_outer_l, ngp_3d_inner_l, ngp_3d_inner_tmp )
 
-    CALL location_message( 'leaving init_3d_model' )
+    CALL location_message( 'leaving init_3d_model', .TRUE. )
 
  END SUBROUTINE init_3d_model
Index: palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- palm/trunk/SOURCE/init_pegrid.f90	(revision 1401)
+++ palm/trunk/SOURCE/init_pegrid.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! location messages modified
 ! 
 ! Former revisions:
@@ -178,5 +178,6 @@
 #if defined( __parallel )
 
-    CALL location_message( 'creating virtual PE grids + MPI derived data types' )
+    CALL location_message( 'creating virtual PE grids + MPI derived data types', &
+                           .FALSE. )
 !
 !-- Determine the processor topology or check it, if prescribed by the user
@@ -1074,5 +1075,5 @@
                         comm1dx, ierr )
 
-    CALL location_message( 'finished' )
+    CALL location_message( 'finished', .TRUE. )
 
 #elif ! defined ( __parallel )
Index: palm/trunk/SOURCE/message.f90
===================================================================
--- palm/trunk/SOURCE/message.f90	(revision 1401)
+++ palm/trunk/SOURCE/message.f90	(revision 1402)
@@ -21,5 +21,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! formatting of messages modified
 ! 
 ! Former revisions:
@@ -83,5 +83,4 @@
     pe_out_of_range = .FALSE.
 
-!    print*, '#1'
 !
 !-- Create the complete output string, starting with the message level
@@ -97,5 +96,4 @@
     ENDIF
 
-!    print*, '#2'
 !
 !-- Add the message identifier and the generating routine
@@ -113,5 +111,4 @@
     
 
-!    print*, '#3'
 !
 !-- Output the output string and the corresponding message string which had
@@ -124,5 +121,4 @@
        do_output = .TRUE.
     ENDIF
-!    print*, '#4'
 #if defined( __parallel )
 !
@@ -132,5 +128,4 @@
        IF ( myid == 0 )  do_output = .TRUE.
     ENDIF
-!    print*, '#5'
 #endif
 
@@ -138,10 +133,9 @@
 !-- Now do the output
     IF ( do_output )  THEN
-!    print*, '#6'
+
        IF ( file_id == 6 )  THEN
 !
 !--       Output on stdout
           WRITE( *, '(A/)' )  TRIM( header_string )
-!    print*, '#7'
 !
 !--       Cut message string into pieces and output one piece per line.
@@ -155,5 +149,4 @@
           ENDDO
           WRITE( *, '(4X,A)' )  TRIM( message_string )
-!    print*, '#8'
           WRITE( *, '(4X,A)' )  ''
           WRITE( *, '(4X,A)' )  TRIM( information_string_1 ) 
@@ -162,5 +155,4 @@
 
        ELSE
-!    print*, '#9'
 !
 !--       Output on requested file id (file must have been opened elsewhere!)
@@ -185,5 +177,4 @@
           IF ( flush == 1 )  CALL local_flush( file_id )
        ENDIF
-!    print*, '#10'
 
        IF ( pe_out_of_range )  THEN
@@ -195,5 +186,4 @@
           WRITE ( *, '(A)' )  '    Output is done on PE0 instead'
        ENDIF
-!    print*, '#11'
 
     ENDIF
@@ -201,15 +191,13 @@
 !
 !-- Abort execution, if requested
-!    print*, '#12'
     IF ( requested_action > 0 )  THEN
        abort_mode = requested_action
        CALL local_stop
     ENDIF
-!    print*, '#13'
 
  END SUBROUTINE message
 
 
- SUBROUTINE location_message( location )
+ SUBROUTINE location_message( location, advance )
 
 !------------------------------------------------------------------------------!
@@ -219,4 +207,7 @@
 !------------------------------------------------------------------------------!
 
+    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                        &
+        ONLY :  OUTPUT_UNIT
+
     USE pegrid,                                                                &
         ONLY :  myid
@@ -224,10 +215,16 @@
     IMPLICIT NONE
 
-    CHARACTER(LEN=*) ::  location
+    CHARACTER(LEN=*) ::  location !: text to be output on stdout
+    LOGICAL          ::  advance  !: switch for advancing/noadvancing I/O
 
 
     IF ( myid == 0 )  THEN
-       WRITE ( 6, '(6X,''... '',A)' )  TRIM( location )
-       CALL local_flush( 6 )
+       IF ( advance )  THEN
+          WRITE ( OUTPUT_UNIT, '(6X,''--- '',A)' )  TRIM( location )
+       ELSE
+          WRITE ( OUTPUT_UNIT, '(6X,''... '',A)', ADVANCE='NO' )               &
+                TRIM( location )
+       ENDIF
+       CALL local_flush( OUTPUT_UNIT )
     ENDIF
 
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 1401)
+++ palm/trunk/SOURCE/palm.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! location messages added
 ! 
 ! Former revisions:
@@ -285,4 +285,6 @@
        CALL cpu_log( log_point(22), 'write_3d_binary', 'start' )
 
+       CALL location_message( 'writing restart data', .FALSE. )
+
        CALL check_open( 14 )
 
@@ -297,4 +299,6 @@
 #endif
        ENDDO
+
+       CALL location_message( 'finished', .TRUE. )
 
        CALL cpu_log( log_point(22), 'write_3d_binary', 'stop' )
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 1401)
+++ palm/trunk/SOURCE/parin.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! location messages modified, batch_job included in envpar-NAMELIST
 ! 
 ! Former revisions:
@@ -245,4 +245,7 @@
         ONLY:  cross_profiles, cross_ts_uymax, cross_ts_uymin,                 &
                profile_columns, profile_rows
+
+    USE progress_bar,                                                          &
+        ONLY :  batch_job
 
     USE statistics,                                                            &
@@ -333,17 +336,17 @@
 
 
-    NAMELIST /envpar/  host, local_dvrserver_running, maximum_cpu_time_allowed,&
-                       maximum_parallel_io_streams, revision, return_addres, &
-                       return_username, run_identifier, tasks_per_node, &
-                       write_binary
+    NAMELIST /envpar/  batch_job, host, local_dvrserver_running, &
+                       maximum_cpu_time_allowed, maximum_parallel_io_streams, &
+                       revision, return_addres, return_username, &
+                       run_identifier, tasks_per_node, write_binary
 
 !
 !-- First read values of environment variables (this NAMELIST file is
 !-- generated by mrun)
-    CALL location_message( 'reading environment parameters from ENVPAR' )
+    CALL location_message( 'reading environment parameters from ENVPAR', .FALSE. )
     OPEN ( 90, FILE='ENVPAR', STATUS='OLD', FORM='FORMATTED', ERR=30 )
     READ ( 90, envpar, ERR=31, END=32 )
     CLOSE ( 90 )
-    CALL location_message( 'finished' )
+    CALL location_message( 'finished', .TRUE. )
 
 !
@@ -368,5 +371,5 @@
     io_group  = MOD( myid+1, io_blocks )
 
-    CALL location_message( 'reading NAMELIST parameters from PARIN' )
+    CALL location_message( 'reading NAMELIST parameters from PARIN', .FALSE. )
 !
 !-- Data is read in parallel by groups of PEs
@@ -487,5 +490,5 @@
     ENDDO
 
-    CALL location_message( 'finished' )
+    CALL location_message( 'finished', .TRUE. )
 
     RETURN
Index: palm/trunk/SOURCE/progress_bar.f90
===================================================================
--- palm/trunk/SOURCE/progress_bar.f90	(revision 1402)
+++ palm/trunk/SOURCE/progress_bar.f90	(revision 1402)
@@ -0,0 +1,153 @@
+ MODULE progress_bar
+
+!--------------------------------------------------------------------------------!
+! 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$
+!
+! Description:
+! ------------
+! CPU-time measurements for any program part whatever. Results of the
+!------------------------------------------------------------------------------!
+
+    USE control_parameters,                                                    &
+        ONLY : end_time, simulated_time, simulated_time_at_begin, time_restart
+
+    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                     &
+        ONLY :  OUTPUT_UNIT
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC   batch_job, finish_progress_bar, output_progress_bar
+
+    CHARACTER(LEN=60) ::  bar      !: progress bar, initially filled with "_"
+    CHARACTER(LEN=60) ::  crosses  !: filled with "X"
+
+    INTEGER(iwp) ::  ilength !: length of progress bar filled with "X"
+
+    LOGICAL ::  batch_job = .FALSE.   !: switch to determine the run mode
+
+    REAL(wp) ::  time_to_be_simulated !: in sec
+
+    LOGICAL ::  initialized = .FALSE. !: switch to determine if bar is initialized
+
+    SAVE
+
+ CONTAINS
+
+    SUBROUTINE init_progress_bar
+
+       IMPLICIT NONE
+
+!
+!--    Calculate the time to be simulated in this job
+!--    (in case of automatic restarts the calculated time will probably be
+!--    larger than the time which will actually be simulated)
+       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time  .AND.&
+            time_restart > simulated_time_at_begin )  THEN
+          time_to_be_simulated = time_restart - simulated_time_at_begin
+       ELSE
+          time_to_be_simulated = end_time     - simulated_time_at_begin
+       ENDIF
+
+       bar = '____________________________________________________________'
+       crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
+!
+!--    Line feed on stdout to seperate the progress bar from previous messages
+       WRITE ( OUTPUT_UNIT, '(1X)' )
+#if defined( __intel_compiler )
+!
+!--    The Intel compiler does not allow to immediately flush the output buffer
+!--    in case that option ADVANCE='NO' is used in the write statement.
+!--    A workaround is to set a special carriage control feature and use "+" as
+!--    first output character, but this non-standard and only available with the
+!--    Intel compiler
+       OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
+#endif
+       initialized = .TRUE.
+
+    END SUBROUTINE init_progress_bar
+
+
+    SUBROUTINE output_progress_bar
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!------------------------------------------------------------------------------!
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  remaining_time_in_percent  !: remaining time to be simulated
+                                               !: in the job
+
+!
+!--    Porgress bar does not make sense in batch mode (and also ADVANCE=no does
+!--    not properly work in batch mode on Cray XC30)
+       IF ( batch_job )  RETURN
+
+       IF ( .NOT. initialized )  CALL init_progress_bar
+!
+!--    Calculate length of progress bar
+       remaining_time_in_percent =                                             &
+             ( simulated_time - simulated_time_at_begin ) / time_to_be_simulated
+
+       ilength = remaining_time_in_percent * 60.0_wp
+       ilength = MIN( ilength, 60 )
+
+       bar(1:ilength) = crosses(1:ilength)
+
+#if defined( __intel_compiler )
+       WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )           &
+               '+', bar,                                                       &
+                MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
+#else
+       WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',            &
+               ADVANCE='NO' )  CHAR( 13 ), bar,                                &
+                MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
+#endif
+       CALL local_flush( OUTPUT_UNIT )
+
+    END SUBROUTINE output_progress_bar
+
+    SUBROUTINE finish_progress_bar
+
+       IMPLICIT NONE
+
+       IF ( batch_job )  RETURN
+
+#if defined( __intel_compiler )
+!
+!--    Reset to the default carriage control
+       OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
+#endif
+!
+!--    Line feed when simulation has finished
+       WRITE ( OUTPUT_UNIT, '(1X)' )
+
+    END SUBROUTINE finish_progress_bar
+
+ END MODULE progress_bar
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 1401)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 1402)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! location messages modified
 ! 
 ! Former revisions:
@@ -205,4 +205,7 @@
         ONLY:  production_e_init
 
+    USE progress_bar,                                                          &
+        ONLY:  finish_progress_bar, output_progress_bar
+
     USE prognostic_equations_mod,                                              &
         ONLY:  prognostic_equations_acc, prognostic_equations_cache,           &
@@ -253,5 +256,5 @@
 #endif
 
-    CALL location_message( 'beginning with time-stepping' )
+    CALL location_message( 'start with time-stepping', .TRUE. )
 !
 !-- Start of the time loop
@@ -944,8 +947,14 @@
        CALL user_actions( 'after_timestep' )
 
+!
+!--    Output elapsed simulated time in form of a progress bar on stdout
+       IF ( myid == 0 )  CALL output_progress_bar
+
        CALL cpu_log( log_point_s(10), 'timesteps', 'stop' )
 
 
     ENDDO   ! time loop
+
+    IF ( myid == 0 )  CALL finish_progress_bar
 
 #if defined( __dvrp_graphics )
@@ -953,5 +962,5 @@
 #endif
 
-    CALL location_message( 'finished time-stepping' )
+    CALL location_message( 'finished time-stepping', .TRUE. )
 
  END SUBROUTINE time_integration
