Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 3832)
+++ 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
