Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 4300)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! 4172 2019-08-20 11:55:33Z oliver.maas
+! removed message PA0421, concerning old parameter recycling_yshift
+! 
+! 11:55:33Z oliver.maas
 ! adjust message to the modified parameter recycling_yshift
 ! 
@@ -2974,13 +2977,4 @@
        recycling_plane = recycling_width / dx
 !
-!--    recycling_yshift will have no effect with only one pe in y-direction
-!--    is possible if there is only one PE in y direction.
-       IF ( ( recycling_yshift /= 0 ) .AND. pdims(2) < 2 )  THEN
-          WRITE( message_string, * )  'recycling_yshift will have no '  //     &
-                                      'effect with only one pe in y-direction.'
-          CALL message( 'check_parameters', 'PA0421', 0, 0, 0, 6, 0 )
-       ENDIF
-
-!
 !--   Check for correct input of recycling method for thermodynamic quantities
        IF ( TRIM( recycling_method_for_thermodynamic_quantities ) /= 'turbulent_fluctuation' .AND. &
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 4300)
+++ palm/trunk/SOURCE/header.f90	(revision 4301)
@@ -20,9 +20,11 @@
 ! Current revisions:
 ! -----------------
-! 
+! replaced recycling_yshift by y_shift
 ! 
 ! Former revisions:
 ! -----------------
 ! $Id$
+!
+! 4297 2019-11-21 10:37:50Z oliver.maas
 ! Adjusted format for simulated time and related quantities
 ! 
@@ -926,9 +928,9 @@
        WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
        IF ( turbulent_inflow )  THEN
-          IF ( recycling_yshift == 0 ) THEN
+          IF ( y_shift == 0 ) THEN
              WRITE ( io, 319 )  recycling_width, recycling_plane, &
                                 inflow_damping_height, inflow_damping_width
           ELSE
-             WRITE ( io, 322 )  recycling_yshift, recycling_width, recycling_plane, &
+             WRITE ( io, 322 )  y_shift, recycling_width, recycling_plane, &
                                 inflow_damping_height, inflow_damping_width
           END IF
@@ -1741,5 +1743,5 @@
               ' ----------------')
 322 FORMAT ('       turbulence recycling at inflow switched on'/ &
-            '       y shift of the recycled inflow turbulence is',I3,' PE'/ &
+            '       y-shift of the recycled inflow turbulence is',I3,' PE'/ &
             '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
             '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
Index: palm/trunk/SOURCE/inflow_turbulence.f90
===================================================================
--- palm/trunk/SOURCE/inflow_turbulence.f90	(revision 4300)
+++ palm/trunk/SOURCE/inflow_turbulence.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! use y_shift instead of old parameter recycling_yshift
+! 
+! 4297 2019-11-21 10:37:50Z oliver.maas
 ! changed recycling_yshift so that the y-shift can be a multiple of PE
 ! instead of y-shift of a half domain width
@@ -55,5 +58,5 @@
         
     USE control_parameters,                                                    &
-        ONLY:  humidity, passive_scalar, recycling_plane, recycling_yshift,    &
+        ONLY:  humidity, passive_scalar, recycling_plane, y_shift,    &
                recycling_method_for_thermodynamic_quantities
         
@@ -87,5 +90,5 @@
        inflow_dist        !< turbulence signal of vars, added at inflow boundary
     REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) ::                         &
-       local_inflow_dist  !< auxiliary variable for inflow_dist, used for yshift
+       local_inflow_dist  !< auxiliary variable for inflow_dist, used for y-shift
     
     CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' )
@@ -245,12 +248,12 @@
 !-- y-shift for inflow_dist
 !-- Shift inflow_dist in positive y direction by a number of
-!-- PEs equal to recycling_yshift
-    IF ( ( recycling_yshift /= 0 ) .AND. myidx == id_inflow ) THEN
+!-- PEs equal to y_shift
+    IF ( ( y_shift /= 0 ) .AND. myidx == id_inflow ) THEN
 
 !
 !--    Calculate the ID of the PE which sends data to this PE (prev) and of the
 !--    PE which receives data from this PE (next).
-       prev = MODULO(myidy - recycling_yshift , pdims(2))
-       next = MODULO(myidy + recycling_yshift , pdims(2))
+       prev = MODULO(myidy - y_shift , pdims(2))
+       next = MODULO(myidy + y_shift , pdims(2))
        
        local_inflow_dist = 0.0_wp
Index: palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- palm/trunk/SOURCE/init_pegrid.f90	(revision 4300)
+++ palm/trunk/SOURCE/init_pegrid.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! changed message PA0467
+! 
+! 4264 2019-10-15 16:00:23Z scharf
 ! corrected error message string
 ! 
@@ -237,41 +240,48 @@
 !-- Get coordinates of left and right neighbor on PE grid
     IF ( y_shift /= 0 ) THEN
-
-       IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
-          message_string = 'y_shift /= 0 is only allowed for cyclic ' //       &
-                           'boundary conditions in both directions '
-          CALL message( 'check_parameters', 'PA0467', 1, 2, 0, 6, 0 )
-       ENDIF
-       IF ( TRIM( psolver ) /= 'multigrid' .AND.                               &
-            TRIM( psolver ) /= 'multigrid_noopt')                              &
-       THEN
-          message_string = 'y_shift /= 0 requires a multigrid pressure solver '
-          CALL message( 'check_parameters', 'PA0468', 1, 2, 0, 6, 0 )
-       ENDIF
-
-       CALL MPI_CART_COORDS( comm2d, pright, ndim, rcoord, ierr )
-       CALL MPI_CART_COORDS( comm2d, pleft, ndim, lcoord, ierr )
-
-!
-!--    If the x(y)-coordinate of the right (left) neighbor is smaller (greater)
-!--    than that of the calling process, then the calling process is located on
-!--    the right (left) boundary of the processor grid. In that case,
-!--    the y-coordinate of that neighbor is increased (decreased) by y_shift.
-!--    The rank of the process with that coordinate is then inquired and the
-!--    neighbor rank for MPI_SENDRECV, pright (pleft) is set to it.
-!--    In this way, the calling process receives a new right (left) neighbor
-!--    for all future MPI_SENDRECV calls. That neighbor has a y-coordinate
-!--    of y+(-)y_shift, where y is the original right (left) neighbor's
-!--    y-coordinate. The modulo-operation ensures that if the neighbor's
-!--    y-coordinate exceeds the grid-boundary, it will be relocated to
-!--    the opposite part of the grid cyclicly.
-       IF ( rcoord(1) < pcoord(1) ) THEN
-          rcoord(2) = MODULO( rcoord(2) + y_shift, pdims(2) )
-          CALL MPI_CART_RANK( comm2d, rcoord, pright, ierr )
-       ENDIF
-
-       IF ( lcoord(1) > pcoord(1) ) THEN
-          lcoord(2) = MODULO( lcoord(2) - y_shift, pdims(2) )
-          CALL MPI_CART_RANK( comm2d, lcoord, pleft, ierr )
+       IF ( bc_lr == 'cyclic' ) THEN
+          IF ( TRIM( psolver ) /= 'multigrid' .AND.                            &
+                TRIM( psolver ) /= 'multigrid_noopt')                          &
+          THEN
+             message_string = 'y_shift /= 0 requires a multigrid pressure solver '
+             CALL message( 'check_parameters', 'PA0468', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          CALL MPI_CART_COORDS( comm2d, pright, ndim, rcoord, ierr )
+          CALL MPI_CART_COORDS( comm2d, pleft, ndim, lcoord, ierr )
+
+!   
+!--       If the x(y)-coordinate of the right (left) neighbor is smaller (greater)
+!--       than that of the calling process, then the calling process is located on
+!--       the right (left) boundary of the processor grid. In that case,
+!--       the y-coordinate of that neighbor is increased (decreased) by y_shift.
+!--       The rank of the process with that coordinate is then inquired and the
+!--       neighbor rank for MPI_SENDRECV, pright (pleft) is set to it.
+!--       In this way, the calling process receives a new right (left) neighbor
+!--       for all future MPI_SENDRECV calls. That neighbor has a y-coordinate
+!--       of y+(-)y_shift, where y is the original right (left) neighbor's
+!--       y-coordinate. The modulo-operation ensures that if the neighbor's
+!--       y-coordinate exceeds the grid-boundary, it will be relocated to
+!--       the opposite part of the grid cyclicly.
+          IF ( rcoord(1) < pcoord(1) ) THEN
+             rcoord(2) = MODULO( rcoord(2) + y_shift, pdims(2) )
+             CALL MPI_CART_RANK( comm2d, rcoord, pright, ierr )
+          ENDIF
+
+          IF ( lcoord(1) > pcoord(1) ) THEN
+             lcoord(2) = MODULO( lcoord(2) - y_shift, pdims(2) )
+             CALL MPI_CART_RANK( comm2d, lcoord, pleft, ierr )
+          ENDIF
+         
+       ELSE
+!
+!--       y-shift for non-cyclic boundary conditions is only implemented 
+!--       for the turbulence recycling method in inflow_turbulence.f90
+          IF ( .NOT. turbulent_inflow )  THEN
+             message_string = 'y_shift /= 0 is only allowed for cyclic ' //    &
+                              'boundary conditions in both directions '  //    &
+                              'or with turbulent_inflow == .TRUE.'
+             CALL message( 'check_parameters', 'PA0467', 1, 2, 0, 6, 0 )
+          ENDIF
        ENDIF
     ENDIF
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 4300)
+++ palm/trunk/SOURCE/modules.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! removed recycling_yshift
+! 
+! 4297 2019-11-21 10:37:50Z oliver.maas
 ! changed variable type of recycling_yshift from LOGICAL to INTEGER
 ! 
@@ -645,5 +648,4 @@
     INTEGER(iwp) ::  vg_vertical_gradient_level_ind(10) = -9999  !< grid index values of vg_vertical_gradient_level(s)
     INTEGER(iwp) ::  subs_vertical_gradient_level_i(10) = -9999  !< grid index values of subs_vertical_gradient_level(s)
-    INTEGER(iwp) ::  recycling_yshift = 0                        !< namelist parameter
     INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xy  !< number of output intervals for 2d data (xy)
     INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xz  !< number of output intervals for 2d data (xz)
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 4300)
+++ palm/trunk/SOURCE/parin.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! removed recycling_yshift
+! 
+! 4227 2019-09-10 18:04:34Z gronemeier
 ! implement new palm_date_time_mod
 ! 
@@ -190,6 +193,5 @@
              random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
              rayleigh_damping_factor, rayleigh_damping_height,                 &
-             recycling_method_for_thermodynamic_quantities,                    &
-             recycling_width, recycling_yshift,                                &
+             recycling_method_for_thermodynamic_quantities, recycling_width,   &
              reference_state, residual_limit,                                  &
              rotation_angle,                                                   &
@@ -263,6 +265,5 @@
              random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
              rayleigh_damping_factor, rayleigh_damping_height,                 &
-             recycling_method_for_thermodynamic_quantities,                    &
-             recycling_width, recycling_yshift,                                &
+             recycling_method_for_thermodynamic_quantities, recycling_width,   &
              reference_state, residual_limit,                                  &
              rotation_angle,                                                   &
Index: palm/trunk/SOURCE/read_restart_data_mod.f90
===================================================================
--- palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4300)
+++ palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! removed recycling_yshift
+! 
+! 4227 2019-09-10 18:04:34Z gronemeier
 ! implement new palm_date_time_mod and increased binary version
 ! 
@@ -550,6 +553,4 @@
              CASE ( 'recycling_width' )
                 READ ( 13 )  recycling_width
-             CASE ( 'recycling_yshift' )
-                READ ( 13 ) recycling_yshift
              CASE ( 'ref_state' )
                 READ ( 13 )  ref_state
Index: palm/trunk/SOURCE/write_restart_data_mod.f90
===================================================================
--- palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4300)
+++ palm/trunk/SOURCE/write_restart_data_mod.f90	(revision 4301)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! removed recycling_yshift
+! 
+! 4227 2019-09-10 18:04:34Z gronemeier
 ! implement new palm_date_time_mod and increased binary version
 ! 
@@ -555,7 +558,4 @@
        WRITE ( 14 )  recycling_width
 
-       CALL wrd_write_string( 'recycling_yshift' ) 
-       WRITE ( 14 )  recycling_yshift
-
        CALL wrd_write_string( 'ref_state' ) 
        WRITE ( 14 )  ref_state
