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
