Index: palm/trunk/SOURCE/Makefile
===================================================================
--- palm/trunk/SOURCE/Makefile	(revision 3874)
+++ palm/trunk/SOURCE/Makefile	(revision 3875)
@@ -1705,6 +1705,5 @@
 	vertical_nesting_mod.o \
 	virtual_flight_mod.o \
-	virtual_measurement_mod.o \
-	wind_turbine_model_mod.o
+	virtual_measurement_mod.o
 time_integration_spinup.o: \
 	basic_constants_and_equations_mod.o \
Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 3874)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 3875)
@@ -361,4 +361,5 @@
                wtm_init_arrays,                                                &
                wtm_init,                                                       &
+               wtm_actions,                                                    &
                wtm_rrd_global,                                                 &
                wtm_wrd_global
@@ -891,4 +892,5 @@
     IF ( ocean_mode          )  CALL ocean_actions( location )
     IF ( salsa               )  CALL salsa_actions( location )
+    IF ( wind_turbine        )  CALL wtm_actions( location )
     IF ( user_module_enabled )  CALL user_actions( location )
 
@@ -914,4 +916,5 @@
     IF ( ocean_mode          )  CALL ocean_actions( i, j, location )
     IF ( salsa               )  CALL salsa_actions( i, j, location )
+    IF ( wind_turbine        )  CALL wtm_actions( i, j, location )
     IF ( user_module_enabled )  CALL user_actions( i, j, location )
 
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 3874)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 3875)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved wtm_tendencies to module_interface_actions
+! 
+! 3874 2019-04-08 16:53:48Z knoop
 ! Added non_transport_physics module interfaces and moved bcm code into it
 ! 
@@ -475,7 +478,4 @@
         ONLY:  tcm_prognostic_equations
 
-    USE wind_turbine_model_mod,                                                &
-        ONLY:  wtm_tendencies
-
     IMPLICIT NONE
 
@@ -722,8 +722,4 @@
 !--          Effect of Stokes drift (in ocean mode only)
              IF ( stokes_force )  CALL stokes_drift_terms( i, j, 1 )
-
-!
-!--          Forces by wind turbines
-             IF ( wind_turbine )  CALL wtm_tendencies( i, j, 1 )
 
              CALL module_interface_actions( i, j, 'u-tendency' )
@@ -806,8 +802,4 @@
              IF ( stokes_force )  CALL stokes_drift_terms( i, j, 2 )
 
-!
-!--          Forces by wind turbines
-             IF ( wind_turbine )  CALL wtm_tendencies( i, j, 2 )
-
              CALL module_interface_actions( i, j, 'v-tendency' )
 !
@@ -885,8 +877,4 @@
           IF ( stokes_force )  CALL stokes_drift_terms( i, j, 3 )
 
-!
-!--       Forces by wind turbines
-          IF ( wind_turbine )  CALL wtm_tendencies( i, j, 3 )
-
           CALL module_interface_actions( i, j, 'w-tendency' )
 !
@@ -1342,8 +1330,4 @@
 !-- Effect of Stokes drift (in ocean mode only)
     IF ( stokes_force )  CALL stokes_drift_terms( 1 )
-
-!
-!-- Forces by wind turbines
-    IF ( wind_turbine )  CALL wtm_tendencies( 1 )
 
     CALL module_interface_actions( 'u-tendency' )
@@ -1450,8 +1434,4 @@
     IF ( stokes_force )  CALL stokes_drift_terms( 2 )
 
-!
-!-- Forces by wind turbines
-    IF ( wind_turbine )  CALL wtm_tendencies( 2 )
-
     CALL module_interface_actions( 'v-tendency' )
 
@@ -1553,8 +1533,4 @@
     IF ( stokes_force )  CALL stokes_drift_terms( 3 )
 
-!
-!-- Forces by wind turbines
-    IF ( wind_turbine )  CALL wtm_tendencies( 3 )
-
     CALL module_interface_actions( 'w-tendency' )
 
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 3874)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 3875)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Moved wtm_forces to module_interface_actions
+! 
+! 3872 2019-04-08 15:03:06Z knoop
 ! Modifications made for salsa:
 ! - Call salsa_emission_update at each time step but do the checks within
@@ -536,5 +539,5 @@
                turbulent_inflow, turbulent_outflow, urban_surface,                                 &
                use_initial_profile_as_reference, use_single_reference_value, u_gtrans, v_gtrans,   &
-               virtual_flight, virtual_measurement, wind_turbine, ws_scheme_mom, ws_scheme_sca
+               virtual_flight, virtual_measurement, ws_scheme_mom, ws_scheme_sca
 
     USE cpulog,                                                                                    &
@@ -643,7 +646,4 @@
     USE virtual_measurement_mod,                                                                   &
         ONLY:  vm_data_output, vm_sampling, vm_time_start
-
-    USE wind_turbine_model_mod,                                                                    &
-        ONLY:  wtm_forces
 
 
@@ -894,8 +894,4 @@
 !--    Execute alle other module actions routunes
        CALL module_interface_actions( 'before_timestep' )
-
-!
-!--    Calculate forces by wind turbines
-       IF ( wind_turbine )  CALL wtm_forces  
        
 !
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 3874)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 3875)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Addaped wtm_tendency to fit the module actions interface
+! 
+! 3832 2019-03-28 13:16:58Z raasch
 ! instrumented with openmp directives
 ! 
@@ -463,16 +466,8 @@
     END INTERFACE wtm_parin
 
-    INTERFACE wtm_wrd_global 
-       MODULE PROCEDURE wtm_wrd_global 
-    END INTERFACE wtm_wrd_global
-
-    INTERFACE wtm_rrd_global 
-       MODULE PROCEDURE wtm_rrd_global
-    END INTERFACE wtm_rrd_global 
-    
     INTERFACE wtm_check_parameters
        MODULE PROCEDURE wtm_check_parameters
     END INTERFACE wtm_check_parameters
-        
+
     INTERFACE wtm_init_arrays
        MODULE PROCEDURE wtm_init_arrays
@@ -482,34 +477,27 @@
        MODULE PROCEDURE wtm_init
     END INTERFACE wtm_init
-    
-    INTERFACE wtm_read_blade_tables
-       MODULE PROCEDURE wtm_read_blade_tables
-    END INTERFACE wtm_read_blade_tables
-           
-    INTERFACE wtm_forces
-       MODULE PROCEDURE wtm_forces
-    END INTERFACE wtm_forces
-
-    INTERFACE wtm_yawcontrol
-       MODULE PROCEDURE wtm_yawcontrol
-    END INTERFACE wtm_yawcontrol
-    
-    INTERFACE wtm_rotate_rotor
-       MODULE PROCEDURE wtm_rotate_rotor
-    END INTERFACE wtm_rotate_rotor
-    
-    INTERFACE wtm_speed_control
-       MODULE PROCEDURE wtm_init_speed_control
-       MODULE PROCEDURE wtm_speed_control
-    END INTERFACE wtm_speed_control
-
-    INTERFACE wtm_tendencies
-       MODULE PROCEDURE wtm_tendencies
-       MODULE PROCEDURE wtm_tendencies_ij
-    END INTERFACE wtm_tendencies
-    
-    
-    PUBLIC wtm_check_parameters, wtm_forces, wtm_init, wtm_init_arrays,        &
-           wtm_parin, wtm_wrd_global, wtm_rrd_global, wtm_tendencies
+
+    INTERFACE wtm_actions
+       MODULE PROCEDURE wtm_actions
+       MODULE PROCEDURE wtm_actions_ij
+    END INTERFACE wtm_actions
+
+    INTERFACE wtm_rrd_global
+       MODULE PROCEDURE wtm_rrd_global
+    END INTERFACE wtm_rrd_global
+
+    INTERFACE wtm_wrd_global
+       MODULE PROCEDURE wtm_wrd_global
+    END INTERFACE wtm_wrd_global
+
+
+    PUBLIC                                                                     &
+           wtm_parin,                                                          &
+           wtm_check_parameters,                                               &
+           wtm_init_arrays,                                                    &
+           wtm_init,                                                           &
+           wtm_actions,                                                        &
+           wtm_rrd_global,                                                     &
+           wtm_wrd_global
 
 
@@ -1085,5 +1073,5 @@
        IF ( speed_control)  THEN
        
-          CALL wtm_speed_control
+          CALL wtm_init_speed_control
 
           IF ( TRIM( initializing_actions ) == 'read_restart_data' ) THEN
@@ -2771,10 +2759,9 @@
 !> Call for all grid points
 !------------------------------------------------------------------------------!
-    SUBROUTINE wtm_tendencies( component )
-
-    
-       IMPLICIT NONE
-
-       INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
+    SUBROUTINE wtm_actions( location )
+
+
+       CHARACTER (LEN=*) ::  location !<
+
        INTEGER(iwp) ::  i           !< running index
        INTEGER(iwp) ::  j           !< running index
@@ -2782,7 +2769,11 @@
 
 
-       SELECT CASE ( component )
-
-       CASE ( 1 )
+       SELECT CASE ( location )
+
+       CASE ( 'before_timestep' )
+
+          CALL wtm_forces
+
+       CASE ( 'u-tendency' )
 !
 !--       Apply the x-component of the force to the u-component of the flow:
@@ -2807,5 +2798,5 @@
           ENDIF
 
-       CASE ( 2 )
+       CASE ( 'v-tendency' )
 !
 !--       Apply the y-component of the force to the v-component of the flow:
@@ -2827,5 +2818,5 @@
           ENDIF
 
-       CASE ( 3 )
+       CASE ( 'w-tendency' )
 !
 !--       Apply the z-component of the force to the w-component of the flow:
@@ -2845,11 +2836,11 @@
        CASE DEFAULT
 
-          WRITE( message_string, * ) 'unknown prognostic variable: ', component
-          CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 ) 
+          WRITE( message_string, * ) 'unknown prognostic variable: ', TRIM( location )
+          CALL message( 'wtm_actions', 'PA04??', 1, 2, 0, 6, 0 )
 
        END SELECT
 
 
-    END SUBROUTINE wtm_tendencies
+    END SUBROUTINE wtm_actions
 
 
@@ -2861,17 +2852,19 @@
 !> Call for grid point i,j
 !------------------------------------------------------------------------------!
-    SUBROUTINE wtm_tendencies_ij( i, j, component )
-
-
-       IMPLICIT NONE
-
-       INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
+    SUBROUTINE wtm_actions_ij( i, j, location )
+
+
+       CHARACTER (LEN=*) ::  location !<
        INTEGER(iwp) ::  i           !< running index
        INTEGER(iwp) ::  j           !< running index
        INTEGER(iwp) ::  k           !< running index
 
-       SELECT CASE ( component )
-
-       CASE ( 1 )
+       SELECT CASE ( location )
+
+       CASE ( 'before_timestep' )
+
+          CALL wtm_forces
+
+       CASE ( 'u-tendency' )
 !
 !--       Apply the x-component of the force to the u-component of the flow:
@@ -2891,5 +2884,5 @@
           ENDIF
 
-       CASE ( 2 )
+       CASE ( 'v-tendency' )
 !
 !--       Apply the y-component of the force to the v-component of the flow:
@@ -2907,5 +2900,5 @@
           ENDIF
 
-       CASE ( 3 )
+       CASE ( 'w-tendency' )
 !
 !--       Apply the z-component of the force to the w-component of the flow:
@@ -2921,11 +2914,11 @@
        CASE DEFAULT
 
-          WRITE( message_string, * ) 'unknown prognostic variable: ', component
-          CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 ) 
+          WRITE( message_string, * ) 'unknown prognostic variable: ', TRIM( location )
+          CALL message( 'wtm_actions', 'PA04??', 1, 2, 0, 6, 0 )
 
        END SELECT
 
 
-    END SUBROUTINE wtm_tendencies_ij
+    END SUBROUTINE wtm_actions_ij
 
  END MODULE wind_turbine_model_mod
