Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 2296)
+++ palm/trunk/SOURCE/modules.f90	(revision 2298)
@@ -25,4 +25,13 @@
 ! -----------------
 ! $Id$
+! missing variable descriptions have been added,
+! type of write_binary changed from CHARACTER to LOGICAL
+! -plot_precision, plot_3d_precision, return_addres, return_username,
+! avs_data_file, exchange_mg, sendrecvcound_yxd, sendrecv_in_background,
+! port_name, profile_number, cross_ts_numbers, cross_ts_number_count,
+! dots_crossindex, dots_index, cross_ts_uymax, cross_ts_uymax_computed,
+! cross_ts_uymin, cross_ts_uymin_computed
+! 
+! 2296 2017-06-28 07:53:56Z maronga
 ! Added parameters for model spinup
 ! 
@@ -470,7 +479,5 @@
 ! Description:
 ! ------------
-!> Definition of all variables
-!>
-!> @todo Add missing variable descriptions (Siggi)
+!> Definition of global variables
 !------------------------------------------------------------------------------!
 
@@ -485,8 +492,8 @@
     USE kinds
 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  aex  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  bex  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dex  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  eex  !< Siggi 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  aex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  bex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  eex  !< exponential coefficient for the Bott-Chlond advection scheme
     
     SAVE
@@ -504,10 +511,10 @@
     USE kinds
 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                  !< Siggi 
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                !< Siggi    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                  !< mean phase velocity at outflow for u-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                !< mean phase velocity at outflow for u-component used in radiation boundary condition (local subdomain value)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                  !< mean phase velocity at outflow for v-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                !< mean phase velocity at outflow for v-component used in radiation boundary condition (local subdomain value)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                  !< mean phase velocity at outflow for w-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                !< mean phase velocity at outflow for w-component used in radiation boundary condition (local subdomain value)
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu                   !< 1/dzu 
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu_pres              !< modified ddzu for pressure solver 
@@ -576,7 +583,7 @@
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_v              !< 6th-order advective flux at south face of grid box - v-component
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_w              !< 6th-order advective flux at south face of grid box - w-component
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f1_mg                 !< Siggi
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f2_mg                 !< Siggi
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f3_mg                 !< Siggi
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f1_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f2_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f3_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  mean_inflow_profiles  !< used for turbulent inflow (non-cyclic boundary conditions)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  precipitation_amount  !< precipitation amount due to gravitational settling (bulk microphysics)
@@ -591,6 +598,6 @@
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_lpt            !< temperature tendency due to subsidence/ascent (large scale forcing)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_q              !< specific humidity tendency due to subsidence/ascent (large scale forcing)
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< Siggi 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< Siggi
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (atmosphere data)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (ocean data)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ug_vert               !< vertical profile of geostrophic wind component in x-direction interpolated to vertical grid (large scale forcing)
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  unudge                !< vertical profile of wind component in x-direction interpolated to vertical grid (nudging) 
@@ -633,19 +640,19 @@
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  l_wall     !< near-wall mixing length
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  prr        !< rain rate
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p_loc      !< Siggi
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p_loc      !< local array in multigrid/sor solver containing the pressure which is iteratively advanced in each iteration step
     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tend       !< tendency field (time integration)
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric       !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n      !< Siggi 
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r      !< Siggi
-    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s      !< Siggi
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric       !< coefficients of the tridiagonal matrix for solution of the Poisson equation in Fourier space
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l      !< velocity data (u at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n      !< velocity data (u at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r      !< velocity data (u at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s      !< velocity data (u at south boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l      !< velocity data (v at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n      !< velocity data (v at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r      !< velocity data (v at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s      !< velocity data (v at south boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l      !< velocity data (w at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n      !< velocity data (w at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r      !< velocity data (w at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s      !< velocity data (w at south boundary) from time level t-dt required for radiation boundary condition
 
 #if defined( __nopointer )
@@ -786,5 +793,5 @@
 #endif
 
-    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tri      !< Siggi 
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tri    !<  array to hold the tridiagonal matrix for solution of the Poisson equation in Fourier space (4th dimension for threads)
 
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  rho_air      !< air density profile on the uv grid
@@ -918,18 +925,7 @@
     USE kinds
 
-    TYPE plot_precision
-       CHARACTER (LEN=8) ::  variable   !< Siggi
-       INTEGER(iwp)      ::  precision  !< Siggi
-    END TYPE plot_precision
-
-    TYPE(plot_precision), DIMENSION(100) ::  plot_3d_precision =               &  !< Siggi
-                        (/ plot_precision( 'u', 2 ), plot_precision( 'v', 2 ), & 
-                           plot_precision( 'w', 2 ), plot_precision( 'p', 5 ), & 
-                           plot_precision( 'pt', 2 ),                          & 
-                           ( plot_precision( ' ', 1 ), i9 = 1,95 ) /)
-
     TYPE file_status
-       LOGICAL ::  opened         !< Siggi
-       LOGICAL ::  opened_before  !< Siggi
+       LOGICAL ::  opened         !< file is currently open
+       LOGICAL ::  opened_before  !< file is currently closed, but has been openend before
     END TYPE file_status
     
@@ -938,11 +934,10 @@
     INTEGER(iwp), PARAMETER ::  varnamelength = 30        !< length of output variable names
 
-    TYPE(file_status), DIMENSION(200+2*max_masks) ::                &  !< Siggi
+    TYPE(file_status), DIMENSION(200+2*max_masks) ::                &  !< indicates if file is open or if it has been opened before
                              openfile = file_status(.FALSE.,.FALSE.)
 
     CHARACTER (LEN=1)    ::  cycle_mg = 'w'                               !< namelist parameter (see documentation)
     CHARACTER (LEN=1)    ::  timestep_reason = ' '                        !< 'A'dvection or 'D'iffusion criterion, written to RUN_CONTROL file
-    CHARACTER (LEN=3)    ::  coupling_char = ''                           !< Siggi
-    CHARACTER (LEN=5)    ::  write_binary = 'false'                       !< internal namelist parameter Siggi--> Why is this not a flag?
+    CHARACTER (LEN=3)    ::  coupling_char = ''                           !< appended to filenames in coupled ocean-atmosphere runs ('_O': ocean PE, '_A': atmosphere PE)
     CHARACTER (LEN=8)    ::  most_method = 'newton'                       !< namelist parameter
     CHARACTER (LEN=8)    ::  run_date                                     !< date of simulation run, printed to HEADER file
@@ -952,6 +947,6 @@
     CHARACTER (LEN=12)   ::  version = ' '                                !< PALM version number
     CHARACTER (LEN=12)   ::  revision = ' '                               !< PALM revision number
-    CHARACTER (LEN=12)   ::  user_interface_current_revision = ' '        !< Siggi
-    CHARACTER (LEN=12)   ::  user_interface_required_revision = ' '       !< Siggi
+    CHARACTER (LEN=12)   ::  user_interface_current_revision = ' '        !< revision number of the currently used user-interface (must match user_interface_required_revision)
+    CHARACTER (LEN=12)   ::  user_interface_required_revision = ' '       !< required user-interface revision number
     CHARACTER (LEN=16)   ::  conserve_volume_flow_mode = 'default'        !< namelist parameter
     CHARACTER (LEN=16)   ::  loop_optimization = 'default'                !< namelist parameter
@@ -978,5 +973,5 @@
     CHARACTER (LEN=20)   ::  cloud_scheme = 'saturation_adjust'           !< namelist parameter
     CHARACTER (LEN=20)   ::  coupling_mode = 'uncoupled'                  !< coupling mode for atmosphere-ocean coupling  
-    CHARACTER (LEN=20)   ::  coupling_mode_remote = 'uncoupled'           !< Siggi
+    CHARACTER (LEN=20)   ::  coupling_mode_remote = 'uncoupled'           !< coupling mode of the remote process in case of coupled atmosphere-ocean runs
     CHARACTER (LEN=20)   ::  dissipation_1d = 'detering'                  !< namelist parameter
     CHARACTER (LEN=20)   ::  fft_method = 'system-specific'               !< namelist parameter
@@ -984,14 +979,11 @@
     CHARACTER (LEN=20)   ::  random_generator = 'random-parallel'         !< namelist parameter
     CHARACTER (LEN=20)   ::  reference_state = 'initial_profile'          !< namelist parameter  
-    CHARACTER (LEN=20)   ::  return_addres                                !< Siggi
-    CHARACTER (LEN=20)   ::  return_username                              !< Siggi
     CHARACTER (LEN=20)   ::  timestep_scheme = 'runge-kutta-3'            !< namelist parameter       
-    CHARACTER (LEN=40)   ::  avs_data_file                                !< Siggi
     CHARACTER (LEN=40)   ::  topography = 'flat'                          !< namelist parameter 
-    CHARACTER (LEN=64)   ::  host = ' '                                   !< Siggi
-    CHARACTER (LEN=80)   ::  log_message                                  !< Siggi
-    CHARACTER (LEN=80)   ::  run_identifier                               !< Siggi
+    CHARACTER (LEN=64)   ::  host = ' '                                   !< hostname on which PALM is running, ENVPAR namelist parameter provided by mrun
+    CHARACTER (LEN=80)   ::  log_message                                  !< user-defined message for debugging (sse data_log.f90)
+    CHARACTER (LEN=80)   ::  run_identifier                               !< run identifier as given by mrun option -d, ENVPAR namelist parameter provided by mrun
     CHARACTER (LEN=100)  ::  initializing_actions = ' '                   !< namelist parameter
-    CHARACTER (LEN=210)  ::  run_description_header                       !< Siggi
+    CHARACTER (LEN=210)  ::  run_description_header                       !< string containing diverse run informations as run identifier, coupling mode, host, ensemble number, run date and time
     CHARACTER (LEN=1000) ::  message_string = ' '                         !< dynamic string for error message output
 
@@ -1021,6 +1013,6 @@
     INTEGER(iwp) ::  average_count_3d = 0              !< number of samples in 3d output
     INTEGER(iwp) ::  current_timestep_number = 0       !< current timestep number, printed to RUN_CONTROL file
-    INTEGER(iwp) ::  coupling_topology = 0             !< processor topology for atmosphere-ocean coupling  Siggi
-    INTEGER(iwp) ::  dist_range = 0                    !< Siggi
+    INTEGER(iwp) ::  coupling_topology = 0             !< switch for atmosphere-ocean-coupling: 0: same number of grid points and PEs along x and y in atmosphere and ocean, otherwise 1
+    INTEGER(iwp) ::  dist_range = 0                    !< switch for steering the horizontal disturbance range, 1: inflow disturbances in case of non-cyclic horizontal BC, 0: otherwise
     INTEGER(iwp) ::  disturbance_level_ind_b           !< lowest grid index where flow disturbance is applied
     INTEGER(iwp) ::  disturbance_level_ind_t           !< highest grid index where flow disturbance is applied
@@ -1031,10 +1023,10 @@
     INTEGER(iwp) ::  dots_time_count = 0               !< number of output intervals for timeseries output
     INTEGER(iwp) ::  dp_level_ind_b = 0                !< lowest grid index for external pressure gradient forcing
-    INTEGER(iwp) ::  dvrp_filecount = 0                !< Siggi
-    INTEGER(iwp) ::  dz_stretch_level_index            !< Siggi
+    INTEGER(iwp) ::  dvrp_filecount = 0                !< parameter for dvr visualization software
+    INTEGER(iwp) ::  dz_stretch_level_index            !< vertical grid level index above which the vertical grid spacing is stretched
     INTEGER(iwp) ::  ensemble_member_nr = 0            !< namelist parameter
-    INTEGER(iwp) ::  gamma_mg                          !< Siggi
-    INTEGER(iwp) ::  gathered_size                     !< Siggi
-    INTEGER(iwp) ::  grid_level                        !< Siggi
+    INTEGER(iwp) ::  gamma_mg                          !< switch for steering the multigrid cycle: 1: v-cycle, 2: w-cycle
+    INTEGER(iwp) ::  gathered_size                     !< number of total domain grid points of the grid level which is gathered on PE0 (multigrid solver)
+    INTEGER(iwp) ::  grid_level                        !< current grid level handled in the multigrid solver
     INTEGER(iwp) ::  ibc_e_b                           !< integer flag for bc_e_b
     INTEGER(iwp) ::  ibc_p_b                           !< integer flag for bc_p_b
@@ -1053,13 +1045,13 @@
     INTEGER(iwp) ::  intermediate_timestep_count       !< number of current Runge-Kutta substep
     INTEGER(iwp) ::  intermediate_timestep_count_max   !< maximum number of Runge-Kutta substeps
-    INTEGER(iwp) ::  io_group = 0                      !< Siggi
-    INTEGER(iwp) ::  io_blocks = 1                     !< Siggi
+    INTEGER(iwp) ::  io_group = 0                      !< I/O group to which the PE belongs (= #PE / io_blocks)
+    INTEGER(iwp) ::  io_blocks = 1                     !< number of blocks for which I/O is done in sequence (total number of PEs / maximum_parallel_io_streams)
     INTEGER(iwp) ::  iran = -1234567                   !< integer random number used for flow disturbances
     INTEGER(iwp) ::  lod = 1                           !< level of detail, topography input parameter 
     INTEGER(iwp) ::  masks = 0                         !< counter for number of masked output quantities
-    INTEGER(iwp) ::  maximum_grid_level                !< Siggi
-    INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< Siggi
+    INTEGER(iwp) ::  maximum_grid_level                !< number of grid levels that the multigrid solver is using
+    INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< maximum number of parallel io streams that the underlying parallel file system allows, set with mrun option -w, ENVPAR namelist parameter, provided by mrun
     INTEGER(iwp) ::  max_pr_user = 0                   !< number of user-defined profiles (must not change within a job chain)
-    INTEGER(iwp) ::  mgcycles = 0                      !< Siggi
+    INTEGER(iwp) ::  mgcycles = 0                      !< number of multigrid cycles that the multigrid solver has actually carried out
     INTEGER(iwp) ::  mg_cycles = -1                    !< namelist parameter
     INTEGER(iwp) ::  mg_switch_to_pe0_level = -1       !< namelist parameter
@@ -1081,7 +1073,7 @@
     INTEGER(iwp) ::  runnr = 0                         !< number of run in job chain
     INTEGER(iwp) ::  subdomain_size                    !< number of grid points in (3d) subdomain including ghost points
-    INTEGER(iwp) ::  terminate_coupled = 0             !< Siggi
-    INTEGER(iwp) ::  terminate_coupled_remote = 0      !< Siggi
-    INTEGER(iwp) ::  timestep_count = 0                !< Siggi --> is it not analogue to intermediate_timestep_count
+    INTEGER(iwp) ::  terminate_coupled = 0             !< switch for steering termination in case of coupled runs
+    INTEGER(iwp) ::  terminate_coupled_remote = 0      !< switch for steering termination in case of coupled runs (condition of the remote model)
+    INTEGER(iwp) ::  timestep_count = 0                !< number of timesteps carried out since the beginning of the initial run
     INTEGER(iwp) ::  dist_nxl(0:1)                               !< left boundary of disturbance region
     INTEGER(iwp) ::  dist_nxr(0:1)                               !< right boundary of disturbance region
@@ -1116,5 +1108,5 @@
     INTEGER(iwp), DIMENSION(0:1) ::  ntdim_3d     !< number of output intervals for 3d data
 
-    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  grid_level_count  !< Siggi
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  grid_level_count  !< internal switch for steering the multigrid v- and w-cycles
 
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_i         !< subdomain grid index of masked output point on x-dimension
@@ -1158,10 +1150,9 @@
     LOGICAL ::  dt_3d_reached                                !< internal timestep for particle advection
     LOGICAL ::  dt_3d_reached_l                              !< internal timestep for particle advection
-    LOGICAL ::  exchange_mg = .FALSE.                        !< (Siggi add short description) 
     LOGICAL ::  first_call_lpm = .TRUE.                      !< call lpm only once per timestep?
     LOGICAL ::  force_print_header = .FALSE.                 !< namelist parameter
     LOGICAL ::  galilei_transformation = .FALSE.             !< namelist parameter
     LOGICAL ::  humidity = .FALSE.                           !< namelist parameter
-    LOGICAL ::  humidity_remote = .FALSE.                    !< (Siggi add short description)
+    LOGICAL ::  humidity_remote = .FALSE.                    !< switch for receiving near-surface humidity flux (atmosphere-ocean coupling)
     LOGICAL ::  inflow_l = .FALSE.                           !< left domain boundary has non-cyclic inflow?
     LOGICAL ::  inflow_n = .FALSE.                           !< north domain boundary has non-cyclic inflow?
@@ -1179,5 +1170,5 @@
     LOGICAL ::  microphysics_morrison = .FALSE.              !< use 2-moment Morrison (add. prog. eq. for nc and qc)
     LOGICAL ::  microphysics_seifert = .FALSE.               !< use 2-moment Seifert and Beheng scheme
-    LOGICAL ::  mg_switch_to_pe0 = .FALSE.                   !< (Siggi add short description)
+    LOGICAL ::  mg_switch_to_pe0 = .FALSE.                   !< internal multigrid switch for steering the ghost point exchange in case that data has been collected on PE0
     LOGICAL ::  nest_bound_l = .FALSE.                       !< nested boundary on left side?
     LOGICAL ::  nest_bound_n = .FALSE.                       !< nested boundary on north side?
@@ -1197,10 +1188,9 @@
     LOGICAL ::  recycling_yshift = .FALSE.                   !< namelist parameter
     LOGICAL ::  run_control_header = .FALSE.                 !< onetime output of RUN_CONTROL header
-    LOGICAL ::  run_coupled = .TRUE.                         !< (Siggi add short description)
+    LOGICAL ::  run_coupled = .TRUE.                         !< internal switch telling PALM to run in coupled mode (i.e. to exchange surface data) in case of atmosphere-ocean coupling
     LOGICAL ::  scalar_rayleigh_damping = .TRUE.             !< namelist parameter
-    LOGICAL ::  sloping_surface = .FALSE.                    !< use sloped surface?
-                                                             !< (namelist parameter alpha_surface)
+    LOGICAL ::  sloping_surface = .FALSE.                    !< use sloped surface? (namelist parameter alpha_surface)
     LOGICAL ::  spinup = .FALSE.                             !< perform model spinup without atmosphere code?
-    LOGICAL ::  stop_dt = .FALSE.                            !< (Siggi add short description)
+    LOGICAL ::  stop_dt = .FALSE.                            !< internal switch to stop the time stepping
     LOGICAL ::  synchronous_exchange = .FALSE.               !< namelist parameter
     LOGICAL ::  synthetic_turbulence_generator = .FALSE.     !< flag for synthetic turbulence generator module
@@ -1222,6 +1212,8 @@
     LOGICAL ::  virtual_flight = .FALSE.                     !< use virtual flight model?
     LOGICAL ::  wall_adjustment = .TRUE.                     !< namelist parameter
+    LOGICAL ::  write_binary = .FALSE.                       !< ENVPAR namelist parameter to steer restart I/O (ENVPAR is created by mrun)
     LOGICAL ::  ws_scheme_sca = .FALSE.                      !< use Wicker-Skamarock scheme (scalar advection)?
     LOGICAL ::  ws_scheme_mom = .FALSE.                      !< use Wicker-Skamarock scheme (momentum advection)?
+
     LOGICAL ::  data_output_xy(0:1) = .FALSE.                !< output of xy cross-section data?
     LOGICAL ::  data_output_xz(0:1) = .FALSE.                !< output of xz cross-section data?
@@ -1364,5 +1356,5 @@
     REAL(wp) ::  time_restart = 9999999.9_wp                   !< time at which run shall be terminated and restarted
     REAL(wp) ::  time_run_control = 0.0_wp                     !< time since last RUN_CONTROL output
-    REAL(wp) ::  time_since_reference_point                    !< Siggi
+    REAL(wp) ::  time_since_reference_point                    !< time after atmosphere-ocean coupling has been activated, or time after spinup phase of LSM has been finished
     REAL(wp) ::  top_heatflux = 9999999.9_wp                   !< namelist parameter
     REAL(wp) ::  top_momentumflux_u = 9999999.9_wp             !< namelist parameter
@@ -1414,7 +1406,7 @@
     REAL(wp) ::  vg_vertical_gradient(10) = 0.0_wp                 !< namelist parameter
     REAL(wp) ::  vg_vertical_gradient_level(10) = -9999999.9_wp    !< namelist parameter
-    REAL(wp) ::  volume_flow(1:3) = 0.0_wp                         !< Siggi
-    REAL(wp) ::  volume_flow_area(1:3) = 0.0_wp                    !< Siggi
-    REAL(wp) ::  volume_flow_initial(1:3) = 0.0_wp                 !< Siggi
+    REAL(wp) ::  volume_flow(1:3) = 0.0_wp                         !< volume flow through 1:yz-plane, 2: xz-plane, 3: xy-plane (nest childs only)
+    REAL(wp) ::  volume_flow_area(1:3) = 0.0_wp                    !< area of the respective volume flow planes
+    REAL(wp) ::  volume_flow_initial(1:3) = 0.0_wp                 !< initial volume flow (t=0) through the respective volume flow planes
     REAL(wp) ::  wall_heatflux(0:5) = 0.0_wp                       !< namelist parameter
     REAL(wp) ::  wall_humidityflux(0:5) = 0.0_wp                   !< namelist parameter
@@ -1453,107 +1445,108 @@
     USE kinds
 
-    CHARACTER (LEN=10) ::  dvrp_output = 'rtsp'        !< Siggi (entire MODULE)
-    CHARACTER (LEN=10) ::  particle_color = 'none'     !< 
-    CHARACTER (LEN=10) ::  particle_dvrpsize = 'none'  !< 
-
-    CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &  !< 
+    CHARACTER (LEN=10) ::  dvrp_output = 'rtsp'        !< dvr namelist parameter
+    CHARACTER (LEN=10) ::  particle_color = 'none'     !< dvr namelist parameter
+    CHARACTER (LEN=10) ::  particle_dvrpsize = 'none'  !< dvr namelist parameter
+
+    CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &  !< dvr namelist parameter
                                      (/ ( '                    ', i9 = 1,10 ) /)
 
-    CHARACTER (LEN=80) ::  dvrp_directory = 'default'                     !< 
-    CHARACTER (LEN=80) ::  dvrp_file      = 'default'                     !< 
-    CHARACTER (LEN=80) ::  dvrp_host      = 'origin.rvs.uni-hannover.de'  !< 
-    CHARACTER (LEN=80) ::  dvrp_password  = '********'                    !< 
-    CHARACTER (LEN=80) ::  dvrp_username  = ' '                           !< 
-
-    INTEGER(iwp) ::  cluster_size = 1                   !< 
-    INTEGER(iwp) ::  dvrp_colortable_entries = 4        !< 
-    INTEGER(iwp) ::  dvrp_colortable_entries_prt = 22   !< 
-    INTEGER(iwp) ::  islice_dvrp                        !< 
-    INTEGER(iwp) ::  nx_dvrp                            !< 
-    INTEGER(iwp) ::  nxl_dvrp                           !< 
-    INTEGER(iwp) ::  nxr_dvrp                           !< 
-    INTEGER(iwp) ::  ny_dvrp                            !< 
-    INTEGER(iwp) ::  nyn_dvrp                           !< 
-    INTEGER(iwp) ::  nys_dvrp                           !< 
-    INTEGER(iwp) ::  nz_dvrp, pathlines_fadeintime = 5  !< 
-    INTEGER(iwp) ::  pathlines_fadeouttime = 5          !< 
-    INTEGER(iwp) ::  pathlines_linecount = 1000         !< 
-    INTEGER(iwp) ::  pathlines_maxhistory = 40          !< 
-    INTEGER(iwp) ::  pathlines_wavecount = 10           !< 
-    INTEGER(iwp) ::  pathlines_wavetime = 50            !< 
-    INTEGER(iwp) ::  vc_gradient_normals = 0            !< 
-    INTEGER(iwp) ::  vc_mode = 0                        !< 
-    INTEGER(iwp) ::  vc_size_x = 2                      !< 
-    INTEGER(iwp) ::  vc_size_y = 2                      !< 
-    INTEGER(iwp) ::  vc_size_z = 2                      !< 
-
-    INTEGER(iwp), DIMENSION(10) ::  slicer_position_dvrp  !< 
-
-    LOGICAL ::  cyclic_dvrp = .FALSE.                      !< 
-    LOGICAL ::  dvrp_overlap                               !< 
-    LOGICAL ::  dvrp_total_overlap                         !< 
-    LOGICAL ::  local_dvrserver_running                    !< internally set namelist parameter
-    LOGICAL ::  lock_steering_update = .FALSE.             !< 
-    LOGICAL ::  use_seperate_pe_for_dvrp_output = .FALSE.  !< 
-
-    REAL(wp) ::  clip_dvrp_l = 9999999.9_wp  !< 
-    REAL(wp) ::  clip_dvrp_n = 9999999.9_wp  !< 
-    REAL(wp) ::  clip_dvrp_r = 9999999.9_wp  !< 
-    REAL(wp) ::  clip_dvrp_s = 9999999.9_wp  !< 
-    REAL(wp) ::  superelevation = 1.0_wp     !< 
-    REAL(wp) ::  superelevation_x = 1.0_wp   !< 
-    REAL(wp) ::  superelevation_y = 1.0_wp   !< 
-    REAL(wp) ::  vc_alpha = 38.0_wp          !< 
-
-    REAL(wp), DIMENSION(2) ::  color_interval = (/ 0.0_wp, 1.0_wp /)     !< 
-    REAL(wp), DIMENSION(2) ::  dvrpsize_interval = (/ 0.0_wp, 1.0_wp /)  !< 
-
-    REAL(wp), DIMENSION(3) ::  groundplate_color = (/ 0.0_wp, 0.6_wp, 0.0_wp /)  !< 
-    REAL(wp), DIMENSION(3) ::  topography_color = (/ 0.8_wp, 0.7_wp, 0.6_wp /)   !< 
-
-    REAL(wp), DIMENSION(2,10) ::  slicer_range_limits_dvrp  !< 
-
-    REAL(wp), DIMENSION(3,10) ::  isosurface_color  !<
-
-    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp          !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp_prt      !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp               !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp_prt           !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp = 0.5_sp      !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp_prt = 0.5_sp  !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp = 1.0_sp      !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp_prt = 1.0_sp  !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp = 0.0_sp      !< 
-    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp_prt = 0.0_sp  !< 
-
-    DATA  slicer_range_limits_dvrp / -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &  !< 
+    CHARACTER (LEN=80) ::  dvrp_directory = 'default'                     !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_file      = 'default'                     !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_host      = 'origin.rvs.uni-hannover.de'  !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_password  = '********'                    !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_username  = ' '                           !< dvr namelist parameter
+
+    INTEGER(iwp) ::  cluster_size = 1                   !< dvr namelist parameter
+    INTEGER(iwp) ::  dvrp_colortable_entries = 4        !< internal dvr software variable
+    INTEGER(iwp) ::  dvrp_colortable_entries_prt = 22   !< internal dvr software variable
+    INTEGER(iwp) ::  islice_dvrp                        !< internal dvr software variable
+    INTEGER(iwp) ::  nx_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  nxl_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nxr_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  ny_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  nyn_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nys_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nz_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  pathlines_fadeintime = 5           !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_fadeouttime = 5          !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_linecount = 1000         !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_maxhistory = 40          !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_wavecount = 10           !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_wavetime = 50            !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_gradient_normals = 0            !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_mode = 0                        !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_x = 2                      !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_y = 2                      !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_z = 2                      !< dvr namelist parameter
+
+    INTEGER(iwp), DIMENSION(10) ::  slicer_position_dvrp  !< internal dvr software variable
+
+    LOGICAL ::  cyclic_dvrp = .FALSE.                      !< internal dvr software variable
+    LOGICAL ::  dvrp_overlap                               !< internal dvr software variable
+    LOGICAL ::  dvrp_total_overlap                         !< internal dvr software variable
+    LOGICAL ::  local_dvrserver_running                    !< namelist parameter (ENVPAR namelist provided by mrun)
+    LOGICAL ::  lock_steering_update = .FALSE.             !< internal dvr software variable
+    LOGICAL ::  use_seperate_pe_for_dvrp_output = .FALSE.  !< internal dvr software variable
+
+    REAL(wp) ::  clip_dvrp_l = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_n = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_r = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_s = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  superelevation = 1.0_wp     !< dvr namelist parameter
+    REAL(wp) ::  superelevation_x = 1.0_wp   !< dvr namelist parameter
+    REAL(wp) ::  superelevation_y = 1.0_wp   !< dvr namelist parameter
+    REAL(wp) ::  vc_alpha = 38.0_wp          !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(2) ::  color_interval = (/ 0.0_wp, 1.0_wp /)     !< dvr namelist parameter
+    REAL(wp), DIMENSION(2) ::  dvrpsize_interval = (/ 0.0_wp, 1.0_wp /)  !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(3) ::  groundplate_color = (/ 0.0_wp, 0.6_wp, 0.0_wp /)  !< dvr namelist parameter
+    REAL(wp), DIMENSION(3) ::  topography_color = (/ 0.8_wp, 0.7_wp, 0.6_wp /)   !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(2,10) ::  slicer_range_limits_dvrp  !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(3,10) ::  isosurface_color  !< dvr namelist parameter
+
+    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp          !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp_prt      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp               !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp_prt           !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp = 0.5_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp_prt = 0.5_sp  !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp = 1.0_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp_prt = 1.0_sp  !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp = 0.0_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp_prt = 0.0_sp  !< internal dvr software variable
+
+    DATA  slicer_range_limits_dvrp / -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &  !< internal dvr software variable
                                      -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
                                      -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
                                      -1.0_wp, 1.0_wp /
 
-    DATA  isosurface_color / 0.9_wp, 0.9_wp, 0.9_wp,  0.8_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.8_wp, &  !< 
+    DATA  isosurface_color / 0.9_wp, 0.9_wp, 0.9_wp,  0.8_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.8_wp, &  !< internal dvr software variable
                              0.1_wp, 0.8_wp, 0.1_wp,  0.6_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.6_wp, &
                              0.1_wp, 0.6_wp, 0.1_wp,  0.4_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.4_wp, &
                              0.1_wp, 0.4_wp, 0.1_wp /
 
-    DATA  interval_h_dvrp / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< 
+    DATA  interval_h_dvrp / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
                             25.0_wp, -25.0_wp, 192 * 0.0_wp /
 
-    DATA  interval_h_dvrp_prt / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< 
+    DATA  interval_h_dvrp_prt / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
                                 25.0_wp, -25.0_wp, 192 * 0.0_wp /
 
-    REAL(sp), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp  !< 
-    REAL(sp), DIMENSION(:), ALLOCATABLE ::  ycoor_dvrp  !< 
-    REAL(sp), DIMENSION(:), ALLOCATABLE ::  zcoor_dvrp  !< 
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp  !< internal dvr software variable
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  ycoor_dvrp  !< internal dvr software variable
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  zcoor_dvrp  !< internal dvr software variable
 
     TYPE steering
-       CHARACTER (LEN=24) ::  name  !<
-       REAL(sp)           ::  min   !<
-       REAL(sp)           ::  max   !<
-       INTEGER(iwp)       ::  imin  !<
-       INTEGER(iwp)       ::  imax  !<
+       CHARACTER (LEN=24) ::  name  !< internal dvr software variable
+       REAL(sp)           ::  min   !< internal dvr software variable
+       REAL(sp)           ::  max   !< internal dvr software variable
+       INTEGER(iwp)       ::  imin  !< internal dvr software variable
+       INTEGER(iwp)       ::  imax  !< internal dvr software variable
     END TYPE steering
 
-    TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp  !< 
+    TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp  !< internal dvr software variable
 
     SAVE
@@ -1605,9 +1598,9 @@
     INTEGER(iwp) ::  nnx          !< number of subdomain grid points in x-direction
     INTEGER(iwp) ::  nx = 0       !< nx+1 = total number of grid points in x-direction
-    INTEGER(iwp) ::  nx_a         !< Siggi
-    INTEGER(iwp) ::  nx_o         !< Siggi
+    INTEGER(iwp) ::  nx_a         !< in coupled atmosphere-ocean runs: total number of grid points along x (atmosphere)
+    INTEGER(iwp) ::  nx_o         !< in coupled atmosphere-ocean runs: total number of grid points along x (ocean)
     INTEGER(iwp) ::  nxl          !< left-most grid index of subdomain (excluding ghost points)
     INTEGER(iwp) ::  nxlg         !< left-most grid index of subdomain (including ghost points)
-    INTEGER(iwp) ::  nxlu         !< =nxl+1 (at left domain boundary with inflow from left), else =nxl
+    INTEGER(iwp) ::  nxlu         !< =nxl+1 (at left domain boundary with inflow from left), else =nxl (used for u-velocity component)
     INTEGER(iwp) ::  nxr          !< right-most grid index of subdomain (excluding ghost points)
     INTEGER(iwp) ::  nxrg         !< right-most grid index of subdomain (including ghost points)
@@ -1615,11 +1608,11 @@
     INTEGER(iwp) ::  nny          !< number of subdomain grid points in y-direction
     INTEGER(iwp) ::  ny = 0       !< ny+1 = total number of grid points in y-direction
-    INTEGER(iwp) ::  ny_a         !< Siggi
-    INTEGER(iwp) ::  ny_o         !< Siggi
+    INTEGER(iwp) ::  ny_a         !< in coupled atmosphere-ocean runs: total number of grid points along y (atmosphere)
+    INTEGER(iwp) ::  ny_o         !< in coupled atmosphere-ocean runs: total number of grid points along y (ocean)
     INTEGER(iwp) ::  nyn          !< north-most grid index of subdomain (excluding ghost points)
     INTEGER(iwp) ::  nyng         !< north-most grid index of subdomain (including ghost points)
     INTEGER(iwp) ::  nys          !< south-most grid index of subdomain (excluding ghost points)
     INTEGER(iwp) ::  nysg         !< south-most grid index of subdomain (including ghost points)
-    INTEGER(iwp) ::  nysv         !< =nys+1 (at south domain boundary with inflow from south), else =nys
+    INTEGER(iwp) ::  nysv         !< =nys+1 (at south domain boundary with inflow from south), else =nys (used for v-velocity component)
     INTEGER(iwp) ::  ny_on_file   !< ny of previous run in job chain
     INTEGER(iwp) ::  nnz          !< number of subdomain grid points in z-direction
@@ -1643,5 +1636,5 @@
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer     !< number of horizontal grid points which are non-topography and non-surface-bounded
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_s_inner   !< number of horizontal grid points which are non-topography
-    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mg_loc_ind        !< Siggi
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mg_loc_ind        !< internal array to store index bounds of all PEs of that multigrid level where data is collected to PE0
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_inner  !< will be removed
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_outer  !< will be removed
@@ -1693,22 +1686,22 @@
 !> @todo Missing subroutine description.
 !------------------------------------------------------------------------------!
-       SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, feld, mode, offset, &
-                                   wert, wert_ijk, wert1, wert1_ijk )
+       SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, array, mode, offset, &
+                                   result, result_ijk, result1, result1_ijk )
 
           USE kinds
 
-          CHARACTER (LEN=*), INTENT(IN) ::  mode                     !< Siggi (entire module, some variables are still in German)
-          INTEGER(iwp), INTENT(IN)      ::  i1                       !< 
-          INTEGER(iwp), INTENT(IN)      ::  i2                       !< 
-          INTEGER(iwp), INTENT(IN)      ::  j1                       !< 
-          INTEGER(iwp), INTENT(IN)      ::  j2                       !< 
-          INTEGER(iwp), INTENT(IN)      ::  k1                       !< 
-          INTEGER(iwp), INTENT(IN)      ::  k2                       !<  
-          INTEGER(iwp)                  ::  wert_ijk(3)              !< 
-          INTEGER(iwp), OPTIONAL        ::  wert1_ijk(3)             !<  
-          REAL(wp)                      ::  offset                   !< 
-          REAL(wp)                      ::  wert                     !< 
-          REAL(wp), OPTIONAL            ::  wert1                    !< 
-          REAL(wp), INTENT(IN)          ::  feld(i1:i2,j1:j2,k1:k2)  !< 
+          CHARACTER (LEN=*), INTENT(IN) ::  mode                      !< mode of global min/max function: can be 'min', 'max', 'minmax', 'abs', or 'absoff'
+          INTEGER(iwp), INTENT(IN)      ::  i1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  i2                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  j1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  j2                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  k1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  k2                        !< internal index of min/max function
+          INTEGER(iwp)                  ::  result_ijk(3)             !< grid index result of min/max function
+          INTEGER(iwp), OPTIONAL        ::  result1_ijk(3)            !< optional grid index result of min/max function
+          REAL(wp)                      ::  offset                    !< min/max function calculates absolute value with respect to an offset
+          REAL(wp)                      ::  result                    !< result of min/max function
+          REAL(wp), OPTIONAL            ::  result1                   !< optional result of min/max function
+          REAL(wp), INTENT(IN)          ::  array(i1:i2,j1:j2,k1:k2)  !< input array of min/max function
 
        END SUBROUTINE global_min_max
@@ -1818,5 +1811,5 @@
 ! ------------
 !> Definition of variables which define processor topology and the exchange of
-!> ghost point layers. This modules must be placed in all routines which contain
+!> ghost point layers. This module must be placed in all routines containing
 !> MPI-calls.
 !------------------------------------------------------------------------------!
@@ -1832,25 +1825,25 @@
 #endif
 #endif
-    CHARACTER(LEN=2) ::  send_receive = 'al'     !< Siggi
+    CHARACTER(LEN=2) ::  send_receive = 'al'     !<
     CHARACTER(LEN=7) ::  myid_char = ''          !< character string containing processor id number
     
-    INTEGER(iwp) ::  comm1dx                     !< Siggi
-    INTEGER(iwp) ::  comm1dy                     !< Siggi
-    INTEGER(iwp) ::  comm2d                      !< Siggi
-    INTEGER(iwp) ::  comm_inter                  !< Siggi
-    INTEGER(iwp) ::  comm_palm                   !< Siggi
+    INTEGER(iwp) ::  comm1dx                     !< communicator for domain decomposition along x
+    INTEGER(iwp) ::  comm1dy                     !< communicator for domain decomposition along y
+    INTEGER(iwp) ::  comm2d                      !< standard 2d (xy) communicator used in PALM for the process group the PE belongs to
+    INTEGER(iwp) ::  comm_inter                  !< intercommunicator that connects atmosphere/ocean process groups
+    INTEGER(iwp) ::  comm_palm                   !< internal communicator used during the MPI setup at the beginning of a run
     INTEGER(iwp) ::  id_inflow = 0               !< myidx of procs at inflow (turbulent inflow method)
     INTEGER(iwp) ::  id_outflow = 0              !< myidx of procs at outflow (turbulent outflow method)
     INTEGER(iwp) ::  id_outflow_source = 0       !< myidx of procs including ouflow source plane (turbulent outflow method)
     INTEGER(iwp) ::  id_recycling = 0            !< myidx of procs containing the recycling plane (turbulence recycling method)
-    INTEGER(iwp) ::  ierr                        !< Siggi
+    INTEGER(iwp) ::  ierr                        !< standard error parameter in MPI calls
     INTEGER(iwp) ::  myid = 0                    !< id number of processor element
     INTEGER(iwp) ::  myidx = 0                   !< id number of processor elements with same position along x-direction
     INTEGER(iwp) ::  myidy = 0                   !< id number of processor elements with same position along y-direction
-    INTEGER(iwp) ::  ndim = 2                    !< Siggi
-    INTEGER(iwp) ::  ngp_a                       !< number of grid points in atmosphere domain   Siggi
-    INTEGER(iwp) ::  ngp_o                       !< number of grid points in ocean domain   Siggi
-    INTEGER(iwp) ::  ngp_xy                      !< number of grid points at atmosphere-ocean interface   Siggi   
-    INTEGER(iwp) ::  ngp_y                       !< Siggi
+    INTEGER(iwp) ::  ndim = 2                    !< dimension of the virtual PE grid
+    INTEGER(iwp) ::  ngp_a                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (atmosphere)
+    INTEGER(iwp) ::  ngp_o                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (ocean)
+    INTEGER(iwp) ::  ngp_xy                      !< used in atmosphere/ocean coupling: number of grid points of the subdomain
+    INTEGER(iwp) ::  ngp_y                       !< number of subdomain grid points along y including ghost points
     INTEGER(iwp) ::  npex = -1                   !< number of processor elements in x-direction
     INTEGER(iwp) ::  npey = -1                   !< number of processor elements in y-direction
@@ -1862,12 +1855,11 @@
     INTEGER(iwp) ::  psouth                      !< MPI-address of the processor south of the current one
     INTEGER(iwp) ::  req_count = 0               !< MPI return variable - checks if Send-Receive operation is already finished
-    INTEGER(iwp) ::  sendrecvcount_xy            !< Siggi
-    INTEGER(iwp) ::  sendrecvcount_yz            !< Siggi
-    INTEGER(iwp) ::  sendrecvcount_zx            !< Siggi
-    INTEGER(iwp) ::  sendrecvcount_zyd           !< Siggi
-    INTEGER(iwp) ::  sendrecvcount_yxd           !< Siggi
-    INTEGER(iwp) ::  target_id                   !< Siggi
-    INTEGER(iwp) ::  tasks_per_node = -9999      !< MPI tasks per computing node 
-    INTEGER(iwp) ::  threads_per_task = 1        !< OPENMP threads per MPI task
+    INTEGER(iwp) ::  sendrecvcount_xy            !< number of subdomain gridpoints to be exchanged in direct transpositions (y --> x, or x --> y) or second (2d) transposition x --> y
+    INTEGER(iwp) ::  sendrecvcount_yz            !< number of subdomain gridpoints to be exchanged in third (2d) transposition y --> z
+    INTEGER(iwp) ::  sendrecvcount_zx            !< number of subdomain gridpoints to be exchanged in first (2d) transposition z --> x
+    INTEGER(iwp) ::  sendrecvcount_zyd           !< number of subdomain gridpoints to be exchanged in direct transpositions z --> y (used for calculating spectra)
+    INTEGER(iwp) ::  target_id                   !< in atmosphere/ocean coupling: id of the ocean/atmosphere counterpart PE with whom the atmosphere/ocean PE exchanges data
+    INTEGER(iwp) ::  tasks_per_node = -9999      !< MPI tasks per compute node
+    INTEGER(iwp) ::  threads_per_task = 1        !< number of OPENMP threads per MPI task
     INTEGER(iwp) ::  type_x                      !< derived MPI datatype for 2-D ghost-point exchange - north / south 
     INTEGER(iwp) ::  type_xy                     !< derived MPI datatype for 2-D ghost-point exchange - north / south 
@@ -1880,17 +1872,12 @@
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  hor_index_bounds_previous_run  !< horizontal index bounds of previous run
 
-    LOGICAL ::  collective_wait = .FALSE.          !< Siggi
-    LOGICAL ::  sendrecv_in_background = .FALSE.   !< Siggi
+    LOGICAL ::  collective_wait = .FALSE.          !< switch to set an explicit MPI barrier in front of all collective MPI calls
 
 #if defined( __parallel )
-#if defined( __mpi2 )
-    CHARACTER (LEN=MPI_MAX_PORT_NAME) ::  port_name  !< Siggi
-#endif
-
-    INTEGER(iwp) ::  ibuf(12)                 !< Siggi
-    INTEGER(iwp) ::  pcoord(2)                !< Siggi
-    INTEGER(iwp) ::  status(MPI_STATUS_SIZE)  !< Siggi
+    INTEGER(iwp) ::  ibuf(12)                 !< internal buffer for calculating MPI settings
+    INTEGER(iwp) ::  pcoord(2)                !< PE coordinates along x and y
+    INTEGER(iwp) ::  status(MPI_STATUS_SIZE)  !< MPI status variable used in various MPI calls
     
-    INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) ::  wait_stat  !< Siggi
+    INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) ::  wait_stat  !< MPI status variable used in various MPI calls
     
     INTEGER(iwp) ::  ngp_yz_int   !< number of ghost points in yz-plane 
@@ -1907,10 +1894,10 @@
     LOGICAL ::  left_border_pe  = .FALSE.  !< = .TRUE. if PE is on left border of computational domain
     LOGICAL ::  north_border_pe = .FALSE.  !< = .TRUE. if PE is on north border of computational domain
-    LOGICAL ::  reorder = .TRUE.           !< Siggi
+    LOGICAL ::  reorder = .TRUE.           !< switch to allow MPI the reorder of ranking (e.g. row-major or column-major)
     LOGICAL ::  right_border_pe = .FALSE.  !< = .TRUE. if PE is on right border of computational domain
     LOGICAL ::  south_border_pe = .FALSE.  !< = .TRUE. if PE is on south border of computational domain
 
-    LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /)  !< Siggi
-    LOGICAL, DIMENSION(2) ::  remain_dims                     !< Siggi
+    LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /)  !< boundary conditions of the virtual PE grid
+    LOGICAL, DIMENSION(2) ::  remain_dims                     !< internal array used to determine sub-topologies for transpositions
 #endif
 
@@ -1929,7 +1916,7 @@
     USE kinds
 
-    INTEGER(iwp), PARAMETER ::  crmax = 100  !< Siggi (entire module)
-
-    CHARACTER (LEN=20), DIMENSION(20) ::  cross_ts_profiles = &  !< 
+    INTEGER(iwp), PARAMETER ::  crmax = 100  !< maximum number of coordinate systems for profile output
+
+    CHARACTER (LEN=20), DIMENSION(20) ::  cross_ts_profiles = &  !< time series to be plotted into one coordinate system, respectively
                            (/ ' E E*               ', ' dt                 ', &
                               ' u* w*              ', ' th*                ', &
@@ -1940,5 +1927,5 @@
                             ( '                    ', i9 = 1, 9 ) /)
 
-    CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &  !< 
+    CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &  !< quantities to be plotted into one coordinate system, respectively
                            (/ ' u v                           ', &
                               ' pt                            ', &
@@ -1949,29 +1936,10 @@
                          ( '                               ', i9 = 1, 94 ) /)
 
-    INTEGER(iwp) ::  profile_columns = 2  !< 
-    INTEGER(iwp) ::  profile_rows = 3     !< 
-    INTEGER(iwp) ::  profile_number = 0   !< 
-
-    INTEGER(iwp) ::  cross_ts_numbers(crmax,crmax) = 0  !< 
-    INTEGER(iwp) ::  cross_ts_number_count(crmax) = 0   !< 
-    INTEGER(iwp) ::  dopr_index(300) = 0                !< 
-    INTEGER(iwp) ::  dopr_initial_index(300) = 0        !< 
-    INTEGER(iwp) ::  dots_crossindex(100) = 0           !< 
-    INTEGER(iwp) ::  dots_index(100) = 0                !< 
+    INTEGER(iwp) ::  profile_columns = 2  !< number of coordinate systems on a profile plot per column
+    INTEGER(iwp) ::  profile_rows = 3     !< number of coordinate systems on a profile plot per row
+
+    INTEGER(iwp) ::  dopr_index(300) = 0                !< index number of respective profile quantity
+    INTEGER(iwp) ::  dopr_initial_index(300) = 0        !< index number of initial profiles to be output
                 
-
-    REAL(wp) ::  cross_ts_uymax(20) = &                    !< 
-                             (/ 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
-                                999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
-                                999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
-                                999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp /)
-    REAL(wp) ::  cross_ts_uymax_computed(20) = 999.999_wp  !< 
-    REAL(wp) ::  cross_ts_uymin(20) = &                    !< 
-                             (/ 999.999_wp, 999.999_wp, 999.999_wp,  -5.000_wp, 999.999_wp,   &
-                                999.999_wp,   0.000_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
-                                999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
-                                999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp /)
-    REAL(wp) ::  cross_ts_uymin_computed(20) = 999.999_wp  !< 
-
     SAVE
 
@@ -2003,5 +1971,5 @@
     REAL(wp) ::  w_max  !< maximum of absolute w-veloctiy in entire domain
     
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height  !< Siggi
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height  !< mean surface level height for the different statistic regions
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  sums_divnew_l              !< subdomain sum (_l) of divergence after pressure 
                                                                        !< solver call (new)
@@ -2051,20 +2019,20 @@
     USE kinds
 
-    INTEGER(iwp) ::  nxl_y   !< Siggi (entire module)
-    INTEGER(iwp) ::  nxl_yd  !< 
-    INTEGER(iwp) ::  nxl_z   !< 
-    INTEGER(iwp) ::  nxr_y   !< 
-    INTEGER(iwp) ::  nxr_yd  !< 
-    INTEGER(iwp) ::  nxr_z   !< 
-    INTEGER(iwp) ::  nyn_x   !< 
-    INTEGER(iwp) ::  nyn_z   !< 
-    INTEGER(iwp) ::  nys_x   !< 
-    INTEGER(iwp) ::  nys_z   !< 
-    INTEGER(iwp) ::  nzb_x   !< 
-    INTEGER(iwp) ::  nzb_y   !< 
-    INTEGER(iwp) ::  nzb_yd  !< 
-    INTEGER(iwp) ::  nzt_x   !< 
-    INTEGER(iwp) ::  nzt_y   !< 
-    INTEGER(iwp) ::  nzt_yd  !< 
+    INTEGER(iwp) ::  nxl_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxl_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxl_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nyn_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nyn_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nys_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nys_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_yd  !< internal index bound for transpositions
                 
     SAVE
