Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 3986)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3943 2019-05-02 09:50:41Z maronga
 ! Added output of qsws for green roofs.
 ! 
@@ -306,5 +309,5 @@
         ONLY:  data_output_2d_on_each_pe,                                      &
                data_output_xy, data_output_xz, data_output_yz,                 &
-               debug_output, debug_string,                                     &
+               debug_output_timestep,                                          &
                do2d,                                                           &
                do2d_xy_last_time, do2d_xy_time_count,                          &
@@ -404,8 +407,5 @@
 
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'data_output_2d'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'data_output_2d', 'start' )
 !
 !-- Immediate return, if no output is requested (no respective sections
@@ -2284,8 +2284,6 @@
     CALL cpu_log( log_point(3), 'data_output_2d', 'stop' )
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'data_output_2d'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'data_output_2d', 'end' )
+
 
  END SUBROUTINE data_output_2d
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 3986)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -262,5 +265,5 @@
 
     USE control_parameters,                                                    &
-        ONLY:  debug_output, debug_string,                                     &
+        ONLY:  debug_output_timestep,                                          &
                do3d, do3d_no, do3d_time_count, io_blocks, io_group,            &
                land_surface, message_string, ntdim_3d, nz_do3d, psolver,       &
@@ -341,8 +344,5 @@
     IF ( do3d_no(av) == 0 )  RETURN
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'data_output_3d'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'data_output_3d', 'start' )
 
     CALL cpu_log (log_point(14),'data_output_3d','start')
@@ -876,8 +876,6 @@
     CALL cpu_log( log_point(14), 'data_output_3d', 'stop' )
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'data_output_3d'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'data_output_3d', 'end' )
+
 
  END SUBROUTINE data_output_3d
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 3986)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 3987)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Convert most location messages to debug messages to reduce output in
+! job logfile to a minimum
+! 
+! 
 ! unused variable removed
 ! 
@@ -737,6 +741,8 @@
     INTEGER(iwp) ::  nz_s_shift_l !< topography-top index on scalar-grid, used to vertically shift initial profiles
 
-    CALL location_message( 'init_3d_model', 'start' )
-    CALL location_message( 'allocating arrays', 'start' )
+
+    CALL location_message( 'model initialization', 'start' )
+
+    IF ( debug_output )  CALL debug_message( 'allocating arrays', 'start' )
 !
 !-- Allocate arrays
@@ -1087,5 +1093,5 @@
     intermediate_timestep_count = 0  ! needed when simulated_time = 0.0
        
-    CALL location_message( 'allocating arrays', 'finished' )
+    IF ( debug_output )  CALL debug_message( 'allocating arrays', 'end' )
 
 !
@@ -1110,5 +1116,5 @@
 !--    Initialization with provided input data derived from larger-scale model
        IF ( INDEX( initializing_actions, 'inifor' ) /= 0 )  THEN
-          CALL location_message( 'initializing with INIFOR', 'start' )
+          IF ( debug_output )  CALL debug_message( 'initializing with INIFOR', 'start' )
 !
 !--       Read initial 1D profiles or 3D data from NetCDF file, depending 
@@ -1313,10 +1319,10 @@
           CALL init_surfaces
 
-          CALL location_message( 'initializing with INIFOR', 'finished' )
+          IF ( debug_output )  CALL debug_message( 'initializing with INIFOR', 'end' )
 !
 !--    Initialization via computed 1D-model profiles
        ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
 
-          CALL location_message( 'initializing with 1D model profiles', 'start' )
+          IF ( debug_output )  CALL debug_message( 'initializing with 1D model profiles', 'start' )
 !
 !--       Use solutions of the 1D model as initial profiles,
@@ -1380,10 +1386,10 @@
           CALL init_surfaces
 
-          CALL location_message( 'initializing with 1D model profiles', 'finished' )
+          IF ( debug_output )  CALL debug_message( 'initializing with 1D model profiles', 'end' )
 
        ELSEIF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 )    &
        THEN
 
-          CALL location_message( 'initializing with constant profiles', 'start' )
+          IF ( debug_output )  CALL debug_message( 'initializing with constant profiles', 'start' )
 
 !
@@ -1448,10 +1454,10 @@
           CALL init_surfaces
           
-          CALL location_message( 'initializing with constant profiles', 'finished' )
+          IF ( debug_output )  CALL debug_message( 'initializing with constant profiles', 'end' )
 
        ELSEIF ( INDEX(initializing_actions, 'by_user') /= 0 )                  &
        THEN
 
-          CALL location_message( 'initializing by user', 'start' )
+          IF ( debug_output )  CALL debug_message( 'initializing by user', 'start' )
 !
 !--       Pre-initialize surface variables, i.e. setting start- and end-indices
@@ -1463,9 +1469,9 @@
           CALL user_init_3d_model
 
-          CALL location_message( 'initializing by user', 'finished' )
-
-       ENDIF
-
-       CALL location_message( 'initializing statistics, boundary conditions, etc.', 'start' )
+          IF ( debug_output )  CALL debug_message( 'initializing by user', 'end' )
+
+       ENDIF
+
+       IF ( debug_output )  CALL debug_message( 'initializing statistics, boundary conditions, etc.', 'start' )
 
 !
@@ -1601,5 +1607,5 @@
        ENDIF       
 
-       CALL location_message( 'initializing statistics, boundary conditions, etc.', 'finished' )
+       IF ( debug_output )  CALL debug_message( 'initializing statistics, boundary conditions, etc.', 'end' )
 
     ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data'  .OR.         &
@@ -1607,5 +1613,5 @@
     THEN
 
-       CALL location_message( 'initializing in case of restart / cyclic_fill', 'start' )
+       IF ( debug_output )  CALL debug_message( 'initializing in case of restart / cyclic_fill', 'start' )
 !
 !--    Initialize surface elements and its attributes, e.g. heat- and 
@@ -1867,5 +1873,5 @@
        IF ( passive_scalar )  ts_m  = 0.0_wp
 
-       CALL location_message( 'initializing in case of restart / cyclic_fill', 'finished' )
+       IF ( debug_output )  CALL debug_message( 'initializing in case of restart / cyclic_fill', 'end' )
 
     ELSE
@@ -2228,4 +2234,5 @@
          TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
 
+       IF ( debug_output )  CALL debug_message( 'creating disturbances + applying pressure solver', 'start' )
 !
 !--    Needed for both disturb_field and pres
@@ -2235,8 +2242,6 @@
 !$ACC COPY(v(nzb:nzt+1,nysg:nyng,nxlg:nxrg))
 
-       CALL location_message( 'creating initial disturbances', 'start' )
        CALL disturb_field( 'u', tend, u )
        CALL disturb_field( 'v', tend, v )
-       CALL location_message( 'creating initial disturbances', 'finished' )
 
 !$ACC DATA &
@@ -2255,12 +2260,12 @@
 !$ACC COPYIN(bc_h(1)%k(1:bc_h(1)%ns))
 
-       CALL location_message( 'applying pressure solver', 'start' )
        n_sor = nsor_ini
        CALL pres
        n_sor = nsor
-       CALL location_message( 'applying pressure solver', 'finished' )
 
 !$ACC END DATA
 !$ACC END DATA
+
+       IF ( debug_output )  CALL debug_message( 'creating disturbances + applying pressure solver', 'end' )
 
     ENDIF
@@ -2466,5 +2471,5 @@
 
 
-    CALL location_message( 'init_3d_model', 'finished' )
+    CALL location_message( 'model initialization', 'finished' )
 
  END SUBROUTINE init_3d_model
Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3964 2019-05-09 09:48:32Z suehring
 ! In a nested child domain, distinguish between soil moisture and temperature 
 ! initialization from parent via dynamic input file. Further, initialize soil
@@ -565,9 +568,9 @@
     USE control_parameters,                                                    &
         ONLY:  cloud_droplets, coupling_start_time,                            &
-               debug_output, debug_string,                                     &
+               debug_output, debug_output_timestep, debug_string,              &
                dt_3d,                                                          &
                end_time, humidity, intermediate_timestep_count,                &
                initializing_actions, intermediate_timestep_count_max,          &
-               land_surface, max_masks, pt_surface,             &
+               land_surface, max_masks, pt_surface,                            &
                rho_surface, spinup, spinup_pt_mean, spinup_time,               &
                surface_pressure, timestep_scheme, tsc,                         &
@@ -1908,7 +1911,6 @@
     TYPE(surf_type), POINTER  ::  surf  !< surface-date type variable
 
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
+
+    IF ( debug_output_timestep )  THEN
        WRITE( debug_string, * ) 'lsm_energy_balance', horizontal, l
        CALL debug_message( debug_string, 'start' )
@@ -2472,5 +2474,5 @@
     IF ( horizontal  .AND.  .NOT. constant_roughness )  CALL calc_z0_water_surface
     
-    IF ( debug_output )  THEN
+    IF ( debug_output_timestep )  THEN
        WRITE( debug_string, * ) 'lsm_energy_balance', horizontal, l
        CALL debug_message( debug_string, 'end' )
@@ -5338,5 +5340,5 @@
 
 
-       IF ( debug_output )  THEN
+       IF ( debug_output_timestep )  THEN
           WRITE( debug_string, * ) 'lsm_soil_model', horizontal, l, calc_soil_moisture
           CALL debug_message( debug_string, 'start' )
@@ -5640,5 +5642,5 @@
 !
 !--    Debug location message
-       IF ( debug_output )  THEN
+       IF ( debug_output_timestep )  THEN
           WRITE( debug_string, * ) 'lsm_soil_model', horizontal, l, calc_soil_moisture
           CALL debug_message( debug_string, 'end' )
Index: palm/trunk/SOURCE/message.f90
===================================================================
--- palm/trunk/SOURCE/message.f90	(revision 3986)
+++ palm/trunk/SOURCE/message.f90	(revision 3987)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Improved formatting of job logfile output,
+! changed output of DEBUG file
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -123,4 +127,5 @@
     CHARACTER(LEN=*)   ::  routine_name                  !<
     CHARACTER(LEN=200) ::  header_string                 !<
+    CHARACTER(LEN=200) ::  header_string_2               !< for message ID and routine name
     CHARACTER(LEN=200) ::  information_string_1          !<
     CHARACTER(LEN=200) ::  information_string_2          !<
@@ -151,9 +156,9 @@
     IF ( message_level == 0 )  THEN
        header_string = '--- informative message' // TRIM(nest_string) //       &
-                       ' ---  ID:'
+                       ' ---'
     ELSEIF ( message_level == 1 )  THEN
-       header_string = '+++ warning message' // TRIM(nest_string) // ' ---  ID:'
+       header_string = '+++ warning message' // TRIM(nest_string) // ' ---'
     ELSEIF ( message_level == 2 )  THEN
-       header_string = '+++ error message' // TRIM(nest_string) // ' ---  ID:'
+       header_string = '+++ error message' // TRIM(nest_string) // ' ---'
     ELSE
        WRITE( header_string,'(A,I2)' )  '+++ unknown message level' //         &
@@ -164,6 +169,6 @@
 !
 !-- Add the message identifier and the generating routine
-    header_string = TRIM( header_string ) // ' ' // message_identifier // &
-                    '   generated by routine: ' // TRIM( routine_name )
+    header_string_2 = 'ID: ' // message_identifier // &
+                      '  generated by routine: ' // TRIM( routine_name )
   
     information_string_1 = 'Further information can be found at'
@@ -203,5 +208,6 @@
 !
 !--       Output on stdout
-          WRITE( *, '(6X,A)' )  TRIM( header_string )
+          WRITE( *, '(16X,A)' )  TRIM( header_string )
+          WRITE( *, '(20X,A)' )  TRIM( header_string_2 )
 !
 !--       Cut message string into pieces and output one piece per line.
@@ -210,14 +216,14 @@
           i = INDEX( message_string, '&' )
           DO WHILE ( i /= 0 )
-             WRITE( *, '(4X,A)' )  ADJUSTL( message_string(1:i-1) )
+             WRITE( *, '(20X,A)' )  ADJUSTL( message_string(1:i-1) )
              message_string = ADJUSTL( message_string(i+1:) )
              i = INDEX( message_string, '&' )
           ENDDO
-          WRITE( *, '(10X,A)' )  ''
-          WRITE( *, '(10X,A)' )  TRIM( message_string )
-          WRITE( *, '(10X,A)' )  ''
-          WRITE( *, '(10X,A)' )  TRIM( information_string_1 ) 
-          WRITE( *, '(10X,A)' )  TRIM( information_string_2 ) 
-          WRITE( *, '(10X,A)' )  ''
+          WRITE( *, '(20X,A)' )  ''
+          WRITE( *, '(20X,A)' )  TRIM( message_string )
+          WRITE( *, '(20X,A)' )  ''
+          WRITE( *, '(20X,A)' )  TRIM( information_string_1 ) 
+          WRITE( *, '(20X,A)' )  TRIM( information_string_2 ) 
+          WRITE( *, '(20X,A)' )  ''
 
        ELSE
@@ -286,4 +292,5 @@
 
     CHARACTER(LEN=*)  ::  location      !< text to be output on stdout
+    CHARACTER(LEN=60) ::  location_string = ' '  !<
     CHARACTER(LEN=*)  ::  message_type  !< attribute marking 'start' or 'end' of routine
     CHARACTER(LEN=11) ::  message_type_string = ' '  !< 
@@ -305,10 +312,14 @@
        IF ( TRIM( message_type ) == 'finished' )  WRITE( message_type_string, * ) '-', TRIM( message_type ), '-'
 !
+!--    Write dummy location_string in order to allow left-alignment of text despite the fixed (=A60)
+!--    format.
+       WRITE( location_string, * )  TRIM( location )
+!
 !--    Write and flush debug location or info message to file
-       WRITE( OUTPUT_UNIT, 200 )  TRIM( message_type_string ), TRIM( location ), TRIM( system_time )
+       WRITE( OUTPUT_UNIT, 200 )  TRIM( message_type_string ), location_string, TRIM( system_time )
        FLUSH( OUTPUT_UNIT )
 !
 !--    Message formats
-200    FORMAT ( 3X, A, '  ', A, '  | System time: ', A )
+200    FORMAT ( 3X, A, ' ', A60, ' | System time: ', A )
 
     ENDIF
@@ -328,5 +339,5 @@
 
     USE control_parameters,                                                                        &
-        ONLY:  current_timestep_number
+        ONLY:  time_since_reference_point
 
     IMPLICIT NONE
@@ -353,10 +364,10 @@
 !
 !-- Write and flush debug location or info message to file
-    WRITE( debug_output_unit, 201 )    TRIM( system_time ), current_timestep_number, TRIM( message_type_string ), TRIM( debug_string )
+    WRITE( debug_output_unit, 201 )    TRIM( system_time ), time_since_reference_point, TRIM( message_type_string ), TRIM( debug_string )
     FLUSH( debug_output_unit )
 
 !
 !-- Message formats
-201 FORMAT ( 'System time: ', A, ' | timestep: ', I6, ' | ', A, ' ', A )
+201 FORMAT ( 'System time: ', A, ' | simulated time (s): ', F12.3, ' | ', A, ' ', A )
 
 
Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 3986)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce switchable DEBUG file output via debug_message routine
+! 
+! 3956 2019-05-07 12:32:52Z monakurppa
 ! - Added calls for salsa_non_advective_processes and 
 !   salsa_exchange_horiz_bounds
@@ -122,6 +125,8 @@
 !-- ToDo: move all of them to respective module or a dedicated central module
     USE control_parameters,                                                    &
-        ONLY:  biometeorology,                                                 &
-               air_chemistry,                                                  &
+        ONLY:  air_chemistry,                                                  &
+               biometeorology,                                                 &
+               debug_output,                                                   &
+               debug_output_timestep,                                          &
                indoor_model,                                                   &
                land_surface,                                                   &
@@ -539,4 +544,6 @@
 
 
+    IF ( debug_output )  CALL debug_message( 'reading module-specific parameters', 'start' )
+
     CALL bio_parin
     CALL bcm_parin
@@ -563,4 +570,6 @@
     CALL package_parin ! ToDo: deprecated, needs to be dissolved
 
+    IF ( debug_output )  CALL debug_message( 'reading module-specific parameters', 'end' )
+
 
  END SUBROUTINE module_interface_parin
@@ -574,4 +583,6 @@
  SUBROUTINE module_interface_check_parameters
 
+
+    IF ( debug_output )  CALL debug_message( 'checking module-specific parameters', 'start' )
 
     IF ( bulk_cloud_model )     CALL bcm_check_parameters
@@ -594,4 +605,6 @@
     IF ( user_module_enabled )  CALL user_check_parameters
 
+    IF ( debug_output )  CALL debug_message( 'checking module-specific parameters', 'end' )
+
 
  END SUBROUTINE module_interface_check_parameters
@@ -612,4 +625,6 @@
 
 
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output ts', 'start' )
+
     IF ( radiation )  THEN
        CALL radiation_check_data_output_ts( dots_max, dots_num )
@@ -619,4 +634,6 @@
        CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit )
     ENDIF
+
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output ts', 'end' )
 
 
@@ -638,4 +655,7 @@
     CHARACTER (LEN=*), INTENT(OUT)   ::  dopr_unit !< local value of dopr_unit
 
+
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output pr', 'start' )
+
     IF ( unit == 'illegal' .AND.  bulk_cloud_model )  THEN
        CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit )
@@ -670,4 +690,6 @@
        CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit )
     ENDIF
+
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output pr', 'end' )
 
 
@@ -690,4 +712,7 @@
     INTEGER(iwp),      INTENT(IN)    :: k         !< ToDo: remove dummy argument, instead pass string from data_output
 
+
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output 2d/3d', 'start' )
+
     IF ( unit == 'illegal'  .AND.  biometeorology )  THEN
        CALL bio_check_data_output( variable, unit, i, j, ilen, k )
@@ -742,4 +767,6 @@
     ENDIF
 
+    IF ( debug_output )  CALL debug_message( 'checking module-specific data output 2d/3d', 'end' )
+
 
  END SUBROUTINE module_interface_check_data_output
@@ -757,4 +784,7 @@
     CHARACTER (LEN=*), INTENT(IN)    ::  variable !< variable name
     CHARACTER (LEN=*), INTENT(INOUT) ::  unit     !< physical unit of variable
+
+
+    IF ( debug_output )  CALL debug_message( 'initializing module-specific masks', 'start' )
 
     IF ( unit == 'illegal'  .AND.  air_chemistry                               &
@@ -775,4 +805,6 @@
        CALL user_check_data_output( variable, unit )
     ENDIF
+
+    IF ( debug_output )  CALL debug_message( 'initializing module-specific masks', 'end' )
 
 
@@ -795,4 +827,7 @@
     CHARACTER (LEN=*), INTENT(OUT) ::  grid_y !< netcdf dimension in y-direction
     CHARACTER (LEN=*), INTENT(OUT) ::  grid_z !< netcdf dimension in z-direction
+
+
+    IF ( debug_output )  CALL debug_message( 'defining module-specific netcdf grids', 'start' )
 !
 !-- As long as no action is done in this subroutine, initialize strings with
@@ -806,4 +841,7 @@
     IF ( var == ' ' )  RETURN
 
+    IF ( debug_output )  CALL debug_message( 'defining module-specific netcdf grids', 'end' )
+
+
  END SUBROUTINE module_interface_define_netcdf_grid
 
@@ -817,5 +855,5 @@
 
 
-    CALL location_message( 'initializing module-specific arrays', 'start' )
+    IF ( debug_output )  CALL debug_message( 'initializing module-specific arrays', 'start' )
 
     IF ( bulk_cloud_model    )  CALL bcm_init_arrays
@@ -830,5 +868,5 @@
     IF ( user_module_enabled )  CALL user_init_arrays
 
-    CALL location_message( 'initializing module-specific arrays', 'finished' )
+    IF ( debug_output )  CALL debug_message( 'initializing module-specific arrays', 'end' )
 
 
@@ -844,5 +882,5 @@
 
 
-    CALL location_message( 'initializing module features', 'start' )
+    IF ( debug_output )  CALL debug_message( 'module-specific initialization', 'start' )
 
     IF ( biometeorology      )  CALL bio_init
@@ -864,5 +902,5 @@
     IF ( user_module_enabled )  CALL user_init
 
-    CALL location_message( 'initializing module features', 'finished' )
+    IF ( debug_output )  CALL debug_message( 'module-specific initialization', 'end' )
 
 
@@ -878,6 +916,10 @@
 
 
+    IF ( debug_output )  CALL debug_message( 'module-specific post-initialization checks', 'start' )
+
     IF ( biometeorology      )  CALL bio_init_checks
 
+    IF ( debug_output )  CALL debug_message( 'module-specific post-initialization checks', 'end' )
+
 
  END SUBROUTINE module_interface_init_checks
@@ -894,4 +936,6 @@
     INTEGER(iwp), INTENT(IN) ::  io  !< unit of the output file
 
+
+    IF ( debug_output )  CALL debug_message( 'module-specific header output', 'start' )
 
     IF ( biometeorology      )  CALL bio_header ( io )
@@ -911,4 +955,6 @@
     IF ( user_module_enabled )  CALL user_header( io )
 
+    IF ( debug_output )  CALL debug_message( 'module-specific header output', 'end' )
+
 
  END SUBROUTINE module_interface_header
@@ -966,5 +1012,5 @@
 ! Description:
 ! ------------
-!> Compute module-specificc non_advective_processes (vector-optimized)
+!> Compute module-specific non_advective_processes (vector-optimized)
 !------------------------------------------------------------------------------!
  SUBROUTINE module_interface_non_advective_processes()
@@ -1006,7 +1052,12 @@
 
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific exchange_horiz', 'start' )
+
     IF ( bulk_cloud_model    )  CALL bcm_exchange_horiz()
     IF ( air_chemistry       )  CALL chem_exchange_horiz_bounds()
     IF ( salsa               )  CALL salsa_exchange_horiz_bounds()
+
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific exchange_horiz', 'end' )
+
 
  END SUBROUTINE module_interface_exchange_horiz
@@ -1064,4 +1115,7 @@
 
     INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap
+
+
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific swap timelevel', 'start' )
 
     IF ( bulk_cloud_model    )  CALL bcm_swap_timelevel( swap_mode )
@@ -1073,4 +1127,6 @@
     IF ( urban_surface       )  CALL usm_swap_timelevel( swap_mode )
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific swap timelevel', 'end' )
+
 
  END SUBROUTINE module_interface_swap_timelevel
@@ -1088,4 +1144,7 @@
     CHARACTER (LEN=*), INTENT(IN) ::  mode     !< averaging interface mode
     CHARACTER (LEN=*), INTENT(IN) ::  variable !< variable name
+
+
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 3d data averaging', 'start' )
 
     IF ( biometeorology      )  CALL bio_3d_data_averaging( mode, variable )
@@ -1100,4 +1159,6 @@
     IF ( user_module_enabled )  CALL user_3d_data_averaging( mode, variable )
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 3d data averaging', 'end' )
+
 
  END SUBROUTINE module_interface_3d_data_averaging
@@ -1126,4 +1187,6 @@
 
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 2d data output', 'start' )
+
     IF ( .NOT. found  .AND.  biometeorology )  THEN
        CALL bio_data_output_2d(                                                &
@@ -1179,4 +1242,7 @@
             )
     ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 2d data output', 'end' )
+
 
  END SUBROUTINE module_interface_data_output_2d
@@ -1204,4 +1270,6 @@
 
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 3d data output', 'start' )
+
     IF ( .NOT. found  .AND.  biometeorology )  THEN
        CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
@@ -1254,4 +1322,6 @@
     ENDIF
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific 3d data output', 'end' )
+
 
  END SUBROUTINE module_interface_data_output_3d
@@ -1271,8 +1341,13 @@
     INTEGER(iwp),      INTENT(IN) ::  dots_max !< maximum number of timeseries
 
+
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific statistics', 'start' )
+
     IF ( gust_module_enabled )  CALL gust_statistics( mode, sr, tn, dots_max )
     IF ( air_chemistry       )  CALL chem_statistics( mode, sr, tn )
     IF ( user_module_enabled )  CALL user_statistics( mode, sr, tn )
 
+    IF ( debug_output_timestep )  CALL debug_message( 'module-specific statistics', 'end' )
+
 
  END SUBROUTINE module_interface_statistics
@@ -1288,4 +1363,7 @@
 
     LOGICAL, INTENT(INOUT) ::  found    !< flag if variable was found
+
+
+    IF ( debug_output )  CALL debug_message( 'module-specific read global restart data', 'start' )
 
     IF ( .NOT. found )  CALL bio_rrd_global( found ) ! ToDo: change interface to pass variable
@@ -1299,4 +1377,6 @@
     IF ( .NOT. found )  CALL user_rrd_global( found ) ! ToDo: change interface to pass variable
 
+    IF ( debug_output )  CALL debug_message( 'module-specific read global restart data', 'end' )
+
 
  END SUBROUTINE module_interface_rrd_global
@@ -1310,4 +1390,6 @@
  SUBROUTINE module_interface_wrd_global
 
+
+    IF ( debug_output )  CALL debug_message( 'module-specific write global restart data', 'start' )
 
     IF ( biometeorology )       CALL bio_wrd_global
@@ -1320,4 +1402,6 @@
     IF ( surface_output )       CALL surface_data_output_wrd_global
     IF ( user_module_enabled )  CALL user_wrd_global
+
+    IF ( debug_output )  CALL debug_message( 'module-specific write global restart data', 'end' )
 
 
@@ -1357,4 +1441,6 @@
 
 
+    IF ( debug_output )  CALL debug_message( 'module-specific read local restart data', 'start' )
+
     IF ( .NOT. found ) CALL bio_rrd_local(                                     &
                                found                                           &
@@ -1445,4 +1531,6 @@
                             ) ! ToDo: change interface to pass variable
 
+    IF ( debug_output )  CALL debug_message( 'module-specific read local restart data', 'end' )
+
 
  END SUBROUTINE module_interface_rrd_local
@@ -1456,4 +1544,6 @@
  SUBROUTINE module_interface_wrd_local
 
+
+    IF ( debug_output )  CALL debug_message( 'module-specific write local restart data', 'start' )
 
     IF ( biometeorology )       CALL bio_wrd_local
@@ -1469,4 +1559,6 @@
     IF ( user_module_enabled )  CALL user_wrd_local
 
+    IF ( debug_output )  CALL debug_message( 'module-specific write local restart data', 'end' )
+
 
  END SUBROUTINE module_interface_wrd_local
@@ -1480,8 +1572,12 @@
  SUBROUTINE module_interface_last_actions
 
+
+    IF ( debug_output )  CALL debug_message( 'module-specific last actions', 'start' )
 
     IF ( virtual_measurement )  CALL vm_last_actions
     IF ( user_module_enabled )  CALL user_last_actions
 
+    IF ( debug_output )  CALL debug_message( 'module-specific last actions', 'end' )
+
 
  END SUBROUTINE module_interface_last_actions
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 3986)
+++ palm/trunk/SOURCE/modules.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -1324,4 +1327,5 @@
     LOGICAL ::  data_output_2d_on_each_pe = .TRUE.               !< namelist parameter
     LOGICAL ::  debug_output = .FALSE.                           !< namelist parameter
+    LOGICAL ::  debug_output_timestep = .FALSE.                  !< namelist parameter
     LOGICAL ::  disturbance_created = .FALSE.                    !< flow disturbance imposed?
     LOGICAL ::  do2d_at_begin = .FALSE.                          !< namelist parameter
Index: palm/trunk/SOURCE/multi_agent_system_mod.f90
===================================================================
--- palm/trunk/SOURCE/multi_agent_system_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/multi_agent_system_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -114,6 +117,5 @@
     USE control_parameters,                                                    &
         ONLY:  biometeorology,                                                 &
-               debug_output,                                                   &
-               debug_string,                                                   &
+               debug_output_timestep,                                          &
                dt_3d,                                                          &
                dt_write_agent_data,                                            &
@@ -396,10 +398,7 @@
     LOGICAL       ::  first_loop_stride   !< flag for first loop stride of agent sub-timesteps
     LOGICAL, SAVE ::  first_call = .TRUE. !< first call of mas flag for output
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'multi_agent_system'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+
+    IF ( debug_output_timestep )  CALL debug_message( 'multi_agent_system', 'start' )
 
     CALL cpu_log( log_point(9), 'mas', 'start' )
@@ -622,10 +621,7 @@
 
     CALL cpu_log( log_point(9), 'mas', 'stop' )
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'multi_agent_system'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'multi_agent_system', 'end' )
+
 
  END SUBROUTINE multi_agent_system
Index: palm/trunk/SOURCE/nesting_offl_mod.f90
===================================================================
--- palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3964 2019-05-09 09:48:32Z suehring
 ! Ensure that veloctiy term in calculation of bulk Richardson number does not
 ! become zero
@@ -85,5 +88,7 @@
         ONLY:  air_chemistry, bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,  &
                bc_dirichlet_s, dt_3d, dz, constant_diffusion,                  &
-               debug_output, debug_string, humidity, initializing_actions,     &
+               debug_output_timestep,                                          &
+               humidity,                                                       &
+               initializing_actions,                                           &
                message_string, nesting_offline, neutral, passive_scalar,       &
                rans_mode, rans_tke_e, time_since_reference_point, volume_flow
@@ -167,11 +172,7 @@
        REAL(wp), DIMENSION(1:3) ::  volume_flow_l   !< local volume flow
 
-!
-!--    Debug location message
-       IF ( debug_output )  THEN
-          WRITE( debug_string, * ) 'nesting_offl_mass_conservation'
-          CALL debug_message( debug_string, 'start' )
-       ENDIF
-       
+
+       IF ( debug_output_timestep )  CALL debug_message( 'nesting_offl_mass_conservation', 'start' )
+
        CALL  cpu_log( log_point(58), 'offline nesting', 'start' )
        
@@ -249,10 +250,6 @@
        
        CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
-!
-!--    Debug location message
-       IF ( debug_output )  THEN
-          WRITE( debug_string, * ) 'nesting_offl_mass_conservation'
-          CALL debug_message( debug_string, 'end' )
-       ENDIF
+
+       IF ( debug_output_timestep )  CALL debug_message( 'nesting_offl_mass_conservation', 'end' )
 
     END SUBROUTINE nesting_offl_mass_conservation
@@ -287,10 +284,6 @@
        REAL(wp), DIMENSION(nzb:nzt+1) ::  v_ref_l  !< reference profile for v-component on subdomain
        
-!
-!--    Debug location message
-       IF ( debug_output )  THEN
-          WRITE( debug_string, * ) 'nesting_offl_bc'
-          CALL debug_message( debug_string, 'start' )
-       ENDIF
+
+       IF ( debug_output_timestep )  CALL debug_message( 'nesting_offl_bc', 'start' )
 
        CALL  cpu_log( log_point(58), 'offline nesting', 'start' )      
@@ -828,10 +821,7 @@
     
        CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
-!
-!--    Debug location message
-       IF ( debug_output )  THEN
-          WRITE( debug_string, * ) 'nesting_offl_bc'
-          CALL debug_message( debug_string, 'end' )
-       ENDIF
+
+       IF ( debug_output_timestep )  CALL debug_message( 'nesting_offl_bc', 'end' )
+
 
     END SUBROUTINE nesting_offl_bc
Index: palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Remove single location message
+! 
+! 3976 2019-05-15 11:02:34Z hellstea
 ! Remove unused variables from last commit
 ! 
@@ -329,4 +332,5 @@
 !> @todo - depreciate subroutines get_variable_4d_to_3d_real and
 !>         get_variable_5d_to_4d_real (ecc)
+!> @todo - introduce useful debug_message(s)
 !------------------------------------------------------------------------------!
  MODULE netcdf_data_input_mod
@@ -1441,7 +1445,4 @@
 !
 !-- Start processing data
-
-       CALL location_message( 'starting allocation of chemistry emissions arrays', .FALSE. )
-
 !
 !-- Emission LOD 0 (Parameterized mode)
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 3986)
+++ palm/trunk/SOURCE/parin.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -696,4 +699,5 @@
              data_output_pr, data_output_2d_on_each_pe,                        &
              debug_output,                                                     &
+             debug_output_timestep,                                            &
              disturbance_amplitude,                                            &
              disturbance_energy_limit, disturbance_level_b,                    &
@@ -720,4 +724,5 @@
              data_output_pr, data_output_2d_on_each_pe,                        &
              debug_output,                                                     &
+             debug_output_timestep,                                            &
              disturbance_amplitude,                                            &
              disturbance_energy_limit, disturbance_level_b,                    &
Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3984 2019-05-16 15:17:03Z hellstea
 ! Commenting improved, pmci_map_fine_to_coarse_grid renamed as pmci_map_child_grid_to_parent_grid,
 ! set_child_edge_coords renamed as pmci_set_child_edge_coords, some variables renamed, etc. 
@@ -443,5 +446,5 @@
                constant_diffusion, constant_flux_layer,                        &
                coupling_char,                                                  &
-               debug_output, debug_string,                                     &
+               debug_output_timestep,                                          &
                dt_3d, dz, humidity, message_string,                            &
                neutral, passive_scalar, rans_mode, rans_tke_e,                 &
@@ -3219,8 +3222,6 @@
    REAL(wp) ::  dtg       !<  Global time step defined as the global minimum of dtl of all processes
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_synchronize'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+   IF ( debug_output_timestep )  CALL debug_message( 'pmci_synchronize', 'start' )
    
    dtl = dt_3d
@@ -3228,8 +3229,5 @@
    dt_3d  = dtg
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_synchronize'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+   IF ( debug_output_timestep )  CALL debug_message( 'pmci_synchronize', 'end' )
 
 #endif
@@ -3278,10 +3276,6 @@
 
 #if defined( __parallel )    
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_datatrans'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'pmci_datatrans', 'start' )
 
     IF ( TRIM( local_nesting_mode ) == 'one-way' )  THEN
@@ -3319,10 +3313,6 @@
 
     ENDIF
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_datatrans'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'pmci_datatrans', 'end' )
 
 #endif
@@ -4790,10 +4780,6 @@
     INTEGER(iwp) ::  n   !< Running index for number of chemical species
     
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_boundary_conds'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'pmci_boundary_conds', 'start' )
 !
 !-- Set Dirichlet boundary conditions for horizontal velocity components
@@ -4982,10 +4968,6 @@
        ENDIF
     ENDIF    
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'pmci_boundary_conds'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'pmci_boundary_conds', 'end' )
 
 #endif
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 3986)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3956 2019-05-07 12:32:52Z monakurppa
 ! Removed salsa calls.
 ! 
@@ -409,5 +412,5 @@
     USE control_parameters,                                                    &
         ONLY:  constant_diffusion,                                             &
-               debug_output, debug_string,                                     &
+               debug_output_timestep,                                          &
                dp_external, dp_level_ind_b, dp_smooth_factor, dpdxy, dt_3d,    &
                humidity, intermediate_timestep_count,                          &
@@ -523,9 +526,5 @@
 
 
-
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'prognostic_equations_cache'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'prognostic_equations_cache', 'start' )
 !
 !-- Time measurement can only be performed for the whole set of equations
@@ -1071,8 +1070,5 @@
     CALL cpu_log( log_point(32), 'all progn.equations', 'stop' )
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'prognostic_equations_cache'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'prognostic_equations_cache', 'end' )
 
  END SUBROUTINE prognostic_equations_cache
@@ -1095,8 +1091,5 @@
 
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'prognostic_equations_vector'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'prognostic_equations_vector', 'start' )
 !
 !-- Calculate non advective processes for all other modules
@@ -1783,8 +1776,5 @@
     CALL module_interface_prognostic_equations()
 
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'prognostic_equations_vector'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+    IF ( debug_output_timestep )  CALL debug_message( 'prognostic_equations_vector', 'end' )
 
  END SUBROUTINE prognostic_equations_vector
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3987)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3943 2019-05-02 09:50:41Z maronga
 ! Missing blank characteer added.
 ! 
@@ -623,5 +626,5 @@
     USE control_parameters,                                                    &
         ONLY:  cloud_droplets, coupling_char,                                  &
-               debug_output, debug_string,                                     &
+               debug_output, debug_output_timestep, debug_string,              &
                dz, dt_spinup, end_time,                                        &
                humidity,                                                       &
@@ -1359,5 +1362,5 @@
 
 
-       IF ( debug_output )  CALL debug_message( 'radiation_control', 'start' )
+       IF ( debug_output_timestep )  CALL debug_message( 'radiation_control', 'start' )
 
 
@@ -1377,5 +1380,5 @@
        END SELECT
 
-       IF ( debug_output )  CALL debug_message( 'radiation_control', 'end' )
+       IF ( debug_output_timestep )  CALL debug_message( 'radiation_control', 'end' )
 
     END SUBROUTINE radiation_control
@@ -5111,5 +5114,5 @@
 
 
-     IF ( debug_output )  CALL debug_message( 'radiation_interaction', 'start' )
+     IF ( debug_output_timestep )  CALL debug_message( 'radiation_interaction', 'start' )
 
      IF ( plant_canopy )  THEN
@@ -5857,5 +5860,5 @@
            (emissivity_urb*sigma_sb * area_hor) )**0.25_wp
 
-     IF ( debug_output )  CALL debug_message( 'radiation_interaction', 'end' )
+     IF ( debug_output_timestep )  CALL debug_message( 'radiation_interaction', 'end' )
 
 
Index: palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/surface_layer_fluxes_mod.f90	(revision 3987)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3885 2019-04-11 11:29:34Z kanani
 ! Changes related to global restructuring of location messages and introduction 
 ! of additional debug messages
@@ -278,5 +281,5 @@
                constant_heatflux, constant_scalarflux,                         &
                constant_waterflux, coupling_mode,                              &
-               debug_output, debug_string,                                     &
+               debug_output_timestep,                                          &
                do_output_at_2m, humidity,                                      &
                ibc_e_b, ibc_pt_b, indoor_model, initializing_actions,          &
@@ -364,5 +367,5 @@
 
 
-       IF ( debug_output )  CALL debug_message( 'surface_layer_fluxes', 'start' )
+       IF ( debug_output_timestep )  CALL debug_message( 'surface_layer_fluxes', 'start' )
 
        surf_vertical = .FALSE. !< flag indicating vertically orientated surface elements
@@ -726,5 +729,5 @@
        mom_tke = .FALSE.
 
-       IF ( debug_output )  CALL debug_message( 'surface_layer_fluxes', 'end' )
+       IF ( debug_output_timestep )  CALL debug_message( 'surface_layer_fluxes', 'end' )
 
     END SUBROUTINE surface_layer_fluxes
Index: palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 3987)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3938 2019-04-29 16:06:25Z suehring
 ! Remove unused variables
 ! 
@@ -209,6 +212,5 @@
 
     USE control_parameters,                                                    &
-        ONLY:  debug_output,                                                   &
-               debug_string,                                                   &
+        ONLY:  debug_output_timestep,                                          &
                initializing_actions,                                           &
                message_string,                                                 &
@@ -1146,10 +1148,6 @@
     REAL(wp) :: volume_flow_l   !< local mass flux through lateral boundary
 
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'stg_main'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'stg_main', 'start' )
 !
 !-- Calculate time step which is needed for filter functions
@@ -1493,10 +1491,6 @@
 !-- Finally, set time counter for calling STG to zero
     time_stg_call = 0.0_wp
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'stg_main'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'stg_main', 'end' )
 
  END SUBROUTINE stg_main
@@ -1900,10 +1894,6 @@
     IMPLICIT NONE
 
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'stg_adjust'
-       CALL debug_message( debug_string, 'start' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'stg_adjust', 'start' )
 !
 !-- Compute mean boundary layer height according to Richardson-Bulk
@@ -1938,10 +1928,6 @@
 !-- Reset time counter for controlling next adjustment to zero
     time_stg_adjust = 0.0_wp
-!
-!-- Debug location message
-    IF ( debug_output )  THEN
-       WRITE( debug_string, * ) 'stg_adjust'
-       CALL debug_message( debug_string, 'end' )
-    ENDIF
+
+    IF ( debug_output_timestep )  CALL debug_message( 'stg_adjust', 'end' )
     
  END SUBROUTINE stg_adjust 
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3986)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3987)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Introduce alternative switch for debug output during timestepping
+! 
+! 3943 2019-05-02 09:50:41Z maronga
 ! Removed qsws_eb. Bugfix in calculation of qsws.
 ! 
@@ -489,5 +492,5 @@
     USE control_parameters,                                                    &
         ONLY:  coupling_start_time, topography,                                &
-               debug_output, debug_string,                                     &
+               debug_output, debug_output_timestep, debug_string,              &
                dt_3d, humidity, indoor_model,                                  &
                intermediate_timestep_count, initializing_actions,              &
@@ -5267,5 +5270,5 @@
 
 
-        IF ( debug_output )  THEN
+        IF ( debug_output_timestep )  THEN
            WRITE( debug_string, * ) 'usm_material_heat_model | spinup: ', spinup
            CALL debug_message( debug_string, 'start' )
@@ -5644,5 +5647,5 @@
         !$OMP END PARALLEL
 
-        IF ( debug_output )  THEN
+        IF ( debug_output_timestep )  THEN
            WRITE( debug_string, * ) 'usm_material_heat_model | spinup: ', spinup
            CALL debug_message( debug_string, 'end' )
@@ -5682,5 +5685,5 @@
 
 
-        IF ( debug_output )  CALL debug_message( 'usm_green_heat_model', 'start' )
+        IF ( debug_output_timestep )  CALL debug_message( 'usm_green_heat_model', 'start' )
 
         drho_l_lv = 1.0_wp / (rho_l * l_v)
@@ -6012,5 +6015,5 @@
         ENDDO
 
-        IF ( debug_output )  CALL debug_message( 'usm_green_heat_model', 'end' )
+        IF ( debug_output_timestep )  CALL debug_message( 'usm_green_heat_model', 'end' )
 
     END SUBROUTINE usm_green_heat_model
@@ -7707,5 +7710,5 @@
 
 
-        IF ( debug_output )  THEN
+        IF ( debug_output_timestep )  THEN
            WRITE( debug_string, * ) 'usm_surface_energy_balance | spinup: ', spinup
            CALL debug_message( debug_string, 'start' )
@@ -8753,5 +8756,5 @@
 !        END SUBROUTINE calc_q_surface_usm
 
-        IF ( debug_output )  THEN
+        IF ( debug_output_timestep )  THEN
            WRITE( debug_string, * ) 'usm_surface_energy_balance | spinup: ', spinup
            CALL debug_message( debug_string, 'end' )
