Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 4731)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 4753)
@@ -1,20 +1,19 @@
 !> @file module_interface.f90
-!------------------------------------------------------------------------------!
-! This file is part of PALM.
-!
-! PALM is free software: you can redistribute it and/or modify it under the
-! terms of the GNU General Public License as published by the Free Software
-! Foundation, either version 3 of the License, or (at your option) any later
-! version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with
-! PALM. If not, see <http://www.gnu.org/licenses/>.
+!--------------------------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
+! Public License as published by the Free Software Foundation, either version 3 of the License, or
+! (at your option) any later version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+! Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with PALM. If not, see
+! <http://www.gnu.org/licenses/>.
 !
 ! Copyright 1997-2020 Leibniz Universitaet Hannover
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Current revisions:
@@ -25,4 +24,7 @@
 ! -----------------
 ! $Id$
+! file re-formatted to follow the PALM coding standard
+!
+! 4731 2020-10-07 13:25:11Z schwenkel
 ! Move exchange_horiz from time_integration to modules
 !
@@ -32,72 +34,70 @@
 ! 4590 2020-07-06 14:34:59Z suehring
 ! Enable mpi-io for biomet
-! 
+!
 ! 4525 2020-05-10 17:05:07Z raasch
 ! added restart I/O for global salsa data,
 ! added restart with MPI-IO for salsa
-! 
+!
 ! 4518 2020-05-04 15:44:28Z suehring
 ! Call of doq_rrd_local enabled
-! 
+!
 ! 4517 2020-05-03 14:29:30Z raasch
 ! added restart with MPI-IO for reading local arrays
-! 
+!
 ! 4514 2020-04-30 16:29:59Z suehring
 ! Added global restart routines for plant-canopy model
-! 
+!
 ! 4495 2020-04-13 20:11:20Z raasch
 ! restart data handling with MPI-IO added
-! 
+!
 ! 4414 2020-02-19 20:16:04Z suehring
 ! Add module interface for basic initialization of numerics.
-! 
+!
 ! 4411 2020-02-18 14:28:02Z maronga
 ! Added output routines for WTM
-! 
+!
 ! 4407 2020-02-13 20:31:44Z knoop
 ! Changed program_debug_output_unit to 9 in dom_init call
-! 
+!
 ! 4400 2020-02-10 20:32:41Z suehring
 ! - Use data-output module for virtual measurement output
 ! - Remove deprecated routines for virtual measurement module
-! 
+!
 ! 4361 2020-01-07 12:22:38Z suehring
 ! Remove unused arrays in pmc_rrd_local
-! 
+!
 ! 4360 2020-01-07 11:25:50Z suehring
 ! Add pcm_rrd_local and pcm_wrd_local
-! 
+!
 ! 4331 2019-12-10 18:25:02Z suehring
-! Change interface for doq_check_data_output, in order to perform further 
-! output checks.
-! 
+! Change interface for doq_check_data_output, in order to perform further output checks.
+!
 ! 4281 2019-10-29 15:15:39Z schwenkel
 ! Added dynamics boundary conditions
-! 
+!
 ! 4272 2019-10-23 15:18:57Z schwenkel
-! Further modularization of boundary conditions: moved boundary conditions to
-! respective modules
+! Further modularization of boundary conditions: moved boundary conditions to respective modules
 !
 ! 4268 2019-10-17 11:29:38Z schwenkel
 ! Introduction of module_interface_boundary_conditions
-! 
+!
 ! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
-! 
+!
 ! 4173 2019-08-20 12:04:06Z gronemeier
 ! add vdi_internal_controls
-! 
+!
 ! 4157 2019-08-14 09:19:12Z suehring
 ! Call doq_init from module interface
-! 
+!
 ! 4132 2019-08-02 12:34:17Z suehring
 ! Bugfix in masked data output for diagnostic quantities
-! 
+!
 ! 4131 2019-08-02 11:06:18Z monakurppa
 ! Add output of 3D plant-canopy outputs (merge from branch resler)
-! 
+!
 ! 4048 2019-06-21 21:00:21Z knoop
 ! Moved turbulence_closure_mod calls into this module_interface
-! 
+!
 ! 4047 2019-06-21 18:58:09Z knoop
 ! Introduction of the dynamics module
@@ -110,8 +110,7 @@
 !
 ! 4017 2019-06-06 12:16:46Z schwenkel
-! local_pf need INTENT(INOUT) attribute rather than INTENT(OUT). This is
-! because INTENT(OUT) sets the array to not-defined. Especially for outputs that
-! are not defined everywhere, e.g. land-surface outputs, this will be
-! problematic as NaN will be output.
+! local_pf need INTENT(INOUT) attribute rather than INTENT(OUT). This is because INTENT(OUT) sets
+! the array to not-defined. Especially for outputs that are not defined everywhere, e.g.
+! land-surface outputs, this will be problematic as NaN will be output.
 !
 ! 3987 2019-05-22 09:52:13Z kanani
@@ -119,10 +118,8 @@
 !
 ! 3956 2019-05-07 12:32:52Z monakurppa
-! - Added calls for salsa_non_advective_processes and
-!   salsa_exchange_horiz_bounds
-! - Moved the call for salsa_data_output_2d/3d before that of
-!   radiation_data_output_2d/3d. radiation_data_output_2d/3d tries to read a
-!   salsa output variable and encounters a segmentation fault for "Ntot" due
-!   to the shortoutput name
+! - Added calls for salsa_non_advective_processes and salsa_exchange_horiz_bounds
+! - Moved the call for salsa_data_output_2d/3d before that of radiation_data_output_2d/3d.
+!   radiation_data_output_2d/3d tries to read a salsa output variable and encounters a segmentation
+!   fault for "Ntot" due to the shortoutput name
 !
 ! 3931 2019-04-24 16:34:28Z schwenkel
@@ -133,6 +130,6 @@
 !
 ! 3887 2019 -04-12 08:47:41Z schwenkel
-! Changes related to global restructuring of location messages and introduction
-! of additional debug messages
+! Changes related to global restructuring of location messages and introduction of additional debug
+! messages
 !
 ! 3880 2019 -04-08 21:43:02Z knoop
@@ -149,7 +146,6 @@
 !
 ! 3766 2019-02-26 16:23:41Z raasch
-! first argument removed from module_interface_rrd_*, statement added to avoid
-! compiler warning about unused variable, file reformatted with respect to coding
-! standards
+! first argument removed from module_interface_rrd_*, statement added to avoid compiler warning
+! about unused variable, file reformatted with respect to coding standards
 !
 ! 3762 2019-02-25 16:54:16Z suehring
@@ -166,6 +162,5 @@
 !
 ! 3735 2019-02-12 09:52:40Z dom_dwd_user
-! Accepting variable j from check_parameters and passing it to
-! bio_check_data_output
+! Accepting variable j from check_parameters and passing it to bio_check_data_output
 ! Add required restart data for surface output module
 !
@@ -189,6 +184,6 @@
 !
 ! 3649 2019-01-02 16:52:21Z suehring
-! Initialize strings, in order to avoid compiler warnings for non-initialized
-! characters with intent(out) attribute
+! Initialize strings, in order to avoid compiler warnings for non-initialized characters with
+! intent(out) attribute
 !
 ! 3648 2019-01-02 16:35:46Z suehring
@@ -202,13 +197,13 @@
 !>
 !> @todo Re-format module to be consistent with coding standard
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  MODULE module_interface
 
-    USE indices,                                                               &
+    USE indices,                                                                                   &
         ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt
 
     USE kinds
 
-    USE pegrid,                                                                &
+    USE pegrid,                                                                                    &
         ONLY:  comm2d
 
@@ -216,372 +211,372 @@
 !-- load module-specific control parameters.
 !-- ToDo: move all of them to respective module or a dedicated central module
-    USE data_output_module,                                                    &
-        ONLY:  dom_def_end,                                                    &
-               dom_finalize_output,                                            &
+    USE data_output_module,                                                                        &
+        ONLY:  dom_def_end,                                                                        &
+               dom_finalize_output,                                                                &
                dom_init
 
-    USE dynamics_mod, &
-        ONLY:  dynamics_parin, &
-               dynamics_check_parameters, &
-               dynamics_check_data_output_ts, &
-               dynamics_check_data_output_pr, &
-               dynamics_check_data_output, &
-               dynamics_init_masks, &
-               dynamics_define_netcdf_grid, &
-               dynamics_init_arrays, &
-               dynamics_init, &
-               dynamics_init_checks, &
-               dynamics_header, &
-               dynamics_actions, &
-               dynamics_non_advective_processes, &
-               dynamics_exchange_horiz, &
-               dynamics_prognostic_equations, &
-               dynamics_boundary_conditions, &
-               dynamics_swap_timelevel, &
-               dynamics_3d_data_averaging, &
-               dynamics_data_output_2d, &
-               dynamics_data_output_3d, &
-               dynamics_statistics, &
-               dynamics_rrd_global, &
-               dynamics_rrd_local, &
-               dynamics_wrd_global, &
-               dynamics_wrd_local, &
-               dynamics_last_actions
-
-    USE turbulence_closure_mod, &
-        ONLY:  tcm_check_parameters, &
-               tcm_check_data_output, &
-               tcm_init_arrays, &
-               tcm_init, &
-               tcm_actions, &
-               tcm_prognostic_equations, &
-               tcm_boundary_conds, &
-               tcm_swap_timelevel, &
-               tcm_3d_data_averaging, &
-               tcm_data_output_2d, &
-               tcm_data_output_3d
-
-    USE control_parameters,                                                    &
-        ONLY:  air_chemistry,                                                  &
-               biometeorology,                                                 &
-               coupling_char,                                                  &
-               debug_output,                                                   &
-               debug_output_timestep,                                          &
-               indoor_model,                                                   &
-               land_surface,                                                   &
-               large_scale_forcing,                                            &
-               nesting_offline,                                                &
-               nudging,                                                        &
-               ocean_mode,                                                     &
-               plant_canopy,                                                   &
-               salsa,                                                          &
-               surface_output,                                                 &
-               syn_turb_gen,                                                   &
-               urban_surface,                                                  &
-               vdi_checks,                                                     &
-               virtual_flight,                                                 &
-               virtual_measurement,                                            &
+    USE dynamics_mod,                                                                              &
+        ONLY:  dynamics_3d_data_averaging,                                                         &
+               dynamics_actions,                                                                   &
+               dynamics_boundary_conditions,                                                       &
+               dynamics_check_data_output,                                                         &
+               dynamics_check_data_output_pr,                                                      &
+               dynamics_check_data_output_ts,                                                      &
+               dynamics_check_parameters,                                                          &
+               dynamics_data_output_2d,                                                            &
+               dynamics_data_output_3d,                                                            &
+               dynamics_define_netcdf_grid,                                                        &
+               dynamics_exchange_horiz,                                                            &
+               dynamics_header,                                                                    &
+               dynamics_init,                                                                      &
+               dynamics_init_arrays,                                                               &
+               dynamics_init_checks,                                                               &
+               dynamics_init_masks,                                                                &
+               dynamics_last_actions,                                                              &
+               dynamics_non_advective_processes,                                                   &
+               dynamics_parin,                                                                     &
+               dynamics_prognostic_equations,                                                      &
+               dynamics_rrd_global,                                                                &
+               dynamics_rrd_local,                                                                 &
+               dynamics_statistics,                                                                &
+               dynamics_swap_timelevel,                                                            &
+               dynamics_wrd_global,                                                                &
+               dynamics_wrd_local
+
+    USE turbulence_closure_mod,                                                                    &
+        ONLY:  tcm_3d_data_averaging,                                                              &
+               tcm_actions,                                                                        &
+               tcm_boundary_conds,                                                                 &
+               tcm_check_data_output,                                                              &
+               tcm_check_parameters,                                                               &
+               tcm_data_output_2d,                                                                 &
+               tcm_data_output_3d,                                                                 &
+               tcm_init,                                                                           &
+               tcm_init_arrays,                                                                    &
+               tcm_prognostic_equations,                                                           &
+               tcm_swap_timelevel
+
+    USE control_parameters,                                                                        &
+        ONLY:  air_chemistry,                                                                      &
+               biometeorology,                                                                     &
+               coupling_char,                                                                      &
+               debug_output,                                                                       &
+               debug_output_timestep,                                                              &
+               indoor_model,                                                                       &
+               land_surface,                                                                       &
+               large_scale_forcing,                                                                &
+               nesting_offline,                                                                    &
+               nudging,                                                                            &
+               ocean_mode,                                                                         &
+               plant_canopy,                                                                       &
+               salsa,                                                                              &
+               surface_output,                                                                     &
+               syn_turb_gen,                                                                       &
+               urban_surface,                                                                      &
+               vdi_checks,                                                                         &
+               virtual_flight,                                                                     &
+               virtual_measurement,                                                                &
                wind_turbine
 
 !
-!-- load interface routines of all PALM modules
-    USE biometeorology_mod,                                                    &
-        ONLY:  bio_parin,                                                      &
-               bio_check_data_output,                                          &
-               bio_init,                                                       &
-               bio_init_checks,                                                &
-               bio_header,                                                     &
-               bio_3d_data_averaging,                                          &
-               bio_data_output_2d,                                             &
-               bio_data_output_3d,                                             &
-               bio_rrd_global,                                                 &
-               bio_rrd_local,                                                  &
-               bio_wrd_global,                                                 &
+!-- Load interface routines of all PALM modules
+    USE biometeorology_mod,                                                                        &
+        ONLY:  bio_3d_data_averaging,                                                              &
+               bio_check_data_output,                                                              &
+               bio_data_output_2d,                                                                 &
+               bio_data_output_3d,                                                                 &
+               bio_init,                                                                           &
+               bio_init_checks,                                                                    &
+               bio_header,                                                                         &
+               bio_parin,                                                                          &
+               bio_rrd_global,                                                                     &
+               bio_rrd_local,                                                                      &
+               bio_wrd_global,                                                                     &
                bio_wrd_local
 
-    USE bulk_cloud_model_mod,                                                  &
-        ONLY:  bulk_cloud_model,                                               &
-               bcm_parin,                                                      &
-               bcm_check_parameters,                                           &
-               bcm_check_data_output_pr,                                       &
-               bcm_check_data_output,                                          &
-               bcm_init_arrays,                                                &
-               bcm_init,                                                       &
-               bcm_header,                                                     &
-               bcm_actions,                                                    &
-               bcm_non_advective_processes,                                    &
-               bcm_exchange_horiz,                                             &
-               bcm_prognostic_equations,                                       &
-               bcm_boundary_conditions,                                        &
-               bcm_swap_timelevel,                                             &
-               bcm_3d_data_averaging,                                          &
-               bcm_data_output_2d,                                             &
-               bcm_data_output_3d,                                             &
-               bcm_rrd_global,                                                 &
-               bcm_wrd_global,                                                 &
-               bcm_rrd_local,                                                  &
-               bcm_wrd_local
-
-   USE chemistry_model_mod,                                                    &
-       ONLY:  chem_parin,                                                      &
-              chem_check_parameters,                                           &
-              chem_check_data_output_pr,                                       &
-              chem_check_data_output,                                          &
-              chem_exchange_horiz_bounds,                                      &
-              chem_init_arrays,                                                &
-              chem_init,                                                       &
-              chem_header,                                                     &
-              chem_actions,                                                    &
-              chem_non_advective_processes,                                    &
-              chem_prognostic_equations,                                       &
-              chem_boundary_conditions,                                        &
-              chem_swap_timelevel,                                             &
-              chem_3d_data_averaging,                                          &
-              chem_data_output_2d,                                             &
-              chem_data_output_3d,                                             &
-              chem_statistics,                                                 &
-              chem_rrd_local,                                                  &
+    USE bulk_cloud_model_mod,                                                                      &
+        ONLY:  bcm_3d_data_averaging,                                                              &
+               bcm_actions,                                                                        &
+               bcm_boundary_conditions,                                                            &
+               bcm_check_data_output_pr,                                                           &
+               bcm_check_data_output,                                                              &
+               bcm_check_parameters,                                                               &
+               bcm_data_output_2d,                                                                 &
+               bcm_data_output_3d,                                                                 &
+               bcm_exchange_horiz,                                                                 &
+               bcm_header,                                                                         &
+               bcm_init_arrays,                                                                    &
+               bcm_init,                                                                           &
+               bcm_non_advective_processes,                                                        &
+               bcm_parin,                                                                          &
+               bcm_prognostic_equations,                                                           &
+               bcm_rrd_global,                                                                     &
+               bcm_rrd_local,                                                                      &
+               bcm_swap_timelevel,                                                                 &
+               bcm_wrd_global,                                                                     &
+               bcm_wrd_local,                                                                      &
+               bulk_cloud_model
+
+   USE chemistry_model_mod,                                                                        &
+       ONLY:  chem_3d_data_averaging,                                                              &
+              chem_actions,                                                                        &
+              chem_boundary_conditions,                                                            &
+              chem_check_data_output,                                                              &
+              chem_check_data_output_pr,                                                           &
+              chem_check_parameters,                                                               &
+              chem_data_output_2d,                                                                 &
+              chem_data_output_3d,                                                                 &
+              chem_exchange_horiz_bounds,                                                          &
+              chem_header,                                                                         &
+              chem_init,                                                                           &
+              chem_init_arrays,                                                                    &
+              chem_non_advective_processes,                                                        &
+              chem_parin,                                                                          &
+              chem_prognostic_equations,                                                           &
+              chem_rrd_local,                                                                      &
+              chem_statistics,                                                                     &
+              chem_swap_timelevel,                                                                 &
               chem_wrd_local
 
-    USE diagnostic_output_quantities_mod,                                      &
-        ONLY:  doq_3d_data_averaging,                                          &
-               doq_check_data_output,                                          &
-               doq_define_netcdf_grid,                                         &
-               doq_init,                                                       &
-               doq_output_2d,                                                  &
-               doq_output_3d,                                                  &
-               doq_rrd_local,                                                  &
+    USE diagnostic_output_quantities_mod,                                                          &
+        ONLY:  doq_3d_data_averaging,                                                              &
+               doq_check_data_output,                                                              &
+               doq_define_netcdf_grid,                                                             &
+               doq_init,                                                                           &
+               doq_output_2d,                                                                      &
+               doq_output_3d,                                                                      &
+               doq_rrd_local,                                                                      &
                doq_wrd_local
 
-    USE flight_mod,                                                            &
-        ONLY:  flight_parin,                                                   &
-               flight_header,                                                  &
-               flight_init,                                                    &
-               flight_rrd_global,                                              &
+    USE flight_mod,                                                                                &
+        ONLY:  flight_header,                                                                      &
+               flight_init,                                                                        &
+               flight_parin,                                                                       &
+               flight_rrd_global,                                                                  &
                flight_wrd_global
 
-    USE gust_mod,                                                              &
-        ONLY:  gust_module_enabled,                                            &
-               gust_parin,                                                     &
-               gust_check_parameters,                                          &
-               gust_check_data_output_pr,                                      &
-               gust_check_data_output,                                         &
-               gust_init_arrays,                                               &
-               gust_init,                                                      &
-               gust_header,                                                    &
-               gust_actions,                                                   &
-               gust_prognostic_equations,                                      &
-               gust_swap_timelevel,                                            &
-               gust_3d_data_averaging,                                         &
-               gust_data_output_2d,                                            &
-               gust_data_output_3d,                                            &
-               gust_statistics,                                                &
-               gust_rrd_global,                                                &
-               gust_wrd_global,                                                &
-               gust_rrd_local,                                                 &
+    USE gust_mod,                                                                                  &
+        ONLY:  gust_3d_data_averaging,                                                             &
+               gust_actions,                                                                       &
+               gust_check_parameters,                                                              &
+               gust_check_data_output,                                                             &
+               gust_check_data_output_pr,                                                          &
+               gust_data_output_2d,                                                                &
+               gust_data_output_3d,                                                                &
+               gust_header,                                                                        &
+               gust_init,                                                                          &
+               gust_init_arrays,                                                                   &
+               gust_module_enabled,                                                                &
+               gust_parin,                                                                         &
+               gust_prognostic_equations,                                                          &
+               gust_rrd_global,                                                                    &
+               gust_rrd_local,                                                                     &
+               gust_statistics,                                                                    &
+               gust_swap_timelevel,                                                                &
+               gust_wrd_global,                                                                    &
                gust_wrd_local
 
-    USE indoor_model_mod,                                                      &
-        ONLY:  im_parin,                                                       &
-               im_check_data_output,                                           &
-               im_check_parameters,                                            &
-               im_data_output_3d,                                              &
-               im_init
-
-    USE lagrangian_particle_model_mod,                                         &
-        ONLY:  lpm_parin,                                                      &
-               lpm_header,                                                     &
-               lpm_check_parameters,                                           &
-               lpm_exchange_horiz_bounds,                                      &
-               lpm_init_arrays,                                                &
-               lpm_init,                                                       &
-               lpm_actions,                                                    &
-               lpm_rrd_global,                                                 &
-               lpm_rrd_local,                                                  &
-               lpm_wrd_local,                                                  &
+    USE indoor_model_mod,                                                                          &
+        ONLY:  im_check_data_output,                                                               &
+               im_check_parameters,                                                                &
+               im_data_output_3d,                                                                  &
+               im_init,                                                                            &
+               im_parin
+
+    USE lagrangian_particle_model_mod,                                                             &
+        ONLY:  lpm_actions,                                                                        &
+               lpm_check_parameters,                                                               &
+               lpm_exchange_horiz_bounds,                                                          &
+               lpm_header,                                                                         &
+               lpm_init,                                                                           &
+               lpm_init_arrays,                                                                    &
+               lpm_parin,                                                                          &
+               lpm_rrd_global,                                                                     &
+               lpm_rrd_local,                                                                      &
+               lpm_wrd_local,                                                                      &
                lpm_wrd_global
 
-    USE land_surface_model_mod,                                                &
-        ONLY:  lsm_parin,                                                      &
-               lsm_check_parameters,                                           &
-               lsm_check_data_output_pr,                                       &
-               lsm_check_data_output,                                          &
-               lsm_init_arrays,                                                &
-               lsm_init,                                                       &
-               lsm_header,                                                     &
-               lsm_swap_timelevel,                                             &
-               lsm_3d_data_averaging,                                          &
-               lsm_data_output_2d,                                             &
-               lsm_rrd_local,                                                  &
+    USE land_surface_model_mod,                                                                    &
+        ONLY:  lsm_3d_data_averaging,                                                              &
+               lsm_check_parameters,                                                               &
+               lsm_check_data_output,                                                              &
+               lsm_check_data_output_pr,                                                           &
+               lsm_data_output_2d,                                                                 &
+               lsm_header,                                                                         &
+               lsm_init,                                                                           &
+               lsm_init_arrays,                                                                    &
+               lsm_parin,                                                                          &
+               lsm_rrd_local,                                                                      &
+               lsm_swap_timelevel,                                                                 &
                lsm_wrd_local
 
-    USE lsf_nudging_mod,                                                       &
-        ONLY:  lsf_nudging_check_parameters,                                   &
-               lsf_nudging_check_data_output_pr,                               &
-               lsf_init,                                                       &
-               nudge_init,                                                     &
-               lsf_nudging_header
-
-    USE multi_agent_system_mod,                                                &
+    USE lsf_nudging_mod,                                                                           &
+        ONLY:  lsf_nudging_check_parameters,                                                       &
+               lsf_nudging_check_data_output_pr,                                                   &
+               lsf_nudging_header,                                                                 &
+               lsf_init,                                                                           &
+               nudge_init
+
+    USE multi_agent_system_mod,                                                                    &
         ONLY:  mas_parin
 
-    USE nesting_offl_mod,                                                      &
-        ONLY:  nesting_offl_parin,                                             &
-               nesting_offl_check_parameters,                                  &
-               nesting_offl_header
-
-    USE ocean_mod,                                                             &
-        ONLY:  ocean_parin,                                                    &
-               ocean_check_parameters,                                         &
-               ocean_check_data_output_pr,                                     &
-               ocean_check_data_output,                                        &
-               ocean_exchange_horiz,                                           &
-               ocean_init_arrays,                                              &
-               ocean_init,                                                     &
-               ocean_header,                                                   &
-               ocean_actions,                                                  &
-               ocean_prognostic_equations,                                     &
-               ocean_boundary_conditions,                                      &
-               ocean_swap_timelevel,                                           &
-               ocean_3d_data_averaging,                                        &
-               ocean_data_output_2d,                                           &
-               ocean_data_output_3d,                                           &
-               ocean_rrd_global,                                               &
-               ocean_wrd_global,                                               &
-               ocean_rrd_local,                                                &
+    USE nesting_offl_mod,                                                                          &
+        ONLY:  nesting_offl_check_parameters,                                                      &
+               nesting_offl_header,                                                                &
+               nesting_offl_parin
+
+    USE ocean_mod,                                                                                 &
+        ONLY:  ocean_3d_data_averaging,                                                            &
+               ocean_actions,                                                                      &
+               ocean_boundary_conditions,                                                          &
+               ocean_check_parameters,                                                             &
+               ocean_check_data_output,                                                            &
+               ocean_check_data_output_pr,                                                         &
+               ocean_data_output_2d,                                                               &
+               ocean_data_output_3d,                                                               &
+               ocean_exchange_horiz,                                                               &
+               ocean_init_arrays,                                                                  &
+               ocean_init,                                                                         &
+               ocean_header,                                                                       &
+               ocean_parin,                                                                        &
+               ocean_prognostic_equations,                                                         &
+               ocean_rrd_global,                                                                   &
+               ocean_rrd_local,                                                                    &
+               ocean_swap_timelevel,                                                               &
+               ocean_wrd_global,                                                                   &
                ocean_wrd_local
 
-    USE particle_attributes,                                                   &
+    USE particle_attributes,                                                                       &
         ONLY:  particle_advection
 
-    USE poismg_noopt_mod,                                                      &
+    USE poismg_noopt_mod,                                                                          &
         ONLY:  poismg_noopt_init
 
-    USE plant_canopy_model_mod,                                                &
-         ONLY: pcm_parin,                                                      &
-               pcm_check_parameters,                                           &
-               pcm_check_data_output,                                          &
-               pcm_init,                                                       &
-               pcm_header,                                                     &
-               pcm_3d_data_averaging,                                          &
-               pcm_data_output_3d,                                             &
-               pcm_rrd_global,                                                 &
-               pcm_rrd_local,                                                  &
-               pcm_wrd_global,                                                 &
+    USE plant_canopy_model_mod,                                                                    &
+         ONLY: pcm_3d_data_averaging,                                                              &
+               pcm_check_parameters,                                                               &
+               pcm_check_data_output,                                                              &
+               pcm_data_output_3d,                                                                 &
+               pcm_header,                                                                         &
+               pcm_init,                                                                           &
+               pcm_parin,                                                                          &
+               pcm_rrd_global,                                                                     &
+               pcm_rrd_local,                                                                      &
+               pcm_wrd_global,                                                                     &
                pcm_wrd_local
 
-    USE radiation_model_mod,                                                   &
-        ONLY:  radiation,                                                      &
-               radiation_parin,                                                &
-               radiation_check_parameters,                                     &
-               radiation_check_data_output_ts,                                 &
-               radiation_check_data_output_pr,                                 &
-               radiation_check_data_output,                                    &
-               radiation_init,                                                 &
-               radiation_header,                                               &
-               radiation_3d_data_averaging,                                    &
-               radiation_data_output_2d,                                       &
-               radiation_data_output_3d,                                       &
-               radiation_rrd_local,                                            &
+    USE radiation_model_mod,                                                                       &
+        ONLY:  radiation,                                                                          &
+               radiation_3d_data_averaging,                                                        &
+               radiation_check_parameters,                                                         &
+               radiation_check_data_output,                                                        &
+               radiation_check_data_output_pr,                                                     &
+               radiation_check_data_output_ts,                                                     &
+               radiation_data_output_2d,                                                           &
+               radiation_data_output_3d,                                                           &
+               radiation_header,                                                                   &
+               radiation_init,                                                                     &
+               radiation_parin,                                                                    &
+               radiation_rrd_local,                                                                &
                radiation_wrd_local
 
-    USE salsa_mod,                                                             &
-        ONLY:  salsa_parin,                                                    &
-               salsa_check_parameters,                                         &
-               salsa_check_data_output_pr,                                     &
-               salsa_check_data_output,                                        &
-               salsa_init_arrays,                                              &
-               salsa_init,                                                     &
-               salsa_header,                                                   &
-               salsa_actions,                                                  &
-               salsa_non_advective_processes,                                  &
-               salsa_exchange_horiz_bounds,                                    &
-               salsa_prognostic_equations,                                     &
-               salsa_boundary_conditions,                                      &
-               salsa_swap_timelevel,                                           &
-               salsa_3d_data_averaging,                                        &
-               salsa_data_output_2d,                                           &
-               salsa_data_output_3d,                                           &
-               salsa_statistics,                                               &
-               salsa_rrd_global,                                               &
-               salsa_rrd_local,                                                &
-               salsa_wrd_global,                                               &
+    USE salsa_mod,                                                                                 &
+        ONLY:  salsa_3d_data_averaging,                                                            &
+               salsa_actions,                                                                      &
+               salsa_boundary_conditions,                                                          &
+               salsa_check_data_output,                                                            &
+               salsa_check_data_output_pr,                                                         &
+               salsa_check_parameters,                                                             &
+               salsa_data_output_2d,                                                               &
+               salsa_data_output_3d,                                                               &
+               salsa_exchange_horiz_bounds,                                                        &
+               salsa_header,                                                                       &
+               salsa_init,                                                                         &
+               salsa_init_arrays,                                                                  &
+               salsa_non_advective_processes,                                                      &
+               salsa_parin,                                                                        &
+               salsa_prognostic_equations,                                                         &
+               salsa_rrd_global,                                                                   &
+               salsa_rrd_local,                                                                    &
+               salsa_statistics,                                                                   &
+               salsa_swap_timelevel,                                                               &
+               salsa_wrd_global,                                                                   &
                salsa_wrd_local
 
-    USE spectra_mod,                                                           &
-        ONLY:  calculate_spectra,                                              &
-               spectra_parin,                                                  &
-               spectra_check_parameters,                                       &
-               spectra_header
-
-    USE surface_data_output_mod,                                               &
-        ONLY:  surface_data_output_parin,                                      &
-               surface_data_output_check_parameters,                           &
-               surface_data_output_init_arrays,                                &
-               surface_data_output_rrd_local,                                  &
-               surface_data_output_rrd_global,                                 &
-               surface_data_output_wrd_local,                                  &
-               surface_data_output_wrd_global
-
-    USE surface_mod,                                                           &
+    USE spectra_mod,                                                                               &
+        ONLY:  calculate_spectra,                                                                  &
+               spectra_check_parameters,                                                           &
+               spectra_header,                                                                     &
+               spectra_parin
+
+    USE surface_data_output_mod,                                                                   &
+        ONLY:  surface_data_output_check_parameters,                                               &
+               surface_data_output_init_arrays,                                                    &
+               surface_data_output_parin,                                                          &
+               surface_data_output_rrd_global,                                                     &
+               surface_data_output_rrd_local,                                                      &
+               surface_data_output_wrd_global,                                                     &
+               surface_data_output_wrd_local
+
+    USE surface_mod,                                                                               &
         ONLY:  init_bc
 
-    USE synthetic_turbulence_generator_mod,                                    &
-        ONLY:  stg_parin,                                                      &
-               stg_check_parameters,                                           &
-               stg_header,                                                     &
-               stg_rrd_global,                                                 &
+    USE synthetic_turbulence_generator_mod,                                                        &
+        ONLY:  stg_check_parameters,                                                               &
+               stg_header,                                                                         &
+               stg_parin,                                                                          &
+               stg_rrd_global,                                                                     &
                stg_wrd_global
 
-    USE urban_surface_mod,                                                     &
-        ONLY:  usm_parin,                                                      &
-               usm_check_parameters,                                           &
-               usm_check_data_output,                                          &
-               usm_init_arrays,                                                &
-               usm_init,                                                       &
-               usm_swap_timelevel,                                             &
-               usm_3d_data_averaging,                                          &
-               usm_rrd_local,                                                  &
+    USE urban_surface_mod,                                                                         &
+        ONLY:  usm_3d_data_averaging,                                                              &
+               usm_check_data_output,                                                              &
+               usm_check_parameters,                                                               &
+               usm_init,                                                                           &
+               usm_init_arrays,                                                                    &
+               usm_parin,                                                                          &
+               usm_swap_timelevel,                                                                 &
+               usm_rrd_local,                                                                      &
                usm_wrd_local
 
-    USE vdi_internal_controls,                                                 &
+    USE vdi_internal_controls,                                                                     &
         ONLY:  vdi_actions
-               
-    USE virtual_measurement_mod,                                               &
-        ONLY:  vm_check_parameters,                                            &
-               vm_init,                                                        &
-               vm_init_output,                                                 &
+
+    USE virtual_measurement_mod,                                                                   &
+        ONLY:  vm_check_parameters,                                                                &
+               vm_init,                                                                            &
+               vm_init_output,                                                                     &
                vm_parin
 
-    USE wind_turbine_model_mod,                                                &
-        ONLY:  wtm_parin,                                                      &
-               wtm_check_parameters,                                           &
-               wtm_init,                                                       &
-               wtm_init_arrays,                                                &
-               wtm_init_output,                                                &
-               wtm_actions,                                                    &
-               wtm_rrd_global,                                                 &
+    USE wind_turbine_model_mod,                                                                    &
+        ONLY:  wtm_actions,                                                                        &
+               wtm_check_parameters,                                                               &
+               wtm_init,                                                                           &
+               wtm_init_arrays,                                                                    &
+               wtm_init_output,                                                                    &
+               wtm_parin,                                                                          &
+               wtm_rrd_global,                                                                     &
                wtm_wrd_global
 
-    USE user,                                                                  &
-        ONLY:  user_module_enabled,                                            &
-               user_parin,                                                     &
-               user_check_parameters,                                          &
-               user_check_data_output_ts,                                      &
-               user_check_data_output_pr,                                      &
-               user_check_data_output,                                         &
-               user_init,                                                      &
-               user_init_arrays,                                               &
-               user_header,                                                    &
-               user_actions,                                                   &
-               user_3d_data_averaging,                                         &
-               user_data_output_2d,                                            &
-               user_data_output_3d,                                            &
-               user_statistics,                                                &
-               user_rrd_global,                                                &
-               user_rrd_local,                                                 &
-               user_wrd_global,                                                &
-               user_wrd_local,                                                 &
-               user_last_actions
+    USE user,                                                                                      &
+        ONLY:  user_3d_data_averaging,                                                             &
+               user_actions,                                                                       &
+               user_check_data_output,                                                             &
+               user_check_data_output_pr,                                                          &
+               user_check_data_output_ts,                                                          &
+               user_check_parameters,                                                              &
+               user_data_output_2d,                                                                &
+               user_data_output_3d,                                                                &
+               user_header,                                                                        &
+               user_init,                                                                          &
+               user_init_arrays,                                                                   &
+               user_last_actions,                                                                  &
+               user_module_enabled,                                                                &
+               user_parin,                                                                         &
+               user_statistics,                                                                    &
+               user_rrd_global,                                                                    &
+               user_rrd_local,                                                                     &
+               user_wrd_global,                                                                    &
+               user_wrd_local
 
     IMPLICIT NONE
@@ -591,32 +586,32 @@
 !
 !-- Public functions
-    PUBLIC                                                                     &
-       module_interface_parin,                                                 &
-       module_interface_check_parameters,                                      &
-       module_interface_check_data_output_ts,                                  &
-       module_interface_check_data_output_pr,                                  &
-       module_interface_check_data_output,                                     &
-       module_interface_init_masks,                                            &
-       module_interface_define_netcdf_grid,                                    &
-       module_interface_init_arrays,                                           &
-       module_interface_init,                                                  &
-       module_interface_init_checks,                                           &
-       module_interface_init_numerics,                                         &
-       module_interface_init_output,                                           &
-       module_interface_header,                                                &
-       module_interface_actions,                                               &
-       module_interface_non_advective_processes,                               &
-       module_interface_exchange_horiz,                                        &
-       module_interface_prognostic_equations,                                  &
-       module_interface_boundary_conditions,                                   &
-       module_interface_swap_timelevel,                                        &
-       module_interface_3d_data_averaging,                                     &
-       module_interface_data_output_2d,                                        &
-       module_interface_data_output_3d,                                        &
-       module_interface_statistics,                                            &
-       module_interface_rrd_global,                                            &
-       module_interface_wrd_global,                                            &
-       module_interface_rrd_local,                                             &
-       module_interface_wrd_local,                                             &
+    PUBLIC                                                                                         &
+       module_interface_parin,                                                                     &
+       module_interface_check_parameters,                                                          &
+       module_interface_check_data_output_ts,                                                      &
+       module_interface_check_data_output_pr,                                                      &
+       module_interface_check_data_output,                                                         &
+       module_interface_init_masks,                                                                &
+       module_interface_define_netcdf_grid,                                                        &
+       module_interface_init_arrays,                                                               &
+       module_interface_init,                                                                      &
+       module_interface_init_checks,                                                               &
+       module_interface_init_numerics,                                                             &
+       module_interface_init_output,                                                               &
+       module_interface_header,                                                                    &
+       module_interface_actions,                                                                   &
+       module_interface_non_advective_processes,                                                   &
+       module_interface_exchange_horiz,                                                            &
+       module_interface_prognostic_equations,                                                      &
+       module_interface_boundary_conditions,                                                       &
+       module_interface_swap_timelevel,                                                            &
+       module_interface_3d_data_averaging,                                                         &
+       module_interface_data_output_2d,                                                            &
+       module_interface_data_output_3d,                                                            &
+       module_interface_statistics,                                                                &
+       module_interface_rrd_global,                                                                &
+       module_interface_wrd_global,                                                                &
+       module_interface_rrd_local,                                                                 &
+       module_interface_wrd_local,                                                                 &
        module_interface_last_actions
 
@@ -743,9 +738,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Read module-specific parameter namelists
-!------------------------------------------------------------------------------!
+!------------------------------------------------------------------------------                    !
  SUBROUTINE module_interface_parin
 
@@ -785,9 +780,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific initialization checks
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_check_parameters
 
@@ -825,14 +820,14 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Check module-specific data output of timeseries
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit )
 
-
-    INTEGER(iwp),      INTENT(IN)    ::  dots_max !< variable output array index
+    INTEGER(iwp),      INTENT(IN)       ::  dots_max !< variable output array index
     INTEGER(iwp),      INTENT(INOUT)    ::  dots_num !< variable output array index
+
     CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label
     CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit
@@ -857,18 +852,18 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Check module-specific data output of profiles
-!------------------------------------------------------------------------------!
- SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit,  &
-                                                   dopr_unit )
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_check_data_output_pr( variable, var_count, unit, dopr_unit )
 
 
     CHARACTER (LEN=*), INTENT(IN)    ::  variable  !< variable name
-    INTEGER(iwp),      INTENT(IN)    ::  var_count !< variable output array index
     CHARACTER (LEN=*), INTENT(INOUT) ::  unit      !< physical unit of variable
     CHARACTER (LEN=*), INTENT(OUT)   ::  dopr_unit !< local value of dopr_unit
 
+    INTEGER(iwp),      INTENT(IN)    ::  var_count !< variable output array index
+
 
     IF ( debug_output )  CALL debug_message( 'checking module-specific data output pr', 'start' )
@@ -876,9 +871,9 @@
     CALL dynamics_check_data_output_pr( variable, var_count, unit, dopr_unit )
 
-    IF ( unit == 'illegal' .AND.  bulk_cloud_model )  THEN
+    IF ( unit == 'illegal'  .AND.  bulk_cloud_model )  THEN
        CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit )
     ENDIF
 
-    IF ( unit == 'illegal' .AND.  air_chemistry )  THEN
+    IF ( unit == 'illegal'  .AND.  air_chemistry )  THEN
        CALL chem_check_data_output_pr( variable, var_count, unit, dopr_unit )
     ENDIF
@@ -918,9 +913,9 @@
  END SUBROUTINE module_interface_check_data_output_pr
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Check module-specific 2D and 3D data output
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_check_data_output( variable, unit, i, j, ilen, k )
 
@@ -949,6 +944,6 @@
     ENDIF
 
-    IF ( unit == 'illegal'  .AND.  air_chemistry                               &
-         .AND.  (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') )  THEN  ! ToDo: remove aditional conditions
+    IF ( unit == 'illegal'  .AND.  air_chemistry  .AND.  (variable(1:3) == 'kc_'  .OR.             &
+         variable(1:3) == 'em_') )  THEN  ! ToDo: remove aditional conditions
        CALL chem_check_data_output( variable, unit, i, ilen, k )
     ENDIF
@@ -970,6 +965,5 @@
     ENDIF
 
-    IF ( unit == 'illegal'  .AND.  plant_canopy                                &
-         .AND.  variable(1:4) == 'pcm_' )  THEN  ! ToDo: remove aditional conditions
+    IF ( unit == 'illegal'  .AND.  plant_canopy  .AND.  variable(1:4) == 'pcm_' )  THEN  ! ToDo: remove aditional conditions
        CALL pcm_check_data_output( variable, unit )
     ENDIF
@@ -987,6 +981,5 @@
     ENDIF
 
-    IF ( unit == 'illegal'  .AND.  urban_surface                      &
-        .AND.  variable(1:4) == 'usm_' )  THEN  ! ToDo: remove aditional conditions
+    IF ( unit == 'illegal'  .AND.  urban_surface  .AND.  variable(1:4) == 'usm_' )  THEN  ! ToDo: remove aditional conditions
        CALL usm_check_data_output( variable, unit )
     ENDIF
@@ -1003,10 +996,10 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Description:
 ! ------------
 !> Interface for init_masks. ToDo: get rid of these redundant calls!
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init_masks( variable, unit )
 
@@ -1020,9 +1013,9 @@
     CALL dynamics_init_masks( variable, unit )
 
-    IF ( unit == 'illegal'  .AND.  air_chemistry                               &
-         .AND.  (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_') )  THEN  ! ToDo: remove aditional conditions
+    IF ( unit == 'illegal'  .AND.  air_chemistry  .AND.  (variable(1:3) == 'kc_'  .OR.             &
+         variable(1:3) == 'em_') )  THEN  ! ToDo: remove aditional conditions
        CALL chem_check_data_output( variable, unit, 0, 0, 0 )
     ENDIF
-    
+
     IF ( unit == 'illegal' )  THEN
        CALL doq_check_data_output( variable, unit )
@@ -1048,25 +1041,25 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Description:
 ! ------------
 !> Define appropriate grid for module-specific netcdf output variables.
-!------------------------------------------------------------------------------!
- SUBROUTINE module_interface_define_netcdf_grid( var, found,                   &
-                                                 grid_x, grid_y, grid_z )
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
 
 
     CHARACTER (LEN=*), INTENT(IN)  ::  var    !< variable name
-    LOGICAL,           INTENT(OUT) ::  found  !< indicates if variable was found
     CHARACTER (LEN=*), INTENT(OUT) ::  grid_x !< netcdf dimension in x-direction
     CHARACTER (LEN=*), INTENT(OUT) ::  grid_y !< netcdf dimension in y-direction
     CHARACTER (LEN=*), INTENT(OUT) ::  grid_z !< netcdf dimension in z-direction
 
+    LOGICAL,           INTENT(OUT) ::  found  !< indicates if variable was found
+
 
     IF ( debug_output )  CALL debug_message( 'defining module-specific netcdf grids', 'start' )
 !
-!-- As long as no action is done in this subroutine, initialize strings with
-!-- intent(out) attribute, in order to avoid compiler warnings.
+!-- As long as no action is done in this subroutine, initialize strings with intent(out) attribute,
+!-- in order to avoid compiler warnings.
     found  = .FALSE.
     grid_x = 'none'
@@ -1083,9 +1076,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Allocate module-specific arrays and pointers
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init_arrays
 
@@ -1115,9 +1108,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific initialization
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init
 
@@ -1154,9 +1147,9 @@
  END SUBROUTINE module_interface_init
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Initialize boundary conditions and numerical schemes.
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init_numerics
 
@@ -1168,13 +1161,13 @@
 !-- Please note, wall flags are only applied in the non-optimized version.
     CALL poismg_noopt_init
- 
+
  END SUBROUTINE module_interface_init_numerics
 
- 
-!------------------------------------------------------------------------------!
+
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Initialize data output
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init_output
 
@@ -1183,7 +1176,7 @@
 !
 !-- Initialize data-output module
-    CALL dom_init( file_suffix_of_output_group=coupling_char,                  &
-                   mpi_comm_of_output_group=comm2d,                            &
-                   program_debug_output_unit=9,                                &
+    CALL dom_init( file_suffix_of_output_group=coupling_char,                                      &
+                   mpi_comm_of_output_group=comm2d,                                                &
+                   program_debug_output_unit=9,                                                    &
                    debug_output=debug_output )
 !
@@ -1197,9 +1190,9 @@
  END SUBROUTINE module_interface_init_output
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific post-initialization checks
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_init_checks
 
@@ -1209,5 +1202,5 @@
     CALL dynamics_init_checks
 
-    IF ( biometeorology      )  CALL bio_init_checks
+    IF ( biometeorology )  CALL bio_init_checks
 
     IF ( debug_output )  CALL debug_message( 'module-specific post-initialization checks', 'end' )
@@ -1217,9 +1210,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Gather module-specific header output
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_header( io )
 
@@ -1256,9 +1249,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific actions while in time-integration (vector-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_actions( location )
 
@@ -1284,15 +1277,15 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific actions while in time-integration (cache-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_actions_ij( i, j, location )
 
+    CHARACTER (LEN=*), INTENT(IN) ::  location  !< call location string
 
     INTEGER(iwp),      INTENT(IN) ::  i         !< grid index in x-direction
     INTEGER(iwp),      INTENT(IN) ::  j         !< grid index in y-direction
-    CHARACTER (LEN=*), INTENT(IN) ::  location  !< call location string
 
     CALL dynamics_actions( i, j, location )
@@ -1312,9 +1305,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific non_advective_processes (vector-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_non_advective_processes
 
@@ -1330,9 +1323,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific non_advective_processes (cache-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_non_advective_processes_ij( i, j )
 
@@ -1350,12 +1343,13 @@
  END SUBROUTINE module_interface_non_advective_processes_ij
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Exchange horiz for module-specific quantities
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_exchange_horiz( location )
 
     CHARACTER (LEN=*), INTENT(IN) ::  location !< call location string
+
 
     IF ( debug_output_timestep )  CALL debug_message( 'module-specific exchange_horiz', 'start' )
@@ -1366,5 +1360,5 @@
     IF ( air_chemistry       )  CALL chem_exchange_horiz_bounds( location )
     IF ( ocean_mode          )  CALL ocean_exchange_horiz( location )
-    IF ( particle_advection  )  CALL lpm_exchange_horiz_bounds ( location )
+    IF ( particle_advection  )  CALL lpm_exchange_horiz_bounds( location )
     IF ( salsa               )  CALL salsa_exchange_horiz_bounds( location )
 
@@ -1375,9 +1369,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific prognostic_equations (vector-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_prognostic_equations
 
@@ -1396,9 +1390,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific prognostic_equations (cache-optimized)
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_prognostic_equations_ij( i, j, i_omp_start, tn )
 
@@ -1421,9 +1415,9 @@
  END SUBROUTINE module_interface_prognostic_equations_ij
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific boundary conditions
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_boundary_conditions
 
@@ -1444,9 +1438,9 @@
  END SUBROUTINE module_interface_boundary_conditions
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Swap the timelevel pointers for module-specific arrays
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_swap_timelevel ( swap_mode )
 
@@ -1474,10 +1468,10 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Description:
 ! ------------
 !> Perform module-specific averaging of 3D data
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_3d_data_averaging( mode, variable )
 
@@ -1511,22 +1505,24 @@
  END SUBROUTINE module_interface_3d_data_averaging
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Description:
 ! ------------
 !> Define module-specific 2D output variables
-!------------------------------------------------------------------------------!
- SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode,  &
-                                             local_pf, two_d, nzb_do, nzt_do,  &
-                                             fill_value )
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_data_output_2d( av, variable, found, grid, mode, local_pf, two_d,     &
+                                             nzb_do, nzt_do, fill_value )
+
+    CHARACTER (LEN=*), INTENT(IN)    ::  mode       !< either 'xy', 'xz' or 'yz'
+    CHARACTER (LEN=*), INTENT(IN)    ::  variable   !< variable name
+    CHARACTER (LEN=*), INTENT(INOUT) ::  grid       !< name of vertical grid
 
     INTEGER(iwp),      INTENT(IN)    ::  av         !< flag for (non-)average output
-    CHARACTER (LEN=*), INTENT(IN)    ::  variable   !< variable name
-    LOGICAL,           INTENT(INOUT) ::  found      !< flag if output variable is found
-    CHARACTER (LEN=*), INTENT(INOUT) ::  grid       !< name of vertical grid
-    CHARACTER (LEN=*), INTENT(IN)    ::  mode       !< either 'xy', 'xz' or 'yz'
-    LOGICAL,           INTENT(OUT)   ::  two_d      !< flag for 2D variables
     INTEGER(iwp),      INTENT(IN)    ::  nzb_do     !< vertical output index (bottom) (usually 0)
     INTEGER(iwp),      INTENT(IN)    ::  nzt_do     !< vertical output index (top) (usually nz_do3d)
+
+    LOGICAL,           INTENT(INOUT) ::  found      !< flag if output variable is found
+    LOGICAL,           INTENT(OUT)   ::  two_d      !< flag for 2D variables
+
     REAL(wp),          INTENT(IN)    ::  fill_value !< to be removed
 
@@ -1536,72 +1532,53 @@
     IF ( debug_output_timestep )  CALL debug_message( 'module-specific 2d data output', 'start' )
 
-    CALL dynamics_data_output_2d(                                                  &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value &
-            )
+    CALL dynamics_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do,&
+                                  fill_value )
 
     IF ( .NOT. found )  THEN
-       CALL tcm_data_output_2d(                                                  &
-               av, variable, found, grid, mode, local_pf, nzb_do, nzt_do &
-            )
+       CALL tcm_data_output_2d( av, variable, found, grid, mode, local_pf, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  biometeorology )  THEN
-       CALL bio_data_output_2d(                                                &
-               av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do      &
-            )
+       CALL bio_data_output_2d( av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  bulk_cloud_model )  THEN
-       CALL bcm_data_output_2d(                                                &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do&
-            )
+       CALL bcm_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  air_chemistry )  THEN
-       CALL chem_data_output_2d(                                               &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value &
-            )
+       CALL chem_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, &
+                                 fill_value )
     ENDIF
 
     IF ( .NOT. found )  THEN
-       CALL doq_output_2d(                                                     &
-               av, variable, found, grid, mode, local_pf, two_d,               &
-               nzb_do, nzt_do, fill_value )
+       CALL doq_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do,       &
+                           fill_value )
     ENDIF
 
     IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
-       CALL gust_data_output_2d(                                               &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value &
-            )
+       CALL gust_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, &
+                                 fill_value )
     ENDIF
 
     IF ( .NOT. found  .AND.  land_surface )  THEN
-       CALL lsm_data_output_2d(                                                &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do&
-            )
+       CALL lsm_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  ocean_mode )  THEN
-       CALL ocean_data_output_2d(                                              &
-               av, variable, found, grid, mode, local_pf, nzb_do, nzt_do       &
-            )
+       CALL ocean_data_output_2d( av, variable, found, grid, mode, local_pf, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  radiation )  THEN
-       CALL radiation_data_output_2d(                                                       &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do, fill_value &
-            )
+       CALL radiation_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do,    &
+                                      nzt_do, fill_value )
     ENDIF
 
     IF ( .NOT. found  .AND.  salsa )  THEN
-       CALL salsa_data_output_2d(                                              &
-               av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do&
-            )
+       CALL salsa_data_output_2d( av, variable, found, grid, mode, local_pf, two_d, nzb_do, nzt_do )
     ENDIF
 
     IF ( .NOT. found  .AND.  user_module_enabled )  THEN
-       CALL user_data_output_2d(                                               &
-               av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do      &
-            )
+       CALL user_data_output_2d( av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do )
     ENDIF
 
@@ -1612,21 +1589,23 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Description:
 ! ------------
 !> Define module-specific 3D output variables
-!------------------------------------------------------------------------------!
- SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf,    &
-                                             fill_value, resorted, nzb_do, nzt_do )
-
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_data_output_3d( av, variable, found, local_pf, fill_value, resorted,  &
+                                             nzb_do, nzt_do )
+
+    CHARACTER (LEN=*), INTENT(IN)    ::  variable   !< variable name
 
     INTEGER(iwp),      INTENT(IN)    ::  av         !< flag for (non-)average output
-    CHARACTER (LEN=*), INTENT(IN)    ::  variable   !< variable name
-    LOGICAL,           INTENT(INOUT) ::  found      !< flag if output variable is found
-    REAL(wp),          INTENT(IN)    ::  fill_value !< ToDo: refactor
-    LOGICAL,           INTENT(OUT)   ::  resorted   !< flag if output has been resorted
     INTEGER(iwp),      INTENT(IN)    ::  nzb_do     !< vertical output index (bottom) (usually 0)
     INTEGER(iwp),      INTENT(IN)    ::  nzt_do     !< vertical output index (top) (usually nz_do3d)
+
+    LOGICAL,           INTENT(INOUT) ::  found      !< flag if output variable is found
+    LOGICAL,           INTENT(OUT)   ::  resorted   !< flag if output has been resorted
+
+    REAL(wp),          INTENT(IN)    ::  fill_value !< ToDo: refactor
 
     REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) ::  local_pf
@@ -1704,16 +1683,17 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Compute module-specific profile and timeseries data
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_statistics( mode, sr, tn, dots_max )
 
 
     CHARACTER (LEN=*), INTENT(IN) ::  mode     !< statistical analysis mode
+
+    INTEGER(iwp),      INTENT(IN) ::  dots_max !< maximum number of timeseries
     INTEGER(iwp),      INTENT(IN) ::  sr       !<
     INTEGER(iwp),      INTENT(IN) ::  tn       !<
-    INTEGER(iwp),      INTENT(IN) ::  dots_max !< maximum number of timeseries
 
 
@@ -1801,9 +1781,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Write module-specific restart data globaly shared by all MPI ranks
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_wrd_global
 
@@ -1833,15 +1813,15 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Read module-specific local restart data arrays (Fortran binary format).
-!------------------------------------------------------------------------------!
- SUBROUTINE module_interface_rrd_local_ftn( map_index,                             &
-                                           nxlf, nxlc, nxl_on_file,               &
-                                           nxrf, nxrc, nxr_on_file,               &
-                                           nynf, nync, nyn_on_file,               &
-                                           nysf, nysc, nys_on_file,               &
-                                           tmp_2d, tmp_3d, found )
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE module_interface_rrd_local_ftn( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxrc, nxr_on_file,                               &
+                                            nynf, nync, nyn_on_file,                               &
+                                            nysf, nysc, nys_on_file,                               &
+                                            tmp_2d, tmp_3d, found )
 
 
@@ -1859,11 +1839,12 @@
     INTEGER(iwp), INTENT(IN)  ::  nysf         !<
     INTEGER(iwp), INTENT(IN)  ::  nys_on_file  !<
+
     LOGICAL,      INTENT(INOUT) ::  found        !< flag if variable was found
 
-    REAL(wp), &
-       DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), &
+    REAL(wp),                                                                                      &
+       DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp),             &
        INTENT(OUT) :: tmp_2d   !<
-    REAL(wp), &
-       DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp), &
+    REAL(wp),                                                                                      &
+       DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp),   &
        INTENT(OUT) :: tmp_3d   !<
 
@@ -1873,127 +1854,112 @@
     ENDIF
 
-    CALL dynamics_rrd_local(                                                   &
-           map_index,                                                          &
-           nxlf, nxlc, nxl_on_file,                                            &
-           nxrf, nxrc, nxr_on_file,                                            &
-           nynf, nync, nyn_on_file,                                            &
-           nysf, nysc, nys_on_file,                                            &
-           tmp_2d, tmp_3d, found                                               &
-        ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL bio_rrd_local(                                    &
-                               found                                           &
-                            )
-
-    IF ( .NOT. found )  CALL bcm_rrd_local(                                    &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_2d, tmp_3d, found                           &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL chem_rrd_local(                                   &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_3d, found                                   &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL doq_rrd_local(                                    &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_2d, tmp_3d, found                           &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL gust_rrd_local(                                   &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_2d, tmp_3d, found                           &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL lpm_rrd_local(                                    &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_3d, found                                   &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL lsm_rrd_local(                                    &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_2d, found                                   &
-                            ) ! ToDo: change interface to pass variable
-
-     IF ( .NOT. found )  CALL pcm_rrd_local(                                   &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               found                                           &
+    CALL dynamics_rrd_local( map_index,                                                            &
+                             nxlf, nxlc, nxl_on_file,                                              &
+                             nxrf, nxrc, nxr_on_file,                                              &
+                             nynf, nync, nyn_on_file,                                              &
+                             nysf, nysc, nys_on_file,                                              &
+                             tmp_2d, tmp_3d, found                                                 &
+                           ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL bio_rrd_local( found )
+
+    IF ( .NOT. found )  CALL bcm_rrd_local( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxrc, nxr_on_file,                               &
+                                            nynf, nync, nyn_on_file,                               &
+                                            nysf, nysc, nys_on_file,                               &
+                                            tmp_2d, tmp_3d, found                                  &
+                                          ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL chem_rrd_local( map_index,                                            &
+                                             nxlf, nxlc, nxl_on_file,                              &
+                                             nxrf, nxrc, nxr_on_file,                              &
+                                             nynf, nync, nyn_on_file,                              &
+                                             nysf, nysc, nys_on_file,                              &
+                                             tmp_3d, found                                         &
+                                           ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL doq_rrd_local( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxrc, nxr_on_file,                               &
+                                            nynf, nync, nyn_on_file,                               &
+                                            nysf, nysc, nys_on_file,                               &
+                                            tmp_2d, tmp_3d, found                                  &
+                                          ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL gust_rrd_local( map_index,                                            &
+                                             nxlf, nxlc, nxl_on_file,                              &
+                                             nxrf, nxrc, nxr_on_file,                              &
+                                             nynf, nync, nyn_on_file,                              &
+                                             nysf, nysc, nys_on_file,                              &
+                                             tmp_2d, tmp_3d, found                                 &
+                                           ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL lpm_rrd_local( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxrc, nxr_on_file,                               &
+                                            nynf, nync, nyn_on_file,                               &
+                                            nysf, nysc, nys_on_file,                               &
+                                            tmp_3d, found                                          &
+                                          ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL lsm_rrd_local( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxrc, nxr_on_file,                               &
+                                            nynf, nync, nyn_on_file,                               &
+                                            nysf, nysc, nys_on_file,                               &
+                                            tmp_2d, found                                          &
+                                          ) ! ToDo: change interface to pass variable
+
+     IF ( .NOT. found )  CALL pcm_rrd_local( map_index,                                            &
+                                             nxlf, nxlc, nxl_on_file,                              &
+                                             nxrf, nxrc, nxr_on_file,                              &
+                                             nynf, nync, nyn_on_file,                              &
+                                             nysf, nysc, nys_on_file,                              &
+                                             found                                                 &
                                            )
 
-    IF ( .NOT. found )  CALL ocean_rrd_local(                                  &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_3d, found                                   &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL radiation_rrd_local(                              &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_2d, tmp_3d, found                           &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL salsa_rrd_local(                                  &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_3d, found                                   &
-                            ) ! ToDo: change interface to pass variable
-
-    IF ( .NOT. found )  CALL usm_rrd_local(                                    &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxr_on_file,                              &
-                               nynf, nyn_on_file,                              &
-                               nysf, nysc, nys_on_file,                        &
-                               found                                           &
-                            ) ! ToDo: change interface to pass variable
+    IF ( .NOT. found )  CALL ocean_rrd_local( map_index,                                           &
+                                              nxlf, nxlc, nxl_on_file,                             &
+                                              nxrf, nxrc, nxr_on_file,                             &
+                                              nynf, nync, nyn_on_file,                             &
+                                              nysf, nysc, nys_on_file,                             &
+                                              tmp_3d, found                                        &
+                                            ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL radiation_rrd_local( map_index,                                       &
+                                                  nxlf, nxlc, nxl_on_file,                         &
+                                                  nxrf, nxrc, nxr_on_file,                         &
+                                                  nynf, nync, nyn_on_file,                         &
+                                                  nysf, nysc, nys_on_file,                         &
+                                                  tmp_2d, tmp_3d, found                            &
+                                                ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL salsa_rrd_local( map_index,                                           &
+                                              nxlf, nxlc, nxl_on_file,                             &
+                                              nxrf, nxrc, nxr_on_file,                             &
+                                              nynf, nync, nyn_on_file,                             &
+                                              nysf, nysc, nys_on_file,                             &
+                                              tmp_3d, found                                        &
+                                            ) ! ToDo: change interface to pass variable
+
+    IF ( .NOT. found )  CALL usm_rrd_local( map_index,                                             &
+                                            nxlf, nxlc, nxl_on_file,                               &
+                                            nxrf, nxr_on_file,                                     &
+                                            nynf, nyn_on_file,                                     &
+                                            nysf, nysc, nys_on_file,                               &
+                                            found                                                  &
+                                          ) ! ToDo: change interface to pass variable
 !
 !-- Surface data do not need overlap data, so do not pass these information.
     IF ( .NOT. found )  CALL surface_data_output_rrd_local( found )
 
-    IF ( .NOT. found )  CALL user_rrd_local(                                   &
-                               map_index,                                      &
-                               nxlf, nxlc, nxl_on_file,                        &
-                               nxrf, nxrc, nxr_on_file,                        &
-                               nynf, nync, nyn_on_file,                        &
-                               nysf, nysc, nys_on_file,                        &
-                               tmp_3d, found                                   &
-                            ) ! ToDo: change interface to pass variable
+    IF ( .NOT. found )  CALL user_rrd_local( map_index,                                            &
+                                             nxlf, nxlc, nxl_on_file,                              &
+                                             nxrf, nxrc, nxr_on_file,                              &
+                                             nynf, nync, nyn_on_file,                              &
+                                             nysf, nysc, nys_on_file,                              &
+                                             tmp_3d, found                                         &
+                                           ) ! ToDo: change interface to pass variable
 
     IF ( debug_output )  THEN
@@ -2004,9 +1970,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Read module-specific local restart data arrays (MPI-IO).
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_rrd_local_mpi
 
@@ -2040,9 +2006,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Write module-specific restart data specific to local MPI ranks
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_wrd_local
 
@@ -2074,9 +2040,9 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> Perform module-specific last actions before the program terminates
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE module_interface_last_actions
 
