Index: /palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- /palm/trunk/SOURCE/init_3d_model.f90	(revision 4847)
+++ /palm/trunk/SOURCE/init_3d_model.f90	(revision 4848)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! replaced use_syn_turb_gen by syn_turb_gen
+!
+! 4845 2021-01-18 11:15:37Z raasch
 ! removed allocation and initialization of arrays required for radiation boundary conditions
 !
@@ -233,5 +236,5 @@
 
     USE synthetic_turbulence_generator_mod,                                                        &
-        ONLY:  stg_init, use_syn_turb_gen
+        ONLY:  stg_init
 
     USE surface_layer_fluxes_mod,                                                                  &
@@ -1830,5 +1833,5 @@
 !
 !-- Initialization of synthetic turbulence generator
-    IF ( use_syn_turb_gen )  CALL stg_init
+    IF ( syn_turb_gen )  CALL stg_init
 !
 !-- Initializing actions for all other modules
Index: /palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- /palm/trunk/SOURCE/init_pegrid.f90	(revision 4847)
+++ /palm/trunk/SOURCE/init_pegrid.f90	(revision 4848)
@@ -21,4 +21,7 @@
 ! -----------------
 ! $Id$
+! replaced use_syn_turb_gen by syn_turb_gen
+!
+! 4648 2020-08-25 07:52:08Z raasch
 ! file re-formatted to follow the PALM coding standard
 !
@@ -95,5 +98,5 @@
         ONLY:  coupling_mode, coupling_topology, gathered_size, momentum_advec,                    &
                outflow_source_plane, recycling_width, scalar_advec, subdomain_size,                &
-               turbulent_inflow, turbulent_outflow, y_shift
+               syn_turb_gen, turbulent_inflow, turbulent_outflow, y_shift
 
     USE grid_variables,                                                                            &
@@ -123,5 +126,5 @@
 
     USE synthetic_turbulence_generator_mod,                                                        &
-        ONLY:  id_stg_left, id_stg_north, id_stg_right, id_stg_south, use_syn_turb_gen
+        ONLY:  id_stg_left, id_stg_north, id_stg_right, id_stg_south
 #endif
 
@@ -1158,5 +1161,5 @@
 !-- Please note, if no forcing or nesting is applied, the generator is applied only at the left
 !-- lateral boundary.
-    IF ( use_syn_turb_gen )  THEN
+    IF ( syn_turb_gen )  THEN
        IF ( bc_dirichlet_l )  THEN
           id_stg_left_l = myidx
Index: /palm/trunk/SOURCE/read_restart_data_mod.f90
===================================================================
--- /palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4847)
+++ /palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4848)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! bugfix: removed syn_turb_gen from restart files
+!
+! 4845 2021-01-18 11:15:37Z raasch
 ! arrays removed that were required for radiation boundary conditions
 !
@@ -42,40 +45,40 @@
 ! Bugfix in allocation of hom and hom_sum in case of mpi-io restart when
 ! chemistry or salsa are employed
-! 
+!
 ! 4580 2020-06-29 07:54:21Z raasch
 ! data handling with MPI-IO for cyclic-fill added (so far only for global data)
-! 
+!
 ! 4564 2020-06-12 14:03:36Z raasch
 ! Vertical nesting method of Huq et al. (2019) removed
-! 
+!
 ! 4539 2020-05-18 14:05:17Z raasch
 ! location message added
-! 
+!
 ! 4536 2020-05-17 17:24:13Z raasch
 ! binary version incremented
-! 
+!
 ! 4534 2020-05-14 18:35:22Z raasch
 ! adjustments for I/O on reduced number of cores using shared memory MPI
-! 
+!
 ! 4518 2020-05-04 15:44:28Z suehring
 ! Move input of diagnostic output quantities to doq_rrd_local
-! 
+!
 ! 4517 2020-05-03 14:29:30Z raasch
 ! qsurf and ssurf added
-! 
+!
 ! 4498 2020-04-15 14:26:31Z raasch
 ! argument removed from rd_mpi_io_open
-! 
+!
 ! 4496 2020-04-15 08:37:26Z raasch
 ! bugfix: MPI barrier removed, coupling character added to input filename
-! 
+!
 ! 4495 2020-04-13 20:11:20Z raasch
 ! restart data handling with MPI-IO added
-! 
+!
 ! 4435 2020-03-03 10:38:41Z raasch
 ! bugfix for message that reports about files that are read from in case that the virtual PE grid
 ! has chenged (in case of large number of files format was exceeded), detailed messages about the
 ! files are now output to the debug file
-! 
+!
 ! 4431 2020-02-27 23:23:01Z gronemeier
 ! added u_center_av, v_center_av, wspeed_av
@@ -283,5 +286,5 @@
        READ ( 13 )  version_on_file
 
-       binary_version_global = '5.1'
+       binary_version_global = '5.2'
        IF ( TRIM( version_on_file ) /= TRIM( binary_version_global ) )  THEN
           WRITE( message_string, * ) 'version mismatch concerning ',           &
@@ -1093,5 +1096,4 @@
        CALL rrd_mpi_io( 'surface_scalarflux', surface_scalarflux )
        CALL rrd_mpi_io( 'surface_waterflux', surface_waterflux )
-       CALL rrd_mpi_io( 'syn_turb_gen', syn_turb_gen )
        CALL rrd_mpi_io( 'time_coupling', time_coupling )
        CALL rrd_mpi_io( 'time_disturb', time_disturb )
Index: /palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- /palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 4847)
+++ /palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 4848)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! replaced use_syn_turb_gen by syn_turb_gen
+!
+! 4843 2021-01-15 15:22:11Z raasch
 ! local namelist parameter added to switch off the module although the respective module namelist
 ! appears in the namelist file
@@ -365,5 +368,4 @@
     LOGICAL ::  parametrize_inflow_turbulence = .FALSE.  !< flag indicating that inflow turbulence is either read from file
                                                          !< (.FALSE.) or if it parametrized
-    LOGICAL ::  use_syn_turb_gen              = .FALSE.  !< switch to use synthetic turbulence generator
     LOGICAL ::  velocity_seed_initialized     = .FALSE.  !< true after first call of stg_main
 
@@ -519,6 +521,5 @@
             parametrize_inflow_turbulence,                                                         &
             time_stg_adjust,                                                                       &
-            time_stg_call,                                                                         &
-            use_syn_turb_gen
+            time_stg_call
 
 
@@ -533,5 +534,5 @@
  SUBROUTINE stg_check_parameters
 
-    IF ( .NOT. use_syn_turb_gen  .AND.  .NOT. rans_mode  .AND.                                     &
+    IF ( .NOT. syn_turb_gen  .AND.  .NOT. rans_mode  .AND.                                     &
           nesting_offline )  THEN
        message_string = 'Synthetic turbulence generator is required ' //                           &
@@ -540,5 +541,5 @@
     ENDIF
 
-    IF ( .NOT. use_syn_turb_gen  .AND.  child_domain                                               &
+    IF ( .NOT. syn_turb_gen  .AND.  child_domain                                               &
          .AND. rans_mode_parent  .AND.  .NOT. rans_mode )  THEN
        message_string = 'Synthetic turbulence generator is required when nesting is applied ' //   &
@@ -547,5 +548,5 @@
     ENDIF
 
-    IF ( use_syn_turb_gen )  THEN
+    IF ( syn_turb_gen )  THEN
 
        IF ( child_domain  .AND.  .NOT. rans_mode  .AND.  .NOT. rans_mode_parent )  THEN
@@ -613,21 +614,15 @@
 !
 !-- Write synthetic turbulence generator Header
-    WRITE( io, 1 )
-    IF ( use_syn_turb_gen )  THEN
-       WRITE( io, 2 )
-    ELSE
-       WRITE( io, 3 )
-    ENDIF
-
-    IF ( parametrize_inflow_turbulence )  THEN
-       WRITE( io, 4 ) dt_stg_adjust
-    ELSE
-       WRITE( io, 5 )
+    IF ( syn_turb_gen )  THEN
+       WRITE( io, 1 )
+       IF ( parametrize_inflow_turbulence )  THEN
+          WRITE( io, 4 ) dt_stg_adjust
+       ELSE
+          WRITE( io, 5 )
+       ENDIF
     ENDIF
 
 1   FORMAT (//' Synthetic turbulence generator information:'/                                      &
               ' ------------------------------------------'/)
-2   FORMAT ('    synthetic turbulence generator is switched on')
-3   FORMAT ('    synthetic turbulence generator is switched off')
 4   FORMAT ('    imposed turbulence statistics are parametrized and ajdusted to boundary-layer development each ', F8.2, ' s' )
 5   FORMAT ('    imposed turbulence is read from file' )
@@ -1228,6 +1223,5 @@
                         dt_stg_adjust,                                                             &
                         dt_stg_call,                                                               &
-                        switch_off_module,                                                         &
-                        use_syn_turb_gen
+                        switch_off_module
 
 
@@ -1278,7 +1272,4 @@
           READ ( 13 )  time_stg_call
 
-       CASE ( 'use_syn_turb_gen' )
-          READ ( 13 )  use_syn_turb_gen
-
        CASE DEFAULT
 
@@ -1300,5 +1291,4 @@
     CALL rrd_mpi_io( 'time_stg_adjust', time_stg_adjust )
     CALL rrd_mpi_io( 'time_stg_call', time_stg_call )
-    CALL rrd_mpi_io( 'use_syn_turb_gen', use_syn_turb_gen )
 
  END SUBROUTINE stg_rrd_global_mpi
@@ -1320,12 +1310,8 @@
        WRITE ( 14 )  time_stg_call
 
-       CALL wrd_write_string( 'use_syn_turb_gen' )
-       WRITE ( 14 )  use_syn_turb_gen
-
     ELSEIF ( restart_data_format_output(1:3) == 'mpi' )  THEN
 
        CALL wrd_mpi_io( 'time_stg_adjust', time_stg_adjust )
        CALL wrd_mpi_io( 'time_stg_call', time_stg_call )
-       CALL wrd_mpi_io( 'use_syn_turb_gen', use_syn_turb_gen )
 
     ENDIF
Index: /palm/trunk/SOURCE/time_integration.f90
===================================================================
--- /palm/trunk/SOURCE/time_integration.f90	(revision 4847)
+++ /palm/trunk/SOURCE/time_integration.f90	(revision 4848)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! replaced use_syn_turb_gen by syn_turb_gen
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! Remove leftover write statement from debugging
 !
@@ -46,9 +49,9 @@
 ! 4668 2020-09-09 13:00:16Z pavelkrc
 ! Improve debug messages during timestepping
-! 
+!
 ! 4581 2020-06-29 08:49:58Z suehring
 ! Omit explicit pressure forcing via geostrophic wind components in case of
 ! mesoscale nesting.
-! 
+!
 ! 4578 2020-06-25 15:43:32Z gronemeier
 ! bugfix: removed unused variables
@@ -308,4 +311,5 @@
                skip_time_do2d_yz, skip_time_do3d, skip_time_domask, skip_time_dopr,                &
                skip_time_data_output_av, sloping_surface, stop_dt, surface_output,                 &
+               syn_turb_gen,                                                                       &
                terminate_coupled, terminate_run, timestep_scheme, time_coupling, time_do2d_xy,     &
                time_do2d_xz, time_do2d_yz, time_do3d, time_domask, time_dopr, time_dopr_av,        &
@@ -421,5 +425,5 @@
     USE synthetic_turbulence_generator_mod,                                                        &
         ONLY:  dt_stg_call, dt_stg_adjust, parametrize_inflow_turbulence, stg_adjust, stg_main,    &
-               time_stg_adjust, time_stg_call, use_syn_turb_gen
+               time_stg_adjust, time_stg_call
 
     USE turbulence_closure_mod,                                                                    &
@@ -926,5 +930,5 @@
 !
 !--       Impose a turbulent inflow using synthetic generated turbulence.
-          IF ( use_syn_turb_gen  .AND.                                                             &
+          IF ( syn_turb_gen  .AND.                                                                 &
                intermediate_timestep_count == intermediate_timestep_count_max )  THEN
              CALL cpu_log( log_point(57), 'synthetic_turbulence_gen', 'start' )
@@ -1244,5 +1248,5 @@
 !--    information, update the time counter and if required, adjust the
 !--    STG to new atmospheric conditions.
-       IF ( use_syn_turb_gen  )  THEN
+       IF ( syn_turb_gen  )  THEN
           IF ( parametrize_inflow_turbulence )  THEN
              time_stg_adjust = time_stg_adjust + dt_3d
Index: /palm/trunk/SOURCE/write_restart_data_mod.f90
===================================================================
--- /palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4847)
+++ /palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4848)
@@ -24,4 +24,7 @@
 ! -----------------
 ! $Id$
+! bugfix: removed syn_turb_gen from restart files
+!
+! 4845 2021-01-18 11:15:37Z raasch
 ! arrays removed that were required for radiation boundary conditions
 !
@@ -34,20 +37,20 @@
 ! 4671 2020-09-09 20:27:58Z pavelkrc
 ! Implementation of downward facing USM and LSM surfaces
-! 
+!
 ! 4564 2020-06-12 14:03:36Z raasch
 ! Vertical nesting method of Huq et al. (2019) removed
-! 
+!
 ! 4536 2020-05-17 17:24:13Z raasch
 ! binary version incremented
-! 
+!
 ! 4535 2020-05-15 12:07:23Z raasch
 ! bugfix for restart data format query
-! 
+!
 ! 4514 2020-04-30 16:29:59Z suehring
 ! qsurf and ssurf added
-! 
+!
 ! 4495 2020-04-13 20:11:20Z raasch
 ! restart data handling with MPI-IO added
-! 
+!
 ! 4489 2020-04-04 10:54:08Z raasch
 ! file re-formatted to follow the PALM coding standard
@@ -198,5 +201,5 @@
     INTEGER ::  i                                !< loop index
 
-    binary_version_global = '5.1'
+    binary_version_global = '5.2'
 
     IF ( restart_data_format_output == 'fortran_binary' )  THEN
@@ -1076,5 +1079,4 @@
        CALL wrd_mpi_io( 'surface_scalarflux', surface_scalarflux )
        CALL wrd_mpi_io( 'surface_waterflux', surface_waterflux )
-       CALL wrd_mpi_io( 'syn_turb_gen', syn_turb_gen )
        CALL wrd_mpi_io( 'time_coupling', time_coupling )
        CALL wrd_mpi_io( 'time_disturb', time_disturb )
