Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 2795)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 2801)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Introduce particle transfer in nested models.
+! 
+! 2795 2018-02-07 14:48:48Z hellstea
 ! Bugfix in computation of the anterpolation under-relaxation functions. 
 ! 
@@ -214,6 +217,9 @@
 !       routine
 ! @todo Data transfer of qc and nc is prepared but not activated
-!-------------------------------------------------------------------------------!
+!------------------------------------------------------------------------------!
  MODULE pmc_interface
+
+    USE ISO_C_BINDING
+
 
 #if defined( __nopointer )
@@ -228,10 +234,10 @@
 #endif
 
-    USE control_parameters,                                                     &
-        ONLY:  air_chemistry, cloud_physics, coupling_char, dt_3d, dz, humidity,&
-               message_string, microphysics_morrison, microphysics_seifert,     &
-               nest_bound_l, nest_bound_r, nest_bound_s, nest_bound_n,          &
-               nest_domain, neutral, passive_scalar, roughness_length,          &
-               simulated_time, topography, volume_flow
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, cloud_physics, coupling_char, dt_3d, dz,         &
+               humidity, message_string, microphysics_morrison,                &
+               microphysics_seifert, nest_bound_l, nest_bound_r, nest_bound_s, &
+               nest_bound_n, nest_domain, neutral, passive_scalar,             & 
+               roughness_length, simulated_time, topography, volume_flow
 
     USE chem_modules,                                                          &
@@ -250,4 +256,7 @@
         ONLY:  nbgp, nx, nxl, nxlg, nxlu, nxr, nxrg, ny, nyn, nyng, nys, nysg, &
                nysv, nz, nzb, nzt, wall_flags_0
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection
 
     USE kinds
@@ -275,5 +284,5 @@
     USE pmc_handle_communicator,                                               &
         ONLY:  pmc_get_model_info, pmc_init_model, pmc_is_rootmodel,           &
-               pmc_no_namelist_found, pmc_parent_for_child
+               pmc_no_namelist_found, pmc_parent_for_child, m_couplers
 
     USE pmc_mpi_wrapper,                                                       &
@@ -297,60 +306,64 @@
 !
 !-- Constants
-    INTEGER(iwp), PARAMETER ::  child_to_parent = 2   !:
-    INTEGER(iwp), PARAMETER ::  parent_to_child = 1   !:
+    INTEGER(iwp), PARAMETER ::  child_to_parent = 2   !<
+    INTEGER(iwp), PARAMETER ::  parent_to_child = 1   !<
 !
 !-- Coupler setup
-    INTEGER(iwp), SAVE      ::  comm_world_nesting     !:
-    INTEGER(iwp), SAVE      ::  cpl_id  = 1            !:
-    CHARACTER(LEN=32), SAVE ::  cpl_name               !:
-    INTEGER(iwp), SAVE      ::  cpl_npe_total          !:
-    INTEGER(iwp), SAVE      ::  cpl_parent_id          !:
+    INTEGER(iwp), SAVE      ::  comm_world_nesting    !<
+    INTEGER(iwp), SAVE      ::  cpl_id  = 1           !<
+    CHARACTER(LEN=32), SAVE ::  cpl_name              !<
+    INTEGER(iwp), SAVE      ::  cpl_npe_total         !<
+    INTEGER(iwp), SAVE      ::  cpl_parent_id         !<
 !
 !-- Control parameters, will be made input parameters later
-    CHARACTER(LEN=7), SAVE ::  nesting_datatransfer_mode = 'mixed'  !: steering
-                                                         !: parameter for data-
-                                                         !: transfer mode
-    CHARACTER(LEN=8), SAVE ::  nesting_mode = 'two-way'  !: steering parameter
-                                                         !: for 1- or 2-way nesting
-
-    LOGICAL, SAVE ::  nested_run = .FALSE.  !: general switch
-
-    REAL(wp), SAVE ::  anterp_relax_length_l = -1.0_wp   !:
-    REAL(wp), SAVE ::  anterp_relax_length_r = -1.0_wp   !:
-    REAL(wp), SAVE ::  anterp_relax_length_s = -1.0_wp   !:
-    REAL(wp), SAVE ::  anterp_relax_length_n = -1.0_wp   !:
-    REAL(wp), SAVE ::  anterp_relax_length_t = -1.0_wp   !:
+    CHARACTER(LEN=7), SAVE ::  nesting_datatransfer_mode = 'mixed'  !< steering
+                                                         !< parameter for data-
+                                                         !< transfer mode
+    CHARACTER(LEN=8), SAVE ::  nesting_mode = 'two-way'  !< steering parameter
+                                                         !< for 1- or 2-way nesting
+
+    LOGICAL, SAVE ::  nested_run = .FALSE.  !< general switch
+
+    REAL(wp), SAVE ::  anterp_relax_length_l = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_r = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_s = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_n = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_t = -1.0_wp   !<
 !
 !-- Geometry
-    REAL(wp), SAVE                            ::  area_t               !:
-    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE ::  coord_x              !:
-    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE ::  coord_y              !:
-    REAL(wp), SAVE                            ::  lower_left_coord_x   !:
-    REAL(wp), SAVE                            ::  lower_left_coord_y   !:
+    REAL(wp), SAVE                                    ::  area_t             !<
+    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE, PUBLIC ::  coord_x            !<
+    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE, PUBLIC ::  coord_y            !<
+    REAL(wp), SAVE, PUBLIC                            ::  lower_left_coord_x !<
+    REAL(wp), SAVE, PUBLIC                            ::  lower_left_coord_y !<
+
 !
 !-- Child coarse data arrays
-    INTEGER(iwp), DIMENSION(5)                  ::  coarse_bound   !:
-
-    REAL(wp), SAVE                              ::  xexl           !:
-    REAL(wp), SAVE                              ::  xexr           !:
-    REAL(wp), SAVE                              ::  yexs           !:
-    REAL(wp), SAVE                              ::  yexn           !:
-    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_l    !:
-    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_n    !:
-    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_r    !:
-    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_s    !:
-    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_t    !:
-
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ec   !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ptc  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  uc   !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vc   !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  wc   !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_c  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qcc  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qrc  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nrc  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ncc  !:
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sc   !:
+    INTEGER(iwp), DIMENSION(5),PUBLIC           ::  coarse_bound   !<
+
+    REAL(wp), SAVE                              ::  xexl           !<
+    REAL(wp), SAVE                              ::  xexr           !<
+    REAL(wp), SAVE                              ::  yexs           !<
+    REAL(wp), SAVE                              ::  yexn           !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_l    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_n    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_r    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_s    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_t    !<
+
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ec   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ptc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  uc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  wc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_c  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qcc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qrc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nrc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ncc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sc   !<
+    INTEGER(idp), SAVE, DIMENSION(:,:), ALLOCATABLE, TARGET, PUBLIC ::  nr_partc    !<
+    INTEGER(idp), SAVE, DIMENSION(:,:), ALLOCATABLE, TARGET, PUBLIC ::  part_adrc   !<
+
 
     REAL(wp), SAVE, DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  chem_spec_c   !< child coarse data array for chemical species 
@@ -359,122 +372,144 @@
 !-- Child interpolation coefficients and child-array indices to be 
 !-- precomputed and stored.
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ico    !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  icu    !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jco    !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jcv    !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kco    !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kcw    !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xu   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xu   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yv   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yv   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zo   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zw   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zw   !:
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ico    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  icu    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jco    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jcv    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kco    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kcw    !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xu   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xu   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yv   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yv   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zw   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zw   !<
 !
 !-- Child index arrays and log-ratio arrays for the log-law near-wall
 !-- corrections. These are not truly 3-D arrays but multiple 2-D arrays.
-    INTEGER(iwp), SAVE :: ncorr  !: 4th dimension of the log_ratio-arrays
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_l   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_n   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_r   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_s   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_l   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_n   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_r   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_s   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_l   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_n   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_r   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_s   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_l   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_n   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_r   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_s   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_l   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_n   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_r   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_s   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_l   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_n   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_r   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_s   !:
+    INTEGER(iwp), SAVE :: ncorr  !< 4th dimension of the log_ratio-arrays
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_s   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_s   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_s   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_s   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_s   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_s   !<
 !
 !-- Upper bounds for k in anterpolation.
-    INTEGER(iwp), SAVE ::  kctu   !:
-    INTEGER(iwp), SAVE ::  kctw   !:
+    INTEGER(iwp), SAVE ::  kctu   !<
+    INTEGER(iwp), SAVE ::  kctw   !<
 !
 !-- Upper bound for k in log-law correction in interpolation.
-    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_l   !:
-    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_n   !:
-    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_r   !:
-    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_s   !:
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_l   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_n   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_r   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_s   !<
 !
 !-- Number of ghost nodes in coarse-grid arrays for i and j in anterpolation.
-    INTEGER(iwp), SAVE ::  nhll   !:
-    INTEGER(iwp), SAVE ::  nhlr   !:
-    INTEGER(iwp), SAVE ::  nhls   !:
-    INTEGER(iwp), SAVE ::  nhln   !:
+    INTEGER(iwp), SAVE ::  nhll   !<
+    INTEGER(iwp), SAVE ::  nhlr   !<
+    INTEGER(iwp), SAVE ::  nhls   !<
+    INTEGER(iwp), SAVE ::  nhln   !<
 !
 !-- Spatial under-relaxation coefficients for anterpolation.
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  frax   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fray   !:
-    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fraz   !:
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  frax   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fray   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fraz   !<
 !
 !-- Child-array indices to be precomputed and stored for anterpolation.
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflu   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuu   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflo   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuo   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflv   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuv   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflo   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuo   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflw   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuw   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflo   !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuo   !:
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflu   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuu   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflo   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuo   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflv   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuv   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflo   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuo   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflw   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuw   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflo   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuo   !<
 !
 !-- Number of fine-grid nodes inside coarse-grid ij-faces
 !-- to be precomputed for anterpolation.
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_u        !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_v        !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_s        !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:)   ::  kfc_w         !:
-    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:)   ::  kfc_s         !:
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_u        !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_v        !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::  ijfc_s        !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:)   ::  kfc_w         !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:)   ::  kfc_s         !<
     
-    INTEGER(iwp), DIMENSION(3)          ::  parent_grid_info_int    !:
-    REAL(wp), DIMENSION(7)              ::  parent_grid_info_real   !:
+    INTEGER(iwp), DIMENSION(3)          ::  parent_grid_info_int    !<
+    REAL(wp), DIMENSION(7)              ::  parent_grid_info_real   !<
+    REAL(wp), DIMENSION(2)              ::  zmax_coarse             !<
 
     TYPE coarsegrid_def
-       INTEGER(iwp)                        ::  nx
-       INTEGER(iwp)                        ::  ny
-       INTEGER(iwp)                        ::  nz
-       REAL(wp)                            ::  dx
-       REAL(wp)                            ::  dy
-       REAL(wp)                            ::  dz
-       REAL(wp)                            ::  lower_left_coord_x
-       REAL(wp)                            ::  lower_left_coord_y
-       REAL(wp)                            ::  xend
-       REAL(wp)                            ::  yend
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_x
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_y
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzu       
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzw       
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu        
-       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw        
+       INTEGER(iwp)                        ::  nx                 !<
+       INTEGER(iwp)                        ::  ny                 !<
+       INTEGER(iwp)                        ::  nz                 !<
+       REAL(wp)                            ::  dx                 !<
+       REAL(wp)                            ::  dy                 !<
+       REAL(wp)                            ::  dz                 !<
+       REAL(wp)                            ::  lower_left_coord_x !<
+       REAL(wp)                            ::  lower_left_coord_y !<
+       REAL(wp)                            ::  xend               !<
+       REAL(wp)                            ::  yend               !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_x            !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_y            !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzu                !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzw                !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu                 !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw                 !<
     END TYPE coarsegrid_def
-                                          
-    TYPE(coarsegrid_def), SAVE ::  cg   !:
-
+
+    TYPE(coarsegrid_def), SAVE, PUBLIC     ::  cg   !<
+
+!-  Variables for particle coupling
+
+    TYPE, PUBLIC :: childgrid_def
+       INTEGER(iwp)                        ::  nx                   !<
+       INTEGER(iwp)                        ::  ny                   !<
+       INTEGER(iwp)                        ::  nz                   !<
+       REAL(wp)                            ::  dx                   !<
+       REAL(wp)                            ::  dy                   !<
+       REAL(wp)                            ::  dz                   !<
+       REAL(wp)                            ::  lx_coord, lx_coord_b !<
+       REAL(wp)                            ::  rx_coord, rx_coord_b !<
+       REAL(wp)                            ::  sy_coord, sy_coord_b !<
+       REAL(wp)                            ::  ny_coord, ny_coord_b !<
+       REAL(wp)                            ::  uz_coord, uz_coord_b !<
+    END TYPE childgrid_def
+
+    TYPE(childgrid_def), SAVE, ALLOCATABLE, DIMENSION(:), PUBLIC :: childgrid !<
+
+    INTEGER(idp),ALLOCATABLE,DIMENSION(:,:),PUBLIC,TARGET    :: nr_part  !<
+    INTEGER(idp),ALLOCATABLE,DIMENSION(:,:),PUBLIC,TARGET    :: part_adr !<
+    
     INTERFACE pmci_boundary_conds
        MODULE PROCEDURE pmci_boundary_conds
     END INTERFACE pmci_boundary_conds
-
+    
     INTERFACE pmci_check_setting_mismatches
        MODULE PROCEDURE pmci_check_setting_mismatches
@@ -509,12 +544,29 @@
     END INTERFACE
 
+    INTERFACE get_number_of_childs
+       MODULE PROCEDURE get_number_of_childs
+    END  INTERFACE get_number_of_childs
+
+    INTERFACE get_childid
+       MODULE PROCEDURE get_childid
+    END  INTERFACE get_childid
+
+    INTERFACE get_child_edges
+       MODULE PROCEDURE get_child_edges
+    END  INTERFACE get_child_edges
+
+    INTERFACE get_child_gridspacing
+       MODULE PROCEDURE get_child_gridspacing
+    END  INTERFACE get_child_gridspacing
+
+
     INTERFACE pmci_set_swaplevel
        MODULE PROCEDURE pmci_set_swaplevel
     END INTERFACE pmci_set_swaplevel
 
-    PUBLIC anterp_relax_length_l, anterp_relax_length_r,                        &
-           anterp_relax_length_s, anterp_relax_length_n,                        &
-           anterp_relax_length_t, child_to_parent, comm_world_nesting,          &
-           cpl_id, nested_run, nesting_datatransfer_mode, nesting_mode,         &
+    PUBLIC anterp_relax_length_l, anterp_relax_length_r,                       &
+           anterp_relax_length_s, anterp_relax_length_n,                       &
+           anterp_relax_length_t, child_to_parent, comm_world_nesting,         &
+           cpl_id, nested_run, nesting_datatransfer_mode, nesting_mode,        &
            parent_to_child
 
@@ -528,4 +580,6 @@
     PUBLIC pmci_synchronize
     PUBLIC pmci_set_swaplevel
+    PUBLIC get_number_of_childs, get_childid, get_child_edges, get_child_gridspacing
+
 
 
@@ -535,19 +589,19 @@
  SUBROUTINE pmci_init( world_comm )
 
-    USE control_parameters,                                                     &
+    USE control_parameters,                                                    &
         ONLY:  message_string
 
     IMPLICIT NONE
 
-    INTEGER, INTENT(OUT) ::  world_comm   !:
+    INTEGER(iwp), INTENT(OUT) ::  world_comm   !<
 
 #if defined( __parallel )
 
-    INTEGER(iwp)         ::  ierr         !:
-    INTEGER(iwp)         ::  istat        !:
-    INTEGER(iwp)         ::  pmc_status   !:
-
-
-    CALL pmc_init_model( world_comm, nesting_datatransfer_mode, nesting_mode,   &
+    INTEGER(iwp)         ::  ierr         !<
+    INTEGER(iwp)         ::  istat        !<
+    INTEGER(iwp)         ::  pmc_status   !<
+
+
+    CALL pmc_init_model( world_comm, nesting_datatransfer_mode, nesting_mode,  &
                          pmc_status )
 
@@ -564,7 +618,7 @@
 !
 !-- Check steering parameter values
-    IF ( TRIM( nesting_mode ) /= 'one-way'  .AND.                               &
-         TRIM( nesting_mode ) /= 'two-way'  .AND.                               &
-         TRIM( nesting_mode ) /= 'vertical' )                                   &                 
+    IF ( TRIM( nesting_mode ) /= 'one-way'  .AND.                              &
+         TRIM( nesting_mode ) /= 'two-way'  .AND.                              &
+         TRIM( nesting_mode ) /= 'vertical' )                                  &                 
     THEN
        message_string = 'illegal nesting mode: ' // TRIM( nesting_mode )
@@ -572,9 +626,9 @@
     ENDIF
 
-    IF ( TRIM( nesting_datatransfer_mode ) /= 'cascade'  .AND.                  &
-         TRIM( nesting_datatransfer_mode ) /= 'mixed'    .AND.                  &
-         TRIM( nesting_datatransfer_mode ) /= 'overlap' )                       &
+    IF ( TRIM( nesting_datatransfer_mode ) /= 'cascade'  .AND.                 &
+         TRIM( nesting_datatransfer_mode ) /= 'mixed'    .AND.                 &
+         TRIM( nesting_datatransfer_mode ) /= 'overlap' )                      &
     THEN
-       message_string = 'illegal nesting datatransfer mode: '                   &
+       message_string = 'illegal nesting datatransfer mode: '                  &
                         // TRIM( nesting_datatransfer_mode )
        CALL message( 'pmci_init', 'PA0418', 3, 2, 0, 6, 0 )
@@ -586,8 +640,8 @@
 !-- Get some variables required by the pmc-interface (and in some cases in the
 !-- PALM code out of the pmci) out of the pmc-core
-    CALL pmc_get_model_info( comm_world_nesting = comm_world_nesting,           &
-                             cpl_id = cpl_id, cpl_parent_id = cpl_parent_id,    &
-                             cpl_name = cpl_name, npe_total = cpl_npe_total,    &
-                             lower_left_x = lower_left_coord_x,                 &
+    CALL pmc_get_model_info( comm_world_nesting = comm_world_nesting,          &
+                             cpl_id = cpl_id, cpl_parent_id = cpl_parent_id,   &
+                             cpl_name = cpl_name, npe_total = cpl_npe_total,   &
+                             lower_left_x = lower_left_coord_x,                &
                              lower_left_y = lower_left_coord_y )
 !
@@ -661,40 +715,42 @@
 
     CHARACTER(LEN=32) ::  myname
-
-    INTEGER(iwp) ::  child_id         !:
-    INTEGER(iwp) ::  ierr             !:
-    INTEGER(iwp) ::  i                !:
-    INTEGER(iwp) ::  j                !:
-    INTEGER(iwp) ::  k                !:
-    INTEGER(iwp) ::  m                !:
-    INTEGER(iwp) ::  mm               !:
+    
+    INTEGER(iwp) ::  child_id         !<
+    INTEGER(iwp) ::  ierr             !<
+    INTEGER(iwp) ::  i                !<
+    INTEGER(iwp) ::  j                !<
+    INTEGER(iwp) ::  k                !<
+    INTEGER(iwp) ::  m                !<
+    INTEGER(iwp) ::  mid              !<
+    INTEGER(iwp) ::  mm               !<
     INTEGER(iwp) ::  n = 1            !< running index for chemical species
-    INTEGER(iwp) ::  nest_overlap     !:
-    INTEGER(iwp) ::  nomatch          !:
-    INTEGER(iwp) ::  nx_cl            !:
-    INTEGER(iwp) ::  ny_cl            !:
-    INTEGER(iwp) ::  nz_cl            !:
-
-    INTEGER(iwp), DIMENSION(5) ::  val    !:
-
-
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xl   !:
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xr   !:    
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_ys   !:
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_yn   !:
-    REAL(wp) ::  cl_height        !: 
-    REAL(wp) ::  dx_cl            !:
-    REAL(wp) ::  dy_cl            !:
-    REAL(wp) ::  left_limit       !:
-    REAL(wp) ::  north_limit      !:
-    REAL(wp) ::  right_limit      !:
-    REAL(wp) ::  south_limit      !:
-    REAL(wp) ::  xez              !:
-    REAL(wp) ::  yez              !:
-
-    REAL(wp), DIMENSION(1) ::  fval             !:
-
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_x   !:
-    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_y   !:
+    INTEGER(iwp) ::  nest_overlap     !<
+    INTEGER(iwp) ::  nomatch          !<
+    INTEGER(iwp) ::  nx_cl            !<
+    INTEGER(iwp) ::  ny_cl            !<
+    INTEGER(iwp) ::  nz_cl            !<
+
+    INTEGER(iwp), DIMENSION(5) ::  val    !<
+
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xl   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xr   !<    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_ys   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_yn   !<
+    REAL(wp) ::  cl_height        !< 
+    REAL(wp) ::  dx_cl            !<
+    REAL(wp) ::  dy_cl            !<
+    REAL(wp) ::  dz_cl            !<
+    REAL(wp) ::  left_limit       !<
+    REAL(wp) ::  north_limit      !<
+    REAL(wp) ::  right_limit      !<
+    REAL(wp) ::  south_limit      !<
+    REAL(wp) ::  xez              !<
+    REAL(wp) ::  yez              !<
+
+    REAL(wp), DIMENSION(5) ::  fval             !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_x   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_y   !<
 
 !
@@ -709,4 +765,8 @@
        ALLOCATE( ch_yn(1:SIZE( pmc_parent_for_child ) - 1) )
     ENDIF
+    IF ( ( SIZE( pmc_parent_for_child ) - 1 > 0 ) )  THEN
+       ALLOCATE( childgrid(1:SIZE( pmc_parent_for_child ) - 1) )
+    ENDIF
+
 !
 !-- Get coordinates from all children
@@ -719,9 +779,11 @@
           CALL pmc_recv_from_child( child_id, fval, size(fval), 0, 124, ierr )
          
-          nx_cl = val(1)
-          ny_cl = val(2)
-          dx_cl = val(4)
-          dy_cl = val(5)
+          nx_cl     = val(1)
+          ny_cl     = val(2)
+          dx_cl     = fval(3)
+          dy_cl     = fval(4)
+          dz_cl     = fval(5)
           cl_height = fval(1)
+
           nz_cl = nz
 !
@@ -734,4 +796,8 @@
              ENDIF
           ENDDO
+
+          zmax_coarse = fval(1:2)
+          cl_height   = fval(1)
+
 !    
 !--       Get absolute coordinates from the child
@@ -739,7 +805,7 @@
           ALLOCATE( cl_coord_y(-nbgp:ny_cl+nbgp) )
          
-          CALL pmc_recv_from_child( child_id, cl_coord_x, SIZE( cl_coord_x ),   &
+          CALL pmc_recv_from_child( child_id, cl_coord_x, SIZE( cl_coord_x ),  &
                0, 11, ierr )
-          CALL pmc_recv_from_child( child_id, cl_coord_y, SIZE( cl_coord_y ),   &
+          CALL pmc_recv_from_child( child_id, cl_coord_y, SIZE( cl_coord_y ),  &
                0, 12, ierr )
          
@@ -761,5 +827,5 @@
              right_limit = parent_grid_info_real(5)
              north_limit = parent_grid_info_real(6)
-             IF ( ( cl_coord_x(nx_cl+1) /= right_limit ) .OR.                   &
+             IF ( ( cl_coord_x(nx_cl+1) /= right_limit ) .OR.                  &
                   ( cl_coord_y(ny_cl+1) /= north_limit ) )  THEN
                 nomatch = 1
@@ -774,7 +840,7 @@
              south_limit = lower_left_coord_y + yez
              north_limit = parent_grid_info_real(6) - yez
-             IF ( ( cl_coord_x(0) < left_limit )        .OR.                    &
-                  ( cl_coord_x(nx_cl+1) > right_limit ) .OR.                    &
-                  ( cl_coord_y(0) < south_limit )       .OR.                    &
+             IF ( ( cl_coord_x(0) < left_limit )        .OR.                   &
+                  ( cl_coord_x(nx_cl+1) > right_limit ) .OR.                   &
+                  ( cl_coord_y(0) < south_limit )       .OR.                   &
                   ( cl_coord_y(ny_cl+1) > north_limit ) )  THEN
                 nomatch = 1
@@ -785,4 +851,5 @@
 !--       that the top ghost layer of the child grid does not exceed 
 !--       the parent domain top boundary.
+
           IF ( cl_height > zw(nz) ) THEN
              nomatch = 1
@@ -798,10 +865,15 @@
 
              IF ( m > 1 )  THEN
-                DO mm = 1, m-1
-                   IF ( ( ch_xl(m) < ch_xr(mm) .OR.                             &
-                          ch_xr(m) > ch_xl(mm) )  .AND.                         &
-                        ( ch_ys(m) < ch_yn(mm) .OR.                             &
-                          ch_yn(m) > ch_ys(mm) ) )  THEN                        
-                      nest_overlap = 1
+                DO mm = 1, m - 1
+                   mid = pmc_parent_for_child(mm)
+!
+!--                Check Only different nest level
+                   IF (m_couplers(child_id)%parent_id /= m_couplers(mid)%parent_id)  THEN
+                      IF ( ( ch_xl(m) < ch_xr(mm) .OR.                         &
+                             ch_xr(m) > ch_xl(mm) )  .AND.                     &
+                           ( ch_ys(m) < ch_yn(mm) .OR.                         &
+                             ch_yn(m) > ch_ys(mm) ) )  THEN
+                         nest_overlap = 1
+                      ENDIF
                    ENDIF
                 ENDDO
@@ -809,18 +881,20 @@
           ENDIF
 
+          CALL set_child_edge_coords
+
           DEALLOCATE( cl_coord_x )
           DEALLOCATE( cl_coord_y )
 !
 !--       Send coarse grid information to child
-          CALL pmc_send_to_child( child_id, parent_grid_info_real,              &
-                                   SIZE( parent_grid_info_real ), 0, 21,        &
+          CALL pmc_send_to_child( child_id, parent_grid_info_real,             &
+                                   SIZE( parent_grid_info_real ), 0, 21,       &
                                    ierr )
-          CALL pmc_send_to_child( child_id, parent_grid_info_int,  3, 0,        &
+          CALL pmc_send_to_child( child_id, parent_grid_info_int,  3, 0,       &
                                    22, ierr )
 !
 !--       Send local grid to child
-          CALL pmc_send_to_child( child_id, coord_x, nx+1+2*nbgp, 0, 24,        &
+          CALL pmc_send_to_child( child_id, coord_x, nx+1+2*nbgp, 0, 24,       &
                                    ierr )
-          CALL pmc_send_to_child( child_id, coord_y, ny+1+2*nbgp, 0, 25,        &
+          CALL pmc_send_to_child( child_id, coord_y, ny+1+2*nbgp, 0, 25,       &
                                    ierr )
 !
@@ -835,5 +909,5 @@
        CALL MPI_BCAST( nomatch, 1, MPI_INTEGER, 0, comm2d, ierr )
        IF ( nomatch /= 0 )  THEN
-          WRITE ( message_string, * )  'nested child domain does ',             &
+          WRITE ( message_string, * )  'nested child domain does ',            &
                                        'not fit into its parent domain'
           CALL message( 'pmci_setup_parent', 'PA0425', 3, 2, 0, 6, 0 )
@@ -847,4 +921,6 @@
       
        CALL MPI_BCAST( nz_cl, 1, MPI_INTEGER, 0, comm2d, ierr )
+       CALL MPI_BCAST( childgrid(m), c_sizeof(childgrid(1)), MPI_BYTE, 0, comm2d, ierr )
+
 !
 !--    TO_DO: Klaus: please give a comment what is done here
@@ -852,5 +928,8 @@
 !
 !--    Include couple arrays into parent content
-!--    TO_DO: Klaus: please give a more meaningful comment
+!--    The adresses of the PALM 2D or 3D array (here server coarse grid) which are candidates
+!--    for coupling are stored once into the pmc context. While data transfer, the array do not
+!--    have to be specified again
+
        CALL pmc_s_clear_next_array_list
        DO  WHILE ( pmc_s_getnextarray( child_id, myname ) )
@@ -881,24 +960,24 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i                  !:
-       INTEGER(iwp) ::  ic                 !:
-       INTEGER(iwp) ::  ierr               !:
-       INTEGER(iwp) ::  j                  !:
-       INTEGER(iwp) ::  k                  !:
-       INTEGER(iwp) ::  m                  !:
-       INTEGER(iwp) ::  n                  !:
-       INTEGER(iwp) ::  npx                !:
-       INTEGER(iwp) ::  npy                !:
-       INTEGER(iwp) ::  nrx                !:
-       INTEGER(iwp) ::  nry                !:
-       INTEGER(iwp) ::  px                 !:
-       INTEGER(iwp) ::  py                 !:
-       INTEGER(iwp) ::  parent_pe          !:
-
-       INTEGER(iwp), DIMENSION(2) ::  scoord             !:
-       INTEGER(iwp), DIMENSION(2) ::  size_of_array      !:
-
-       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  coarse_bound_all   !:
-       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  index_list         !:
+       INTEGER(iwp) ::  i                  !<
+       INTEGER(iwp) ::  ic                 !<
+       INTEGER(iwp) ::  ierr               !<
+       INTEGER(iwp) ::  j                  !<
+       INTEGER(iwp) ::  k                  !<
+       INTEGER(iwp) ::  m                  !<
+       INTEGER(iwp) ::  n                  !<
+       INTEGER(iwp) ::  npx                !<
+       INTEGER(iwp) ::  npy                !<
+       INTEGER(iwp) ::  nrx                !<
+       INTEGER(iwp) ::  nry                !<
+       INTEGER(iwp) ::  px                 !<
+       INTEGER(iwp) ::  py                 !<
+       INTEGER(iwp) ::  parent_pe          !<
+
+       INTEGER(iwp), DIMENSION(2) ::  scoord             !<
+       INTEGER(iwp), DIMENSION(2) ::  size_of_array      !<
+
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  coarse_bound_all   !<
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  index_list         !<
 
        IF ( myid == 0 )  THEN
@@ -907,5 +986,5 @@
           CALL pmc_recv_from_child( child_id, size_of_array, 2, 0, 40, ierr )
           ALLOCATE( coarse_bound_all(size_of_array(1),size_of_array(2)) )
-          CALL pmc_recv_from_child( child_id, coarse_bound_all,                 &
+          CALL pmc_recv_from_child( child_id, coarse_bound_all,                &
                                     SIZE( coarse_bound_all ), 0, 41, ierr )
 !
@@ -983,4 +1062,37 @@
      END SUBROUTINE pmci_create_index_list
 
+     SUBROUTINE set_child_edge_coords
+        IMPLICIT  NONE
+
+        INTEGER(iwp) :: nbgp_lpm = 1
+
+        nbgp_lpm = min(nbgp_lpm, nbgp)
+
+        childgrid(m)%nx = nx_cl
+        childgrid(m)%ny = ny_cl
+        childgrid(m)%nz = nz_cl
+        childgrid(m)%dx = dx_cl
+        childgrid(m)%dy = dy_cl
+        childgrid(m)%dz = dz_cl
+
+        childgrid(m)%lx_coord   = cl_coord_x(0)
+        childgrid(m)%lx_coord_b = cl_coord_x(-nbgp_lpm)
+        childgrid(m)%rx_coord   = cl_coord_x(nx_cl)+dx_cl
+        childgrid(m)%rx_coord_b = cl_coord_x(nx_cl+nbgp_lpm)+dx_cl
+        childgrid(m)%sy_coord   = cl_coord_y(0)
+        childgrid(m)%sy_coord_b = cl_coord_y(-nbgp_lpm)
+        childgrid(m)%ny_coord   = cl_coord_y(ny_cl)+dy_cl
+        childgrid(m)%ny_coord_b = cl_coord_y(ny_cl+nbgp_lpm)+dy_cl
+        childgrid(m)%uz_coord   = zmax_coarse(2)
+        childgrid(m)%uz_coord_b = zmax_coarse(1)
+
+        WRITE(9,*)                 'edge coordinates for child id ',child_id,m
+        WRITE(9,*)                 'Number of Boundray cells lpm  ',nbgp_lpm
+        WRITE(9,'(a,3i7,2f10.2)') ' model size                    ', nx_cl, ny_cl, nz_cl, dx_cl, dy_cl
+        WRITE(9,'(a,5f10.2)')     ' model edge                    ', childgrid(m)%lx_coord, childgrid(m)%rx_coord, childgrid(m)%sy_coord, childgrid(m)%ny_coord,childgrid(m)%uz_coord
+        WRITE(9,'(a,4f10.2)')     ' model edge with Boundary      ', childgrid(m)%lx_coord_b, childgrid(m)%rx_coord_b, childgrid(m)%sy_coord_b, childgrid(m)%ny_coord_b
+
+     END SUBROUTINE set_child_edge_coords
+
 #endif
  END SUBROUTINE pmci_setup_parent
@@ -1005,16 +1117,17 @@
     INTEGER(iwp) ::  n          !< running index for number of chemical species
 
-    INTEGER(iwp), DIMENSION(5) ::  val        !:
+    INTEGER(iwp), DIMENSION(5) ::  val        !<
     
-    REAL(wp) ::  xcs        !:
-    REAL(wp) ::  xce        !:
-    REAL(wp) ::  ycs        !:
-    REAL(wp) ::  yce        !:
-
-    REAL(wp), DIMENSION(1) ::  fval       !:
+    REAL(wp) ::  xcs        !<
+    REAL(wp) ::  xce        !<
+    REAL(wp) ::  ycs        !<
+    REAL(wp) ::  yce        !<
+
+    REAL(wp), DIMENSION(5) ::  fval       !<
                                              
 !
-!-- TO_DO: describe what is happening in this if-clause
-!-- Root model does not have a parent and is not a child
+!-- Child setup
+!-- Root model does not have a parent and is not a child, therefore no child setup on root model
+
     IF ( .NOT. pmc_is_rootmodel() )  THEN
 
@@ -1057,4 +1170,9 @@
        ENDIF
 
+       IF( particle_advection )  THEN
+          CALL pmc_set_dataarray_name( 'coarse', 'nr_part'  ,'fine', 'nr_part',  ierr )
+          CALL pmc_set_dataarray_name( 'coarse', 'part_adr'  ,'fine', 'part_adr',  ierr )
+       ENDIF
+       
        IF ( air_chemistry )  THEN
           DO  n = 1, nspec
@@ -1078,4 +1196,8 @@
        val(5)  = dy
        fval(1) = zw(nzt+1)
+       fval(2) = zw(nzt)
+       fval(3) = dx
+       fval(4) = dy
+       fval(5) = dz
 
        IF ( myid == 0 )  THEN
@@ -1087,23 +1209,23 @@
 !
 !--       Receive Coarse grid information.
-          CALL pmc_recv_from_parent( parent_grid_info_real,                     &
+          CALL pmc_recv_from_parent( parent_grid_info_real,                    &
                                      SIZE(parent_grid_info_real), 0, 21, ierr )
           CALL pmc_recv_from_parent( parent_grid_info_int,  3, 0, 22, ierr )
 !
 !--        Debug-printouts - keep them
-!          WRITE(0,*) 'Coarse grid from parent '
-!          WRITE(0,*) 'startx_tot    = ',parent_grid_info_real(1)
-!          WRITE(0,*) 'starty_tot    = ',parent_grid_info_real(2)
-!          WRITE(0,*) 'endx_tot      = ',parent_grid_info_real(5)
-!          WRITE(0,*) 'endy_tot      = ',parent_grid_info_real(6)
-!          WRITE(0,*) 'dx            = ',parent_grid_info_real(3)
-!          WRITE(0,*) 'dy            = ',parent_grid_info_real(4)
-!          WRITE(0,*) 'dz            = ',parent_grid_info_real(7)
-!          WRITE(0,*) 'nx_coarse     = ',parent_grid_info_int(1)
-!          WRITE(0,*) 'ny_coarse     = ',parent_grid_info_int(2)
-!          WRITE(0,*) 'nz_coarse     = ',parent_grid_info_int(3)
-       ENDIF
-
-       CALL MPI_BCAST( parent_grid_info_real, SIZE(parent_grid_info_real),      &
+!           WRITE(0,*) 'Coarse grid from parent '
+!           WRITE(0,*) 'startx_tot    = ',parent_grid_info_real(1)
+!           WRITE(0,*) 'starty_tot    = ',parent_grid_info_real(2)
+!           WRITE(0,*) 'endx_tot      = ',parent_grid_info_real(5)
+!           WRITE(0,*) 'endy_tot      = ',parent_grid_info_real(6)
+!           WRITE(0,*) 'dx            = ',parent_grid_info_real(3)
+!           WRITE(0,*) 'dy            = ',parent_grid_info_real(4)
+!           WRITE(0,*) 'dz            = ',parent_grid_info_real(7)
+!           WRITE(0,*) 'nx_coarse     = ',parent_grid_info_int(1)
+!           WRITE(0,*) 'ny_coarse     = ',parent_grid_info_int(2)
+!           WRITE(0,*) 'nz_coarse     = ',parent_grid_info_int(3)
+       ENDIF
+
+       CALL MPI_BCAST( parent_grid_info_real, SIZE(parent_grid_info_real),     &
                        MPI_REAL, 0, comm2d, ierr )
        CALL MPI_BCAST( parent_grid_info_int, 3, MPI_INTEGER, 0, comm2d, ierr )
@@ -1158,5 +1280,5 @@
        n = 1
        DO  WHILE ( pmc_c_getnextarray( myname ) )
-!--       Note that cg%nz is not th eoriginal nz of parent, but the highest
+!--       Note that cg%nz is not the original nz of parent, but the highest
 !--       parent-grid level needed for nesting.
 !--       Please note, in case of chemical species an additional parameter
@@ -1186,5 +1308,5 @@
 !--    Precompute the index arrays and relaxation functions for the
 !--    anterpolation
-       IF ( TRIM( nesting_mode ) == 'two-way' .OR.                              &
+       IF ( TRIM( nesting_mode ) == 'two-way' .OR.                             &
                   nesting_mode == 'vertical' )  THEN
           CALL pmci_init_anterp_tophat
@@ -1206,11 +1328,11 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), DIMENSION(5,numprocs) ::  coarse_bound_all   !:
-       INTEGER(iwp), DIMENSION(2)          ::  size_of_array      !:
+       INTEGER(iwp), DIMENSION(5,numprocs) ::  coarse_bound_all   !<
+       INTEGER(iwp), DIMENSION(2)          ::  size_of_array      !<
                                               
-       REAL(wp) ::  loffset     !:
-       REAL(wp) ::  noffset     !:
-       REAL(wp) ::  roffset     !:
-       REAL(wp) ::  soffset     !:
+       REAL(wp) ::  loffset     !<
+       REAL(wp) ::  noffset     !<
+       REAL(wp) ::  roffset     !<
+       REAL(wp) ::  soffset     !<
 
 !
@@ -1283,5 +1405,5 @@
 !--    Note that MPI_Gather receives data from all processes in the rank order
 !--    TO_DO: refer to the line where this fact becomes important
-       CALL MPI_GATHER( coarse_bound, 5, MPI_INTEGER, coarse_bound_all, 5,      &
+       CALL MPI_GATHER( coarse_bound, 5, MPI_INTEGER, coarse_bound_all, 5,     &
                         MPI_INTEGER, 0, comm2d, ierr )
 
@@ -1290,5 +1412,5 @@
           size_of_array(2) = SIZE( coarse_bound_all, 2 )
           CALL pmc_send_to_parent( size_of_array, 2, 0, 40, ierr )
-          CALL pmc_send_to_parent( coarse_bound_all, SIZE( coarse_bound_all ),  &
+          CALL pmc_send_to_parent( coarse_bound_all, SIZE( coarse_bound_all ), &
                                    0, 41, ierr )
        ENDIF
@@ -1306,27 +1428,27 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i       !:
-       INTEGER(iwp) ::  i1      !:
-       INTEGER(iwp) ::  j       !:
-       INTEGER(iwp) ::  j1      !:
-       INTEGER(iwp) ::  k       !:
-       INTEGER(iwp) ::  kc      !:
-       INTEGER(iwp) ::  kdzo    !:
-       INTEGER(iwp) ::  kdzw    !:       
-
-       REAL(wp) ::  xb          !:
-       REAL(wp) ::  xcsu        !:
-       REAL(wp) ::  xfso        !:
-       REAL(wp) ::  xcso        !:
-       REAL(wp) ::  xfsu        !:
-       REAL(wp) ::  yb          !:
-       REAL(wp) ::  ycso        !:
-       REAL(wp) ::  ycsv        !:
-       REAL(wp) ::  yfso        !:
-       REAL(wp) ::  yfsv        !:
-       REAL(wp) ::  zcso        !:
-       REAL(wp) ::  zcsw        !:
-       REAL(wp) ::  zfso        !:
-       REAL(wp) ::  zfsw        !:
+       INTEGER(iwp) ::  i       !<
+       INTEGER(iwp) ::  i1      !<
+       INTEGER(iwp) ::  j       !<
+       INTEGER(iwp) ::  j1      !<
+       INTEGER(iwp) ::  k       !<
+       INTEGER(iwp) ::  kc      !<
+       INTEGER(iwp) ::  kdzo    !<
+       INTEGER(iwp) ::  kdzw    !<       
+
+       REAL(wp) ::  xb          !<
+       REAL(wp) ::  xcsu        !<
+       REAL(wp) ::  xfso        !<
+       REAL(wp) ::  xcso        !<
+       REAL(wp) ::  xfsu        !<
+       REAL(wp) ::  yb          !<
+       REAL(wp) ::  ycso        !<
+       REAL(wp) ::  ycsv        !<
+       REAL(wp) ::  yfso        !<
+       REAL(wp) ::  yfsv        !<
+       REAL(wp) ::  zcso        !<
+       REAL(wp) ::  zcsw        !<
+       REAL(wp) ::  zfso        !<
+       REAL(wp) ::  zfsw        !<
       
 
@@ -1391,11 +1513,4 @@
           kcw(k) = kc - 1
           
-          !if ( myid == 0 .and. nx==191 )  then
-          !   write(162,*)nx, nzt+1, k, zw(k), cg%nz+1, kcw(k), cg%zw(kcw(k))
-          !endif
-          !if ( myid == 0 .and. nx==383 )  then
-          !   write(163,*)nx, nzt+1, k, zw(k), cg%nz+1, kcw(k), cg%zw(kcw(k))
-          !endif
-
           DO kc = 0, cg%nz+1
              IF ( cg%zu(kc) > zfso )  EXIT
@@ -1945,5 +2060,5 @@
                       inc        = 1
                       wall_index = j
-                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,   &
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
                           k, j, inc, wall_index, z0_topo, kb, direction, ncorr )
 !
@@ -2188,23 +2303,23 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), INTENT(IN)  ::  direction                 !:
-       INTEGER(iwp), INTENT(IN)  ::  ij                        !:
-       INTEGER(iwp), INTENT(IN)  ::  inc                       !:
-       INTEGER(iwp), INTENT(IN)  ::  k                         !:
-       INTEGER(iwp), INTENT(IN)  ::  kb                        !:
-       INTEGER(iwp), INTENT(OUT) ::  lc                        !:
-       INTEGER(iwp), INTENT(IN)  ::  ncorr                     !:
-       INTEGER(iwp), INTENT(IN)  ::  wall_index                !:
-
-       INTEGER(iwp) ::  alcorr       !:
-       INTEGER(iwp) ::  corr_index   !:
-       INTEGER(iwp) ::  lcorr        !:
-
-       LOGICAL      ::  more         !:
-
-       REAL(wp), DIMENSION(0:ncorr-1), INTENT(OUT) ::  lcr     !:
-       REAL(wp), INTENT(IN)      ::  z0_l                      !:
+       INTEGER(iwp), INTENT(IN)  ::  direction  !<
+       INTEGER(iwp), INTENT(IN)  ::  ij         !<
+       INTEGER(iwp), INTENT(IN)  ::  inc        !<
+       INTEGER(iwp), INTENT(IN)  ::  k          !<
+       INTEGER(iwp), INTENT(IN)  ::  kb         !<
+       INTEGER(iwp), INTENT(OUT) ::  lc         !<
+       INTEGER(iwp), INTENT(IN)  ::  ncorr      !<
+       INTEGER(iwp), INTENT(IN)  ::  wall_index !<
+
+       INTEGER(iwp) ::  alcorr       !<
+       INTEGER(iwp) ::  corr_index   !<
+       INTEGER(iwp) ::  lcorr        !<
+
+       LOGICAL      ::  more         !<
+
+       REAL(wp), DIMENSION(0:ncorr-1), INTENT(OUT) ::  lcr     !<
+       REAL(wp), INTENT(IN)      ::  z0_l                      !<
       
-       REAL(wp)     ::  logvelc1     !:
+       REAL(wp)     ::  logvelc1     !<
       
 
@@ -2296,14 +2411,14 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), INTENT(IN)  ::  kb   !:
-       INTEGER(iwp), INTENT(OUT) ::  lc   !:
-
-       INTEGER(iwp) ::  kbc    !:
-       INTEGER(iwp) ::  k1     !:
-
-       REAL(wp), INTENT(OUT) ::  logzc1     !:
-       REAL(wp), INTENT(IN) ::  z0_l       !:
-
-       REAL(wp) ::  zuc1   !:
+       INTEGER(iwp), INTENT(IN)  ::  kb   !<
+       INTEGER(iwp), INTENT(OUT) ::  lc   !<
+
+       INTEGER(iwp) ::  kbc    !<
+       INTEGER(iwp) ::  k1     !<
+
+       REAL(wp), INTENT(OUT) ::  logzc1     !<
+       REAL(wp), INTENT(IN) ::  z0_l       !<
+
+       REAL(wp) ::  zuc1   !<
 
 
@@ -2335,15 +2450,15 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), INTENT(IN)  ::  inc    !:  increment must be 1 or -1.
-       INTEGER(iwp), INTENT(IN)  ::  j      !:
-       INTEGER(iwp), INTENT(IN)  ::  jw     !:
-       INTEGER(iwp), INTENT(OUT) ::  lc     !:
-
-       INTEGER(iwp) ::  j1       !:
-
-       REAL(wp), INTENT(IN) ::  z0_l   !:
-
-       REAL(wp) ::  logyc1   !:
-       REAL(wp) ::  yc1      !:
+       INTEGER(iwp), INTENT(IN)  ::  inc    !<  increment must be 1 or -1.
+       INTEGER(iwp), INTENT(IN)  ::  j      !<
+       INTEGER(iwp), INTENT(IN)  ::  jw     !<
+       INTEGER(iwp), INTENT(OUT) ::  lc     !<
+
+       INTEGER(iwp) ::  j1       !<
+
+       REAL(wp), INTENT(IN) ::  z0_l   !<
+
+       REAL(wp) ::  logyc1   !<
+       REAL(wp) ::  yc1      !<
        
 !
@@ -2376,15 +2491,15 @@
        IMPLICIT NONE
 
-       INTEGER(iwp), INTENT(IN)  ::  i      !:
-       INTEGER(iwp), INTENT(IN)  ::  inc    !: increment must be 1 or -1.
-       INTEGER(iwp), INTENT(IN)  ::  iw     !:
-       INTEGER(iwp), INTENT(OUT) ::  lc     !:
-
-       INTEGER(iwp) ::  i1       !:
-
-       REAL(wp), INTENT(IN) ::  z0_l   !:
-
-       REAL(wp) ::  logxc1   !:
-       REAL(wp) ::  xc1      !:
+       INTEGER(iwp), INTENT(IN)  ::  i      !<
+       INTEGER(iwp), INTENT(IN)  ::  inc    !< increment must be 1 or -1.
+       INTEGER(iwp), INTENT(IN)  ::  iw     !<
+       INTEGER(iwp), INTENT(OUT) ::  lc     !<
+
+       INTEGER(iwp) ::  i1       !<
+
+       REAL(wp), INTENT(IN) ::  z0_l   !<
+
+       REAL(wp) ::  logxc1   !<
+       REAL(wp) ::  xc1      !<
 
 !
@@ -2417,20 +2532,20 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i        !: Fine-grid index
-       INTEGER(iwp) ::  ifc_o    !:
-       INTEGER(iwp) ::  ifc_u    !:
-       INTEGER(iwp) ::  ii       !: Coarse-grid index
-       INTEGER(iwp) ::  istart   !:
-       INTEGER(iwp) ::  ir       !:
-       INTEGER(iwp) ::  j        !: Fine-grid index
-       INTEGER(iwp) ::  jj       !: Coarse-grid index
-       INTEGER(iwp) ::  jstart   !:
-       INTEGER(iwp) ::  jr       !:
-       INTEGER(iwp) ::  k        !: Fine-grid index
-       INTEGER(iwp) ::  kk       !: Coarse-grid index
-       INTEGER(iwp) ::  kstart   !:
-       REAL(wp)     ::  xi       !:
-       REAL(wp)     ::  eta      !:
-       REAL(wp)     ::  zeta     !:
+       INTEGER(iwp) ::  i        !< Fine-grid index
+       INTEGER(iwp) ::  ifc_o    !<
+       INTEGER(iwp) ::  ifc_u    !<
+       INTEGER(iwp) ::  ii       !< Coarse-grid index
+       INTEGER(iwp) ::  istart   !<
+       INTEGER(iwp) ::  ir       !<
+       INTEGER(iwp) ::  j        !< Fine-grid index
+       INTEGER(iwp) ::  jj       !< Coarse-grid index
+       INTEGER(iwp) ::  jstart   !<
+       INTEGER(iwp) ::  jr       !<
+       INTEGER(iwp) ::  k        !< Fine-grid index
+       INTEGER(iwp) ::  kk       !< Coarse-grid index
+       INTEGER(iwp) ::  kstart   !<
+       REAL(wp)     ::  xi       !<
+       REAL(wp)     ::  eta      !<
+       REAL(wp)     ::  zeta     !<
      
 !
@@ -2490,5 +2605,5 @@
        DO  ii = icl, icr-1
           i = istart
-          DO  WHILE ( ( coord_x(i) < cg%coord_x(ii) - 0.5_wp * cg%dx )  .AND.   &
+          DO  WHILE ( ( coord_x(i) < cg%coord_x(ii) - 0.5_wp * cg%dx )  .AND.  &
                       ( i < nxrg ) )
              i  = i + 1
@@ -2496,5 +2611,5 @@
           iflu(ii) = MIN( MAX( i, nxlg ), nxrg )
           ir = i
-          DO  WHILE ( ( coord_x(ir) <= cg%coord_x(ii) + 0.5_wp * cg%dx )  .AND. &
+          DO  WHILE ( ( coord_x(ir) <= cg%coord_x(ii) + 0.5_wp * cg%dx )  .AND.&
                       ( i < nxrg+1 ) )
              i  = i + 1
@@ -2512,5 +2627,5 @@
        DO  ii = icl, icr-1
           i = istart
-          DO  WHILE ( ( coord_x(i) + 0.5_wp * dx < cg%coord_x(ii) )  .AND.      &
+          DO  WHILE ( ( coord_x(i) + 0.5_wp * dx < cg%coord_x(ii) )  .AND.     &
                       ( i < nxrg ) )
              i  = i + 1
@@ -2518,5 +2633,5 @@
           iflo(ii) = MIN( MAX( i, nxlg ), nxrg )
           ir = i
-          DO  WHILE ( ( coord_x(ir) + 0.5_wp * dx <= cg%coord_x(ii) + cg%dx )   &
+          DO  WHILE ( ( coord_x(ir) + 0.5_wp * dx <= cg%coord_x(ii) + cg%dx )  &
                       .AND.  ( i < nxrg+1 ) )
              i  = i + 1
@@ -2534,5 +2649,5 @@
        DO  jj = jcs, jcn-1
           j = jstart
-          DO  WHILE ( ( coord_y(j) < cg%coord_y(jj) - 0.5_wp * cg%dy )  .AND.   &
+          DO  WHILE ( ( coord_y(j) < cg%coord_y(jj) - 0.5_wp * cg%dy )  .AND.  &
                       ( j < nyng ) )
              j  = j + 1
@@ -2540,5 +2655,5 @@
           jflv(jj) = MIN( MAX( j, nysg ), nyng )
           jr = j
-          DO  WHILE ( ( coord_y(jr) <= cg%coord_y(jj) + 0.5_wp * cg%dy )  .AND. &
+          DO  WHILE ( ( coord_y(jr) <= cg%coord_y(jj) + 0.5_wp * cg%dy )  .AND.&
                       ( j < nyng+1 ) )
              j  = j + 1
@@ -2556,5 +2671,5 @@
        DO  jj = jcs, jcn-1
           j = jstart
-          DO  WHILE ( ( coord_y(j) + 0.5_wp * dy < cg%coord_y(jj) )  .AND.      &
+          DO  WHILE ( ( coord_y(j) + 0.5_wp * dy < cg%coord_y(jj) )  .AND.     &
                       ( j < nyng ) )
              j  = j + 1
@@ -2562,5 +2677,5 @@
           jflo(jj) = MIN( MAX( j, nysg ), nyng )
           jr = j
-          DO  WHILE ( ( coord_y(jr) + 0.5_wp * dy <= cg%coord_y(jj) + cg%dy )   &
+          DO  WHILE ( ( coord_y(jr) + 0.5_wp * dy <= cg%coord_y(jj) + cg%dy )  &
                       .AND.  ( j < nyng+1 ) )
              j  = j + 1
@@ -2636,10 +2751,10 @@
           DO  ii = icl, icr
              IF ( ifuu(ii) < ( nx + 1 ) / 2 )  THEN   
-                xi = ( MAX( 0.0_wp, ( cg%coord_x(ii) -                          &
+                xi = ( MAX( 0.0_wp, ( cg%coord_x(ii) -                         &
                      lower_left_coord_x ) ) / anterp_relax_length_l )**4
                 frax(ii) = xi / ( 1.0_wp + xi )
              ELSE
-                xi = ( MAX( 0.0_wp, ( lower_left_coord_x + ( nx + 1 ) * dx -    &
-                                      cg%coord_x(ii) ) ) /                      &
+                xi = ( MAX( 0.0_wp, ( lower_left_coord_x + ( nx + 1 ) * dx -   &
+                                      cg%coord_x(ii) ) ) /                     &
                        anterp_relax_length_r )**4
                 frax(ii) = xi / ( 1.0_wp + xi )                
@@ -2650,10 +2765,10 @@
           DO  jj = jcs, jcn
              IF ( jfuv(jj) < ( ny + 1 ) / 2 )  THEN 
-                eta = ( MAX( 0.0_wp, ( cg%coord_y(jj) -                         &
+                eta = ( MAX( 0.0_wp, ( cg%coord_y(jj) -                        &
                      lower_left_coord_y ) ) / anterp_relax_length_s )**4
                 fray(jj) = eta / ( 1.0_wp + eta )
              ELSE
-                eta = ( MAX( 0.0_wp, ( lower_left_coord_y + ( ny + 1 ) * dy -   &
-                                       cg%coord_y(jj)) ) /                      &
+                eta = ( MAX( 0.0_wp, ( lower_left_coord_y + ( ny + 1 ) * dy -  &
+                                       cg%coord_y(jj)) ) /                     &
                         anterp_relax_length_n )**4
                 fray(jj) = eta / ( 1.0_wp + eta )
@@ -2683,17 +2798,17 @@
        IMPLICIT NONE
 
-       INTEGER(iwp)        ::  k                     !: index variable along z
-       INTEGER(iwp)        ::  k_wall                !: topography-top index along z
-       INTEGER(iwp)        ::  kc                    !:
-
-       REAL(wp), PARAMETER ::  cfw = 0.2_wp          !:
-       REAL(wp), PARAMETER ::  c_tkef = 0.6_wp       !:
-       REAL(wp)            ::  fw                    !:
-       REAL(wp), PARAMETER ::  fw0 = 0.9_wp          !:
-       REAL(wp)            ::  glsf                  !:
-       REAL(wp)            ::  glsc                  !:
-       REAL(wp)            ::  height                !:
-       REAL(wp), PARAMETER ::  p13 = 1.0_wp/3.0_wp   !:
-       REAL(wp), PARAMETER ::  p23 = 2.0_wp/3.0_wp   !:        
+       INTEGER(iwp)        ::  k                     !< index variable along z
+       INTEGER(iwp)        ::  k_wall                !< topography-top index along z
+       INTEGER(iwp)        ::  kc                    !<
+
+       REAL(wp), PARAMETER ::  cfw = 0.2_wp          !<
+       REAL(wp), PARAMETER ::  c_tkef = 0.6_wp       !<
+       REAL(wp)            ::  fw                    !<
+       REAL(wp), PARAMETER ::  fw0 = 0.9_wp          !<
+       REAL(wp)            ::  glsf                  !<
+       REAL(wp)            ::  glsc                  !<
+       REAL(wp)            ::  height                !<
+       REAL(wp), PARAMETER ::  p13 = 1.0_wp/3.0_wp   !<
+       REAL(wp), PARAMETER ::  p23 = 2.0_wp/3.0_wp   !<        
 
        IF ( nest_bound_l )  THEN
@@ -2711,5 +2826,5 @@
                 height = zu(k) - zu(k_wall)
                 fw     = EXP( -cfw * height / glsf )
-                tkefactor_l(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                tkefactor_l(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *     &
                                               ( glsf / glsc )**p23 )
              ENDDO
@@ -2732,5 +2847,5 @@
                 height = zu(k) - zu(k_wall)
                 fw     = EXP( -cfw * height / glsf )
-                tkefactor_r(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                tkefactor_r(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *     &
                                               ( glsf / glsc )**p23 )
              ENDDO
@@ -2753,5 +2868,5 @@
                 height = zu(k) - zu(k_wall)
                 fw     = EXP( -cfw*height / glsf )
-                tkefactor_s(k,i) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                tkefactor_s(k,i) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *     &
                      ( glsf / glsc )**p23 )
              ENDDO
@@ -2812,6 +2927,6 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  i   !:
-    INTEGER(iwp) ::  j   !:
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  j   !<
 
 !
@@ -2838,22 +2953,25 @@
     IMPLICIT NONE
 
-    INTEGER, INTENT(IN)          ::  child_id    !:
-    INTEGER, INTENT(IN)          ::  nz_cl       !:
-    INTEGER, INTENT(IN),OPTIONAL ::  n           !< index of chemical species
-
-    CHARACTER(LEN=*), INTENT(IN) ::  name        !:
+    INTEGER(iwp), INTENT(IN)          ::  child_id    !<
+    INTEGER(iwp), INTENT(IN)          ::  nz_cl       !<
+    INTEGER(iwp), INTENT(IN),OPTIONAL ::  n           !< index of chemical species
+
+    CHARACTER(LEN=*), INTENT(IN) ::  name        !<
 
 #if defined( __parallel )
-    INTEGER(iwp) ::  ierr        !:
-    INTEGER(iwp) ::  istat       !:
-
-    REAL(wp), POINTER, DIMENSION(:,:)   ::  p_2d        !:
-    REAL(wp), POINTER, DIMENSION(:,:)   ::  p_2d_sec    !:
-    REAL(wp), POINTER, DIMENSION(:,:,:) ::  p_3d        !:
-    REAL(wp), POINTER, DIMENSION(:,:,:) ::  p_3d_sec    !:
+    INTEGER(iwp) ::  ierr        !<
+    INTEGER(iwp) ::  istat       !<
+
+    REAL(wp), POINTER, DIMENSION(:,:)     ::  p_2d        !<
+    REAL(wp), POINTER, DIMENSION(:,:)     ::  p_2d_sec    !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)   ::  p_3d        !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)   ::  p_3d_sec    !<
+    INTEGER(idp), POINTER, DIMENSION(:,:) ::  i_2d        !<
 
 
     NULLIFY( p_3d )
     NULLIFY( p_2d )
+    NULLIFY( i_2d )
+
 !
 !-- List of array names, which can be coupled.
@@ -2870,4 +2988,6 @@
     IF ( TRIM(name) == "nc" )  p_3d => nc
     IF ( TRIM(name) == "s"  )  p_3d => s
+    IF ( TRIM(name) == "nr_part"  )   i_2d => nr_part
+    IF ( TRIM(name) == "part_adr"  )  i_2d => part_adr
     IF ( INDEX( TRIM(name), "chem_" ) /= 0 )  p_3d => chem_species(n)%conc
 
@@ -2882,4 +3002,6 @@
     ELSEIF ( ASSOCIATED( p_2d ) )  THEN
        CALL pmc_s_set_dataarray( child_id, p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, i_2d )
     ELSE
 !
@@ -2887,5 +3009,5 @@
        IF ( myid == 0  .AND.  cpl_id == 1 )  THEN
 
-          message_string = 'pointer for array "' // TRIM( name ) //             &
+          message_string = 'pointer for array "' // TRIM( name ) //            &
                            '" can''t be associated'
           CALL message( 'pmci_set_array_pointer', 'PA0117', 3, 2, 0, 6, 0 )
@@ -2911,8 +3033,10 @@
 
     IF ( ASSOCIATED( p_3d ) )  THEN
-       CALL pmc_s_set_dataarray( child_id, p_3d, nz_cl, nz,                     &
+       CALL pmc_s_set_dataarray( child_id, p_3d, nz_cl, nz,                    &
                                  array_2 = p_3d_sec )
     ELSEIF ( ASSOCIATED( p_2d ) )  THEN
        CALL pmc_s_set_dataarray( child_id, p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, i_2d )
     ELSE
 !
@@ -2920,5 +3044,5 @@
        IF ( myid == 0  .AND.  cpl_id == 1 )  THEN
 
-          message_string = 'pointer for array "' // TRIM( name ) //             &
+          message_string = 'pointer for array "' // TRIM( name ) //            &
                            '" can''t be associated'
           CALL message( 'pmci_set_array_pointer', 'PA0117', 3, 2, 0, 6, 0 )
@@ -2933,32 +3057,91 @@
 
 #endif
- END SUBROUTINE pmci_set_array_pointer
-
-
-
- SUBROUTINE pmci_create_child_arrays( name, is, ie, js, je, nzc, n )
+END SUBROUTINE pmci_set_array_pointer
+
+INTEGER FUNCTION get_number_of_childs ()
+   IMPLICIT NONE
+
+   get_number_of_childs = SIZE( pmc_parent_for_child ) - 1
+
+   RETURN
+END FUNCTION get_number_of_childs
+
+INTEGER FUNCTION get_childid (id_index)
+   IMPLICIT NONE
+
+   INTEGER,INTENT(IN)                 :: id_index
+
+   get_childid = pmc_parent_for_child(id_index)
+
+   RETURN
+END FUNCTION get_childid
+
+SUBROUTINE  get_child_edges (m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
+                               sy_coord, sy_coord_b, ny_coord, ny_coord_b,     &
+                               uz_coord, uz_coord_b)
+   IMPLICIT NONE
+   INTEGER,INTENT(IN)             ::  m
+   REAL(wp),INTENT(OUT)           ::  lx_coord, lx_coord_b
+   REAL(wp),INTENT(OUT)           ::  rx_coord, rx_coord_b
+   REAL(wp),INTENT(OUT)           ::  sy_coord, sy_coord_b
+   REAL(wp),INTENT(OUT)           ::  ny_coord, ny_coord_b
+   REAL(wp),INTENT(OUT)           ::  uz_coord, uz_coord_b
+
+   lx_coord = childgrid(m)%lx_coord
+   rx_coord = childgrid(m)%rx_coord
+   sy_coord = childgrid(m)%sy_coord
+   ny_coord = childgrid(m)%ny_coord
+   uz_coord = childgrid(m)%uz_coord
+
+   lx_coord_b = childgrid(m)%lx_coord_b
+   rx_coord_b = childgrid(m)%rx_coord_b
+   sy_coord_b = childgrid(m)%sy_coord_b
+   ny_coord_b = childgrid(m)%ny_coord_b
+   uz_coord_b = childgrid(m)%uz_coord_b
+
+END SUBROUTINE get_child_edges
+
+SUBROUTINE  get_child_gridspacing (m, dx,dy,dz)
+
+   IMPLICIT NONE
+   INTEGER,INTENT(IN)             ::  m
+   REAL(wp),INTENT(OUT)           ::  dx,dy
+   REAL(wp),INTENT(OUT),OPTIONAL  ::  dz
+
+   dx = childgrid(m)%dx
+   dy = childgrid(m)%dy
+   IF(PRESENT(dz))   THEN
+      dz = childgrid(m)%dz
+   ENDIF
+
+END SUBROUTINE get_child_gridspacing
+
+SUBROUTINE pmci_create_child_arrays( name, is, ie, js, je, nzc,n  )
 
     IMPLICIT NONE
 
-    CHARACTER(LEN=*), INTENT(IN) ::  name    !:
-
-    INTEGER(iwp), INTENT(IN) ::  ie      !:
-    INTEGER(iwp), INTENT(IN) ::  is      !:
-    INTEGER(iwp), INTENT(IN) ::  je      !:
-    INTEGER(iwp), INTENT(IN) ::  js      !:
-    INTEGER(iwp), INTENT(IN) ::  nzc     !:  Note that nzc is cg%nz
+    CHARACTER(LEN=*), INTENT(IN) ::  name    !<
+
+    INTEGER(iwp), INTENT(IN) ::  ie      !<
+    INTEGER(iwp), INTENT(IN) ::  is      !<
+    INTEGER(iwp), INTENT(IN) ::  je      !<
+    INTEGER(iwp), INTENT(IN) ::  js      !<
+    INTEGER(iwp), INTENT(IN) ::  nzc     !<  Note that nzc is cg%nz
 
     INTEGER(iwp), INTENT(IN), OPTIONAL ::  n  !< number of chemical species
 
 #if defined( __parallel )
-    INTEGER(iwp) ::  ierr    !:
-    INTEGER(iwp) ::  istat   !:
-
-    REAL(wp), POINTER,DIMENSION(:,:)   ::  p_2d    !:
-    REAL(wp), POINTER,DIMENSION(:,:,:) ::  p_3d    !:
+    INTEGER(iwp) ::  ierr    !<
+    INTEGER(iwp) ::  istat   !<
+
+    REAL(wp), POINTER,DIMENSION(:,:)       ::  p_2d    !<
+    REAL(wp), POINTER,DIMENSION(:,:,:)     ::  p_3d    !<
+    INTEGER(idp), POINTER,DIMENSION(:,:)   ::  i_2d    !<
 
 
     NULLIFY( p_3d )
     NULLIFY( p_2d )
+    NULLIFY( i_2d )
+
 !
 !-- List of array names, which can be coupled
@@ -2996,4 +3179,10 @@
        IF ( .NOT. ALLOCATED( sc ) )  ALLOCATE( sc(0:nzc+1,js:je,is:ie) )
        p_3d => sc
+    ELSEIF (trim(name) == "nr_part") then
+       IF (.not.allocated(nr_partc))  allocate(nr_partc(js:je, is:ie))
+       i_2d => nr_partc
+    ELSEIF (trim(name) == "part_adr") then
+       IF (.not.allocated(part_adrc))  allocate(part_adrc(js:je, is:ie))
+       i_2d => part_adrc
     ELSEIF ( TRIM( name(1:5) ) == "chem_" )  THEN
        IF ( .NOT. ALLOCATED( chem_spec_c ) )                                   &
@@ -3009,4 +3198,6 @@
     ELSEIF ( ASSOCIATED( p_2d ) )  THEN
        CALL pmc_c_set_dataarray( p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_c_set_dataarray( i_2d )
     ELSE
 !
@@ -3014,5 +3205,5 @@
        IF ( myid == 0  .AND.  cpl_id == 2 )  THEN
 
-          message_string = 'pointer for array "' // TRIM( name ) //             &
+          message_string = 'pointer for array "' // TRIM( name ) //            &
                            '" can''t be associated'
           CALL message( 'pmci_create_child_arrays', 'PA0170', 3, 2, 0, 6, 0 )
@@ -3037,8 +3228,8 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  child_id    !:
-    INTEGER(iwp) ::  m           !:
-
-    REAL(wp) ::  waittime        !:
+    INTEGER(iwp) ::  child_id    !<
+    INTEGER(iwp) ::  m           !<
+
+    REAL(wp) ::  waittime        !<
 
 
@@ -3086,15 +3277,15 @@
 !
 !--    The interpolation.
-       CALL pmci_interp_tril_all ( u,  uc,  icu, jco, kco, r1xu, r2xu, r1yo,    &
+       CALL pmci_interp_tril_all ( u,  uc,  icu, jco, kco, r1xu, r2xu, r1yo,   &
                                    r2yo, r1zo, r2zo, 'u' )
-       CALL pmci_interp_tril_all ( v,  vc,  ico, jcv, kco, r1xo, r2xo, r1yv,    &
+       CALL pmci_interp_tril_all ( v,  vc,  ico, jcv, kco, r1xo, r2xo, r1yv,   &
                                    r2yv, r1zo, r2zo, 'v' )
-       CALL pmci_interp_tril_all ( w,  wc,  ico, jco, kcw, r1xo, r2xo, r1yo,    &
+       CALL pmci_interp_tril_all ( w,  wc,  ico, jco, kcw, r1xo, r2xo, r1yo,   &
                                    r2yo, r1zw, r2zw, 'w' )
-       CALL pmci_interp_tril_all ( e,  ec,  ico, jco, kco, r1xo, r2xo, r1yo,    &
+       CALL pmci_interp_tril_all ( e,  ec,  ico, jco, kco, r1xo, r2xo, r1yo,   &
                                    r2yo, r1zo, r2zo, 'e' )
 
        IF ( .NOT. neutral )  THEN
-          CALL pmci_interp_tril_all ( pt, ptc, ico, jco, kco, r1xo, r2xo,       &
+          CALL pmci_interp_tril_all ( pt, ptc, ico, jco, kco, r1xo, r2xo,      &
                                       r1yo, r2yo, r1zo, r2zo, 's' )
        ENDIF
@@ -3102,18 +3293,18 @@
        IF ( humidity )  THEN
 
-          CALL pmci_interp_tril_all ( q, q_c, ico, jco, kco, r1xo, r2xo, r1yo,   &
+          CALL pmci_interp_tril_all ( q, q_c, ico, jco, kco, r1xo, r2xo, r1yo, &
                                       r2yo, r1zo, r2zo, 's' )
 
           IF ( cloud_physics  .AND.  microphysics_morrison )  THEN
-             CALL pmci_interp_tril_all ( qc, qcc, ico, jco, kco, r1xo, r2xo,    &
+             CALL pmci_interp_tril_all ( qc, qcc, ico, jco, kco, r1xo, r2xo,   &
                                           r1yo, r2yo, r1zo, r2zo, 's' ) 
-             CALL pmci_interp_tril_all ( nc, ncc, ico, jco, kco, r1xo, r2xo,    &
+             CALL pmci_interp_tril_all ( nc, ncc, ico, jco, kco, r1xo, r2xo,   &
                                          r1yo, r2yo, r1zo, r2zo, 's' )   
           ENDIF
 
           IF ( cloud_physics  .AND.  microphysics_seifert )  THEN
-             CALL pmci_interp_tril_all ( qr, qrc, ico, jco, kco, r1xo, r2xo,    &
+             CALL pmci_interp_tril_all ( qr, qrc, ico, jco, kco, r1xo, r2xo,   &
                                          r1yo, r2yo, r1zo, r2zo, 's' )
-             CALL pmci_interp_tril_all ( nr, nrc, ico, jco, kco, r1xo, r2xo,    &
+             CALL pmci_interp_tril_all ( nr, nrc, ico, jco, kco, r1xo, r2xo,   &
                                          r1yo, r2yo, r1zo, r2zo, 's' )
           ENDIF
@@ -3122,5 +3313,5 @@
 
        IF ( passive_scalar )  THEN
-          CALL pmci_interp_tril_all ( s, sc, ico, jco, kco, r1xo, r2xo, r1yo,   &
+          CALL pmci_interp_tril_all ( s, sc, ico, jco, kco, r1xo, r2xo, r1yo,  &
                                       r2yo, r1zo, r2zo, 's' )
        ENDIF
@@ -3169,5 +3360,5 @@
 
 
-    SUBROUTINE pmci_interp_tril_all( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y,     &
+    SUBROUTINE pmci_interp_tril_all( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y,    &
                                      r1z, r2z, var )
 !
@@ -3177,43 +3368,43 @@
        IMPLICIT NONE
 
-       CHARACTER(LEN=1), INTENT(IN) :: var  !:
-
-       INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !:
-       INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !:
-       INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !:
-
-       INTEGER(iwp) ::  i        !:
-       INTEGER(iwp) ::  ib       !:
-       INTEGER(iwp) ::  ie       !:
-       INTEGER(iwp) ::  j        !:
-       INTEGER(iwp) ::  jb       !:
-       INTEGER(iwp) ::  je       !:
-       INTEGER(iwp) ::  k        !:
-       INTEGER(iwp) ::  k_wall   !:
-       INTEGER(iwp) ::  k1       !:
-       INTEGER(iwp) ::  kbc      !:
-       INTEGER(iwp) ::  l        !:
-       INTEGER(iwp) ::  m        !:
-       INTEGER(iwp) ::  n        !:
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !:
-       REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: fc       !:
-       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r1x   !:
-       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r2x   !:
-       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r1y   !:
-       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r2y   !:
-       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r1z   !:
-       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r2z   !:
-
-       REAL(wp) ::  fk         !:
-       REAL(wp) ::  fkj        !:
-       REAL(wp) ::  fkjp       !:
-       REAL(wp) ::  fkp        !:
-       REAL(wp) ::  fkpj       !:
-       REAL(wp) ::  fkpjp      !:
-       REAL(wp) ::  logratio   !:
-       REAL(wp) ::  logzuc1    !:
-       REAL(wp) ::  zuc1       !:
-       REAL(wp) ::  z0_topo    !:  roughness at vertical walls
+       CHARACTER(LEN=1), INTENT(IN) :: var  !<
+
+       INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !<
+       INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !<
+       INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !<
+
+       INTEGER(iwp) ::  i        !<
+       INTEGER(iwp) ::  ib       !<
+       INTEGER(iwp) ::  ie       !<
+       INTEGER(iwp) ::  j        !<
+       INTEGER(iwp) ::  jb       !<
+       INTEGER(iwp) ::  je       !<
+       INTEGER(iwp) ::  k        !<
+       INTEGER(iwp) ::  k_wall   !<
+       INTEGER(iwp) ::  k1       !<
+       INTEGER(iwp) ::  kbc      !<
+       INTEGER(iwp) ::  l        !<
+       INTEGER(iwp) ::  m        !<
+       INTEGER(iwp) ::  n        !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !<
+       REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: fc       !<
+       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r1x   !<
+       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r2x   !<
+       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r1y   !<
+       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r2y   !<
+       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r1z   !<
+       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r2z   !<
+
+       REAL(wp) ::  fk         !<
+       REAL(wp) ::  fkj        !<
+       REAL(wp) ::  fkjp       !<
+       REAL(wp) ::  fkp        !<
+       REAL(wp) ::  fkpj       !<
+       REAL(wp) ::  fkpjp      !<
+       REAL(wp) ::  logratio   !<
+       REAL(wp) ::  logzuc1    !<
+       REAL(wp) ::  zuc1       !<
+       REAL(wp) ::  z0_topo    !<  roughness at vertical walls
 
 
@@ -3292,5 +3483,5 @@
                 k = k_wall + 1
                 DO  WHILE ( zu(k) < zuc1 )
-                   logratio = ( LOG( ( zu(k) - zu(k_wall) ) / z0_topo ) ) /     &
+                   logratio = ( LOG( ( zu(k) - zu(k_wall) ) / z0_topo ) ) /    &
                                 logzuc1
                    f(k,j,i) = logratio * f(k1,j,i)
@@ -3331,5 +3522,5 @@
 #if defined( __parallel )
 
-    USE control_parameters,                                                     &
+    USE control_parameters,                                                    &
         ONLY:  dt_restart, end_time, message_string, restart_time, time_restart
 
@@ -3353,9 +3544,9 @@
     IF ( .NOT. pmc_is_rootmodel() )  THEN
        IF ( end_time /= end_time_root )  THEN
-          WRITE( message_string, * )  'mismatch between root model and ',       &
-               'child settings &   end_time(root) = ', end_time_root,           &
-               ' &   end_time(child) = ', end_time, ' & child value is set',    &
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings &   end_time(root) = ', end_time_root,          &
+               ' &   end_time(child) = ', end_time, ' & child value is set',   &
                ' to root value'
-          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6,  &
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
                         0 )
           end_time = end_time_root
@@ -3369,9 +3560,9 @@
     IF ( .NOT. pmc_is_rootmodel() )  THEN
        IF ( restart_time /= restart_time_root )  THEN
-          WRITE( message_string, * )  'mismatch between root model and ',       &
-               'child settings &   restart_time(root) = ', restart_time_root,   &
-               ' &   restart_time(child) = ', restart_time, ' & child ',        &
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings &   restart_time(root) = ', restart_time_root,  &
+               ' &   restart_time(child) = ', restart_time, ' & child ',       &
                'value is set to root value'
-          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6,  &
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
                         0 )
           restart_time = restart_time_root
@@ -3385,9 +3576,9 @@
     IF ( .NOT. pmc_is_rootmodel() )  THEN
        IF ( dt_restart /= dt_restart_root )  THEN
-          WRITE( message_string, * )  'mismatch between root model and ',       &
-               'child settings &   dt_restart(root) = ', dt_restart_root,       &
-               ' &   dt_restart(child) = ', dt_restart, ' & child ',            &
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings &   dt_restart(root) = ', dt_restart_root,      &
+               ' &   dt_restart(child) = ', dt_restart, ' & child ',           &
                'value is set to root value'
-          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6,  &
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
                         0 )
           dt_restart = dt_restart_root
@@ -3401,9 +3592,9 @@
     IF ( .NOT. pmc_is_rootmodel() )  THEN
        IF ( time_restart /= time_restart_root )  THEN
-          WRITE( message_string, * )  'mismatch between root model and ',       &
-               'child settings &   time_restart(root) = ', time_restart_root,   &
-               ' &   time_restart(child) = ', time_restart, ' & child ',        &
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings &   time_restart(root) = ', time_restart_root,  &
+               ' &   time_restart(child) = ', time_restart, ' & child ',       &
                'value is set to root value'
-          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6,  &
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
                         0 )
           time_restart = time_restart_root
@@ -3424,13 +3615,13 @@
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  i                           !:
-    INTEGER(iwp) ::  ierr                        !:
-    INTEGER(iwp) ::  j                           !:
-    INTEGER(iwp) ::  k                           !:
-
-    REAL(wp) ::  dxdy                            !:
-    REAL(wp) ::  innor                           !:
-    REAL(wp) ::  w_lt                            !:
-    REAL(wp), DIMENSION(1:3) ::  volume_flow_l   !:
+    INTEGER(iwp) ::  i                           !<
+    INTEGER(iwp) ::  ierr                        !<
+    INTEGER(iwp) ::  j                           !<
+    INTEGER(iwp) ::  k                           !<
+
+    REAL(wp) ::  dxdy                            !<
+    REAL(wp) ::  innor                           !<
+    REAL(wp) ::  w_lt                            !<
+    REAL(wp), DIMENSION(1:3) ::  volume_flow_l   !<
 
 !
@@ -3465,5 +3656,5 @@
 #if defined( __parallel )
     IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-    CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 1, MPI_REAL,          &
+    CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 1, MPI_REAL,         &
                         MPI_SUM, comm2d, ierr )
 #else
@@ -3502,5 +3693,5 @@
 #if defined( __parallel )
     IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-    CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL,          &
+    CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL,         &
                         MPI_SUM, comm2d, ierr )
 #else
@@ -3522,5 +3713,5 @@
 #if defined( __parallel )
     IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
-    CALL MPI_ALLREDUCE( volume_flow_l(3), volume_flow(3), 1, MPI_REAL,          &
+    CALL MPI_ALLREDUCE( volume_flow_l(3), volume_flow(3), 1, MPI_REAL,         &
                         MPI_SUM, comm2d, ierr )
 #else
@@ -3553,7 +3744,7 @@
    IMPLICIT NONE
 
-   INTEGER(iwp)           :: ierr  !:
-   REAL(wp), DIMENSION(1) :: dtl   !:
-   REAL(wp), DIMENSION(1) :: dtg   !:
+   INTEGER(iwp)           :: ierr  !<
+   REAL(wp), DIMENSION(1) :: dtl   !<
+   REAL(wp), DIMENSION(1) :: dtg   !<
 
    
@@ -3575,9 +3766,9 @@
     IMPLICIT NONE
 
-    INTEGER(iwp), INTENT(IN) ::  swaplevel  !: swaplevel (1 or 2) of PALM's
-                                            !: timestep
-
-    INTEGER(iwp)            ::  child_id    !:
-    INTEGER(iwp)            ::  m           !:
+    INTEGER(iwp), INTENT(IN) ::  swaplevel  !< swaplevel (1 or 2) of PALM's
+                                            !< timestep
+
+    INTEGER(iwp)            ::  child_id    !<
+    INTEGER(iwp)            ::  m           !<
 
 #if defined( __parallel )
@@ -3603,6 +3794,6 @@
     IMPLICIT NONE
 
-    INTEGER(iwp)           ::  ierr   !:
-    INTEGER(iwp)           ::  istat  !:
+    INTEGER(iwp)           ::  ierr   !<
+    INTEGER(iwp)           ::  istat  !<
 
     CHARACTER(LEN=*), INTENT(IN) ::  local_nesting_mode
@@ -3651,17 +3842,17 @@
     IMPLICIT NONE
 
-    INTEGER(iwp), INTENT(IN) ::  direction   !:
+    INTEGER(iwp), INTENT(IN) ::  direction   !<
 
 #if defined( __parallel )
-    INTEGER(iwp) ::  child_id    !:
-    INTEGER(iwp) ::  i           !:
-    INTEGER(iwp) ::  ierr        !:
-    INTEGER(iwp) ::  j           !:
-    INTEGER(iwp) ::  k           !:
-    INTEGER(iwp) ::  m           !:
-
-    REAL(wp)               ::  waittime    !:
-    REAL(wp), DIMENSION(1) ::  dtc         !:
-    REAL(wp), DIMENSION(1) ::  dtl         !:
+    INTEGER(iwp) ::  child_id    !<
+    INTEGER(iwp) ::  i           !<
+    INTEGER(iwp) ::  ierr        !<
+    INTEGER(iwp) ::  j           !<
+    INTEGER(iwp) ::  k           !<
+    INTEGER(iwp) ::  m           !<
+
+    REAL(wp)               ::  waittime    !<
+    REAL(wp), DIMENSION(1) ::  dtc         !<
+    REAL(wp), DIMENSION(1) ::  dtl         !<
 
 
@@ -3722,15 +3913,15 @@
     IMPLICIT NONE
 
-    INTEGER(iwp), INTENT(IN) ::  direction   !:
+    INTEGER(iwp), INTENT(IN) ::  direction   !<
 
 #if defined( __parallel )
-    INTEGER(iwp) ::  ierr        !:
-    INTEGER(iwp) ::  icl         !:
-    INTEGER(iwp) ::  icr         !:
-    INTEGER(iwp) ::  jcs         !:
-    INTEGER(iwp) ::  jcn         !:
+    INTEGER(iwp) ::  ierr        !<
+    INTEGER(iwp) ::  icl         !<
+    INTEGER(iwp) ::  icr         !<
+    INTEGER(iwp) ::  jcs         !<
+    INTEGER(iwp) ::  jcn         !<
     
-    REAL(wp), DIMENSION(1) ::  dtl         !:
-    REAL(wp), DIMENSION(1) ::  dts         !:
+    REAL(wp), DIMENSION(1) ::  dtl         !<
+    REAL(wp), DIMENSION(1) ::  dts         !<
 
 
@@ -3788,28 +3979,28 @@
 !--       Left border pe:
           IF ( nest_bound_l )  THEN
-             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_l, logc_ratio_u_l,                &
+             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_l, logc_ratio_u_l,               &
                                        nzt_topo_nestbc_l, 'l', 'u' )
 
-             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,      &
-                                       r1yv, r2yv, r1zo, r2zo,                  &
-                                       logc_v_l, logc_ratio_v_l,                &
+             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_l, logc_ratio_v_l,               &
                                        nzt_topo_nestbc_l, 'l', 'v' )
 
-             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zw, r2zw,                  &
-                                       logc_w_l, logc_ratio_w_l,                &
+             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_l, logc_ratio_w_l,               &
                                        nzt_topo_nestbc_l, 'l', 'w' )
 
-             CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_l, logc_ratio_u_l,                &
+             CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_l, logc_ratio_u_l,               &
                                        nzt_topo_nestbc_l, 'l', 'e' )
 
              IF ( .NOT. neutral )  THEN
-                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,   &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_l, logc_ratio_u_l,             &
+                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_l, logc_ratio_u_l,            &
                                           nzt_topo_nestbc_l, 'l', 's' )
              ENDIF
@@ -3817,7 +4008,7 @@
              IF ( humidity )  THEN
 
-                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,    &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_l, logc_ratio_u_l,             &
+                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_l, logc_ratio_u_l,            &
                                           nzt_topo_nestbc_l, 'l', 's' )
 
@@ -3853,7 +4044,7 @@
 
              IF ( passive_scalar )  THEN
-                CALL pmci_interp_tril_lr( s, sc, ico, jco, kco, r1xo, r2xo,     &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_l, logc_ratio_u_l,             &
+                CALL pmci_interp_tril_lr( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_l, logc_ratio_u_l,            &
                                           nzt_topo_nestbc_l, 'l', 's' )
              ENDIF
@@ -3916,29 +4107,29 @@
 !--       Right border pe
           IF ( nest_bound_r )  THEN
-             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_r, logc_ratio_u_r,                &
+             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_r, logc_ratio_u_r,               &
                                        nzt_topo_nestbc_r, 'r', 'u' )
 
-             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,      &
-                                       r1yv, r2yv, r1zo, r2zo,                  &
-                                       logc_v_r, logc_ratio_v_r,                &
+             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_r, logc_ratio_v_r,               &
                                        nzt_topo_nestbc_r, 'r', 'v' )
 
-             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zw, r2zw,                  &
-                                       logc_w_r, logc_ratio_w_r,                &
+             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_r, logc_ratio_w_r,               &
                                        nzt_topo_nestbc_r, 'r', 'w' )
 
-             CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,      &
-                                       r1yo,r2yo, r1zo, r2zo,                   &
-                                       logc_u_r, logc_ratio_u_r,                &
+             CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,     &
+                                       r1yo,r2yo, r1zo, r2zo,                  &
+                                       logc_u_r, logc_ratio_u_r,               &
                                        nzt_topo_nestbc_r, 'r', 'e' )
 
 
              IF ( .NOT. neutral )  THEN
-                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,   &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_r, logc_ratio_u_r,             &
+                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_r, logc_ratio_u_r,            &
                                           nzt_topo_nestbc_r, 'r', 's' )
 
@@ -3946,7 +4137,7 @@
 
              IF ( humidity )  THEN
-                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,    &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_r, logc_ratio_u_r,             &
+                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_r, logc_ratio_u_r,            &
                                           nzt_topo_nestbc_r, 'r', 's' )
 
@@ -4047,32 +4238,32 @@
 !--       South border pe
           IF ( nest_bound_s )  THEN
-             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_s, logc_ratio_u_s,                &
+             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_s, logc_ratio_u_s,               &
                                        nzt_topo_nestbc_s, 's', 'u' )
-             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,      &
-                                       r1yv, r2yv, r1zo, r2zo,                  &
-                                       logc_v_s, logc_ratio_v_s,                &
+             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_s, logc_ratio_v_s,               &
                                        nzt_topo_nestbc_s, 's', 'v' )
-             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zw, r2zw,                  &
-                                       logc_w_s, logc_ratio_w_s,                &
+             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_s, logc_ratio_w_s,               &
                                        nzt_topo_nestbc_s, 's','w' )
-             CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_s, logc_ratio_u_s,                &
+             CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_s, logc_ratio_u_s,               &
                                        nzt_topo_nestbc_s, 's', 'e' )
 
              IF ( .NOT. neutral )  THEN
-                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,   &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_s, logc_ratio_u_s,             &
+                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_s, logc_ratio_u_s,            &
                                           nzt_topo_nestbc_s, 's', 's' )
              ENDIF
 
              IF ( humidity )  THEN
-                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,    &
-                                          r1yo,r2yo, r1zo, r2zo,                &
-                                          logc_u_s, logc_ratio_u_s,             &
+                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo,r2yo, r1zo, r2zo,               &
+                                          logc_u_s, logc_ratio_u_s,            &
                                           nzt_topo_nestbc_s, 's', 's' )
 
@@ -4112,7 +4303,7 @@
 
              IF ( passive_scalar )  THEN
-                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,     &
-                                          r1yo,r2yo, r1zo, r2zo,                &
-                                          logc_u_s, logc_ratio_u_s,             &
+                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo,r2yo, r1zo, r2zo,               &
+                                          logc_u_s, logc_ratio_u_s,            &
                                           nzt_topo_nestbc_s, 's', 's' )
              ENDIF
@@ -4120,9 +4311,9 @@
              IF ( air_chemistry )  THEN
                 DO  n = 1, nspec
-                   CALL pmci_interp_tril_sn( chem_species(n)%conc,              &
-                                             chem_spec_c(:,:,:,n),              &
-                                             ico, jco, kco, r1xo, r2xo,         &
-                                             r1yo, r2yo, r1zo, r2zo,            &
-                                             logc_u_s, logc_ratio_u_s,          &
+                   CALL pmci_interp_tril_sn( chem_species(n)%conc,             &
+                                             chem_spec_c(:,:,:,n),             &
+                                             ico, jco, kco, r1xo, r2xo,        &
+                                             r1yo, r2yo, r1zo, r2zo,           &
+                                             logc_u_s, logc_ratio_u_s,         &
                                              nzt_topo_nestbc_s, 's', 's' )
                 ENDDO
@@ -4172,35 +4363,35 @@
 !--       North border pe
           IF ( nest_bound_n )  THEN
-             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_n, logc_ratio_u_n,                &
+             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_n, logc_ratio_u_n,               &
                                        nzt_topo_nestbc_n, 'n', 'u' )
 
-             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,      &
-                                       r1yv, r2yv, r1zo, r2zo,                  &
-                                       logc_v_n, logc_ratio_v_n,                & 
+             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_n, logc_ratio_v_n,               & 
                                        nzt_topo_nestbc_n, 'n', 'v' )
 
-             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zw, r2zw,                  &
-                                       logc_w_n, logc_ratio_w_n,                &
+             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_n, logc_ratio_w_n,               &
                                        nzt_topo_nestbc_n, 'n', 'w' )
 
-             CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,      &
-                                       r1yo, r2yo, r1zo, r2zo,                  &
-                                       logc_u_n, logc_ratio_u_n,                &
+             CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_n, logc_ratio_u_n,               &
                                        nzt_topo_nestbc_n, 'n', 'e' )
 
              IF ( .NOT. neutral )  THEN
-                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,   &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_n, logc_ratio_u_n,             &
+                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_n, logc_ratio_u_n,            &
                                           nzt_topo_nestbc_n, 'n', 's' )
              ENDIF
 
              IF ( humidity )  THEN
-                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,    &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_n, logc_ratio_u_n,             &
+                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_n, logc_ratio_u_n,            &
                                           nzt_topo_nestbc_n, 'n', 's' )
 
@@ -4240,7 +4431,7 @@
 
              IF ( passive_scalar )  THEN
-                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,     &
-                                          r1yo, r2yo, r1zo, r2zo,               &
-                                          logc_u_n, logc_ratio_u_n,             &
+                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_u_n, logc_ratio_u_n,            &
                                           nzt_topo_nestbc_n, 'n', 's' )
              ENDIF
@@ -4479,56 +4670,56 @@
       IMPLICIT NONE
 
-      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                       &
-                                      INTENT(INOUT) ::  f       !:
-      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                           &
-                                      INTENT(IN)    ::  fc      !:
-      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nys:nyn),           &
-                                      INTENT(IN)    ::  logc_ratio   !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x     !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x     !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y     !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y     !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z     !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z     !:
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f       !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc      !<
+      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nys:nyn),          &
+                                      INTENT(IN)    ::  logc_ratio   !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x     !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x     !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y     !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y     !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z     !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z     !<
       
-      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic     !:
-      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc     !:
-      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc     !:
-      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nys:nyn),                 &
-                                          INTENT(IN)           ::  logc   !:
-      INTEGER(iwp) ::  nzt_topo_nestbc   !:
-
-      CHARACTER(LEN=1), INTENT(IN) ::  edge   !:
-      CHARACTER(LEN=1), INTENT(IN) ::  var    !:
-
-      INTEGER(iwp) ::  i        !:
-      INTEGER(iwp) ::  ib       !:
-      INTEGER(iwp) ::  ibgp     !:
-      INTEGER(iwp) ::  iw       !:
-      INTEGER(iwp) ::  j        !:
-      INTEGER(iwp) ::  jco      !:
-      INTEGER(iwp) ::  jcorr    !:
-      INTEGER(iwp) ::  jinc     !:
-      INTEGER(iwp) ::  jw       !:
-      INTEGER(iwp) ::  j1       !:
-      INTEGER(iwp) ::  k        !:
-      INTEGER(iwp) ::  k_wall   !: vertical index of topography top
-      INTEGER(iwp) ::  kco      !:
-      INTEGER(iwp) ::  kcorr    !:
-      INTEGER(iwp) ::  k1       !:
-      INTEGER(iwp) ::  l        !:
-      INTEGER(iwp) ::  m        !:
-      INTEGER(iwp) ::  n        !:
-      INTEGER(iwp) ::  kbc      !:
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic     !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc     !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc     !<
+      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nys:nyn),                &
+                                          INTENT(IN)           ::  logc   !<
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
+      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+      CHARACTER(LEN=1), INTENT(IN) ::  var    !<
+
+      INTEGER(iwp) ::  i        !<
+      INTEGER(iwp) ::  ib       !<
+      INTEGER(iwp) ::  ibgp     !<
+      INTEGER(iwp) ::  iw       !<
+      INTEGER(iwp) ::  j        !<
+      INTEGER(iwp) ::  jco      !<
+      INTEGER(iwp) ::  jcorr    !<
+      INTEGER(iwp) ::  jinc     !<
+      INTEGER(iwp) ::  jw       !<
+      INTEGER(iwp) ::  j1       !<
+      INTEGER(iwp) ::  k        !<
+      INTEGER(iwp) ::  k_wall   !< vertical index of topography top
+      INTEGER(iwp) ::  kco      !<
+      INTEGER(iwp) ::  kcorr    !<
+      INTEGER(iwp) ::  k1       !<
+      INTEGER(iwp) ::  l        !<
+      INTEGER(iwp) ::  m        !<
+      INTEGER(iwp) ::  n        !<
+      INTEGER(iwp) ::  kbc      !<
       
-      REAL(wp) ::  coarse_dx   !:
-      REAL(wp) ::  coarse_dy   !:
-      REAL(wp) ::  coarse_dz   !:
-      REAL(wp) ::  fkj         !:
-      REAL(wp) ::  fkjp        !:
-      REAL(wp) ::  fkpj        !:
-      REAL(wp) ::  fkpjp       !:
-      REAL(wp) ::  fk          !:
-      REAL(wp) ::  fkp         !:
+      REAL(wp) ::  coarse_dx   !<
+      REAL(wp) ::  coarse_dy   !<
+      REAL(wp) ::  coarse_dz   !<
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkp         !<
       
 ! 
@@ -4640,7 +4831,7 @@
                         DO  kcorr = 0, ncorr-1
                            kco = k + kcorr
-                           f(kco,jco,i) = 0.5_wp * ( logc_ratio(1,kcorr,k,j) *  &
-                                                     f(k1,j,i)                  &
-                                                   + logc_ratio(2,jcorr,k,j) *  &
+                           f(kco,jco,i) = 0.5_wp * ( logc_ratio(1,kcorr,k,j) * &
+                                                     f(k1,j,i)                 &
+                                                   + logc_ratio(2,jcorr,k,j) * &
                                                      f(k,j1,i) )
                         ENDDO
@@ -4695,5 +4886,5 @@
 
 
-   SUBROUTINE pmci_interp_tril_sn( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z,  &
+   SUBROUTINE pmci_interp_tril_sn( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z, &
                                    r2z, logc, logc_ratio,                   &
                                    nzt_topo_nestbc, edge, var )
@@ -4706,53 +4897,53 @@
       IMPLICIT NONE
 
-      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                       &
-                                      INTENT(INOUT) ::  f             !:
-      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                           &
-                                      INTENT(IN)    ::  fc            !:
-      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nxl:nxr),           &
-                                      INTENT(IN)    ::  logc_ratio    !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x           !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x           !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y           !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y           !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z           !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z           !:
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f             !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc            !<
+      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nxl:nxr),          &
+                                      INTENT(IN)    ::  logc_ratio    !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x           !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x           !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y           !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y           !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z           !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z           !<
       
-      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !:
-      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !:
-      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !:
-      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nxl:nxr),                 &
-                                          INTENT(IN)           ::  logc  !:
-      INTEGER(iwp) ::  nzt_topo_nestbc   !:
-
-      CHARACTER(LEN=1), INTENT(IN) ::  edge   !:
-      CHARACTER(LEN=1), INTENT(IN) ::  var    !:
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !<
+      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nxl:nxr),                &
+                                          INTENT(IN)           ::  logc  !<
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
+      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+      CHARACTER(LEN=1), INTENT(IN) ::  var    !<
       
-      INTEGER(iwp) ::  i       !:
-      INTEGER(iwp) ::  iinc    !:
-      INTEGER(iwp) ::  icorr   !:
-      INTEGER(iwp) ::  ico     !:
-      INTEGER(iwp) ::  i1      !:
-      INTEGER(iwp) ::  j       !:
-      INTEGER(iwp) ::  jb      !:
-      INTEGER(iwp) ::  jbgp    !:
-      INTEGER(iwp) ::  k       !:
-      INTEGER(iwp) ::  k_wall   !: vertical index of topography top
-      INTEGER(iwp) ::  kcorr   !:
-      INTEGER(iwp) ::  kco     !:
-      INTEGER(iwp) ::  k1      !:
-      INTEGER(iwp) ::  l       !:
-      INTEGER(iwp) ::  m       !:
-      INTEGER(iwp) ::  n       !:
+      INTEGER(iwp) ::  i       !<
+      INTEGER(iwp) ::  iinc    !<
+      INTEGER(iwp) ::  icorr   !<
+      INTEGER(iwp) ::  ico     !<
+      INTEGER(iwp) ::  i1      !<
+      INTEGER(iwp) ::  j       !<
+      INTEGER(iwp) ::  jb      !<
+      INTEGER(iwp) ::  jbgp    !<
+      INTEGER(iwp) ::  k       !<
+      INTEGER(iwp) ::  k_wall   !< vertical index of topography top
+      INTEGER(iwp) ::  kcorr   !<
+      INTEGER(iwp) ::  kco     !<
+      INTEGER(iwp) ::  k1      !<
+      INTEGER(iwp) ::  l       !<
+      INTEGER(iwp) ::  m       !<
+      INTEGER(iwp) ::  n       !<
                             
-      REAL(wp) ::  coarse_dx   !:
-      REAL(wp) ::  coarse_dy   !:
-      REAL(wp) ::  coarse_dz   !:
-      REAL(wp) ::  fk          !:
-      REAL(wp) ::  fkj         !:
-      REAL(wp) ::  fkjp        !:
-      REAL(wp) ::  fkpj        !:
-      REAL(wp) ::  fkpjp       !:
-      REAL(wp) ::  fkp         !:
+      REAL(wp) ::  coarse_dx   !<
+      REAL(wp) ::  coarse_dy   !<
+      REAL(wp) ::  coarse_dz   !<
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fkp         !<
       
 !
@@ -4865,7 +5056,7 @@
                         DO  kcorr = 0, ncorr-1
                            kco = k + kcorr
-                           f(kco,j,ico) = 0.5_wp * ( logc_ratio(1,kcorr,k,i) *  &
-                                                     f(k1,j,i)                  &
-                                                   + logc_ratio(2,icorr,k,i) *  &
+                           f(kco,j,ico) = 0.5_wp * ( logc_ratio(1,kcorr,k,i) * &
+                                                     f(k1,j,i)                 &
+                                                   + logc_ratio(2,icorr,k,i) * &
                                                      f(k,j,i1) )
                         ENDDO
@@ -4918,5 +5109,5 @@
  
 
-   SUBROUTINE pmci_interp_tril_t( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z,   &
+   SUBROUTINE pmci_interp_tril_t( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z,  &
                                   r2z, var )
 
@@ -4928,41 +5119,41 @@
       IMPLICIT NONE
 
-      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                       &
-                                      INTENT(INOUT) ::  f     !:
-      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                           &
-                                      INTENT(IN)    ::  fc    !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x   !:
-      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x   !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y   !:
-      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y   !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z   !:
-      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z   !:
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f     !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc    !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x   !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x   !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y   !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y   !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z   !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z   !<
       
-      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN) ::  ic    !:
-      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN) ::  jc    !:
-      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN) ::  kc    !:
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN) ::  ic    !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN) ::  jc    !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN) ::  kc    !<
       
-      CHARACTER(LEN=1), INTENT(IN) :: var   !:
-
-      INTEGER(iwp) ::  i   !:
-      INTEGER(iwp) ::  ib  !:
-      INTEGER(iwp) ::  ie  !:
-      INTEGER(iwp) ::  j   !:
-      INTEGER(iwp) ::  jb   !:
-      INTEGER(iwp) ::  je   !:      
-      INTEGER(iwp) ::  k   !:
-      INTEGER(iwp) ::  l   !:
-      INTEGER(iwp) ::  m   !:
-      INTEGER(iwp) ::  n   !:
+      CHARACTER(LEN=1), INTENT(IN) :: var   !<
+
+      INTEGER(iwp) ::  i   !<
+      INTEGER(iwp) ::  ib  !<
+      INTEGER(iwp) ::  ie  !<
+      INTEGER(iwp) ::  j   !<
+      INTEGER(iwp) ::  jb   !<
+      INTEGER(iwp) ::  je   !<      
+      INTEGER(iwp) ::  k   !<
+      INTEGER(iwp) ::  l   !<
+      INTEGER(iwp) ::  m   !<
+      INTEGER(iwp) ::  n   !<
       
-      REAL(wp) ::  coarse_dx   !:
-      REAL(wp) ::  coarse_dy   !:
-      REAL(wp) ::  coarse_dz   !:
-      REAL(wp) ::  fk          !:
-      REAL(wp) ::  fkj         !:
-      REAL(wp) ::  fkjp        !:
-      REAL(wp) ::  fkpj        !:
-      REAL(wp) ::  fkpjp       !:
-      REAL(wp) ::  fkp         !:
+      REAL(wp) ::  coarse_dx   !<
+      REAL(wp) ::  coarse_dy   !<
+      REAL(wp) ::  coarse_dz   !<
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fkp         !<
 
       
@@ -5036,19 +5227,19 @@
        IMPLICIT NONE
 
-       CHARACTER(LEN=1), INTENT(IN) ::  edge   !:
-       CHARACTER(LEN=1), INTENT(IN) ::  var    !:
-
-       INTEGER(iwp) ::  i       !:
-       INTEGER(iwp) ::  ib      !:
-       INTEGER(iwp) ::  ibgp    !:
-       INTEGER(iwp) ::  ied     !:
-       INTEGER(iwp) ::  j       !:
-       INTEGER(iwp) ::  k       !:
-       INTEGER(iwp) ::  k_wall  !:
-
-       REAL(wp) ::  outnor    !:
-       REAL(wp) ::  vdotnor   !:
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !:
+       CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+       CHARACTER(LEN=1), INTENT(IN) ::  var    !<
+
+       INTEGER(iwp) ::  i       !<
+       INTEGER(iwp) ::  ib      !<
+       INTEGER(iwp) ::  ibgp    !<
+       INTEGER(iwp) ::  ied     !<
+       INTEGER(iwp) ::  j       !<
+       INTEGER(iwp) ::  k       !<
+       INTEGER(iwp) ::  k_wall  !<
+
+       REAL(wp) ::  outnor    !<
+       REAL(wp) ::  vdotnor   !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !<
 !
 !--    Check which edge is to be handled: left or right
@@ -5114,19 +5305,19 @@
        IMPLICIT NONE
 
-       CHARACTER(LEN=1), INTENT(IN) ::  edge   !:
-       CHARACTER(LEN=1), INTENT(IN) ::  var    !:
+       CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+       CHARACTER(LEN=1), INTENT(IN) ::  var    !<
       
-       INTEGER(iwp) ::  i         !:
-       INTEGER(iwp) ::  j         !:
-       INTEGER(iwp) ::  jb        !:
-       INTEGER(iwp) ::  jbgp      !:
-       INTEGER(iwp) ::  jed       !:
-       INTEGER(iwp) ::  k         !:
-       INTEGER(iwp) ::  k_wall    !:
-
-       REAL(wp)     ::  outnor    !:
-       REAL(wp)     ::  vdotnor   !:
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !:
+       INTEGER(iwp) ::  i         !<
+       INTEGER(iwp) ::  j         !<
+       INTEGER(iwp) ::  jb        !<
+       INTEGER(iwp) ::  jbgp      !<
+       INTEGER(iwp) ::  jed       !<
+       INTEGER(iwp) ::  k         !<
+       INTEGER(iwp) ::  k_wall    !<
+
+       REAL(wp)     ::  outnor    !<
+       REAL(wp)     ::  vdotnor   !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !<
 
 !
@@ -5191,15 +5382,15 @@
        IMPLICIT NONE
 
-       CHARACTER(LEN=1), INTENT(IN) ::  var   !:
+       CHARACTER(LEN=1), INTENT(IN) ::  var   !<
       
-       INTEGER(iwp) ::  i     !:
-       INTEGER(iwp) ::  j     !:
-       INTEGER(iwp) ::  k     !:
-       INTEGER(iwp) ::  ked   !:
-
-       REAL(wp) ::  vdotnor   !:
-
-       REAL(wp), DIMENSION(nzb:nzt+1,nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp),      &
-                 INTENT(INOUT) ::  f   !:
+       INTEGER(iwp) ::  i     !<
+       INTEGER(iwp) ::  j     !<
+       INTEGER(iwp) ::  k     !<
+       INTEGER(iwp) ::  ked   !<
+
+       REAL(wp) ::  vdotnor   !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp),     &
+                 INTENT(INOUT) ::  f   !<
      
 
@@ -5232,5 +5423,5 @@
 
 
-    SUBROUTINE pmci_anterp_tophat( f, fc, kct, ifl, ifu, jfl, jfu, kfl, kfu,    &
+    SUBROUTINE pmci_anterp_tophat( f, fc, kct, ifl, ifu, jfl, jfu, kfl, kfu,   &
                                    ijfc, kfc, var )
 !
@@ -5351,5 +5542,5 @@
 !--             Spatial under-relaxation.
                 fra  = frax(ii) * fray(jj) * fraz(kk)
-                fc(kk,jj,ii) = ( 1.0_wp - fra ) * fc(kk,jj,ii) +                &
+                fc(kk,jj,ii) = ( 1.0_wp - fra ) * fc(kk,jj,ii) +               &
                                fra * cellsum / REAL( nfc, KIND = wp )
 
