Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 2835)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 2836)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! dt_dopr_listing is set to the default value zero 
+! 
+! 2817 2018-02-19 16:32:21Z knoop
 ! Preliminary gust module interface implemented
 ! 
@@ -2316,4 +2319,10 @@
 
 !
+!-- Set the default interval at which data of vertical profiles shall be output
+    IF ( dt_dopr_listing == 9999999.9_wp )  THEN
+       dt_dopr_listing = 0.0_wp
+    ENDIF
+
+!
 !-- Set the default interval for the output of timeseries to a reasonable
 !-- value (tries to minimize the number of calls of flow_statistics)
Index: palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 2835)
+++ palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 2836)
@@ -25,7 +25,8 @@
 ! -----------------
 ! $Id$
-! Variable synthetic_turbulence_generator use_synthetic_turbulence_generator has
-! been abbreviated + syn_turb_gen_prerun flag is used to define if module 
-! related parameters were outputted as restart data 
+! The variables synthetic_turbulence_generator and 
+! use_synthetic_turbulence_generator have been abbreviated + syn_turb_gen_prerun
+! flag is used to define if module related parameters were outputted as restart
+! data 
 ! 
 ! 2716 2017-12-29 16:35:59Z kanani
Index: palm/trunk/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 2835)
+++ palm/trunk/SOURCE/wind_turbine_model_mod.f90	(revision 2836)
@@ -26,4 +26,9 @@
 ! -----------------
 ! $Id$
+! Bugfix in interpolation of lift and drag coefficients on fine grid of radius 
+! segments and angles of attack, speed-up of the initialization of the wind 
+! turbine model 
+! 
+! 2792 2018-02-07 06:45:29Z Giersch
 ! omega_rot_l has to be calculated after determining the indices for the hub in
 ! case of restart runs
@@ -1406,67 +1411,77 @@
 
 !
-!--    For each possible radial position (resolution: 0.1 m --> 630 values) and
-!--    each possible angle of attack (resolution: 0.01 degrees --> 36000 values!)
+!--    For each possible radial position (resolution: 0.1 m --> 631 values if rr(1)=63m)
+!--    and each possible angle of attack (resolution: 0.1 degrees --> 3601 values!)
 !--    determine the lift and drag coefficient by interpolating between the
 !--    tabulated values of each table (interpolate to current angle of attack)
 !--    and between the tables (interpolate to current radial position):
 
-       ALLOCATE( turb_cl_sel1(0:dlenbl) )  
-       ALLOCATE( turb_cl_sel2(0:dlenbl) )  
-       ALLOCATE( turb_cd_sel1(0:dlenbl) )
-       ALLOCATE( turb_cd_sel2(0:dlenbl) )
+       ALLOCATE( turb_cl_sel1(1:dlenbl) )  
+       ALLOCATE( turb_cl_sel2(1:dlenbl) )  
+       ALLOCATE( turb_cd_sel1(1:dlenbl) )
+       ALLOCATE( turb_cd_sel2(1:dlenbl) )
 
        radres     = INT( rr(1) * 10.0_wp ) + 1_iwp
        dlenbl_int = INT( 360.0_wp / accu_cl_cd_tab ) + 1_iwp
 
-
-       ALLOCATE( turb_cl_tab(0:dlenbl_int,1:radres) )
-       ALLOCATE( turb_cd_tab(0:dlenbl_int,1:radres) )
-
+       ALLOCATE( turb_cl_tab(1:dlenbl_int,1:radres) )
+       ALLOCATE( turb_cd_tab(1:dlenbl_int,1:radres) )
 
        DO iir = 1, radres ! loop over radius
 
-          DO iialpha = 1, dlenbl_int  ! loop over angles
-
-             cur_r = ( iir - 1_iwp ) * 0.1_wp             
+          cur_r = ( iir - 1_iwp ) * 0.1_wp
+!
+!--       Find position in table 1
+          lct = MINLOC( ABS( trad1 - cur_r ) )
+!             lct(1) = lct(1)
+
+          IF ( ( trad1(lct(1)) - cur_r ) .GT. 0.0 )  THEN
+             lct(1) = lct(1) - 1
+          ENDIF
+
+          trow = lct(1)
+!
+!--       Calculate weights for radius interpolation
+          weight_a = ( trad2(trow) - cur_r ) / ( trad2(trow) - trad1(trow) )
+          weight_b = ( cur_r - trad1(trow) ) / ( trad2(trow) - trad1(trow) )
+          t1 = ttoint1(trow)
+          t2 = ttoint2(trow)
+
+          IF ( t1 .EQ. t2 ) THEN  ! if both are the same, the weights are NaN
+             weight_a = 0.5_wp    ! then do interpolate in between same twice
+             weight_b = 0.5_wp    ! using 0.5 as weight
+          ENDIF
+
+          IF ( t1 == 0 .AND. t2 == 0 ) THEN
+             turb_cd_sel1 = 0.0_wp
+             turb_cd_sel2 = 0.0_wp
+             turb_cl_sel1 = 0.0_wp
+             turb_cl_sel2 = 0.0_wp
+
+             turb_cd_tab(1,iir) = 0.0_wp  ! For -180Â° (iialpha=1) the values    
+             turb_cl_tab(1,iir) = 0.0_wp  ! for each radius has to be set
+                                          ! explicitly              
+          ELSE
+             turb_cd_sel1 = turb_cd_table(:,t1)
+             turb_cd_sel2 = turb_cd_table(:,t2)
+             turb_cl_sel1 = turb_cl_table(:,t1)
+             turb_cl_sel2 = turb_cl_table(:,t2)
+!
+!--          For -180Â° (iialpha=1) the values for each radius has to be set 
+!--          explicitly 
+             turb_cd_tab(1,iir) = ( weight_a * turb_cd_table(1,t1) + weight_b  & 
+                                  * turb_cd_table(1,t2) )    
+             turb_cl_tab(1,iir) = ( weight_a * turb_cl_table(1,t1) + weight_b  & 
+                                  * turb_cl_table(1,t2) ) 
+          ENDIF
+
+          DO iialpha = 2, dlenbl_int  ! loop over angles
+             
              alpha_attack_i = -180.0_wp + REAL( iialpha-1 ) * accu_cl_cd_tab
              ialpha = 1
-
+             
              DO WHILE ( ( alpha_attack_i > alpha_attack_tab(ialpha) ) .AND. (ialpha <= dlen ) )
                 ialpha = ialpha + 1
              ENDDO
-!
-!--          Find position in table
-             lct = MINLOC( ABS( trad1 - cur_r ) )
-!                lct(1) = lct(1)
-
-             IF ( ( trad1(lct(1)) - cur_r ) .GT. 0.0 )  THEN
-                lct(1) = lct(1) - 1
-             ENDIF
-
-             trow = lct(1)
-!
-!--          Calculate weights for interpolation
-             weight_a = ( trad2(trow) - cur_r ) / ( trad2(trow) - trad1(trow) )
-             weight_b = ( cur_r - trad1(trow) ) / ( trad2(trow) - trad1(trow) )
-             t1 = ttoint1(trow)
-             t2 = ttoint2(trow)
-
-             IF ( t1 .EQ. t2 ) THEN  ! if both are the same, the weights are NaN
-                weight_a = 0.5_wp    ! then do interpolate in between same twice
-                weight_b = 0.5_wp    ! using 0.5 as weight
-             ENDIF
-
-             IF ( t1 == 0 .AND. t2 == 0 ) THEN
-                turb_cd_sel1 = 0.0_wp
-                turb_cd_sel2 = 0.0_wp
-                turb_cl_sel1 = 0.0_wp
-                turb_cl_sel2 = 0.0_wp
-             ELSE
-                turb_cd_sel1 = turb_cd_table(:,t1)
-                turb_cd_sel2 = turb_cd_table(:,t2)
-                turb_cl_sel1 = turb_cl_table(:,t1)
-                turb_cl_sel2 = turb_cl_table(:,t2)
-             ENDIF
 
 !
@@ -1497,9 +1512,10 @@
                                         ( weight_a * turb_cd_sel1(ialpha) +    &
                                           weight_b * turb_cd_sel2(ialpha) )
-   
+            
           ENDDO   ! end loop over angles of attack
-
+          
        ENDDO   ! end loop over radius
-    
+
+
     END SUBROUTINE wtm_read_blade_tables
 
@@ -2016,8 +2032,8 @@
 !--                Determine index of current angle of attack, needed for
 !--                finding the appropriate interpolated values of the lift and
-!--                drag coefficients (-180.0 degrees = 0, +180.0 degrees = 36000,
-!--                so one index every 0.01 degrees):
+!--                drag coefficients (-180.0 degrees = 1, +180.0 degrees = 3601,
+!--                so one index every 0.1 degrees):
                    iialpha = CEILING( ( alpha_attack(rseg) + 180.0_wp )        &
-                                      * ( 1.0_wp / accu_cl_cd_tab ) )
+                                      * ( 1.0_wp / accu_cl_cd_tab ) ) + 1.0_wp
 !
 !--                Determine index of current radial position, needed for
