Index: palm/trunk/SOURCE/biometeorology_mod.f90
===================================================================
--- palm/trunk/SOURCE/biometeorology_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/biometeorology_mod.f90	(revision 4843)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -1391,8 +1395,13 @@
     INTEGER(iwp) ::  io_status   !< Status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
     NAMELIST /biometeorology_parameters/  clothing,                                                &
                                           consider_obstructions,                                   &
                                           orientation_angle,                                       &
                                           sun_in_south,                                            &
+                                          switch_off_module,                                       &
                                           thermal_comfort,                                         &
                                           turn_to_sun,                                             &
@@ -1410,5 +1419,5 @@
 !--    biometeorology_parameters namelist was found and read correctly. Set flag that
 !--    biometeorology_mod is switched on.
-       biometeorology = .TRUE.
+       IF ( .NOT. switch_off_module )  biometeorology = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/bulk_cloud_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/bulk_cloud_model_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -678,4 +682,7 @@
     INTEGER(iwp)  ::  io_status   !< Status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /bulk_cloud_parameters/                                                               &
@@ -699,4 +706,5 @@
        snow,                                                                                       &
        start_ice_microphysics,                                                                     &
+       switch_off_module,                                                                          &
        ventilation_effect
 
@@ -711,5 +719,5 @@
 !--    bulk_cloud_parameters namelist was found and read correctly. Set flag that
 !--    bulk_cloud_model_mod is switched on.
-       bulk_cloud_model = .TRUE.
+       IF ( .NOT. switch_off_module )  bulk_cloud_model = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4843)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4833 2021-01-07 08:57:54Z raasch
 ! openmp bugfix for time measurements of non advective processes 
 !
@@ -2506,8 +2510,6 @@
     USE chem_modules
     USE control_parameters
-
     USE pegrid
     USE statistics
-
 
     CHARACTER(LEN=100) ::  line                        !< dummy string that contains the current
@@ -2518,4 +2520,8 @@
     INTEGER(iwp) ::  io_status                         !< Status after reading the namelist file
     INTEGER(iwp) ::  max_pr_cs_tmp                     !<
+
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     REAL(wp), DIMENSION(nmaxfixsteps) ::   my_steps    !< List of fixed timesteps   my_step(1) = 0.0
@@ -2564,4 +2570,5 @@
          surface_csflux,                                                                           &
          surface_csflux_name,                                                                      &
+         switch_off_module,                                                                        &
          time_fac_type
 !
@@ -2594,5 +2601,5 @@
 !
 !      chemistry_parameters namelist was found and read correctly. Switch on chemistry model.
-       air_chemistry = .TRUE.
+       IF ( .NOT. switch_off_module )  air_chemistry = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/dynamics_mod.f90
===================================================================
--- palm/trunk/SOURCE/dynamics_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/dynamics_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -339,16 +343,21 @@
  SUBROUTINE dynamics_parin
 
-
     CHARACTER(LEN=100)  ::  line  !< dummy string that contains the current line of the parameter
                                   !< file
     INTEGER(iwp)  ::  io_status   !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
     
-    NAMELIST /dynamics_parameters/  dynamics_module_enabled
-
-!
-!-- Set default module switch to true.
+    NAMELIST /dynamics_parameters/  switch_off_module
+
+
+!
+!-- For the time beeing (unless the dynamics module is further developed), set default module
+!-- switch to true.
     dynamics_module_enabled = .TRUE.
 
+!
 !-- Move to the beginning of the namelist file and try to find and read the namelist.
     REWIND( 11 )
@@ -357,5 +366,10 @@
 !
 !-- Action depending on the READ status
-    IF ( io_status > 0 )  THEN
+    IF ( io_status == 0 )  THEN
+!
+!--    dynamics_parameters namelist was found and read correctly.
+       IF ( .NOT. switch_off_module )  dynamics_module_enabled = .TRUE.
+
+    ELSEIF ( io_status > 0 )  THEN
 !
 !--    dynamics_parameters namelist was found, but contained errors. Print an error message
Index: palm/trunk/SOURCE/gust_mod.f90
===================================================================
--- palm/trunk/SOURCE/gust_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/gust_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -224,8 +228,12 @@
     CHARACTER(LEN=100)  ::  line  !< dummy string that contains the current line of the parameter
                                   !< file
+
     INTEGER(iwp)  ::  io_status   !< status after reading the namelist file
 
-
-    NAMELIST /gust_parameters/  gust_module_enabled
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /gust_parameters/  switch_off_module
 
 !
@@ -240,5 +248,5 @@
 !--    gust_parameters namelist was found and read correctly. Set flag that indicates that the gust
 !--    module is switched on.
-       gust_module_enabled = .TRUE.
+       IF ( .NOT. switch_off_module )  gust_module_enabled = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/indoor_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/indoor_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/indoor_model_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -2131,7 +2135,11 @@
     INTEGER(iwp)  ::  io_status  !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /indoor_parameters/  indoor_during_spinup,                                            &
-                                  initial_indoor_temperature
+                                  initial_indoor_temperature,                                      &
+                                  switch_off_module
 
 !
@@ -2146,5 +2154,5 @@
 !--    indoor_parameters namelist was found and read correctly. Set flag that indicates that the
 !--    indoor model is switched on.
-       indoor_model = .TRUE.
+       IF ( .NOT. switch_off_module )  indoor_model = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/lagrangian_particle_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/lagrangian_particle_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/lagrangian_particle_model_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -577,4 +581,8 @@
 
     INTEGER(iwp) ::  io_status  !< status after reading the namelist file
+
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /particle_parameters/                                                                 &
@@ -638,4 +646,5 @@
        splitting_mode,                                                                             &
        step_dealloc,                                                                               &
+       switch_off_module,                                                                          &
        unlimited_dimension,                                                                        &
        use_sgs_for_particles,                                                                      &
@@ -655,5 +664,5 @@
 !--    particle_parameters namelist was found and read correctly. Set flag that indicates that
 !--    particles are switched on.
-       particle_advection = .TRUE.
+       IF ( .NOT. switch_off_module )  particle_advection = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -5004,6 +5008,10 @@
     CHARACTER(LEN=100) ::  line  !< dummy string that contains the current line of the parameter
                                  !< file
+
     INTEGER(iwp)  ::  io_status  !< status after reading the nameslist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /land_surface_parameters/  aero_resist_kray,                                          &
@@ -5037,4 +5045,5 @@
                                         soil_type,                                                 &
                                         surface_type,                                              &
+                                        switch_off_module,                                         &
                                         vegetation_coverage,                                       &
                                         vegetation_type,                                           &
@@ -5063,5 +5072,5 @@
 !--    land_surface_parameters namelist was found and read correctly. Set flag that indicates that
 !--    the land surface model is switched on.
-       land_surface = .TRUE.
+       IF ( .NOT. switch_off_module )  land_surface = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/multi_agent_system_mod.f90
===================================================================
--- palm/trunk/SOURCE/multi_agent_system_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/multi_agent_system_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -3663,4 +3667,7 @@
     INTEGER(iwp)  ::  io_status  !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /agent_parameters/  a_rand_target,                                                    &
@@ -3703,4 +3710,5 @@
                                  sigma_rep_wall,                                                   &
                                  step_dealloc_mas,                                                 &
+                                 switch_off_module,                                                &
                                  tau_accel_agent
 
@@ -3716,5 +3724,5 @@
 !--    agent_parameters namelist was found and read correctly. Set flag that indicates that agents
 !--    are switched on.
-       agents_active = .TRUE.
+       IF ( .NOT. switch_off_module )  agents_active = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/nesting_offl_mod.f90
===================================================================
--- palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -2453,8 +2457,13 @@
 
     CHARACTER(LEN=100) ::  line  !< dummy string that contains the current line of the parameter file
+
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
-
-    NAMELIST /nesting_offl_parameters/  nesting_offline
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /nesting_offl_parameters/  switch_off_module
+
 
 !
@@ -2465,5 +2474,11 @@
 !
 !-- Action depending on the READ status
-    IF ( io_status > 0 )  THEN
+    IF ( io_status == 0 )  THEN
+!
+!--    nesting_offl_parameters namelist was found and read correctly. Enable the
+!--    offline nesting.
+       IF ( .NOT. switch_off_module )  nesting_offline = .TRUE.
+
+    ELSEIF ( io_status > 0 )  THEN
 !
 !--    nesting_offl_parameters namelist was found but contained errors. Print an error message
Index: palm/trunk/SOURCE/ocean_mod.f90
===================================================================
--- palm/trunk/SOURCE/ocean_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/ocean_mod.f90	(revision 4843)
@@ -24,4 +24,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -578,6 +582,10 @@
     CHARACTER(LEN=100) ::  line  !< dummy string that contains the current line of the parameter
                                  !< file
+
     INTEGER(iwp)  ::  io_status  !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /ocean_parameters/  bc_sa_t,                                                          &
@@ -590,4 +598,5 @@
                                  stokes_wavelength,                                                &
                                  surface_cooling_spinup_time,                                      &
+                                 switch_off_module,                                                &
                                  top_salinityflux,                                                 &
                                  wall_salinityflux,                                                &
@@ -606,5 +615,5 @@
 !--    ocean_parameters namelist was found and read correctly. Set switch that enables PALM's ocean
 !--    mode.
-       ocean_mode = .TRUE.
+       IF ( .NOT. switch_off_module )  ocean_mode = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/plant_canopy_model_mod.f90	(revision 4843)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -1561,4 +1565,7 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /plant_canopy_parameters/  alpha_lad,                                                 &
@@ -1575,5 +1582,6 @@
                                         leaf_surface_conc,                                         &
                                         pch_index,                                                 &
-                                        plant_canopy_transpiration
+                                        plant_canopy_transpiration,                                &
+                                        switch_off_module
 
 !
@@ -1589,5 +1597,5 @@
 !--    plant_canopy_parameters namelist was found and read correctly. Set flag that indicates that
 !--    the plant-canopy model is switched on.
-       plant_canopy = .TRUE.
+       IF ( .NOT. switch_off_module )  plant_canopy = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/pmc_handle_communicator_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_handle_communicator_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/pmc_handle_communicator_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! Canopy-restricted anterpolation introduced. New namelist parameter anterpolation_starting_height 
 ! introduced for controlling canopy-restricted anterpolation.
@@ -445,13 +449,19 @@
     INTEGER(iwp) ::  bad_llcorner  !<
     INTEGER(iwp) ::  i             !<
-    INTEGER(iwp) ::  istat         !<
+    INTEGER(iwp) ::  io_status     !<
+
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     TYPE(pmc_layout), DIMENSION(pmc_max_models) ::  domain_layouts  !<
 
-    NAMELIST /nesting_parameters/  domain_layouts,                                                 &
+    NAMELIST /nesting_parameters/  anterpolation_buffer_width,                                     &
+                                   anterpolation_starting_height,                                  &
+                                   domain_layouts,                                                 &
                                    nesting_datatransfer_mode,                                      &
                                    nesting_mode,                                                   &
-                                   anterpolation_buffer_width,                                     &
-                                   anterpolation_starting_height
+                                   switch_off_module
+
 
 !
@@ -460,9 +470,9 @@
     m_ncpl =   0
 
-    pmc_status = pmc_status_ok
+    pmc_status = pmc_no_namelist_found
 !
 !-- Open the NAMELIST-file and read the nesting layout
     CALL check_open( 11 )
-    READ ( 11, nesting_parameters, IOSTAT = istat )
+    READ ( 11, nesting_parameters, IOSTAT = io_status )
 !
 !-- Set filepointer to the beginning of the file. Otherwise process 0 will later be unable to read
@@ -470,10 +480,18 @@
     REWIND ( 11 )
 
-    IF ( istat < 0 )  THEN
+    IF ( io_status == 0 )  THEN
+!
+!--    nesting_parameters namelist was found and read correctly. Enable the nesting by setting
+!--    the palm model coupler status respectively.
+       IF ( .NOT. switch_off_module )  THEN
+          pmc_status = pmc_status_ok
+       ELSE
+          RETURN
+       ENDIF
+    ELSEIF ( io_status < 0 )  THEN
 !
 !--    No nesting_parameters-NAMELIST found
-       pmc_status = pmc_no_namelist_found
        RETURN
-    ELSEIF ( istat > 0 )  THEN
+    ELSEIF ( io_status > 0 )  THEN
 !
 !--    Errors in reading nesting_parameters-NAMELIST
@@ -481,4 +499,5 @@
        RETURN
     ENDIF
+
 !
 !-- Output location message
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4843)
@@ -27,4 +27,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -4116,4 +4120,7 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /radiation_parameters/ albedo,                                                        &
@@ -4148,4 +4155,5 @@
                                     surface_reflections,                                           &
                                     svfnorm_report_thresh,                                         &
+                                    switch_off_module,                                             &
                                     sw_radiation,                                                  &
                                     unscheduled_radiation_calls
@@ -4162,5 +4170,5 @@
 !--    radiation_parameters namelist was found and read correctly. Set flag that indicates that the
 !--    radiation model is switched on.
-       radiation = .TRUE.
+       IF ( .NOT. switch_off_module )  radiation = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/salsa_mod.f90
===================================================================
--- palm/trunk/SOURCE/salsa_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/salsa_mod.f90	(revision 4843)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -1135,4 +1139,8 @@
     INTEGER(iwp) ::  max_pr_salsa_tmp  !< dummy variable
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
     NAMELIST /salsa_parameters/      aerosol_flux_dpg,                                             &
                                      aerosol_flux_mass_fracs_a,                                    &
@@ -1187,4 +1195,5 @@
                                      skip_time_do_salsa,                                           &
                                      surface_aerosol_flux,                                         &
+                                     switch_off_module,                                            &
                                      van_der_waals_coagc
 
@@ -1200,6 +1209,6 @@
 !
 !--    salsa_parameters namelist was found and read correctly. Enable salsa (salsa switch in
-!--    modules.f90)
-       salsa = .TRUE.
+!--    modules.f90).
+       IF ( .NOT. switch_off_module )  salsa = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/spectra_mod.f90
===================================================================
--- palm/trunk/SOURCE/spectra_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/spectra_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more,
@@ -159,4 +163,7 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /spectra_parameters/                                                                  &
@@ -166,5 +173,6 @@
                             dt_dosp,                                                               &
                             skip_time_dosp,                                                        &
-                            spectra_direction
+                            spectra_direction,                                                     &
+                            switch_off_module
 !
 !-- Position the namelist-file at the beginning (it was already opened in parin), and try to read
@@ -177,11 +185,12 @@
     IF ( io_status == 0 )  THEN
 !
-!--    spectra_parameters namelist was found and read correctly.
-!--    Default setting of dt_dosp here (instead of check_parameters), because its current value is
-!--    needed in init_pegrid.
-       IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
-!
-!--    Set general switch that spectra shall be calculated.
-       calculate_spectra = .TRUE.
+!--    spectra_parameters namelist was found and read correctly. Set flag to indicate that spectra
+!--    have to be calculated.
+       IF ( .NOT.  switch_off_module )  THEN
+          calculate_spectra = .TRUE.
+!--       Default setting of dt_dosp here (instead of check_parameters), because its current value
+!--       is needed in init_pegrid.
+          IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
+       ENDIF
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/surface_data_output_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_data_output_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/surface_data_output_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -4213,4 +4217,7 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /surface_data_output_parameters/  averaging_interval_surf,                            &
@@ -4220,4 +4227,5 @@
                                                skip_time_dosurf,                                   &
                                                skip_time_dosurf_av,                                &
+                                               switch_off_module,                                  &
                                                to_netcdf,                                          &
                                                to_vtk
@@ -4233,5 +4241,5 @@
 !--    surface_data_output_parameters namelist was found and read correctly. Set flag that indicates
 !--    that surface data output is switched on.
-       surface_output = .TRUE.
+       IF ( .NOT. switch_off_module )  surface_output = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -1217,8 +1221,13 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
-    NAMELIST /stg_par/  dt_stg_adjust,                                                             &
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /stg_par/  compute_velocity_seeds_local,                                              &
+                        dt_stg_adjust,                                                             &
                         dt_stg_call,                                                               &
-                        use_syn_turb_gen,                                                          &
-                        compute_velocity_seeds_local
+                        switch_off_module,                                                         &
+                        use_syn_turb_gen
 
 
@@ -1234,5 +1243,5 @@
 !--    stg_par namelist was found and read correctly. Set flag that indicates that the synthetic
 !--    turbulence generator is switched on.
-       syn_turb_gen = .TRUE.
+       IF ( .NOT. switch_off_module )  syn_turb_gen = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4843)
@@ -27,4 +27,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -5821,4 +5825,8 @@
     INTEGER(iwp) ::  io_status    !< status after reading the namelist file
 
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
     NAMELIST /urban_surface_parameters/                                                            &
                         building_type,                                                             &
@@ -5827,4 +5835,5 @@
                         roughness_concrete,                                                        &
                         soil_inner_temperature,                                                    &
+                        switch_off_module,                                                         &
                         urban_surface,                                                             &
                         usm_wall_mod,                                                              &
@@ -5834,5 +5843,4 @@
 
 
-
 !
 !-- Move to the beginning of the namelist file and try to find and read the namelist.
@@ -5846,5 +5854,5 @@
 !--    urban_surface_parameters namelist was found and read correctly. Set flag that indicates that
 !--    the urban surface model is switched on.
-       urban_surface = .TRUE.
+       IF ( .NOT. switch_off_module )  urban_surface = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/user_module.f90
===================================================================
--- palm/trunk/SOURCE/user_module.f90	(revision 4842)
+++ palm/trunk/SOURCE/user_module.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! Enable 3D data output also with 64-bit precision
 ! 
@@ -249,10 +253,13 @@
     INTEGER(iwp) ::  j          !<
 
-
-    NAMELIST /user_parameters/                                                                     &
-       data_output_masks_user,                                                                     &
-       data_output_pr_user,                                                                        &
-       data_output_user,                                                                           &
-       region
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /user_parameters/  data_output_masks_user,                                            &
+                                data_output_pr_user,                                               &
+                                data_output_user,                                                  &
+                                region,                                                            &
+                                switch_off_module
 
 !
@@ -281,5 +288,5 @@
 !--    User namelist found and correctly read. Set default module switch to true. This activates
 !--    calls of the user-interface subroutines.
-       user_module_enabled = .TRUE.
+       IF ( .NOT. switch_off_module )  user_module_enabled = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/virtual_flight_mod.f90
===================================================================
--- palm/trunk/SOURCE/virtual_flight_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/virtual_flight_mod.f90	(revision 4843)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4842 2021-01-14 10:42:28Z raasch
 ! reading of namelist file and actions in case of namelist errors revised so that statement labels
 ! and goto statements are not required any more
@@ -236,17 +240,22 @@
     INTEGER(iwp) ::  io_status   !< status after reading the namelist file
 
-
-    NAMELIST /virtual_flight_parameters/ flight_angle,                                             &
-                                         flight_begin,                                             &
-                                         flight_end,                                               &
-                                         flight_level,                                             &
-                                         leg_mode,                                                 &
-                                         max_elev_change,                                          &
-                                         rate_of_climb,                                            &
-                                         speed_agl,                                                &
-                                         x_end,                                                    &
-                                         x_start,                                                  &
-                                         y_end,                                                    &
-                                         y_start
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /virtual_flight_parameters/  flight_angle,                                            &
+                                          flight_begin,                                            &
+                                          flight_end,                                              &
+                                          flight_level,                                            &
+                                          leg_mode,                                                &
+                                          max_elev_change,                                         &
+                                          rate_of_climb,                                           &
+                                          speed_agl,                                               &
+                                          switch_off_module,                                       &
+                                          x_end,                                                   &
+                                          x_start,                                                 &
+                                          y_end,                                                   &
+                                          y_start
+
 
 !
@@ -261,5 +270,5 @@
 !--    virtual_flight_parameters namelist was found and read correctly. Set switch that virtual
 !--    flights are carried out.
-       virtual_flight = .TRUE.
+       IF ( .NOT. switch_off_module )  virtual_flight = .TRUE.
 
     ELSEIF ( io_status > 0 )  THEN
Index: palm/trunk/SOURCE/virtual_measurement_mod.f90
===================================================================
--- palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 4843)
@@ -25,4 +25,10 @@
 ! -----------------
 ! $Id$
+! reading of namelist file and actions in case of namelist errors revised so that statement labels
+! and goto statements are not required any more,
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! - Add control flags
 !
@@ -415,5 +421,4 @@
     LOGICAL ::  global_attribute          = .TRUE.   !< flag indicating a global attribute
     LOGICAL ::  initial_write_coordinates = .FALSE.  !< flag indicating a global attribute
-    LOGICAL ::  use_virtual_measurement   = .FALSE.  !< Namelist parameter
 
     REAL(wp) ::  dt_virtual_measurement   = 0.0_wp  !< sampling interval
@@ -817,5 +822,11 @@
  SUBROUTINE vm_parin
 
-    CHARACTER(LEN=80) ::  line   !< dummy string that contains the current line of the parameter file
+    CHARACTER(LEN=100) ::  line  !< dummy string that contains the current line of the parameter file
+
+    INTEGER(iwp) ::  io_status   !< status after reading the namelist file
+
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
 
     NAMELIST /virtual_measurement_parameters/  dt_virtual_measurement,                             &
@@ -826,31 +837,29 @@
                                                off_ts,                                             &
                                                off_ts_z,                                           &
-                                               use_virtual_measurement,                            &
+                                               switch_off_module,                                  &
                                                vm_time_start
 
-    line = ' '
-!
-!-- Try to find stg package
-    REWIND ( 11 )
-    line = ' '
-    DO  WHILE ( INDEX( line, '&virtual_measurement_parameters' ) == 0 )
-       READ ( 11, '(A)', END=20 )  line
-    ENDDO
-    BACKSPACE ( 11 )
-
-!
-!-- Read namelist
-    READ ( 11, virtual_measurement_parameters, ERR = 10, END = 20 )
-
-!
-!-- Set flag that indicates that the virtual measurement module is switched on
-    IF ( use_virtual_measurement )  virtual_measurement = .TRUE.
-    GOTO 20
-
- 10 BACKSPACE( 11 )
-    READ( 11 , '(A)') line
-    CALL parin_fail_message( 'virtual_measurement_parameters', line )
-
- 20 CONTINUE
+!
+!-- Move to the beginning of the namelist file and try to find and read the namelist.
+    REWIND( 11 )
+    READ( 11, virtual_measurement_parameters, IOSTAT=io_status )
+
+!
+!-- Action depending on the READ status
+    IF ( io_status == 0 )  THEN
+!
+!--    virtual_measurements_parameters namelist was found and read correctly. Enable the
+!--    virtual measurements.
+       IF ( .NOT. switch_off_module )  virtual_measurement = .TRUE.
+
+    ELSEIF ( io_status > 0 )  THEN
+!
+!--    virtual_measurement_parameters namelist was found but contained errors. Print an error
+!--    message including the line that caused the problem.
+       BACKSPACE( 11 )
+       READ( 11 , '(A)' ) line
+       CALL parin_fail_message( 'virtual_measurement_parameters', line )
+
+    ENDIF
 
  END SUBROUTINE vm_parin
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 4842)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 4843)
@@ -21,9 +21,15 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! reading of namelist file and actions in case of namelist errors revised so that statement labels
+! and goto statements are not required any more,
+! local namelist parameter added to switch off the module although the respective module namelist
+! appears in the namelist file
+!
+! 4828 2021-01-05 11:21:41Z Giersch
 ! reset n_turbines_max to 1E4 (10 000), because it was set to 1 000 in r4497 by mistake
 ! 
@@ -530,43 +536,75 @@
     IMPLICIT NONE
 
-    CHARACTER(LEN=80) ::  line  !< dummy string that contains the current line of the parameter file
-
-    NAMELIST /wind_turbine_parameters/                                                             &
-             air_density, tower_diameter, dt_data_output_wtm,                                      &
-                gear_efficiency, gear_ratio, generator_efficiency,                                 &
-                generator_inertia, rotor_inertia, yaw_misalignment_max,                            &
-                generator_torque_max, generator_torque_rate_max, yaw_misalignment_min,             &
-                region_15_min, region_2_min, n_airfoils, n_turbines,                               &
-                rotor_speed, yaw_angle, pitch_angle, pitch_control,                                &
-                generator_speed_rated, generator_power_rated, hub_x, hub_y, hub_z,                 &
-                nacelle_radius, rotor_radius, segment_length_tangential, segment_width_radial,     &
-                region_2_slope, speed_control, tilt_angle, time_turbine_on,                        &
-                smearing_kernel_size, tower_cd, pitch_rate,                                        &
-                yaw_control, yaw_speed, tip_loss_correction
-!                , nacelle_cd
-
-!
-!-- Try to find wind turbine model package:
-    REWIND ( 11 )
-    line = ' '
-    DO WHILE ( INDEX ( line, '&wind_turbine_parameters' ) == 0 )
-       READ ( 11, '(A)', END = 12 )  line
-    ENDDO
-    BACKSPACE ( 11 )
-
-!
-!-- Read user-defined namelist:
-    READ ( 11, wind_turbine_parameters, ERR = 10, END = 12 )
-!
-!-- Set flag that indicates that the wind turbine model is switched on:
-    wind_turbine = .TRUE.
-
-    GOTO 12
-
- 10 BACKSPACE ( 11 )
-    READ ( 11, '(A)' ) line
-    CALL parin_fail_message( 'wind_turbine_parameters', line )
-
- 12 CONTINUE  ! TBD Change from continue, mit ierrn machen
+    CHARACTER(LEN=100) ::  line  !< dummy string that contains the current line of the parameter file
+
+    INTEGER(iwp) ::  io_status   !< status after reading the namelist file
+
+    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
+                                             !< although the respective module namelist appears in
+                                             !< the namelist file
+
+    NAMELIST /wind_turbine_parameters/  air_density,                                               &
+                                        dt_data_output_wtm,                                        &
+                                        gear_efficiency,                                           &
+                                        gear_ratio,                                                &
+                                        generator_efficiency,                                      &
+                                        generator_inertia,                                         &
+                                        generator_power_rated,                                     &
+                                        generator_speed_rated,                                     &
+                                        generator_torque_max,                                      &
+                                        generator_torque_rate_max,                                 &
+                                        hub_x,                                                     &
+                                        hub_y,                                                     &
+                                        hub_z,                                                     &
+                                        nacelle_radius,                                            &
+                                        n_airfoils,                                                &
+                                        n_turbines,                                                &
+                                        pitch_angle,                                               &
+                                        pitch_control,                                             &
+                                        pitch_rate,                                                &
+                                        region_15_min,                                             &
+                                        region_2_min,                                              &
+                                        region_2_slope,                                            &
+                                        rotor_inertia,                                             &
+                                        rotor_radius,                                              &
+                                        rotor_speed,                                               &
+                                        segment_length_tangential,                                 &
+                                        segment_width_radial,                                      &
+                                        smearing_kernel_size,                                      &
+                                        speed_control,                                             &
+                                        switch_off_module,                                         &
+                                        tilt_angle,                                                &
+                                        time_turbine_on,                                           &
+                                        tip_loss_correction,                                       &
+                                        tower_cd,                                                  &
+                                        tower_diameter,                                            &
+                                        yaw_angle,                                                 &
+                                        yaw_control,                                               &
+                                        yaw_misalignment_max,                                      &
+                                        yaw_misalignment_min,                                      &
+                                        yaw_speed
+
+!
+!-- Move to the beginning of the namelist file and try to find and read the namelist.
+    REWIND( 11 )
+    READ( 11, wind_turbine_parameters, IOSTAT=io_status )
+
+!
+!-- Action depending on the READ status
+    IF ( io_status == 0 )  THEN
+!
+!--    wind_turbine_parameters namelist was found and read correctly. Enable the
+!--    wind turbine module.
+       IF ( .NOT. switch_off_module )  wind_turbine = .TRUE.
+
+    ELSEIF ( io_status > 0 )  THEN
+!
+!--    wind_turbine_parameters namelist was found but contained errors. Print an error message
+!--    including the line that caused the problem.
+       BACKSPACE( 11 )
+       READ( 11 , '(A)' ) line
+       CALL parin_fail_message( 'wind_turbine_parameters', line )
+
+    ENDIF
 
  END SUBROUTINE wtm_parin
