Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 4047)
+++ palm/trunk/SOURCE/Makefile	(revision 4048)
@@ -25,4 +25,7 @@
 # -----------------
 # $Id$
+# Moved turbulence_closure_mod calls into module_interface
+# 
+# 4047 2019-06-21 18:58:09Z knoop
 # Introduction of the dynamics module and dissolution of swap_timelevel
 #
@@ -781,6 +784,5 @@
 	mod_kinds.o \
 	module_interface.o \
-	modules.o \
-	turbulence_closure_mod.o
+	modules.o
 basic_constants_and_equations_mod.o: \
 	mod_kinds.o
@@ -842,5 +844,4 @@
 	pmc_interface_mod.o \
 	subsidence_mod.o \
-	turbulence_closure_mod.o \
 	vertical_nesting_mod.o
 chem_emissions_mod.o: \
@@ -960,5 +961,4 @@
 	netcdf_interface_mod.o \
 	radiation_model_mod.o \
-	turbulence_closure_mod.o \
 	urban_surface_mod.o
 date_and_time_mod.o: \
@@ -1084,6 +1084,5 @@
 	surface_mod.o \
 	surface_data_output_mod.o \
-	synthetic_turbulence_generator_mod.o \
-	turbulence_closure_mod.o
+	synthetic_turbulence_generator_mod.o
 init_advec.o: \
 	mod_kinds.o \
@@ -1406,5 +1405,4 @@
 	surface_mod.o \
 	surface_mod.o \
-	turbulence_closure_mod.o \
 	wind_turbine_model_mod.o
 progress_bar_mod.o: \
@@ -1485,5 +1483,4 @@
 	modules.o \
 	surface_mod.o \
-	turbulence_closure_mod.o \
 	urban_surface_mod.o
 surface_coupler.o: \
Index: palm/trunk/SOURCE/average_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/average_3d_data.f90	(revision 4047)
+++ palm/trunk/SOURCE/average_3d_data.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved tcm_3d_data_averaging to module_interface
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! Modularize diagnostic output
 ! 
@@ -202,7 +205,4 @@
         ONLY:  module_interface_3d_data_averaging
 
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_3d_data_averaging
-
 
 
@@ -563,8 +563,4 @@
 
           CASE DEFAULT
-
-!
-!--          Averaging of data from turbulence closure module
-             CALL tcm_3d_data_averaging( 'average', trimvar )
 !
 !--          Averaging of data from all other modules
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 4047)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved tcm_check_data_output to module_interface
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! Modularize diagnostic output
 ! 
@@ -833,8 +836,4 @@
 
     USE transpose_indices
-
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_check_parameters,                                           &
-               tcm_check_data_output
 
     USE vertical_nesting_mod,                                                  &
@@ -1505,8 +1504,4 @@
        CALL message( 'check_parameters', 'PA0036', 1, 2, 0, 6, 0 )
     ENDIF
-
-!
-!-- tcm_check_parameters must be called before all other module calls
-    CALL tcm_check_parameters
 
 !-- Check the module settings
@@ -3134,6 +3129,4 @@
 
           CASE DEFAULT
-
-             CALL tcm_check_data_output( var, unit )
 !
 !--          Check for other modules
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 4047)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Removed turbulence_closure_mod dependency
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! modularize diagnostic output
 ! 
@@ -358,7 +361,4 @@
         ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win, surf_def_h,           &
                surf_lsm_h, surf_usm_h
-
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_data_output_2d
 
 
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 4047)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved tcm_data_output_3d to module_interface
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! modularize diagnostic output
 ! 
@@ -313,7 +316,4 @@
     USE radiation_model_mod,                                                   &
         ONLY:  nz_urban_b, nz_urban_t
-
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_data_output_3d
 
     USE urban_surface_mod,                                                     &
@@ -718,11 +718,4 @@
 
           CASE DEFAULT
-
-             IF ( .NOT. found )  THEN
-                CALL tcm_data_output_3d( av, trimvar, found, local_pf,   &
-                                         nzb_do, nzt_do )
-                resorted = .TRUE.
-             ENDIF
-
 !
 !--          Quantities of other modules
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 4047)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 4048)
@@ -693,7 +693,4 @@
 
     USE transpose_indices
-
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_init_arrays, tcm_init
 
     IMPLICIT NONE
@@ -1052,7 +1049,4 @@
 
 !
-!-- Initialize arrays for turbulence closure
-    CALL tcm_init_arrays
-!
 !-- Initialize surface arrays
     CALL init_surface_arrays
@@ -1862,8 +1856,4 @@
        CALL message( 'init_3d_model', 'PA0193', 1, 2, 0, 6, 0 )
     ENDIF
-
-!
-!-- Initialize TKE, Kh and Km
-    CALL tcm_init
 
 
Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 4047)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved turbulence_closure_mod calls into this module_interface
+! 
+! 4047 2019-06-21 18:58:09Z knoop
 ! Introduction of the dynamics module
 !
@@ -168,5 +171,14 @@
 
     USE turbulence_closure_mod, &
-        ONLY:  tcm_swap_timelevel
+        ONLY:  tcm_check_parameters, &
+               tcm_check_data_output, &
+               tcm_init_arrays, &
+               tcm_init, &
+               tcm_actions, &
+               tcm_prognostic_equations, &
+               tcm_swap_timelevel, &
+               tcm_3d_data_averaging, &
+               tcm_data_output_2d, &
+               tcm_data_output_3d
 
     USE control_parameters,                                                    &
@@ -659,4 +671,5 @@
 
     CALL dynamics_check_parameters
+    CALL tcm_check_parameters
 
     IF ( bulk_cloud_model )     CALL bcm_check_parameters
@@ -797,4 +810,6 @@
     CALL dynamics_check_data_output( variable, unit )
 
+    CALL tcm_check_data_output( variable, unit )
+
     IF ( unit == 'illegal'  .AND.  biometeorology )  THEN
        CALL bio_check_data_output( variable, unit, i, j, ilen, k )
@@ -946,4 +961,5 @@
 
     CALL dynamics_init_arrays
+    CALL tcm_init_arrays
 
     IF ( bulk_cloud_model    )  CALL bcm_init_arrays
@@ -977,4 +993,5 @@
 
     CALL dynamics_init
+    CALL tcm_init
 
     IF ( biometeorology      )  CALL bio_init
@@ -1074,4 +1091,5 @@
 
     CALL dynamics_actions( location )
+    CALL tcm_actions( location )
 
     IF ( bulk_cloud_model    )  CALL bcm_actions( location )
@@ -1102,4 +1120,5 @@
 
     CALL dynamics_actions( i, j, location )
+    CALL tcm_actions( i, j, location )
 
     IF ( bulk_cloud_model    )  CALL bcm_actions( i, j, location )
@@ -1185,4 +1204,5 @@
 
     CALL dynamics_prognostic_equations
+    CALL tcm_prognostic_equations
 
     IF ( bulk_cloud_model    )  CALL bcm_prognostic_equations
@@ -1210,4 +1230,5 @@
 
     CALL dynamics_prognostic_equations( i, j, i_omp_start, tn )
+    CALL tcm_prognostic_equations( i, j, i_omp_start, tn )
 
     IF ( bulk_cloud_model    )  CALL bcm_prognostic_equations( i, j, i_omp_start, tn )
@@ -1267,4 +1288,5 @@
 
     CALL dynamics_3d_data_averaging( mode, variable )
+    CALL tcm_3d_data_averaging( mode, variable )
 
     IF ( biometeorology      )  CALL bio_3d_data_averaging( mode, variable )
@@ -1315,4 +1337,10 @@
             )
 
+    IF ( .NOT. found )  THEN
+       CALL tcm_data_output_2d(                                                  &
+               av, variable, found, grid, mode, local_pf, nzb_do, nzt_do &
+            )
+    ENDIF
+
     IF ( .NOT. found  .AND.  biometeorology )  THEN
        CALL bio_data_output_2d(                                                &
@@ -1406,4 +1434,9 @@
     CALL dynamics_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do )
     resorted = .FALSE.
+
+    IF ( .NOT. found )  THEN
+       CALL tcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+       resorted = .TRUE.
+    ENDIF
 
     IF ( .NOT. found  .AND.  biometeorology )  THEN
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 4047)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved tcm_prognostic_equations to module_interface
+! 
+! 3987 2019-05-22 09:52:13Z kanani
 ! Introduce alternative switch for debug output during timestepping
 ! 
@@ -480,7 +483,4 @@
                 surf_usm_v
 
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_prognostic_equations
-
     IMPLICIT NONE
 
@@ -1056,7 +1056,4 @@
 
           ENDIF
-!
-!--       Calculate prognostic equations for turbulence closure
-          CALL tcm_prognostic_equations( i, j, i_omp_start, tn )
 !
 !--       Calculate prognostic equations for all other modules
@@ -1768,8 +1765,4 @@
 
     ENDIF
-
-!
-!-- Calculate prognostic equations for turbulence closure
-    CALL tcm_prognostic_equations()
 !
 !-- Calculate prognostic equations for all other modules
Index: palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 4047)
+++ palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved tcm_3d_data_averaging to module_interface
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! Modularize diagnostic output
 ! 
@@ -304,7 +307,4 @@
         ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win,                       &
                surf_def_h, surf_lsm_h, surf_usm_h
-
-    USE turbulence_closure_mod,                                                &
-        ONLY:  tcm_3d_data_averaging
 
     USE urban_surface_mod,                                                     &
@@ -535,8 +535,4 @@
 
              CASE DEFAULT
-
-!
-!--             Allocating and initializing data arrays for turbulence closure module
-                CALL tcm_3d_data_averaging( 'allocate', trimvar )
 
 !
@@ -1191,8 +1187,4 @@
 
 !
-!--          Summing up data from turbulence closure module
-             CALL tcm_3d_data_averaging( 'sum', trimvar )
-
-!
 !--          Summing up data from all other modules
              CALL module_interface_3d_data_averaging( 'sum', trimvar )
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 4047)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 4048)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved production_e_init call into turbulence_closure_mod
+! 
+! 4047 2019-06-21 18:58:09Z knoop
 ! Added remainings of swap_timelevel upon its dissolution
 ! 
@@ -675,5 +678,5 @@
 
     USE turbulence_closure_mod,                                                                    &
-        ONLY:  tcm_diffusivities, production_e_init
+        ONLY:  tcm_diffusivities
 
     USE urban_surface_mod,                                                                         &
@@ -975,5 +978,4 @@
           ENDIF
 
-          IF ( .NOT. constant_diffusion )  CALL production_e_init
           IF ( ( ws_scheme_mom .OR. ws_scheme_sca )  .AND.  intermediate_timestep_count == 1 )     &
           THEN
Index: palm/trunk/SOURCE/turbulence_closure_mod.f90
===================================================================
--- palm/trunk/SOURCE/turbulence_closure_mod.f90	(revision 4047)
+++ palm/trunk/SOURCE/turbulence_closure_mod.f90	(revision 4048)
@@ -274,4 +274,23 @@
     PUBLIC c_0, rans_const_c, rans_const_sigma
 
+    SAVE
+
+    PRIVATE
+
+
+    PUBLIC &
+       tcm_check_parameters, &
+       tcm_check_data_output, &
+       tcm_define_netcdf_grid, &
+       tcm_init_arrays, &
+       tcm_init, &
+       tcm_actions, &
+       tcm_prognostic_equations, &
+       tcm_swap_timelevel, &
+       tcm_3d_data_averaging, &
+       tcm_data_output_2d, &
+       tcm_data_output_3d, &
+       tcm_diffusivities
+
 !
 !-- PALM interfaces:
@@ -294,20 +313,8 @@
 
 !
-!-- Averaging of 3D data for output
-    INTERFACE tcm_3d_data_averaging
-       MODULE PROCEDURE tcm_3d_data_averaging
-    END INTERFACE tcm_3d_data_averaging
-
-!
-!-- Data output of 2D quantities
-    INTERFACE tcm_data_output_2d
-       MODULE PROCEDURE tcm_data_output_2d
-    END INTERFACE tcm_data_output_2d
-
-!
-!-- Data output of 3D data
-    INTERFACE tcm_data_output_3d
-       MODULE PROCEDURE tcm_data_output_3d
-    END INTERFACE tcm_data_output_3d
+!-- Initialization of arrays
+    INTERFACE tcm_init_arrays
+       MODULE PROCEDURE tcm_init_arrays
+    END INTERFACE tcm_init_arrays
 
 !
@@ -318,14 +325,9 @@
 
 !
-!-- Initialization of arrays
-    INTERFACE tcm_init_arrays
-       MODULE PROCEDURE tcm_init_arrays
-    END INTERFACE tcm_init_arrays
-
-!
-!-- Initialization of TKE production term
-    INTERFACE production_e_init
-       MODULE PROCEDURE production_e_init
-    END INTERFACE production_e_init
+!-- Location specific actions
+    INTERFACE tcm_actions
+       MODULE PROCEDURE tcm_actions
+       MODULE PROCEDURE tcm_actions_ij
+    END INTERFACE tcm_actions
 
 !
@@ -337,35 +339,26 @@
 
 !
-!-- Production term for TKE
-    INTERFACE production_e
-       MODULE PROCEDURE production_e
-       MODULE PROCEDURE production_e_ij
-    END INTERFACE production_e
-
-!
-!-- Diffusion term for TKE
-    INTERFACE diffusion_e
-       MODULE PROCEDURE diffusion_e
-       MODULE PROCEDURE diffusion_e_ij
-    END INTERFACE diffusion_e
-
-!
-!-- Diffusion term for TKE dissipation rate
-    INTERFACE diffusion_diss
-       MODULE PROCEDURE diffusion_diss
-       MODULE PROCEDURE diffusion_diss_ij
-    END INTERFACE diffusion_diss
-
-!
-!-- Mixing length for LES case
-    INTERFACE mixing_length_les
-       MODULE PROCEDURE mixing_length_les
-    END INTERFACE mixing_length_les
-
-!
-!-- Mixing length for RANS case
-    INTERFACE mixing_length_rans
-       MODULE PROCEDURE mixing_length_rans
-    END INTERFACE mixing_length_rans
+!-- Swapping of time levels (required for prognostic variables)
+    INTERFACE tcm_swap_timelevel
+       MODULE PROCEDURE tcm_swap_timelevel
+    END INTERFACE tcm_swap_timelevel
+
+!
+!-- Averaging of 3D data for output
+    INTERFACE tcm_3d_data_averaging
+       MODULE PROCEDURE tcm_3d_data_averaging
+    END INTERFACE tcm_3d_data_averaging
+
+!
+!-- Data output of 2D quantities
+    INTERFACE tcm_data_output_2d
+       MODULE PROCEDURE tcm_data_output_2d
+    END INTERFACE tcm_data_output_2d
+
+!
+!-- Data output of 3D data
+    INTERFACE tcm_data_output_3d
+       MODULE PROCEDURE tcm_data_output_3d
+    END INTERFACE tcm_data_output_3d
 
 !
@@ -374,39 +367,4 @@
        MODULE PROCEDURE tcm_diffusivities
     END INTERFACE tcm_diffusivities
-
-!
-!-- Calculate diffusivities
-    INTERFACE tcm_diffusivities_default
-       MODULE PROCEDURE tcm_diffusivities_default
-    END INTERFACE tcm_diffusivities_default
-
-!
-!-- Calculate diffusivities according to dynamic sgs model
-    INTERFACE tcm_diffusivities_dynamic
-       MODULE PROCEDURE tcm_diffusivities_dynamic
-    END INTERFACE tcm_diffusivities_dynamic
-
-!
-!-- Box-filter method for dynamic sgs model
-    INTERFACE tcm_box_filter_2d
-       MODULE PROCEDURE tcm_box_filter_2d_single
-       MODULE PROCEDURE tcm_box_filter_2d_array
-    END INTERFACE tcm_box_filter_2d
-
-!
-!-- Swapping of time levels (required for prognostic variables)
-    INTERFACE tcm_swap_timelevel
-       MODULE PROCEDURE tcm_swap_timelevel
-    END INTERFACE tcm_swap_timelevel
-
-    SAVE
-
-    PRIVATE
-!
-!-- Add INTERFACES that must be available to other modules (alphabetical order)
-    PUBLIC production_e_init, tcm_3d_data_averaging, tcm_check_data_output,    &
-           tcm_check_parameters, tcm_data_output_2d, tcm_data_output_3d,       &
-           tcm_define_netcdf_grid, tcm_diffusivities, tcm_init,                &
-           tcm_init_arrays, tcm_prognostic_equations, tcm_swap_timelevel
 
 
@@ -1923,4 +1881,121 @@
 
 
+!--------------------------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Execute module-specific actions for all grid points
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE tcm_actions( location )
+
+
+    CHARACTER (LEN=*) ::  location !<
+
+!    INTEGER(iwp) ::  i !<
+!    INTEGER(iwp) ::  j !<
+!    INTEGER(iwp) ::  k !<
+
+!
+!-- Here the module-specific actions follow
+!-- No calls for single grid points are allowed at locations before and
+!-- after the timestep, since these calls are not within an i,j-loop
+    SELECT CASE ( location )
+
+       CASE ( 'before_timestep' )
+
+
+       CASE ( 'before_prognostic_equations' )
+
+          IF ( .NOT. constant_diffusion )  CALL production_e_init
+
+
+       CASE ( 'after_integration' )
+
+
+       CASE ( 'after_timestep' )
+
+
+       CASE ( 'u-tendency' )
+
+
+       CASE ( 'v-tendency' )
+
+
+       CASE ( 'w-tendency' )
+
+
+       CASE ( 'pt-tendency' )
+
+
+       CASE ( 'sa-tendency' )
+
+
+       CASE ( 'e-tendency' )
+
+
+       CASE ( 'q-tendency' )
+
+
+       CASE ( 's-tendency' )
+
+
+       CASE DEFAULT
+          CONTINUE
+
+    END SELECT
+
+ END SUBROUTINE tcm_actions
+
+
+!--------------------------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Execute module-specific actions for grid point i,j
+!--------------------------------------------------------------------------------------------------!
+ SUBROUTINE tcm_actions_ij( i, j, location )
+
+
+    CHARACTER (LEN=*) ::  location
+
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  j
+
+!
+!-- Here the module-specific actions follow
+    SELECT CASE ( location )
+
+       CASE ( 'u-tendency' )
+
+!--       Next line is to avoid compiler warning about unused variables. Please remove.
+          IF ( i +  j < 0 )  CONTINUE
+
+       CASE ( 'v-tendency' )
+
+
+       CASE ( 'w-tendency' )
+
+
+       CASE ( 'pt-tendency' )
+
+
+       CASE ( 'sa-tendency' )
+
+
+       CASE ( 'e-tendency' )
+
+
+       CASE ( 'q-tendency' )
+
+
+       CASE ( 's-tendency' )
+
+
+       CASE DEFAULT
+          CONTINUE
+
+    END SELECT
+
+ END SUBROUTINE tcm_actions_ij
+
+
 !------------------------------------------------------------------------------!
 ! Description:
@@ -2205,14 +2280,14 @@
        ENDIF
 
-       CALL production_e( i, j, .FALSE. )
+       CALL production_e_ij( i, j, .FALSE. )
 
        IF ( .NOT. humidity )  THEN
           IF ( ocean_mode )  THEN
-             CALL diffusion_e( i, j, prho, prho_reference )
+             CALL diffusion_e_ij( i, j, prho, prho_reference )
           ELSE
-             CALL diffusion_e( i, j, pt, pt_reference )
+             CALL diffusion_e_ij( i, j, pt, pt_reference )
           ENDIF
        ELSE
-          CALL diffusion_e( i, j, vpt, pt_reference )
+          CALL diffusion_e_ij( i, j, vpt, pt_reference )
        ENDIF
 
@@ -2275,8 +2350,8 @@
 !
 !--    Production of TKE dissipation rate
-       CALL production_e( i, j, .TRUE. )
+       CALL production_e_ij( i, j, .TRUE. )
 !
 !--    Diffusion term of TKE dissipation rate
-       CALL diffusion_diss( i, j )
+       CALL diffusion_diss_ij( i, j )
 !
 !--    Additional sink term for flows through plant canopies
@@ -4012,5 +4087,5 @@
 !> Vector-optimized version
 !------------------------------------------------------------------------------!
- SUBROUTINE diffusion_diss()
+ SUBROUTINE diffusion_diss
     USE arrays_3d,                                                             &
         ONLY:  ddzu, ddzw, drho_air, rho_air_zw
@@ -4702,7 +4777,7 @@
 !
 !-- velocities on grid centers:
-    CALL tcm_box_filter_2d( u, ut )
-    CALL tcm_box_filter_2d( v, vt )
-    CALL tcm_box_filter_2d( w, wt )
+    CALL tcm_box_filter_2d_array( u, ut )
+    CALL tcm_box_filter_2d_array( v, vt )
+    CALL tcm_box_filter_2d_array( w, wt )
 
     DO  i = nxl, nxr
@@ -4787,13 +4862,13 @@
              ENDDO
 
-             CALL tcm_box_filter_2d( uc, uct )
-             CALL tcm_box_filter_2d( vc, vct )
-             CALL tcm_box_filter_2d( wc, wct )
-             CALL tcm_box_filter_2d( uc**2, u2t )
-             CALL tcm_box_filter_2d( vc**2, v2t )
-             CALL tcm_box_filter_2d( wc**2, w2t )
-             CALL tcm_box_filter_2d( uc*vc, uvt )
-             CALL tcm_box_filter_2d( uc*wc, uwt )
-             CALL tcm_box_filter_2d( vc*wc, vwt )
+             CALL tcm_box_filter_2d_single( uc, uct )
+             CALL tcm_box_filter_2d_single( vc, vct )
+             CALL tcm_box_filter_2d_single( wc, wct )
+             CALL tcm_box_filter_2d_single( uc**2, u2t )
+             CALL tcm_box_filter_2d_single( vc**2, v2t )
+             CALL tcm_box_filter_2d_single( wc**2, w2t )
+             CALL tcm_box_filter_2d_single( uc*vc, uvt )
+             CALL tcm_box_filter_2d_single( uc*wc, uwt )
+             CALL tcm_box_filter_2d_single( vc*wc, vwt )
 
              ld11 = u2t - uct*uct
