Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 4182)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 4183)
@@ -25,4 +25,8 @@
 ! -----------------
 ! 4172 2019-08-20 11:55:33Z oliver.maas
+! removed conversion from recycle_absolute_quantities to raq, added check and 
+! error message for correct input of recycling_method_for_thermodynamic_quantities
+! 
+! 11:55:33Z oliver.maas
 ! Corrected "Former revisions" section
 ! 
@@ -164,5 +168,4 @@
     INTEGER(iwp) ::  k                               !< loop index
     INTEGER(iwp) ::  kk                              !< loop index
-    INTEGER(iwp) ::  r                               !< loop index
     INTEGER(iwp) ::  mid                             !< masked output running index
     INTEGER(iwp) ::  netcdf_data_format_save         !< initial value of netcdf_data_format
@@ -2928,6 +2931,9 @@
 
 !
-!-- In case of turbulent inflow calculate the index of the recycling plane
+!-- In case of turbulent inflow
     IF ( turbulent_inflow )  THEN
+
+!
+!--    Calculate the index of the recycling plane
        IF ( recycling_width <= dx  .OR.  recycling_width >= nx * dx )  THEN
           WRITE( message_string, * )  'illegal value for recycling_width: ',   &
@@ -2948,21 +2954,12 @@
 
 !
-!--    Convert recycle_absolute_quantities (list of strings that define the quantities for 
-!--    absolute recycling) to raq (list of logicals with length 7 corresponding to u,v,w,pt,e,q,s). 
-!--    Output error message for not implemented quantities.
-       DO r = LBOUND( recycle_absolute_quantities, 1 ), UBOUND( recycle_absolute_quantities, 1 )
-          SELECT CASE ( TRIM( recycle_absolute_quantities(r) ) )
-             CASE ( 'theta' )
-                raq(4) = .TRUE.
-             CASE ( 'q' )
-                raq(6) = .TRUE.
-             CASE ( '' )
-                CONTINUE
-             CASE DEFAULT
-                message_string = 'absolute recycling not implemented for variable ' // &
-                TRIM( recycle_absolute_quantities(r) )
-                CALL message( 'inflow_turbulence', 'PA0184', 1, 2, 0, 6, 0 )
-          END SELECT
-       ENDDO
+!--   Check for correct input of recycling method for thermodynamic quantities
+       IF ( TRIM( recycling_method_for_thermodynamic_quantities ) /= 'turbulent_fluctuation' .AND. &
+            TRIM( recycling_method_for_thermodynamic_quantities ) /= 'absolute_value' )  THEN
+          WRITE( message_string, * )  'unknown recycling method for thermodynamic quantities: ',   &
+               TRIM( recycling_method_for_thermodynamic_quantities )
+          CALL message( 'check_parameters', 'PA0184', 1, 2, 0, 6, 0 )
+       ENDIF
+
     ENDIF
 
Index: palm/trunk/SOURCE/inflow_turbulence.f90
===================================================================
--- palm/trunk/SOURCE/inflow_turbulence.f90	(revision 4182)
+++ palm/trunk/SOURCE/inflow_turbulence.f90	(revision 4183)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! simplified steering of recycling of absolute values by initialization 
+! parameter recycling_method_for_thermodynamic_quantities
+! 
+! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
 ! 
@@ -47,5 +51,6 @@
         
     USE control_parameters,                                                    &
-        ONLY:  humidity, passive_scalar, recycling_plane, recycling_yshift, raq
+        ONLY:  humidity, passive_scalar, recycling_plane, recycling_yshift,    &
+               recycling_method_for_thermodynamic_quantities
         
     USE cpulog,                                                                &
@@ -156,19 +161,22 @@
           DO  j = nysg, nyng
              DO  k = nzb, nzt + 1
-
                 inflow_dist(k,j,1,l) = u(k,j,i+1) - avpr(k,1,l)
                 inflow_dist(k,j,2,l) = v(k,j,i)   - avpr(k,2,l)
                 inflow_dist(k,j,3,l) = w(k,j,i)   - avpr(k,3,l)
-                IF ( raq(4) )  THEN
+                IF ( TRIM( recycling_method_for_thermodynamic_quantities )     &
+                   == 'turbulent_fluctuation' )  THEN
+                   inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l)
+                ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities ) &
+                   == 'absolute_value' )  THEN
                    inflow_dist(k,j,4,l) = pt(k,j,i)
-                ELSE
-                   inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l)
                 ENDIF
                 inflow_dist(k,j,5,l) = e(k,j,i)   - avpr(k,5,l)
                 IF ( humidity ) THEN
-                   IF ( raq(6) ) THEN
+                   IF ( TRIM( recycling_method_for_thermodynamic_quantities )  &
+                      == 'turbulent_fluctuation' )  THEN
+                      inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
+                   ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities )  &
+                      == 'absolute_value' )  THEN
                       inflow_dist(k,j,6,l) = q(k,j,i)
-                   ELSE
-                      inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
                    ENDIF
                 ENDIF
@@ -188,15 +196,19 @@
              inflow_dist(k,j,2,l) = v(k,j,i)   - avpr(k,2,l)
              inflow_dist(k,j,3,l) = w(k,j,i)   - avpr(k,3,l)
-             IF ( raq(4) )  THEN
+             IF ( TRIM( recycling_method_for_thermodynamic_quantities )        &
+                   == 'turbulent_fluctuation' )  THEN
+                inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l)
+             ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities )    &
+                   == 'absolute_value' )  THEN
                 inflow_dist(k,j,4,l) = pt(k,j,i)
-             ELSE
-                inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 
              ENDIF
              inflow_dist(k,j,5,l) = e(k,j,i)   - avpr(k,5,l)
              IF ( humidity )  THEN
-                IF ( raq(6) ) THEN
+                IF ( TRIM( recycling_method_for_thermodynamic_quantities )     &
+                      == 'turbulent_fluctuation' )  THEN
+                   inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
+                ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities ) &
+                      == 'absolute_value' )  THEN
                    inflow_dist(k,j,6,l) = q(k,j,i)
-                ELSE
-                   inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
                 ENDIF
              ENDIF
@@ -264,31 +276,35 @@
           DO  k = nzb, nzt + 1
 
-             u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) +                 &
+             u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) +                    &
                         inflow_dist(k,j,1,1:nbgp) * inflow_damping_factor(k)
-             v(k,j,-nbgp:-1)  = mean_inflow_profiles(k,2) +                 &
+             v(k,j,-nbgp:-1)  = mean_inflow_profiles(k,2) +                    &
                         inflow_dist(k,j,2,1:nbgp) * inflow_damping_factor(k)
-             w(k,j,-nbgp:-1)  =                                             &
+             w(k,j,-nbgp:-1)  =                                                &
                         inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k)
-             IF ( raq(4) )  THEN
+             IF ( TRIM( recycling_method_for_thermodynamic_quantities )        &
+                   == 'turbulent_fluctuation' )  THEN
+                pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) +                 &
+                inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k)
+             ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities )    &
+                   == 'absolute_value' )  THEN
                 pt(k,j,-nbgp:-1) = inflow_dist(k,j,4,1:nbgp)
-             ELSE
-                pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) +               &
-                inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k)
              ENDIF
-             e(k,j,-nbgp:-1)  = mean_inflow_profiles(k,5) +                  &
+             e(k,j,-nbgp:-1)  = mean_inflow_profiles(k,5) +                    &
                         inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k)
              e(k,j,-nbgp:-1)  = MAX( e(k,j,-nbgp:-1), 0.0_wp )
-
              IF ( humidity )  THEN
-                IF ( raq(6) )  THEN
+                IF ( TRIM( recycling_method_for_thermodynamic_quantities )     &
+                      == 'turbulent_fluctuation' )  THEN
+                   q(k,j,-nbgp:-1)  = mean_inflow_profiles(k,6) +              & 
+                      inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k)
+                ELSEIF ( TRIM( recycling_method_for_thermodynamic_quantities ) &
+                      == 'absolute_value' )  THEN
                    q(k,j,-nbgp:-1)  = inflow_dist(k,j,6,1:nbgp)
-                ELSE 
-                   q(k,j,-nbgp:-1)  = mean_inflow_profiles(k,6) +           & 
-                        inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k)
                 ENDIF
              ENDIF
-             IF ( passive_scalar )                                          &
-                s(k,j,-nbgp:-1)  = mean_inflow_profiles(k,7) +              &
+             IF ( passive_scalar )                                             &
+                s(k,j,-nbgp:-1)  = mean_inflow_profiles(k,7) +                 &
                         inflow_dist(k,j,7,1:nbgp) * inflow_damping_factor(k)
+                        
           ENDDO
        ENDDO
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 4182)
+++ palm/trunk/SOURCE/modules.f90	(revision 4183)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! removed recycle_absolute_quantities and raq
+! added recycling_method_for_thermodynamic_quantities
+! 
+! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
 ! 
@@ -496,4 +500,5 @@
     CHARACTER (LEN=20)   ::  mixing_length_1d = 'blackadar'               !< namelist parameter
     CHARACTER (LEN=20)   ::  random_generator = 'random-parallel'         !< namelist parameter
+    CHARACTER (LEN=20)   ::  recycling_method_for_thermodynamic_quantities = 'turbulent_fluctuation'        !< namelist parameter
     CHARACTER (LEN=20)   ::  reference_state = 'initial_profile'          !< namelist parameter  
     CHARACTER (LEN=20)   ::  timestep_scheme = 'runge-kutta-3'            !< namelist parameter       
@@ -527,6 +532,4 @@
     CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) ::  do3d = ' '  !< label array for 3d output quantities
 
-    CHARACTER (LEN=varnamelength), DIMENSION(7) :: recycle_absolute_quantities = ' '    !< namelist parameter
-    
     INTEGER(iwp), PARAMETER ::  fl_max = 500     !< maximum number of virtual-flight measurements
     INTEGER(iwp), PARAMETER ::  var_fl_max = 20  !< maximum number of different sampling variables in virtual flight measurements
@@ -764,7 +767,5 @@
 
     LOGICAL, DIMENSION(max_masks) ::  mask_surface = .FALSE.   !< flag for surface-following masked output
-    
-    LOGICAL, DIMENSION(7) ::  raq = .FALSE.                    !< recycle absolute quantities (u,v,w,theta,e,q,s) in inflow_turbulence
-    
+
     REAL(wp) ::  advected_distance_x = 0.0_wp                  !< advected distance of model domain along x 
                                                                !< (galilei transformation) 
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 4182)
+++ palm/trunk/SOURCE/parin.f90	(revision 4183)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! replaced recycle_absolute_quantities by recycling_method_for_thermodynamic_quantities
+! 
+! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
 ! 
@@ -254,5 +257,6 @@
              random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
              rayleigh_damping_factor, rayleigh_damping_height,                 &
-             recycling_width, recycling_yshift, recycle_absolute_quantities,   &
+             recycling_width, recycling_yshift,                                &
+             recycling_method_for_thermodynamic_quantities,                    &
              reference_state, residual_limit,                                  &
              roughness_length, scalar_advec,                                   &
