Index: palm/trunk/DOC/app/chapter_4.1.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.1.html	(revision 74)
+++ palm/trunk/DOC/app/chapter_4.1.html	(revision 75)
@@ -88,20 +88,16 @@
 <span style="font-weight: bold;">bc_lr</span> may
 also be
-assigned the values <span style="font-style: italic;">'dirichlet/neumann'</span>
-(inflow from left, outflow to the right) or <span style="font-style: italic;">'neumann/dirichlet'</span>
+assigned the values <span style="font-style: italic;">'dirichlet/radiation'</span>
+(inflow from left, outflow to the right) or <span style="font-style: italic;">'radiation/dirichlet'</span>
 (inflow from
 right, outflow to the left). This requires the multi-grid method to be
 used for solving the Poisson equation for perturbation pressure (see <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/doc/app/chapter_4.2.html#psolver">psolver</a>)
-and it also requires cyclic boundary conditions along y (see<br> <a href="#bc_ns">bc_ns</a>).<br> <br>
+and it also requires cyclic boundary conditions along y (see&nbsp;<a href="#bc_ns">bc_ns</a>).<br> <br>
 In case of these non-cyclic lateral boundaries, a Dirichlet condition
 is used at the inflow for all quantities (initial vertical profiles -
 see <a href="#initializing_actions">initializing_actions</a>
 - are fixed during the run) except u, to which a Neumann (zero
-gradient) condition is applied. At the outflow, a Neumann (zero
-gradient) condition is used for all quantities except v, which is set
-to its horizontal average along the outflow (e.g. v(k,:,nx+1) =
-average_along_y( v(k,:,nx)), and except w, which is set to zero
-(Dirichlet condition). These conditions ensure the velocity field to be
-free of divergence at the inflow and at the outflow. For perturbation
+gradient) condition is applied. At the outflow, a radiation condition is used for all velocity components, while a Neumann (zero
+gradient) condition is used for the scalars. For perturbation
 pressure Neumann (zero gradient) conditions are assumed both at the
 inflow and at the outflow.<br> <br>
@@ -137,6 +133,6 @@
 <span style="font-weight: bold;">bc_ns</span> may
 also be
-assigned the values <span style="font-style: italic;">'dirichlet/neumann'</span>
-(inflow from rear ("north"), outflow to the front ("south")) or <span style="font-style: italic;">'neumann/dirichlet'</span>
+assigned the values <span style="font-style: italic;">'dirichlet/radiation'</span>
+(inflow from rear ("north"), outflow to the front ("south")) or <span style="font-style: italic;">'radiation/dirichlet'</span>
 (inflow from front ("south"), outflow to the rear ("north")). This
 requires the multi-grid
@@ -146,12 +142,8 @@
 In case of these non-cyclic lateral boundaries, a Dirichlet condition
 is used at the inflow for all quantities (initial vertical profiles -
-see <a href="#initializing_actions">initializing_actions</a>
-- are fixed during the run) except v, to which a Neumann (zero
-gradient) condition is applied. At the outflow, a Neumann (zero
-gradient) condition is used for all quantities except u, which is set
-to its horizontal average along the outflow (e.g. u(k,ny+1,:) =
-average_along_x( u(k,ny,:)), and except w, which is set to zero
-(Dirichlet condition). These conditions ensure the velocity field to be
-free of divergence at the inflow and at the outflow. For perturbation
+see <a href="chapter_4.1.html#initializing_actions">initializing_actions</a>
+- are fixed during the run) except u, to which a Neumann (zero
+gradient) condition is applied. At the outflow, a radiation condition is used for all velocity components, while a Neumann (zero
+gradient) condition is used for the scalars. For perturbation
 pressure Neumann (zero gradient) conditions are assumed both at the
 inflow and at the outflow.<br> <br>
@@ -428,5 +420,5 @@
 Also cloud-top cooling by longwave radiation can be utilized (see <a href="#radiation">radiation</a>)<br> <b><br>
 cloud_physics =</b> <span style="font-style: italic;">.TRUE.
-</span>requires <a href="#moisture">moisture</a>
+</span>requires&nbsp;<a href="#humidity">humidity</a>
 =<span style="font-style: italic;"> .TRUE.</span> .<br>
 Detailed information about the condensation scheme is given in the
@@ -890,5 +882,5 @@
 the so-called Blackadar mixing length is used (l = kappa * z / ( 1 +
 kappa * z / lambda ) with the limiting value lambda = 2.7E-4 * u_g / f).<br>
-</td> </tr> <tr> <td style="vertical-align: top;"> <p><a name="moisture"></a><b>moisture</b></p>
+</td> </tr> <tr> <td style="vertical-align: top;"> <p><a name="humidity"></a><b>humidity</b></p>
 </td> <td style="vertical-align: top;">L</td>
 <td style="vertical-align: top;"><i>.F.</i></td>
@@ -953,5 +945,5 @@
 <br> <span style="font-weight: bold;">Important: </span>The&nbsp;
 upstream-spline scheme is not implemented for humidity and passive
-scalars (see <a href="#moisture">moisture</a>
+scalars (see&nbsp;<a href="#humidity">humidity</a>
 and <a href="#passive_scalar">passive_scalar</a>)
 and requires the use of a 2d-domain-decomposition. The last conditions
@@ -1206,5 +1198,5 @@
 With <span style="font-weight: bold;">passive_scalar</span>
 switched
-on, the simultaneous use of humidity (see <a href="#moisture">moisture</a>)
+on, the simultaneous use of humidity (see&nbsp;<a href="#humidity">humidity</a>)
 is impossible.</p> </td> </tr> <tr> <td style="vertical-align: top;"> <p><a name="phi"></a><b>phi</b></p>
 </td> <td style="vertical-align: top;">R</td>
@@ -1367,5 +1359,5 @@
 <br> <b>_level</b></p> </td> <td style="vertical-align: top;">R (10)</td> <td style="vertical-align: top;"> <p><i>10 *</i>&nbsp;
 <i>0.0</i></p> </td> <td style="vertical-align: top;"> <p>Height level from
-which on the moisture gradient defined by <a href="#q_vertical_gradient">q_vertical_gradient</a>
+which on the humidity gradient defined by <a href="#q_vertical_gradient">q_vertical_gradient</a>
 is effective (in m).&nbsp; </p> <p>The height levels
 are to be assigned in ascending order. The
@@ -1533,5 +1525,5 @@
 </p> <p style="margin-left: 40px;"><span style="font-weight: bold;">Important: </span>The&nbsp;
 upstream-spline scheme is not implemented for humidity and passive
-scalars (see <a href="#moisture">moisture</a>
+scalars (see&nbsp;<a href="#humidity">humidity</a>
 and <a href="#passive_scalar">passive_scalar</a>)
 and requires the use of a 2d-domain-decomposition. The last conditions
@@ -1823,5 +1815,5 @@
 <i>&nbsp;</i><a href="#alpha_surface">alpha_surface</a>
 = 0.0, <a href="#bc_lr">bc_lr</a> = <a href="#bc_ns">bc_ns</a> = <span style="font-style: italic;">'cyclic'</span>,&nbsp;<a style="" href="#galilei_transformation">galilei_transformation</a>
-= <span style="font-style: italic;">.F.</span>,&nbsp;<a href="#cloud_physics">cloud_physics&nbsp;</a> = <span style="font-style: italic;">.F.</span>,&nbsp; <a href="#cloud_droplets">cloud_droplets</a> = <span style="font-style: italic;">.F.</span>,&nbsp; <a href="#moisture">moisture</a> = <span style="font-style: italic;">.F.</span>, and <a href="#prandtl_layer">prandtl_layer</a> = .T..<br>
+= <span style="font-style: italic;">.F.</span>,&nbsp;<a href="#cloud_physics">cloud_physics&nbsp;</a> = <span style="font-style: italic;">.F.</span>,&nbsp; <a href="#cloud_droplets">cloud_droplets</a> = <span style="font-style: italic;">.F.</span>,&nbsp;&nbsp;<a href="#humidity">humidity</a> = <span style="font-style: italic;">.F.</span>, and <a href="#prandtl_layer">prandtl_layer</a> = .T..<br>
 <font color="#000000"><br>
 Note that an inclined model domain requires the use of <span style="font-weight: bold;">topography</span> = <span style="font-style: italic;">'flat'</span> and a
Index: palm/trunk/DOC/app/chapter_4.2.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.2.html	(revision 74)
+++ palm/trunk/DOC/app/chapter_4.2.html	(revision 75)
@@ -394,5 +394,5 @@
 = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">pt</span></td><td style="width: 196px; vertical-align: top;">potential
 temperature<br></td><td style="vertical-align: top;">K</td><td style="vertical-align: top;"></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">q</span></td><td style="width: 196px; vertical-align: top;">specific humidity
-(or total water content, if cloud physics is switched on)</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#moisture">moisture</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">ql</span></td><td style="width: 196px; vertical-align: top;">liquid water
+(or total water content, if cloud physics is switched on)</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires&nbsp;<a href="chapter_4.1.html#humidity">humidity</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">ql</span></td><td style="width: 196px; vertical-align: top;">liquid water
 content</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#cloud_physics">cloud_physics</a>
 = <span style="font-style: italic;">.TRUE.</span>
@@ -414,5 +414,5 @@
 is allowed</td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">v</span></td><td style="width: 196px; vertical-align: top;">v-component of
 the velocity</td><td style="vertical-align: top;">m/s</td><td style="vertical-align: top;"></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">vpt</span></td><td style="width: 196px; vertical-align: top;">virtual potential
-temperature</td><td style="vertical-align: top;">K</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#moisture">moisture</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">w</span></td><td style="width: 196px; vertical-align: top;">w-component of
+temperature</td><td style="vertical-align: top;">K</td><td style="vertical-align: top;">requires&nbsp;<a href="chapter_4.1.html#humidity">humidity</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">w</span></td><td style="width: 196px; vertical-align: top;">w-component of
 the velocity</td><td style="vertical-align: top;">m/s</td><td style="vertical-align: top;"></td></tr><tr><td style="vertical-align: top;"><span style="font-style: italic;">z0*</span></td><td style="vertical-align: top;">roughness length</td><td style="vertical-align: top;">m</td><td></td></tr></tbody></table><br>Multiple
 quantities can be assigned, e.g. <span style="font-weight: bold;">data_output</span>
Index: palm/trunk/DOC/app/chapter_4.6.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.6.html	(revision 74)
+++ palm/trunk/DOC/app/chapter_4.6.html	(revision 75)
@@ -652,5 +652,8 @@
 <td style="vertical-align: middle;" width="57%"> <p>Variable
 to adjust the subdomain sizes in parallel runs.</p> </td> </tr>
-<tr> <td style="vertical-align: middle;"><b><a href="chapter_4.1.html#inflow_disturbance_begin"><b>inflow_disturbance_begin</b></a></b></td>
+<tr><td><b><a href="chapter_4.1.html#humidity"><b>humidity</b></a></b></td><td>I</td><td>L</td><td><span style="font-style: italic;">.F.</span></td><td>Parameter
+to switch on the prognostic equation for
+specific
+humidity q.</td></tr><tr> <td style="vertical-align: middle;"><b><a href="chapter_4.1.html#inflow_disturbance_begin"><b>inflow_disturbance_begin</b></a></b></td>
 <td style="vertical-align: middle;">I<br> </td>
 <td style="vertical-align: middle;">I<br> </td>
@@ -749,13 +752,5 @@
 which are
 to be created by the <span style="font-weight: bold;">dvrp</span>
-software. <br> </p> </td> </tr> <tr>
-<td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#moisture"><b>moisture</b></a></p>
-</td> <td style="vertical-align: middle;" width="5%">
-<p>I</p> </td> <td style="vertical-align: middle;" width="7%"> <p>L</p>
-</td> <td style="vertical-align: middle;" width="16%">
-<p><i>.F.</i></p> </td> <td style="vertical-align: middle;" width="57%"> <p>Parameter
-to switch on the prognostic equation for
-specific
-humidity q.</p> </td> </tr> <tr> <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#momentum_advec"><b>momentum_advec</b></a></p>
+software. <br> </p> </td> </tr>  <tr> <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#momentum_advec"><b>momentum_advec</b></a></p>
 </td> <td style="vertical-align: middle;" width="5%">
 <p>I</p> </td> <td style="vertical-align: middle;" width="7%"> <p>C
@@ -1105,5 +1100,5 @@
 (10)</p> </td> <td style="vertical-align: middle;" width="16%"> <p><i>10 *</i>&nbsp; <i>0.0</i></p>
 </td> <td style="vertical-align: middle;" width="57%">
-<p>Height level from which on the moisture gradient defined
+<p>Height level from which on the humidity gradient defined
 by <a href="chapter_4.1.html#q_vertical_gradient">q_vertical_gradient</a>
 is effective (in m).&nbsp;</p> </td> </tr> <tr>
Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 74)
+++ palm/trunk/SCRIPTS/mbuild	(revision 75)
@@ -1395,4 +1395,5 @@
           fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
 
+          rm -rf  ${remote_host}_last_make_protokoll
 
              # NUR AUF EINEM HLRN-RECHNER UEBERSETZEN
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 74)
+++ palm/trunk/SCRIPTS/mrun	(revision 75)
@@ -2688,8 +2688,14 @@
        # NAMELIST-DATEI MIT WERTEN VON ENVIRONMENT-VARIABLEN ERZEUGEN (ZU
        # LESEN VON PALM)
+       # DAZU VORHER DIE "GLOBAL REVISION" VON SUBVERSION ERMITTELN, FALLS
+       # DIE SOURCEN UNTER SUBVERSION-KONTROLLE STEHEN
+    global_revision=`svnversion $source_path`
+    global_revision="Rev: $global_revision"
+
     cat  >  ENVPAR  <<  %%END%%
  &envpar  run_identifier = '$fname', host = '$localhost',
           write_binary = '$write_binary', tasks_per_node = $tasks_per_node,
-          maximum_cpu_time_allowed = ${cpumax}. /
+          maximum_cpu_time_allowed = ${cpumax}.,
+          revision = '$global_revision' /
 
 %%END%%
Index: palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 74)
+++ palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 75)
@@ -33,5 +33,5 @@
 Changed:
 -------
-General revision of non-cyclic horizontal boundary conditions: radiation boundary conditions are now used instead of Neumann conditions at the outflow (calculation needs velocity values for t-dt, which are stored on new arrays u_m_l, u_m_r, etc.), calculation of mean outflow is not needed any more, additional gridpoints along x and y (uxrp, vynp) are not needed any more, routine "boundary_conds" now operates on timelevel t+dt and is not split in two parts (main, uvw_outflow) any more, Neumann boundary conditions at inflow/outflow in case of non-cyclic boundary conditions for all 2d-arrays that are handled by exchange_horiz_2d
+General revision of non-cyclic horizontal boundary conditions: radiation boundary conditions are now used instead of Neumann conditions at the outflow (calculation needs velocity values for t-dt, which are stored on new arrays u_m_l, u_m_r, etc.), calculation of mean outflow is not needed any more, volume flow control is added for the outflow boundary (currently only for the north boundary!!), additional gridpoints along x and y (uxrp, vynp) are not needed any more, routine "boundary_conds" now operates on timelevel t+dt and is not split in two parts (main, uvw_outflow) any more, Neumann boundary conditions at inflow/outflow in case of non-cyclic boundary conditions for all 2d-arrays that are handled by exchange_horiz_2d
 
 +age_m in particle_type
@@ -48,9 +48,15 @@
 q is not allowed to become negative (prognostic_equations).
 
+poisfft_init is only called if fft-solver is switched on (init_pegrid).
+
+d3par-parameter moisture renamed to humidity.
+
+Subversion global revision number is read from mrun and added to the run description header and to the run control (_rc) file.
+
 __vtk directives removed from main program.
 
 The uitility routine interpret_config reads PALM environment variables from NAMELIST instead using the system call GETENV.
 
-check_parameters, data_output_dvrp, data_output_ptseries, data_output_ts, exchange_horiz_2d, flow_statistics, header, init_particles, init_pegrid, init_3d_model, modules, palm, package_parin, parin, prognostic_equations, read_3d_binary, time_integration, write_3d_binary
+advec_u_pw, advec_u_up, advec_v_pw, advec_v_up, asselin_filter, check_parameters, coriolis, data_output_dvrp, data_output_ptseries, data_output_ts, data_output_2d, data_output_3d, diffusion_u, diffusion_v, exchange_horiz, exchange_horiz_2d, flow_statistics, header, init_grid, init_particles, init_pegrid, init_rankine, init_pt_anomaly, init_1d_model, init_3d_model, modules, palm, package_parin, parin, poismg, prandtl_fluxes, pres, production_e, prognostic_equations, read_var_list, read_3d_binary, sor, swap_timelevel, time_integration, write_var_list, write_3d_binary
 
 
Index: palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- palm/trunk/SOURCE/advec_particles.f90	(revision 74)
+++ palm/trunk/SOURCE/advec_particles.f90	(revision 75)
@@ -9,5 +9,6 @@
 ! + user_advec_particles, particles-package is now part of the defaut code,
 ! array arguments in sendrecv calls have to refer to first element (1) due to
-! mpich (mpiI) interface requirements 
+! mpich (mpiI) interface requirements,
+! 2nd+3rd argument removed from exchange horiz
 ! TEST: PRINT statements on unit 9 (commented out)
 !
@@ -662,8 +663,8 @@
 !
 !--    Lateral boundary conditions
-       CALL exchange_horiz( de_dx, 0, 0 )
-       CALL exchange_horiz( de_dy, 0, 0 )
-       CALL exchange_horiz( de_dz, 0, 0 )
-       CALL exchange_horiz( diss,  0, 0 )
+       CALL exchange_horiz( de_dx )
+       CALL exchange_horiz( de_dy )
+       CALL exchange_horiz( de_dz )
+       CALL exchange_horiz( diss  )
 
 !
Index: palm/trunk/SOURCE/advec_u_pw.f90
===================================================================
--- palm/trunk/SOURCE/advec_u_pw.f90	(revision 74)
+++ palm/trunk/SOURCE/advec_u_pw.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! uxrp eliminated
 !
 ! Former revisions:
@@ -54,5 +54,5 @@
        gu = 2.0 * u_gtrans
        gv = 2.0 * v_gtrans
-       DO  i = nxl, nxr+uxrp
+       DO  i = nxl, nxr
           DO  j = nys, nyn
              DO  k = nzb_u_inner(j,i)+1, nzt
Index: palm/trunk/SOURCE/advec_u_up.f90
===================================================================
--- palm/trunk/SOURCE/advec_u_up.f90	(revision 74)
+++ palm/trunk/SOURCE/advec_u_up.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! uxrp eliminated
 !
 ! Former revisions:
@@ -53,5 +53,5 @@
 
 
-       DO  i = nxl, nxr+uxrp
+       DO  i = nxl, nxr
           DO  j = nys, nyn
              DO  k = nzb_u_inner(j,i)+1, nzt
Index: palm/trunk/SOURCE/advec_v_pw.f90
===================================================================
--- palm/trunk/SOURCE/advec_v_pw.f90	(revision 74)
+++ palm/trunk/SOURCE/advec_v_pw.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! vynp eliminated
 !
 ! Former revisions:
@@ -56,5 +56,5 @@
        gv = 2.0 * v_gtrans
        DO  i = nxl, nxr
-          DO  j = nys, nyn+vynp
+          DO  j = nys, nyn
              DO  k = nzb_v_inner(j,i)+1, nzt
                 tend(k,j,i) = tend(k,j,i) - 0.25 * (                           &
Index: palm/trunk/SOURCE/advec_v_up.f90
===================================================================
--- palm/trunk/SOURCE/advec_v_up.f90	(revision 74)
+++ palm/trunk/SOURCE/advec_v_up.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! vynp eliminated
 !
 ! Former revisions:
@@ -53,5 +53,5 @@
 
        DO  i = nxl, nxr
-          DO  j = nys, nyn+vynp
+          DO  j = nys, nyn
              DO  k = nzb_v_inner(j,i)+1, nzt
 !
Index: palm/trunk/SOURCE/asselin_filter.f90
===================================================================
--- palm/trunk/SOURCE/asselin_filter.f90	(revision 74)
+++ palm/trunk/SOURCE/asselin_filter.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -72,5 +72,5 @@
           ENDIF
 
-          IF ( ( moisture .OR. passive_scalar )  .AND. &
+          IF ( ( humidity .OR. passive_scalar )  .AND. &
              scalar_advec /= 'bc-scheme' )  THEN
              DO  k = nzb_2d(j,i), nzt+1
@@ -96,5 +96,5 @@
     ENDIF
 
-    IF ( ( moisture .OR. passive_scalar )  .AND. &
+    IF ( ( humidity .OR. passive_scalar )  .AND. &
          scalar_advec /= 'bc-scheme' )  THEN
        q = q + asselin_filter_factor * ( q_p - 2.0 * q + q_m )
Index: palm/trunk/SOURCE/boundary_conds.f90
===================================================================
--- palm/trunk/SOURCE/boundary_conds.f90	(revision 74)
+++ palm/trunk/SOURCE/boundary_conds.f90	(revision 75)
@@ -4,6 +4,7 @@
 ! Actual revisions:
 ! -----------------
-! The "main" part sets conditions for time level t+dt insteat of level t,
-! outflow boundary conditions changed from Neumann to radiation condition
+! The "main" part sets conditions for time level t+dt instead of level t,
+! outflow boundary conditions changed from Neumann to radiation condition,
+! uxrp, vynp eliminated, moisture renamed humidity
 !
 ! Former revisions:
@@ -126,7 +127,7 @@
 !--    Boundary conditions for total water content or scalar,
 !--    bottom and surface boundary (see also temperature)
-       IF ( moisture  .OR.  passive_scalar )  THEN
-!
-!--       Surface conditions for constant_moisture_flux
+       IF ( humidity  .OR.  passive_scalar )  THEN
+!
+!--       Surface conditions for constant_humidity_flux
           IF ( ibc_q_b == 0 ) THEN
              DO  i = nxl-1, nxr+1
@@ -154,9 +155,9 @@
           v_p(:,nys,:) = v_p(:,nys-1,:)
        ELSEIF ( inflow_n ) THEN
-          v_p(:,nyn+vynp,:) = v_p(:,nyn+vynp+1,:)
+          v_p(:,nyn,:) = v_p(:,nyn+1,:)
        ELSEIF ( inflow_l ) THEN
           u_p(:,:,nxl) = u_p(:,:,nxl-1)
        ELSEIF ( inflow_r ) THEN
-          u_p(:,:,nxr+uxrp) = u_p(:,:,nxr+uxrp+1)
+          u_p(:,:,nxr) = u_p(:,:,nxr+1)
        ENDIF
 
@@ -166,254 +167,395 @@
           pt_p(:,nys-1,:)     = pt_p(:,nys,:)
           IF ( .NOT. constant_diffusion     )  e_p(:,nys-1,:) = e_p(:,nys,:)
-          IF ( moisture .OR. passive_scalar )  q_p(:,nys-1,:) = q_p(:,nys,:)
+          IF ( humidity .OR. passive_scalar )  q_p(:,nys-1,:) = q_p(:,nys,:)
        ELSEIF ( outflow_n )  THEN
           pt_p(:,nyn+1,:)     = pt_p(:,nyn,:)
           IF ( .NOT. constant_diffusion     )  e_p(:,nyn+1,:) = e_p(:,nyn,:)
-          IF ( moisture .OR. passive_scalar )  q_p(:,nyn+1,:) = q_p(:,nyn,:)
+          IF ( humidity .OR. passive_scalar )  q_p(:,nyn+1,:) = q_p(:,nyn,:)
        ELSEIF ( outflow_l )  THEN
           pt_p(:,:,nxl-1)     = pt_p(:,:,nxl)
           IF ( .NOT. constant_diffusion     )  e_p(:,:,nxl-1) = e_p(:,:,nxl)
-          IF ( moisture .OR. passive_scalar )  q_p(:,:,nxl-1) = q_p(:,:,nxl)      
+          IF ( humidity .OR. passive_scalar )  q_p(:,:,nxl-1) = q_p(:,:,nxl)
        ELSEIF ( outflow_r )  THEN
           pt_p(:,:,nxr+1)     = pt_p(:,:,nxr)
           IF ( .NOT. constant_diffusion     )  e_p(:,:,nxr+1) = e_p(:,:,nxr)
-          IF ( moisture .OR. passive_scalar )  q_p(:,:,nxr+1) = q_p(:,:,nxr)
+          IF ( humidity .OR. passive_scalar )  q_p(:,:,nxr+1) = q_p(:,:,nxr)
        ENDIF
 
     ENDIF
 
-    IF ( range == 'outflow_uvw' ) THEN
-!
-!--    Radiation boundary condition for the velocities at the respective outflow
-       IF ( outflow_s ) THEN
-!          v(:,nys-1,:) = v(:,nys,:)
-!          w(:,nys-1,:) = 0.0
-!!
-!!--       Compute the mean horizontal wind parallel to and within the outflow
-!!--       wall and use this as boundary condition for u
-!#if defined( __parallel )
-!          CALL MPI_ALLREDUCE( uvmean_outflow_l, uvmean_outflow, nzt-nzb+2, &
-!                              MPI_REAL, MPI_SUM, comm1dx, ierr )
-!          uvmean_outflow = uvmean_outflow / ( nx + 1.0 )
-!#else
-!          uvmean_outflow = uvmean_outflow_l / ( nx + 1.0 )
-!#endif
-!          DO  k = nzb, nzt+1
-!             u(k,nys-1,:) = uvmean_outflow(k)
-!          ENDDO
-       ENDIF
-
-       IF ( outflow_n  .AND.                                                 &
-            intermediate_timestep_count == intermediate_timestep_count_max ) &
-       THEN
-
-          c_max = dy / dt_3d
-
-          DO i = nxl-1, nxr+1
-             DO k = nzb+1, nzt+1
-
-!
-!--             First calculate the phase speeds for u,v, and w
-                denom = u_m_n(k,ny,i,-2) - u_m_n(k,ny-1,i,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_u = -c_max * ( u_m_n(k,ny,i,-1)-u_m_n(k,ny,i,-2) ) / denom
-                   IF ( c_u < 0.0 )  THEN
-                      c_u = 0.0
-                   ELSEIF ( c_u > c_max )  THEN
-                      c_u = c_max
-                   ENDIF
-                ELSE
+!
+!-- Radiation boundary condition for the velocities at the respective outflow
+    IF ( outflow_s  .AND.                                                 &
+         intermediate_timestep_count == intermediate_timestep_count_max ) &
+    THEN
+
+       c_max = dy / dt_3d
+
+       DO i = nxl-1, nxr+1
+          DO k = nzb+1, nzt+1
+
+!
+!--          First calculate the phase speeds for u,v, and w
+             denom = u_m_s(k,0,i) - u_m_s(k,1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_u = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) / denom
+                IF ( c_u < 0.0 )  THEN
+                   c_u = 0.0
+                ELSEIF ( c_u > c_max )  THEN
                    c_u = c_max
                 ENDIF
-
-                denom = v_m_n(k,ny,i,-2) - v_m_n(k,ny-1,i,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_v = -c_max * ( v_m_n(k,ny,i,-1)-v_m_n(k,ny,i,-2) ) / denom
-                   IF ( c_v < 0.0 )  THEN
-                      c_v = 0.0
-                   ELSEIF ( c_v > c_max )  THEN
-                      c_v = c_max
-                   ENDIF
-                ELSE
+             ELSE
+                c_u = c_max
+             ENDIF
+             denom = v_m_s(k,0,i) - v_m_s(k,1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_v = -c_max * ( v(k,0,i) - v_m_s(k,0,i) ) / denom
+                IF ( c_v < 0.0 )  THEN
+                   c_v = 0.0
+                ELSEIF ( c_v > c_max )  THEN
                    c_v = c_max
                 ENDIF
-
-                denom = w_m_n(k,ny,i,-2) - w_m_n(k,ny-1,i,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_w = -c_max * ( w_m_n(k,ny,i,-1)-w_m_n(k,ny,i,-2) ) / denom
-                   IF ( c_w < 0.0 )  THEN
-                      c_w = 0.0
-                   ELSEIF ( c_w > c_max )  THEN
-                      c_w = c_max
-                   ENDIF
-                ELSE
+             ELSE
+                c_v = c_max
+             ENDIF
+
+             denom = w_m_s(k,0,i) - w_m_s(k,1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_w = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) / denom
+                IF ( c_w < 0.0 )  THEN
+                   c_w = 0.0
+                ELSEIF ( c_w > c_max )  THEN
                    c_w = c_max
                 ENDIF
-
-!
-!--             Calculate the new velocities
-                u(k,ny+1,i) = u_m_n(k,ny+1,i,-1) - dt_3d * c_u * &
-                              ( u_m_n(k,ny+1,i,-1) - u_m_n(k,ny,i,-1) ) * ddy
-
-                v(k,ny+1,i) = v_m_n(k,ny+1,i,-1) - dt_3d * c_v * &
-                              ( v_m_n(k,ny+1,i,-1) - v_m_n(k,ny,i,-1) ) * ddy
-
-                w(k,ny+1,i) = w_m_n(k,ny+1,i,-1) - dt_3d * c_w * &
-                              ( w_m_n(k,ny+1,i,-1) - w_m_n(k,ny,i,-1) ) * ddy
-
-!
-!--             Swap timelevels for the next timestep
-                u_m_n(k,:,i,-2) = u_m_n(k,:,i,-1)
-                u_m_n(k,:,i,-1) = u(k,ny-1:ny+1,i)
-                v_m_n(k,:,i,-2) = v_m_n(k,:,i,-1)
-                v_m_n(k,:,i,-1) = v(k,ny-1:ny+1,i)
-                w_m_n(k,:,i,-2) = w_m_n(k,:,i,-1)
-                w_m_n(k,:,i,-1) = w(k,ny-1:ny+1,i)
-
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u(nzb,ny+1,:) = -u(nzb+1,ny+1,:) 
-             v(nzb,ny+1,:) = -v(nzb+1,ny+1,:)  
-          ELSE                    
-             u(nzb,ny+1,:) =  u(nzb+1,ny+1,:)
-             v(nzb,ny+1,:) =  v(nzb+1,ny+1,:)
-          ENDIF
-          w(nzb,ny+1,:) = 0.0
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u(nzt+1,ny+1,:) = ug(nzt+1)
-             v(nzt+1,ny+1,:) = vg(nzt+1)
-          ELSE
-             u(nzt+1,ny+1,:) = u(nzt,nyn+1,:)
-             v(nzt+1,ny+1,:) = v(nzt,nyn+1,:)
-          ENDIF
-          w(nzt:nzt+1,ny+1,:) = 0.0
-
-       ENDIF
-
-       IF ( outflow_l ) THEN
-!          u(:,:,nxl-1) = u(:,:,nxl)
-!          w(:,:,nxl-1) = 0.0
-!
-!--       Compute the mean horizontal wind parallel to and within the outflow
-!--       wall and use this as boundary condition for v
-!#if defined( __parallel )
-!          CALL MPI_ALLREDUCE( uvmean_outflow_l, uvmean_outflow, nzt-nzb+2, &
-!                              MPI_REAL, MPI_SUM, comm1dy, ierr )
-!          uvmean_outflow = uvmean_outflow / ( ny + 1.0 )
-!#else
-!          uvmean_outflow = uvmean_outflow_l / ( ny + 1.0 )
-!#endif
-!          DO  k = nzb, nzt+1
-!             v(k,:,nxl-1) = uvmean_outflow(k)
-!          ENDDO    
-!
-       ENDIF
-
-       IF ( outflow_r  .AND.                                                 &
-            intermediate_timestep_count == intermediate_timestep_count_max ) &
-       THEN
-
-          c_max = dx / dt_3d
-
-          DO j = nys-1, nyn+1
-             DO k = nzb+1, nzt+1
-
-!
-!--             First calculate the phase speeds for u,v, and w
-                denom = u_m_r(k,j,nx,-2) - u_m_r(k,j,nx-1,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_u = -c_max * ( u_m_r(k,j,nx,-1)-u_m_r(k,j,nx,-2) ) / denom
-                   IF ( c_u < 0.0 )  THEN
-                      c_u = 0.0
-                   ELSEIF ( c_u > c_max )  THEN
-                      c_u = c_max
-                   ENDIF
-                ELSE
+             ELSE
+                c_w = c_max
+             ENDIF
+
+!
+!--          Calculate the new velocities
+             u_p(k,-1,i) = u(k,-1,i) + dt_3d * c_u * &
+                                       ( u(k,-1,i) - u(k,0,i) ) * ddy
+
+             v_p(k,-1,i) = v(k,-1,i) + dt_3d * c_v * &
+                                       ( v(k,-1,i) - v_m_s(k,0,i) ) * ddy
+
+             w_p(k,-1,i) = w(k,-1,i) + dt_3d * c_w * &
+                                       ( w(k,-1,i) - w(k,0,i) ) * ddy
+
+!
+!--          Save old timelevels for the next timestep
+             u_m_s(k,:,i) = u(k,-1:1,i)
+             v_m_s(k,:,i) = v(k,-1:1,i)
+             w_m_s(k,:,i) = w(k,-1:1,i)
+
+          ENDDO
+       ENDDO
+
+!
+!--    Bottom boundary at the outflow
+       IF ( ibc_uv_b == 0 )  THEN
+          u_p(nzb,-1,:) = -u_p(nzb+1,-1,:) 
+          v_p(nzb,-1,:) = -v_p(nzb+1,-1,:)  
+       ELSE                    
+          u_p(nzb,-1,:) =  u_p(nzb+1,-1,:)
+          v_p(nzb,-1,:) =  v_p(nzb+1,-1,:)
+       ENDIF
+       w_p(nzb,ny+1,:) = 0.0
+
+!
+!--    Top boundary at the outflow
+       IF ( ibc_uv_t == 0 )  THEN
+          u_p(nzt+1,-1,:) = ug(nzt+1)
+          v_p(nzt+1,-1,:) = vg(nzt+1)
+       ELSE
+          u_p(nzt+1,-1,:) = u(nzt,-1,:)
+          v_p(nzt+1,-1,:) = v(nzt,-1,:)
+       ENDIF
+       w_p(nzt:nzt+1,-1,:) = 0.0
+
+    ENDIF
+
+    IF ( outflow_n  .AND.                                                 &
+         intermediate_timestep_count == intermediate_timestep_count_max ) &
+    THEN
+
+       c_max = dy / dt_3d
+
+       DO i = nxl-1, nxr+1
+          DO k = nzb+1, nzt+1
+
+!
+!--          First calculate the phase speeds for u,v, and w
+             denom = u_m_n(k,ny,i) - u_m_n(k,ny-1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_u = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) / denom
+                IF ( c_u < 0.0 )  THEN
+                   c_u = 0.0
+                ELSEIF ( c_u > c_max )  THEN
                    c_u = c_max
                 ENDIF
-
-                denom = v_m_r(k,j,nx,-2) - v_m_r(k,j,nx-1,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_v = -c_max * ( v_m_r(k,j,nx,-1)-v_m_r(k,j,nx,-2) ) / denom
-                   IF ( c_v < 0.0 )  THEN
-                      c_v = 0.0
-                   ELSEIF ( c_v > c_max )  THEN
-                      c_v = c_max
-                   ENDIF
-                ELSE
+             ELSE
+                c_u = c_max
+             ENDIF
+
+             denom = v_m_n(k,ny,i) - v_m_n(k,ny-1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_v = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) / denom
+                IF ( c_v < 0.0 )  THEN
+                   c_v = 0.0
+                ELSEIF ( c_v > c_max )  THEN
                    c_v = c_max
                 ENDIF
-
-                denom = w_m_r(k,j,nx,-2) - w_m_r(k,j,nx-1,-2)
-
-                IF ( denom /= 0.0 )  THEN
-                   c_w = -c_max * ( w_m_r(k,j,nx,-1)-w_m_n(k,j,nx,-2) ) / denom
-                   IF ( c_w < 0.0 )  THEN
-                      c_w = 0.0
-                   ELSEIF ( c_w > c_max )  THEN
-                      c_w = c_max
-                   ENDIF
-                ELSE
+             ELSE
+                c_v = c_max
+             ENDIF
+
+             denom = w_m_n(k,ny,i) - w_m_n(k,ny-1,i)
+
+             IF ( denom /= 0.0 )  THEN
+                c_w = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) / denom
+                IF ( c_w < 0.0 )  THEN
+                   c_w = 0.0
+                ELSEIF ( c_w > c_max )  THEN
                    c_w = c_max
                 ENDIF
-
-!
-!--             Calculate the new velocities
-                u(k,j,nx+1) = u_m_r(k,j,nx+1,-1) - dt_3d * c_u * &
-                              ( u_m_r(k,j,nx+1,-1) - u_m_r(k,j,nx,-1) ) * ddx
-
-                v(k,j,nx+1) = v_m_r(k,j,nx+1,-1) - dt_3d * c_v * &
-                              ( v_m_r(k,j,nx+1,-1) - v_m_r(k,j,nx,-1) ) * ddx
-
-                w(k,j,nx+1) = w_m_r(k,j,nx+1,-1) - dt_3d * c_w * &
-                              ( w_m_r(k,j,nx+1,-1) - w_m_r(k,j,nx,-1) ) * ddx
-
-!
-!--             Swap timelevels for the next timestep
-                u_m_r(k,j,:,-2) = u_m_r(k,j,:,-1)
-                u_m_r(k,j,:,-1) = u(k,j,nx-1:nx+1)
-                v_m_r(k,j,:,-2) = v_m_r(k,j,:,-1)
-                v_m_r(k,j,:,-1) = v(k,j,nx-1:nx+1)
-                w_m_r(k,j,:,-2) = w_m_r(k,j,:,-1)
-                w_m_r(k,j,:,-1) = w(k,j,nx-1:nx+1)
-
-             ENDDO
-          ENDDO
-
-!
-!--       Bottom boundary at the outflow
-          IF ( ibc_uv_b == 0 )  THEN
-             u(nzb,ny+1,:) = -u(nzb+1,ny+1,:) 
-             v(nzb,ny+1,:) = -v(nzb+1,ny+1,:)  
-          ELSE                    
-             u(nzb,ny+1,:) =  u(nzb+1,ny+1,:)
-             v(nzb,ny+1,:) =  v(nzb+1,ny+1,:)
-          ENDIF
-          w(nzb,ny+1,:) = 0.0
-
-!
-!--       Top boundary at the outflow
-          IF ( ibc_uv_t == 0 )  THEN
-             u(nzt+1,ny+1,:) = ug(nzt+1)
-             v(nzt+1,ny+1,:) = vg(nzt+1)
-          ELSE
-             u(nzt+1,ny+1,:) = u(nzt,nyn+1,:)
-             v(nzt+1,ny+1,:) = v(nzt,nyn+1,:)
-          ENDIF
-          w(nzt:nzt+1,ny+1,:) = 0.0
-
-       ENDIF
+             ELSE
+                c_w = c_max
+             ENDIF
+
+!
+!--          Calculate the new velocities
+             u_p(k,ny+1,i) = u(k,ny+1,i) - dt_3d * c_u * &
+                                           ( u(k,ny+1,i) - u(k,ny,i) ) * ddy
+
+             v_p(k,ny+1,i) = v(k,ny+1,i) - dt_3d * c_v * &
+                                           ( v(k,ny+1,i) - v(k,ny,i) ) * ddy
+
+             w_p(k,ny+1,i) = w(k,ny+1,i) - dt_3d * c_w * &
+                                           ( w(k,ny+1,i) - w(k,ny,i) ) * ddy
+
+!
+!--          Swap timelevels for the next timestep
+             u_m_n(k,:,i) = u(k,ny-1:ny+1,i)
+             v_m_n(k,:,i) = v(k,ny-1:ny+1,i)
+             w_m_n(k,:,i) = w(k,ny-1:ny+1,i)
+
+          ENDDO
+       ENDDO
+
+!
+!--    Bottom boundary at the outflow
+       IF ( ibc_uv_b == 0 )  THEN
+          u_p(nzb,ny+1,:) = -u_p(nzb+1,ny+1,:) 
+          v_p(nzb,ny+1,:) = -v_p(nzb+1,ny+1,:)  
+       ELSE                    
+          u_p(nzb,ny+1,:) =  u_p(nzb+1,ny+1,:)
+          v_p(nzb,ny+1,:) =  v_p(nzb+1,ny+1,:)
+       ENDIF
+       w_p(nzb,ny+1,:) = 0.0
+
+!
+!--    Top boundary at the outflow
+       IF ( ibc_uv_t == 0 )  THEN
+          u_p(nzt+1,ny+1,:) = ug(nzt+1)
+          v_p(nzt+1,ny+1,:) = vg(nzt+1)
+       ELSE
+          u_p(nzt+1,ny+1,:) = u_p(nzt,nyn+1,:)
+          v_p(nzt+1,ny+1,:) = v_p(nzt,nyn+1,:)
+       ENDIF
+       w_p(nzt:nzt+1,ny+1,:) = 0.0
+
+    ENDIF
+
+    IF ( outflow_l  .AND.                                                 &
+         intermediate_timestep_count == intermediate_timestep_count_max ) &
+    THEN
+
+       c_max = dx / dt_3d
+
+       DO j = nys-1, nyn+1
+          DO k = nzb+1, nzt+1
+
+!
+!--          First calculate the phase speeds for u,v, and w
+             denom = u_m_l(k,j,0) - u_m_l(k,j,1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_u = -c_max * ( u(k,j,0) - u_m_r(k,j,0) ) / denom
+                IF ( c_u > 0.0 )  THEN
+                   c_u = 0.0
+                ELSEIF ( c_u < -c_max )  THEN
+                   c_u = -c_max
+                ENDIF
+             ELSE
+                c_u = -c_max
+             ENDIF
+
+             denom = v_m_l(k,j,0) - v_m_l(k,j,1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_v = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) / denom
+                IF ( c_v < 0.0 )  THEN
+                   c_v = 0.0
+                ELSEIF ( c_v > c_max )  THEN
+                   c_v = c_max
+                ENDIF
+             ELSE
+                c_v = c_max
+             ENDIF
+
+             denom = w_m_l(k,j,0) - w_m_l(k,j,1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_w = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) / denom
+                IF ( c_w < 0.0 )  THEN
+                   c_w = 0.0
+                ELSEIF ( c_w > c_max )  THEN
+                   c_w = c_max
+                ENDIF
+             ELSE
+                c_w = c_max
+             ENDIF
+
+!
+!--          Calculate the new velocities
+             u_p(k,j,-1) = u(k,j,-1) + dt_3d * c_u * &
+                                       ( u(k,j,-1) - u(k,j,0) ) * ddx
+
+             v_p(k,j,-1) = v(k,j,-1) + dt_3d * c_v * &
+                                       ( v(k,j,-1) - v(k,j,0) ) * ddx
+
+             w_p(k,j,-1) = w(k,j,-1) + dt_3d * c_w * &
+                                       ( w(k,j,-1) - w(k,j,0) ) * ddx
+
+!
+!--          Swap timelevels for the next timestep
+             u_m_l(k,j,:) = u(k,j,-1:1)
+             v_m_l(k,j,:) = v(k,j,-1:1)
+             w_m_l(k,j,:) = w(k,j,-1:1)
+
+          ENDDO
+       ENDDO
+
+!
+!--    Bottom boundary at the outflow
+       IF ( ibc_uv_b == 0 )  THEN
+          u_p(nzb,:,-1) = -u_p(nzb+1,:,-1) 
+          v_p(nzb,:,-1) = -v_p(nzb+1,:,-1)  
+       ELSE                    
+          u_p(nzb,:,-1) =  u_p(nzb+1,:,-1)
+          v_p(nzb,:,-1) =  v_p(nzb+1,:,-1)
+       ENDIF
+       w_p(nzb,:,-1) = 0.0
+
+!
+!--    Top boundary at the outflow
+       IF ( ibc_uv_t == 0 )  THEN
+          u_p(nzt+1,:,-1) = ug(nzt+1)
+          v_p(nzt+1,:,-1) = vg(nzt+1)
+       ELSE
+          u_p(nzt+1,:,-1) = u_p(nzt,:,-1)
+          v_p(nzt+1,:,-1) = v_p(nzt,:,-1)
+       ENDIF
+       w_p(nzt:nzt+1,:,-1) = 0.0
+
+    ENDIF
+
+    IF ( outflow_r  .AND.                                                 &
+         intermediate_timestep_count == intermediate_timestep_count_max ) &
+    THEN
+
+       c_max = dx / dt_3d
+
+       DO j = nys-1, nyn+1
+          DO k = nzb+1, nzt+1
+
+!
+!--          First calculate the phase speeds for u,v, and w
+             denom = u_m_r(k,j,nx) - u_m_r(k,j,nx-1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_u = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) / denom
+                IF ( c_u < 0.0 )  THEN
+                   c_u = 0.0
+                ELSEIF ( c_u > c_max )  THEN
+                   c_u = c_max
+                ENDIF
+             ELSE
+                c_u = c_max
+             ENDIF
+
+             denom = v_m_r(k,j,nx) - v_m_r(k,j,nx-1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_v = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) / denom
+                IF ( c_v < 0.0 )  THEN
+                   c_v = 0.0
+                ELSEIF ( c_v > c_max )  THEN
+                   c_v = c_max
+                ENDIF
+             ELSE
+                c_v = c_max
+             ENDIF
+
+             denom = w_m_r(k,j,nx) - w_m_r(k,j,nx-1)
+
+             IF ( denom /= 0.0 )  THEN
+                c_w = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) / denom
+                IF ( c_w < 0.0 )  THEN
+                   c_w = 0.0
+                ELSEIF ( c_w > c_max )  THEN
+                   c_w = c_max
+                ENDIF
+             ELSE
+                c_w = c_max
+             ENDIF
+
+!
+!--          Calculate the new velocities
+             u_p(k,j,nx+1) = u(k,j,nx+1) - dt_3d * c_u * &
+                                           ( u(k,j,nx+1) - u(k,j,nx) ) * ddx
+
+             v_p(k,j,nx+1) = v(k,j,nx+1) - dt_3d * c_v * &
+                                           ( v(k,j,nx+1) - v(k,j,nx) ) * ddx
+
+             w_p(k,j,nx+1) = w(k,j,nx+1) - dt_3d * c_w * &
+                                           ( w(k,j,nx+1) - w(k,j,nx) ) * ddx
+
+!
+!--          Swap timelevels for the next timestep
+             u_m_r(k,j,:) = u(k,j,nx-1:nx+1)
+             v_m_r(k,j,:) = v(k,j,nx-1:nx+1)
+             w_m_r(k,j,:) = w(k,j,nx-1:nx+1)
+
+          ENDDO
+       ENDDO
+
+!
+!--    Bottom boundary at the outflow
+       IF ( ibc_uv_b == 0 )  THEN
+          u_p(nzb,:,nx+1) = -u_p(nzb+1,:,nx+1) 
+          v_p(nzb,:,nx+1) = -v_p(nzb+1,:,nx+1)  
+       ELSE                    
+          u_p(nzb,:,nx+1) =  u_p(nzb+1,:,nx+1)
+          v_p(nzb,:,nx+1) =  v_p(nzb+1,:,nx+1)
+       ENDIF
+       w_p(nzb,:,nx+1) = 0.0
+
+!
+!--    Top boundary at the outflow
+       IF ( ibc_uv_t == 0 )  THEN
+          u_p(nzt+1,:,nx+1) = ug(nzt+1)
+          v_p(nzt+1,:,nx+1) = vg(nzt+1)
+       ELSE
+          u_p(nzt+1,:,nx+1) = u_p(nzt,:,nx+1)
+          v_p(nzt+1,:,nx+1) = v_p(nzt,:,nx+1)
+       ENDIF
+       w(nzt:nzt+1,:,nx+1) = 0.0
 
     ENDIF
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 74)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 75)
@@ -6,8 +6,9 @@
 ! "by_user" allowed as initializing action, -data_output_ts,
 ! leapfrog with non-flat topography not allowed any more, loop_optimization
-! and pt_reference are checked,
+! and pt_reference are checked, moisture renamed humidity,
 ! output of precipitation amount/rate and roughnes length + check
 ! possible negative humidities are avoided in initial profile,
-! dirichlet/neumann changed to dirichlet/radiation, etc.
+! dirichlet/neumann changed to dirichlet/radiation, etc.,
+! revision added to run_description_header
 !
 ! Former revisions:
@@ -80,6 +81,7 @@
     run_time = time(1:2)//':'//time(3:4)//':'//time(5:6)
 
-    WRITE ( run_description_header, '(A,2X,A,A,A,I2.2,2X,A,A,2X,A,1X,A)' )  &
-              TRIM( version ),'run: ', TRIM( run_identifier ), '.', &
+    WRITE ( run_description_header, '(A,2X,A,2X,A,A,A,I2.2,2X,A,A,2X,A,1X,A)' )&
+              TRIM( version ), TRIM( revision ), &
+              'run: ', TRIM( run_identifier ), '.', &
               runnr, 'host: ', TRIM( host ), run_date, run_time
 
@@ -131,6 +133,6 @@
           WRITE( action, '(A)' )  'cloud_droplets = .TRUE.'
        ENDIF
-       IF ( moisture )  THEN
-          WRITE( action, '(A)' )  'moisture = .TRUE.'
+       IF ( humidity )  THEN
+          WRITE( action, '(A)' )  'humidity = .TRUE.'
        ENDIF
        IF ( .NOT. prandtl_layer )  THEN
@@ -353,8 +355,8 @@
     ENDIF
 
-    IF ( cloud_physics  .AND.  .NOT. moisture )  THEN
+    IF ( cloud_physics  .AND.  .NOT. humidity )  THEN
        IF ( myid == 0 )  PRINT*, '+++ check_parameters: cloud_physics =', &
                                  cloud_physics, ' is not allowed with ',  &
-                                 'moisture =', moisture
+                                 'humidity =', humidity
        CALL local_stop
     ENDIF
@@ -367,6 +369,6 @@
     ENDIF
 
-    IF ( moisture  .AND.  sloping_surface )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters: moisture = TRUE', &
+    IF ( humidity  .AND.  sloping_surface )  THEN
+       IF ( myid == 0 )  PRINT*, '+++ check_parameters: humidity = TRUE', &
                                  'and hang = TRUE are not',               &
                                  ' allowed simultaneously' 
@@ -374,12 +376,12 @@
     ENDIF
 
-    IF ( moisture  .AND.  scalar_advec == 'ups-scheme' )  THEN
+    IF ( humidity  .AND.  scalar_advec == 'ups-scheme' )  THEN
        IF ( myid == 0 )  PRINT*, '+++ check_parameters: UPS-scheme', &
-                                 'is not implemented for moisture'
+                                 'is not implemented for humidity'
        CALL local_stop       
     ENDIF
 
-    IF ( passive_scalar  .AND.  moisture )  THEN
-       IF ( myid == 0 )  PRINT*, '+++ check_parameters: moisture = TRUE and', &
+    IF ( passive_scalar  .AND.  humidity )  THEN
+       IF ( myid == 0 )  PRINT*, '+++ check_parameters: humidity = TRUE and', &
                                  'passive_scalar = TRUE is not allowed ',     &
                                  'simultaneously'
@@ -410,5 +412,5 @@
        v_init  = vg_surface
        pt_init = pt_surface
-       IF ( moisture )        q_init = q_surface
+       IF ( humidity )        q_init = q_surface
        IF ( passive_scalar )  q_init = s_surface
 
@@ -552,5 +554,5 @@
        ENDIF
 
-       IF ( moisture  .OR.  passive_scalar )  THEN
+       IF ( humidity  .OR.  passive_scalar )  THEN
 
           i = 1
@@ -760,12 +762,12 @@
           CALL local_stop
        ENDIF
-       IF ( conserve_volume_flow )  THEN
-          IF ( myid == 0 )  THEN
-             PRINT*, '+++ check_parameters:'
-             PRINT*, '    non-cyclic lateral boundaries do not allow', &
-                          ' conserve_volume_flow = .T.' 
-          ENDIF
-          CALL local_stop
-       ENDIF
+!       IF ( conserve_volume_flow )  THEN
+!          IF ( myid == 0 )  THEN
+!             PRINT*, '+++ check_parameters:'
+!             PRINT*, '    non-cyclic lateral boundaries do not allow', &
+!                          ' conserve_volume_flow = .T.' 
+!          ENDIF
+!          CALL local_stop
+!       ENDIF
     ENDIF
 
@@ -907,8 +909,8 @@
 
 !
-!-- In case of moisture or passive scalar, set boundary conditions for total 
+!-- In case of humidity or passive scalar, set boundary conditions for total 
 !-- water content / scalar
-    IF ( moisture  .OR.  passive_scalar ) THEN
-       IF ( moisture )  THEN
+    IF ( humidity  .OR.  passive_scalar ) THEN
+       IF ( humidity )  THEN
           sq = 'q'
        ELSE
@@ -942,5 +944,5 @@
 !
 !--    A given surface humidity implies Dirichlet boundary condition for
-!--    moisture. In this case specification of a constant water flux is
+!--    humidity. In this case specification of a constant water flux is
 !--    forbidden.
        IF ( ibc_q_b == 0  .AND.  constant_waterflux )  THEN
@@ -1552,9 +1554,9 @@
 
           CASE ( 'w"qv"' )
-             IF ( moisture  .AND.  .NOT. cloud_physics ) &
+             IF ( humidity  .AND.  .NOT. cloud_physics ) &
              THEN
                 dopr_index(i) = 48
                 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF( moisture .AND. cloud_physics ) THEN
+             ELSEIF( humidity .AND. cloud_physics ) THEN
                 dopr_index(i) = 51
                 hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 )
@@ -1564,5 +1566,5 @@
                            data_output_pr(i),                          &
                            '    is not implemented for cloud_physics = FALSE', &
-                           '    and                    moisture      = FALSE'
+                           '    and                    humidity      = FALSE'
                 ENDIF
                 CALL local_stop                   
@@ -1570,9 +1572,9 @@
 
           CASE ( 'w*qv*' )
-             IF ( moisture  .AND.  .NOT. cloud_physics ) &
+             IF ( humidity  .AND.  .NOT. cloud_physics ) &
              THEN
                 dopr_index(i) = 49
                 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF( moisture .AND. cloud_physics ) THEN
+             ELSEIF( humidity .AND. cloud_physics ) THEN
                 dopr_index(i) = 52
                 hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 )
@@ -1582,5 +1584,5 @@
                            data_output_pr(i),                                  &
                            '    is not implemented for cloud_physics = FALSE', &
-                           '                       and moisture      = FALSE'
+                           '                       and humidity      = FALSE'
                 ENDIF
                 CALL local_stop                   
@@ -1588,9 +1590,9 @@
 
           CASE ( 'wqv' )
-             IF ( moisture  .AND.  .NOT. cloud_physics ) &
+             IF ( humidity  .AND.  .NOT. cloud_physics ) &
              THEN
                 dopr_index(i) = 50
                 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 )
-             ELSEIF( moisture .AND. cloud_physics ) THEN
+             ELSEIF( humidity .AND. cloud_physics ) THEN
                 dopr_index(i) = 53
                 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 )
@@ -1600,5 +1602,5 @@
                            data_output_pr(i),                                  &
                            '    is not implemented for cloud_physics = FALSE', &
-                           '                       and moisture      = FALSE'
+                           '                       and humidity      = FALSE'
                 ENDIF
                 CALL local_stop                   
@@ -1819,8 +1821,8 @@
 
           CASE ( 'q', 'vpt' )
-             IF ( .NOT. moisture )  THEN
+             IF ( .NOT. humidity )  THEN
                 IF ( myid == 0 )  THEN
                    PRINT*, '+++ check_parameters: output of "', TRIM( var ), &
-                                '" requires moisture = .TRUE.'
+                                '" requires humidity = .TRUE.'
                 ENDIF
                 CALL local_stop
Index: palm/trunk/SOURCE/coriolis.f90
===================================================================
--- palm/trunk/SOURCE/coriolis.f90	(revision 74)
+++ palm/trunk/SOURCE/coriolis.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! uxrp, vynp eliminated
 !
 ! Former revisions:
@@ -56,5 +56,5 @@
 !--       u-component
           CASE ( 1 )
-             DO  i = nxl, nxr+uxrp
+             DO  i = nxl, nxr
                 DO  j = nys, nyn
                    DO  k = nzb_u_inner(j,i)+1, nzt
@@ -74,5 +74,5 @@
           CASE ( 2 )
              DO  i = nxl, nxr
-                DO  j = nys, nyn+vynp
+                DO  j = nys, nyn
                    DO  k = nzb_v_inner(j,i)+1, nzt
                       tend(k,j,i) = tend(k,j,i) - f *     ( 0.25 *          &
Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 74)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 75)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! Output of precipitation amount/rate and roughness length
+! Output of precipitation amount/rate and roughness length,
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -208,5 +209,5 @@
                 IF ( av == 0 )  THEN
                    tend = prt_count
-                   CALL exchange_horiz( tend, 0, 0 )
+                   CALL exchange_horiz( tend )
                    DO  i = nxl-1, nxr+1
                       DO  j = nys-1, nyn+1
@@ -218,5 +219,5 @@
                    resorted = .TRUE.
                 ELSE
-                   CALL exchange_horiz( pc_av, 0, 0 )
+                   CALL exchange_horiz( pc_av )
                    to_be_resorted => pc_av
                 ENDIF
@@ -243,5 +244,5 @@
                       ENDDO
                    ENDDO
-                   CALL exchange_horiz( tend, 0, 0 )
+                   CALL exchange_horiz( tend )
                    DO  i = nxl-1, nxr+1
                       DO  j = nys-1, nyn+1
@@ -253,5 +254,5 @@
                    resorted = .TRUE.
                 ELSE
-                   CALL exchange_horiz( pr_av, 0, 0 )
+                   CALL exchange_horiz( pr_av )
                    to_be_resorted => pr_av
                 ENDIF
Index: palm/trunk/SOURCE/data_output_3d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_3d.f90	(revision 74)
+++ palm/trunk/SOURCE/data_output_3d.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -129,5 +129,5 @@
              IF ( av == 0 )  THEN
                 tend = prt_count
-                CALL exchange_horiz( tend, 0, 0 )
+                CALL exchange_horiz( tend )
                 DO  i = nxl-1, nxr+1
                    DO  j = nys-1, nyn+1
@@ -139,5 +139,5 @@
                 resorted = .TRUE.
              ELSE
-                CALL exchange_horiz( pc_av, 0, 0 )
+                CALL exchange_horiz( pc_av )
                 to_be_resorted => pc_av
              ENDIF
@@ -164,5 +164,5 @@
                    ENDDO
                 ENDDO
-                CALL exchange_horiz( tend, 0, 0 )
+                CALL exchange_horiz( tend )
                 DO  i = nxl-1, nxr+1
                    DO  j = nys-1, nyn+1
@@ -174,5 +174,5 @@
                 resorted = .TRUE.
              ELSE
-                CALL exchange_horiz( pr_av, 0, 0 )
+                CALL exchange_horiz( pr_av )
                 to_be_resorted => pr_av
              ENDIF
Index: palm/trunk/SOURCE/data_output_dvrp.f90
===================================================================
--- palm/trunk/SOURCE/data_output_dvrp.f90	(revision 74)
+++ palm/trunk/SOURCE/data_output_dvrp.f90	(revision 75)
@@ -32,5 +32,6 @@
 ! Actual revisions:
 ! -----------------
-! Particles-package is now part of the default code.
+! Particles-package is now part of the default code,
+! moisture renamed humidity
 ! TEST: write statements
 !
@@ -391,5 +392,5 @@
 
              CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' )
-                IF ( moisture  .OR.  passive_scalar )  THEN
+                IF ( humidity  .OR.  passive_scalar )  THEN
                    DO  i = nxl, nxr+1
                       DO  j = nys, nyn+1
@@ -401,5 +402,5 @@
                 ELSE
                    IF ( myid == 0 )  THEN
-                      PRINT*, '+++ data_output_dvrp: if moisture/passive_scalar = ', & 
+                      PRINT*, '+++ data_output_dvrp: if humidity/passive_scalar = ', & 
                               'FALSE output of ', output_variable,            &
                               'is not provided' 
Index: palm/trunk/SOURCE/diffusion_u.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_u.f90	(revision 74)
+++ palm/trunk/SOURCE/diffusion_u.f90	(revision 75)
@@ -5,5 +5,5 @@
 ! -----------------
 ! Wall functions now include diabatic conditions, call of routine wall_fluxes,
-! z0 removed from argument list
+! z0 removed from argument list, uxrp eliminated
 ! 
 ! Former revisions:
@@ -65,5 +65,5 @@
        REAL, DIMENSION(:,:),   POINTER ::  usws
        REAL, DIMENSION(:,:,:), POINTER ::  km, u, v, w
-       REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr+uxrp) ::  usvs
+       REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) ::  usvs
 
 !
@@ -71,9 +71,9 @@
 !--    if neccessary
        IF ( topography /= 'flat' )  THEN
-          CALL wall_fluxes( usvs, 1.0, 0.0, 0.0, 0.0, uxrp, 0, nzb_u_inner, &
+          CALL wall_fluxes( usvs, 1.0, 0.0, 0.0, 0.0, nzb_u_inner, &
                             nzb_u_outer, wall_u )
        ENDIF
 
-       DO  i = nxl, nxr+uxrp
+       DO  i = nxl, nxr
           DO  j = nys,nyn
 !
Index: palm/trunk/SOURCE/diffusion_v.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_v.f90	(revision 74)
+++ palm/trunk/SOURCE/diffusion_v.f90	(revision 75)
@@ -5,5 +5,5 @@
 ! -----------------
 ! Wall functions now include diabatic conditions, call of routine wall_fluxes,
-! z0 removed from argument list
+! z0 removed from argument list, vynp eliminated
 !
 ! Former revisions:
@@ -63,5 +63,5 @@
        REAL, DIMENSION(:,:),   POINTER ::  vsws
        REAL, DIMENSION(:,:,:), POINTER ::  km, u, v, w
-       REAL, DIMENSION(nzb:nzt+1,nys:nyn+vynp,nxl:nxr) ::  vsus
+       REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) ::  vsus
 
 !
@@ -69,10 +69,10 @@
 !--    if neccessary
        IF ( topography /= 'flat' )  THEN
-          CALL wall_fluxes( vsus, 0.0, 1.0, 0.0, 0.0, 0, vynp, nzb_v_inner, &
+          CALL wall_fluxes( vsus, 0.0, 1.0, 0.0, 0.0, nzb_v_inner, &
                             nzb_v_outer, wall_v )
        ENDIF
 
        DO  i = nxl, nxr
-          DO  j = nys, nyn+vynp
+          DO  j = nys, nyn
 !
 !--          Compute horizontal diffusion
Index: palm/trunk/SOURCE/diffusion_w.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_w.f90	(revision 74)
+++ palm/trunk/SOURCE/diffusion_w.f90	(revision 75)
@@ -69,7 +69,7 @@
 !--    walls, if neccessary
        IF ( topography /= 'flat' )  THEN
-          CALL wall_fluxes( wsus, 0.0, 0.0, 0.0, 1.0, 0, 0, nzb_w_inner, &
+          CALL wall_fluxes( wsus, 0.0, 0.0, 0.0, 1.0, nzb_w_inner, &
                             nzb_w_outer, wall_w_x )
-          CALL wall_fluxes( wsvs, 0.0, 0.0, 1.0, 0.0, 0, 0, nzb_w_inner, &
+          CALL wall_fluxes( wsvs, 0.0, 0.0, 1.0, 0.0, nzb_w_inner, &
                             nzb_w_outer, wall_w_y )
        ENDIF
Index: palm/trunk/SOURCE/disturb_field.f90
===================================================================
--- palm/trunk/SOURCE/disturb_field.f90	(revision 74)
+++ palm/trunk/SOURCE/disturb_field.f90	(revision 75)
@@ -1,8 +1,8 @@
- SUBROUTINE disturb_field( nzb_uv_inner, dist1, field, xrp, ynp )
+ SUBROUTINE disturb_field( nzb_uv_inner, dist1, field )
 
 !------------------------------------------------------------------------------!
 ! Actual revisions:
 ! -----------------
-! 
+! xrp, ynp eliminated, 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -36,10 +36,10 @@
     IMPLICIT NONE
 
-    INTEGER ::  i, j, k, xrp, ynp
+    INTEGER ::  i, j, k
     INTEGER ::  nzb_uv_inner(nys-1:nyn+1,nxl-1:nxr+1)
 
     REAL    ::  randomnumber,                             &
                 dist1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
-                field(nzb:nzt+1,nys-1:nyn+ynp+1,nxl-1:nxr+xrp+1)
+                field(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1)
     REAL, DIMENSION(:,:,:), ALLOCATABLE ::  dist2
 
@@ -94,5 +94,5 @@
 !
 !-- Exchange of ghost points for the random perturbation
-    CALL exchange_horiz( dist1, 0, 0 )
+    CALL exchange_horiz( dist1 )
 
 !
@@ -114,5 +114,5 @@
 !-- Exchange of ghost points for the filtered perturbation.
 !-- Afterwards, filter operation and exchange of ghost points are repeated.
-    CALL exchange_horiz( dist2, 0, 0 )
+    CALL exchange_horiz( dist2 )
     DO  i = nxl, nxr
        DO  j = nys, nyn
@@ -125,5 +125,5 @@
        ENDDO
     ENDDO
-    CALL exchange_horiz( dist1, 0, 0 )
+    CALL exchange_horiz( dist1 )
 
 !
Index: palm/trunk/SOURCE/exchange_horiz.f90
===================================================================
--- palm/trunk/SOURCE/exchange_horiz.f90	(revision 74)
+++ palm/trunk/SOURCE/exchange_horiz.f90	(revision 75)
@@ -1,8 +1,9 @@
- SUBROUTINE exchange_horiz( ar, xrp, ynp )
+ SUBROUTINE exchange_horiz( ar )
 
 !------------------------------------------------------------------------------!
 ! Actual revisions:
 ! -----------------
-! 
+! Special cases for additional gridpoints along x or y in case of non-cyclic
+! boundary conditions are not regarded any more
 !
 ! Former revisions:
@@ -32,13 +33,10 @@
     IMPLICIT NONE
 
-    INTEGER ::  xrp, ynp
-
 #if defined( __parallel )
-    INTEGER                               ::  typexz
     INTEGER, DIMENSION(4)                 ::  req
     INTEGER, DIMENSION(MPI_STATUS_SIZE,4) ::  wait_stat
 #endif
 
-    REAL ::  ar(nzb:nzt+1,nys-1:nyn+ynp+1,nxl-1:nxr+xrp+1)
+    REAL ::  ar(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1)
 
 
@@ -59,4 +57,5 @@
 
     ELSE
+
        req = 0
 !
@@ -76,5 +75,6 @@
                ar(nzb,nys-1,nxl-1), ngp_yz(grid_level), MPI_REAL, pleft,  1, &
                           comm2d, req(4), ierr )
-       call MPI_Waitall (4,req,wait_stat,ierr)
+       CALL MPI_WAITALL( 4, req, wait_stat, ierr )
+
     ENDIF
 
@@ -90,28 +90,20 @@
 
     ELSE
-!
-!--    Set the MPI data type, which depends on the size of the array
-!--    (the v array has an additional gridpoint along y in case of non-cyclic
-!--    boundary conditions)
-       IF ( ynp == 0 )  THEN
-          typexz = type_xz(grid_level)
-       ELSE
-          typexz = type_xz_p
-       ENDIF
 
        req = 0
 !
 !--    Send front boundary, receive rear one
-       CALL MPI_ISEND( ar(nzb,nys,nxl-1),   1, typexz, psouth, 0, comm2d, &
-                       req(1), ierr )
-       CALL MPI_IRECV( ar(nzb,nyn+1,nxl-1), 1, typexz, pnorth, 0, comm2d, &
-                       req(2), ierr )
+       CALL MPI_ISEND( ar(nzb,nys,nxl-1),   1, type_xz(grid_level), psouth, 0, &
+                       comm2d, req(1), ierr )
+       CALL MPI_IRECV( ar(nzb,nyn+1,nxl-1), 1, type_xz(grid_level), pnorth, 0, &
+                       comm2d, req(2), ierr )
 !
 !--    Send rear boundary, receive front one
-       CALL MPI_ISEND( ar(nzb,nyn,nxl-1),   1, typexz, pnorth, 1, comm2d, &
-                       req(3), ierr )
-       CALL MPI_IRECV( ar(nzb,nys-1,nxl-1), 1, typexz, psouth, 1, comm2d, &
-                       req(4), ierr )
-       call MPI_Waitall (4,req,wait_stat,ierr)
+       CALL MPI_ISEND( ar(nzb,nyn,nxl-1),   1, type_xz(grid_level), pnorth, 1, &
+                       comm2d, req(3), ierr )
+       CALL MPI_IRECV( ar(nzb,nys-1,nxl-1), 1, type_xz(grid_level), psouth, 1, &
+                       comm2d, req(4), ierr )
+       call MPI_WAITALL( 4, req, wait_stat, ierr )
+
     ENDIF
 
Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 74)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! Collection of time series quantities moved from routine flow_statistics to
-! here, routine user_statistics is called for each statistic region
+! here, routine user_statistics is called for each statistic region,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -115,5 +116,5 @@
 !--    total water content, specific humidity and liquid water potential
 !--    temperature
-       IF ( moisture )  THEN
+       IF ( humidity )  THEN
           !$OMP DO
           DO  i = nxl, nxr
@@ -164,5 +165,5 @@
              sums_l(:,2,0) = sums_l(:,2,0) + sums_l(:,2,i)
              sums_l(:,4,0) = sums_l(:,4,0) + sums_l(:,4,i)
-             IF ( moisture )  THEN
+             IF ( humidity )  THEN
                 sums_l(:,41,0) = sums_l(:,41,0) + sums_l(:,41,i)
                 sums_l(:,44,0) = sums_l(:,44,0) + sums_l(:,44,i)
@@ -187,5 +188,5 @@
        CALL MPI_ALLREDUCE( sums_l(nzb,4,0), sums(nzb,4), nzt+2-nzb, MPI_REAL, &
                            MPI_SUM, comm2d, ierr )
-       IF ( moisture ) THEN
+       IF ( humidity ) THEN
           CALL MPI_ALLREDUCE( sums_l(nzb,44,0), sums(nzb,44), nzt+2-nzb, &
                               MPI_REAL, MPI_SUM, comm2d, ierr )
@@ -208,5 +209,5 @@
        sums(:,2) = sums_l(:,2,0)
        sums(:,4) = sums_l(:,4,0)
-       IF ( moisture ) THEN
+       IF ( humidity ) THEN
           sums(:,44) = sums_l(:,44,0)
           sums(:,41) = sums_l(:,41,0)
@@ -231,5 +232,5 @@
 !
 !--    Humidity and cloud parameters
-       IF ( moisture ) THEN
+       IF ( humidity ) THEN
           sums(:,44) = sums(:,44) / ngp_2dh_outer(:,sr)
           sums(:,41) = sums(:,41) / ngp_2dh_outer(:,sr)
@@ -365,5 +366,5 @@
 !
 !--             Buoyancy flux, water flux (humidity flux) w"q"
-                IF ( moisture ) THEN
+                IF ( humidity ) THEN
                    sums_l(k,45,tn) = sums_l(k,45,tn)                           &
                                          - 0.5 * ( kh(k,j,i) + kh(k+1,j,i) )   &
@@ -407,5 +408,5 @@
                 sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + &
                                     0.0 * rmask(j,i,sr)           ! v"pt"
-                IF ( moisture )  THEN
+                IF ( humidity )  THEN
                    sums_l(nzb,48,tn) = sums_l(nzb,48,tn) + &
                                        qsws(j,i) * rmask(j,i,sr)  ! w"q" (w"qv")
@@ -437,5 +438,5 @@
                 sums_l(nzt,61,tn) = sums_l(nzt,61,tn) + &
                                     0.0 * rmask(j,i,sr)           ! v"pt"
-                IF ( moisture )  THEN
+                IF ( humidity )  THEN
                    sums_l(nzt,48,tn) = sums_l(nzt,48,tn) + &
                                        qswst(j,i) * rmask(j,i,sr)  ! w"q" (w"qv")
@@ -499,5 +500,5 @@
 !--             Buoyancy flux, water flux, humidity flux and liquid water
 !--             content
-                IF ( moisture )  THEN
+                IF ( humidity )  THEN
                    pts = 0.5 * ( vpt(k,j,i)   - hom(k,1,44,sr) + &
                                  vpt(k+1,j,i) - hom(k+1,1,44,sr) )
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 74)
+++ palm/trunk/SOURCE/header.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! Output of netcdf_64bit_3d, particles-package is now part of the default code,
-! output of the loop optimization method.
+! output of the loop optimization method, moisture renamed humidity,
+! output of subversion revision number
 !
 ! Former revisions:
@@ -52,4 +53,5 @@
     CHARACTER (LEN=10) ::  coor_chr, host_chr
     CHARACTER (LEN=16) ::  begin_chr
+    CHARACTER (LEN=21) ::  ver_rev
     CHARACTER (LEN=40) ::  output_format
     CHARACTER (LEN=70) ::  char1, char2, coordinates, gradients, dopr_chr, &
@@ -95,5 +97,6 @@
 !-- Run-identification, date, time, host
     host_chr = host(1:10)
-    WRITE ( io, 100 )  version, TRIM( run_classification ), run_date, &
+    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
+    WRITE ( io, 100 )  ver_rev, TRIM( run_classification ), run_date, &
                        run_identifier, run_time, runnr, ADJUSTR( host_chr )
 #if defined( __parallel )
@@ -217,5 +220,5 @@
        WRITE ( io, 123 )  rayleigh_damping_height, rayleigh_damping_factor
     ENDIF
-    IF ( moisture )  THEN
+    IF ( humidity )  THEN
        IF ( .NOT. cloud_physics )  THEN
           WRITE ( io, 129 )
@@ -370,6 +373,6 @@
     ENDIF
 
-    IF ( moisture  .OR.  passive_scalar )  THEN
-       IF ( moisture )  THEN
+    IF ( humidity  .OR.  passive_scalar )  THEN
+       IF ( humidity )  THEN
           IF ( ibc_q_b == 0 )  THEN
              runten = 'q(0)     = q_surface'
@@ -405,5 +408,5 @@
           IF ( random_heatflux )  WRITE ( io, 307 )
        ENDIF
-       IF ( moisture  .AND.  constant_waterflux )  THEN
+       IF ( humidity  .AND.  constant_waterflux )  THEN
           WRITE ( io, 311 ) surface_waterflux
        ENDIF
@@ -418,5 +421,5 @@
           WRITE ( io, 306 )  top_heatflux
        ENDIF
-       IF ( moisture  .OR.  passive_scalar )  THEN
+       IF ( humidity  .OR.  passive_scalar )  THEN
           WRITE ( io, 315 )
        ENDIF
@@ -426,5 +429,5 @@
        WRITE ( io, 305 )  zu(1), roughness_length, kappa, rif_min, rif_max
        IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
-       IF ( moisture  .AND.  .NOT. constant_waterflux )  THEN
+       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
           WRITE ( io, 312 )
        ENDIF
@@ -955,5 +958,5 @@
 !-- Initial humidity profile
 !-- Building output strings, starting with surface humidity
-    IF ( moisture  .OR.  passive_scalar )  THEN
+    IF ( humidity  .OR.  passive_scalar )  THEN
        WRITE ( temperatures, '(E8.1)' )  q_surface
        gradients = '--------'
@@ -978,5 +981,5 @@
        ENDDO
 
-       IF ( moisture )  THEN
+       IF ( humidity )  THEN
           WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
                              TRIM( gradients ), TRIM( slices )
@@ -1021,5 +1024,5 @@
        WRITE ( io, 475 )  pt_surface_initial_change
     ENDIF
-    IF ( moisture  .AND.  q_surface_initial_change /= 0.0 )  THEN
+    IF ( humidity  .AND.  q_surface_initial_change /= 0.0 )  THEN
        WRITE ( io, 476 )  q_surface_initial_change       
     ENDIF
@@ -1113,7 +1116,7 @@
 
  99 FORMAT (1X,78('-'))
-100 FORMAT (/10X,'****************',11X,28('-')/                &
-            10X,'*  ',A12,'*',11X,A/                            &
-            10X,'****************',11X,28('-')//                &
+100 FORMAT (/1X,'*************************',11X,28('-')/        &
+            1X,'* ',A,' *',11X,A/                               &
+            1X,'*************************',11X,28('-')//        &
             ' Date:            ',A8,11X,'Run:       ',A20/      &
             ' Time:            ',A8,11X,'Run-No.:   ',I2.2/     &
Index: palm/trunk/SOURCE/init_1d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_1d_model.f90	(revision 74)
+++ palm/trunk/SOURCE/init_1d_model.f90	(revision 75)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! Bugfix: preset of tendencies te_em, te_um, te_vm
+! Bugfix: preset of tendencies te_em, te_um, te_vm,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -125,5 +126,5 @@
     vsws1d = 0.0; vsws1d_m = 0.0
     z01d = roughness_length
-    IF ( moisture .OR. passive_scalar )  qs1d = 0.0
+    IF ( humidity .OR. passive_scalar )  qs1d = 0.0
 
 !
@@ -216,5 +217,5 @@
                 kmzm = 0.5 * ( km1d_m(k-1) + km1d_m(k) )
                 kmzp = 0.5 * ( km1d_m(k) + km1d_m(k+1) )
-                IF ( .NOT. moisture )  THEN
+                IF ( .NOT. humidity )  THEN
                    pt_0 = pt_init(k)
                    flux =  ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k)
@@ -256,5 +257,5 @@
              kmzm = 0.5 * ( km1d_m(k-1) + km1d_m(k) )
              kmzp = 0.5 * ( km1d_m(k) + km1d_m(k+1) )
-             IF ( .NOT. moisture )  THEN
+             IF ( .NOT. humidity )  THEN
                 pt_0 = pt_init(k)
                 flux =  ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k)
@@ -450,5 +451,5 @@
 
              IF ( prandtl_layer )  THEN
-                IF ( .NOT. moisture )  THEN
+                IF ( .NOT. humidity )  THEN
                    pt_0 = pt_init(nzb+1)
                    flux = ts1d
@@ -462,5 +463,5 @@
 
              DO  k = nzb_diff, nzt
-                IF ( .NOT. moisture )  THEN
+                IF ( .NOT. humidity )  THEN
                    pt_0 = pt_init(k)
                    flux = ( pt_init(k+1) - pt_init(k-1) ) * dd2zu(k)
@@ -544,5 +545,5 @@
                 e1d(nzb) = e1d(nzb+1)
 
-                IF ( moisture .OR. passive_scalar ) THEN
+                IF ( humidity .OR. passive_scalar ) THEN
 !
 !--                Compute q* 
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 74)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 75)
@@ -9,9 +9,10 @@
 ! Arrays for radiation boundary conditions are allocated (u_m_l, u_m_r, etc.),
 ! bugfix for cases with the outflow damping layer extending over more than one
-! subdomain,
-! New initializing action "by_user" calls user_init_3d_model,
+! subdomain, moisture renamed humidity,
+! new initializing action "by_user" calls user_init_3d_model,
 ! precipitation_amount/rate, ts_value are allocated, +module netcdf_control,
 ! initial velocities at nzb+1 are regarded for volume
 ! flow control in case they have been set zero before (to avoid small timesteps)
+! -uvmean_outflow, uxrp, vynp eliminated
 !
 ! Former revisions:
@@ -76,6 +77,5 @@
               sums_divnew_l(0:statistic_regions),                           &
               sums_divold_l(0:statistic_regions) )
-    ALLOCATE( rdf(nzb+1:nzt), uvmean_outflow(nzb:nzt+1),                    &
-              uvmean_outflow_l(nzb:nzt+1) )
+    ALLOCATE( rdf(nzb+1:nzt) )
     ALLOCATE( hom_sum(nzb:nzt+1,var_hom,0:statistic_regions),               &
               ngp_2dh_outer(nzb:nzt+1,0:statistic_regions),                 &
@@ -105,23 +105,23 @@
     ENDIF
 
-    ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra),             &
-              e_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),      &
-              e_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),      &
-              e_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),      &
-              kh_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              km_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              p(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),        &
-              pt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              pt_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              pt_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),     &
-              u_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1+uxrp), &
-              u_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1+uxrp), &
-              u_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1+uxrp), &
-              v_1(nzb:nzt+1,nys-1:nyn+1+vynp,nxl-1:nxr+1), &
-              v_2(nzb:nzt+1,nys-1:nyn+1+vynp,nxl-1:nxr+1), &
-              v_3(nzb:nzt+1,nys-1:nyn+1+vynp,nxl-1:nxr+1), &
-              w_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),      &
-              w_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),      &
+    ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra),         &
+              e_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              e_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              e_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              kh_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              km_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              p(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),    &
+              pt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              pt_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              pt_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              u_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              u_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              u_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              v_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              v_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              v_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
+              w_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
+              w_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
               w_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
 
@@ -131,7 +131,7 @@
     ENDIF
 
-    IF ( moisture  .OR.  passive_scalar ) THEN
-!
-!--    2D-moisture/scalar arrays
+    IF ( humidity  .OR.  passive_scalar ) THEN
+!
+!--    2D-humidity/scalar arrays
        ALLOCATE ( qs(nys-1:nyn+1,nxl-1:nxr+1),     &
                   qsws_1(nys-1:nyn+1,nxl-1:nxr+1), &
@@ -143,5 +143,5 @@
        ENDIF
 !
-!--    3D-moisture/scalar arrays
+!--    3D-humidity/scalar arrays
        ALLOCATE( q_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
                  q_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), &
@@ -149,6 +149,6 @@
 
 !
-!--    3D-arrays needed for moisture only
-       IF ( moisture )  THEN
+!--    3D-arrays needed for humidity only
+       IF ( humidity )  THEN
           ALLOCATE( vpt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
 
@@ -212,22 +212,22 @@
 !-- conditions
     IF ( outflow_l )  THEN
-       ALLOCATE( u_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1,-2:-1), &
-                 v_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1,-2:-1), &
-                 w_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1,-2:-1) )
+       ALLOCATE( u_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1), &
+                 v_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1), &
+                 w_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1) )
     ENDIF
     IF ( outflow_r )  THEN
-       ALLOCATE( u_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1,-2:-1), &
-                 v_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1,-2:-1), &
-                 w_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1,-2:-1) )
+       ALLOCATE( u_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1), &
+                 v_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1), &
+                 w_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1) )
     ENDIF
     IF ( outflow_s )  THEN
-       ALLOCATE( u_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1,-2:-1), &
-                 v_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1,-2:-1), &
-                 w_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1,-2:-1) )
+       ALLOCATE( u_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1), &
+                 v_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1), &
+                 w_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1) )
     ENDIF
     IF ( outflow_n )  THEN
-       ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1,-2:-1), &
-                 v_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1,-2:-1), &
-                 w_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1,-2:-1) )
+       ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1), &
+                 v_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1), &
+                 w_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1) )
     ENDIF
 
@@ -249,9 +249,9 @@
        w_m  => w_1;   w  => w_2;   w_p  => w_3;   tw_m  => w_3
 
-       IF ( moisture  .OR.  passive_scalar )  THEN
+       IF ( humidity  .OR.  passive_scalar )  THEN
           qsws_m  => qsws_1;   qsws  => qsws_2
           qswst_m => qswst_1;  qswst => qswst_2
           q_m    => q_1;     q    => q_2;     q_p => q_3;     tq_m => q_3
-          IF ( moisture )        vpt_m  => vpt_1;   vpt  => vpt_2
+          IF ( humidity )        vpt_m  => vpt_1;   vpt  => vpt_2
           IF ( cloud_physics )   ql   => ql_1
           IF ( cloud_droplets )  THEN
@@ -276,9 +276,9 @@
        w     => w_1;   w_p  => w_2;   tw_m  => w_3;   w_m  => w_3
 
-       IF ( moisture  .OR.  passive_scalar )  THEN
+       IF ( humidity  .OR.  passive_scalar )  THEN
           qsws   => qsws_1
           qswst  => qswst_1
           q      => q_1;     q_p  => q_2;     tq_m => q_3;    q_m => q_3
-          IF ( moisture )        vpt  => vpt_1
+          IF ( humidity )        vpt  => vpt_1
           IF ( cloud_physics )   ql   => ql_1
           IF ( cloud_droplets )  THEN
@@ -309,18 +309,10 @@
                 km(:,j,i) = km1d
                 pt(:,j,i) = pt_init
-             ENDDO
-          ENDDO
-          DO  i = nxl-1, nxr+uxrp+1
-             DO  j = nys-1, nyn+1
                 u(:,j,i)  = u1d
-             ENDDO
-          ENDDO
-          DO  i = nxl-1, nxr+1
-             DO  j = nys-1, nyn+vynp+1
                 v(:,j,i)  = v1d
              ENDDO
           ENDDO
 
-          IF ( moisture  .OR.  passive_scalar )  THEN
+          IF ( humidity  .OR.  passive_scalar )  THEN
              DO  i = nxl-1, nxr+1
                 DO  j = nys-1, nyn+1
@@ -368,5 +360,5 @@
 !--       This could actually be computed more accurately in the 1D model.
 !--       Update when opportunity arises!
-          IF ( moisture  .OR.  passive_scalar )  qs = 0.0
+          IF ( humidity  .OR.  passive_scalar )  qs = 0.0
 
 !
@@ -419,16 +411,9 @@
              DO  j = nys-1, nyn+1
                 pt(:,j,i) = pt_init
-             ENDDO
-          ENDDO
-          DO  i = nxl-1, nxr+uxrp+1
-             DO  j = nys-1, nyn+1
                 u(:,j,i)  = u_init
-             ENDDO
-          ENDDO
-          DO  i = nxl-1, nxr+1
-             DO  j = nys-1, nyn+vynp+1
                 v(:,j,i)  = v_init
              ENDDO
           ENDDO
+
 !
 !--       Set initial horizontal velocities at the lowest computational grid levels
@@ -458,5 +443,5 @@
           ENDIF
 
-          IF ( moisture  .OR.  passive_scalar )  THEN
+          IF ( humidity  .OR.  passive_scalar )  THEN
              DO  i = nxl-1, nxr+1
                 DO  j = nys-1, nyn+1
@@ -482,5 +467,5 @@
           usws = 0.0
           vsws = 0.0
-          IF ( moisture  .OR.  passive_scalar ) qs = 0.0
+          IF ( humidity  .OR.  passive_scalar ) qs = 0.0
 
 !
@@ -499,5 +484,5 @@
 !
 !--    Calculate virtual potential temperature
-       IF ( moisture ) vpt = pt * ( 1.0 + 0.61 * q )
+       IF ( humidity ) vpt = pt * ( 1.0 + 0.61 * q )
 
 !
@@ -515,5 +500,5 @@
 
 
-       IF ( moisture )  THEN
+       IF ( humidity )  THEN
 !
 !--       Store initial profile of total water content, virtual potential
@@ -564,5 +549,5 @@
 !
 !--       Determine the near-surface water flux
-          IF ( moisture  .OR.  passive_scalar )  THEN
+          IF ( humidity  .OR.  passive_scalar )  THEN
              IF ( constant_waterflux )  THEN
                 qsws   = surface_waterflux
@@ -585,5 +570,5 @@
              IF ( ASSOCIATED( tswst_m ) )  tswst_m = tswst
 
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 qswst = 0.0
                 IF ( ASSOCIATED( qswst_m ) )  qswst_m = qswst
@@ -610,5 +595,5 @@
           ENDIF
 
-          IF ( moisture  .OR.  passive_scalar )  THEN
+          IF ( humidity  .OR.  passive_scalar )  THEN
              IF ( .NOT. constant_waterflux )  THEN
                 qsws   = 0.0
@@ -709,5 +694,5 @@
 !--    If required, change the surface humidity/scalar at the start of the 3D
 !--    run
-       IF ( ( moisture .OR. passive_scalar ) .AND. &
+       IF ( ( humidity .OR. passive_scalar ) .AND. &
             q_surface_initial_change /= 0.0 )  THEN
           q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change
@@ -722,6 +707,6 @@
 !--    remove the divergences from the velocity field
        IF ( create_disturbances )  THEN
-          CALL disturb_field( nzb_u_inner, tend, u, uxrp,    0 )
-          CALL disturb_field( nzb_v_inner, tend, v,    0, vynp )
+          CALL disturb_field( nzb_u_inner, tend, u )
+          CALL disturb_field( nzb_v_inner, tend, v )
           n_sor = nsor_ini
           CALL pres
@@ -746,9 +731,9 @@
        e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w
 
-       IF ( moisture  .OR.  passive_scalar )  THEN
+       IF ( humidity  .OR.  passive_scalar )  THEN
           IF ( ASSOCIATED( q_m ) )  q_m = q
           IF ( timestep_scheme(1:5) == 'runge' )  tq_m = 0.0
           q_p = q
-          IF ( moisture  .AND.  ASSOCIATED( vpt_m ) )  vpt_m = vpt
+          IF ( humidity  .AND.  ASSOCIATED( vpt_m ) )  vpt_m = vpt
        ENDIF
 
@@ -756,34 +741,22 @@
 !--    Initialize old timelevels needed for radiation boundary conditions
        IF ( outflow_l )  THEN
-          u_m_l(:,:,:,-2) = u(:,:,-1:1)
-          v_m_l(:,:,:,-2) = v(:,:,-1:1)
-          w_m_l(:,:,:,-2) = w(:,:,-1:1)
-          u_m_l(:,:,:,-1) = u(:,:,-1:1)
-          v_m_l(:,:,:,-1) = v(:,:,-1:1)
-          w_m_l(:,:,:,-1) = w(:,:,-1:1)
+          u_m_l(:,:,:) = u(:,:,-1:1)
+          v_m_l(:,:,:) = v(:,:,-1:1)
+          w_m_l(:,:,:) = w(:,:,-1:1)
        ENDIF
        IF ( outflow_r )  THEN
-          u_m_r(:,:,:,-2) = u(:,:,nx-1:nx+1)
-          v_m_r(:,:,:,-2) = v(:,:,nx-1:nx+1)
-          w_m_r(:,:,:,-2) = w(:,:,nx-1:nx+1)
-          u_m_r(:,:,:,-1) = u(:,:,nx-1:nx+1)
-          v_m_r(:,:,:,-1) = v(:,:,nx-1:nx+1)
-          w_m_r(:,:,:,-1) = w(:,:,nx-1:nx+1)
+          u_m_r(:,:,:) = u(:,:,nx-1:nx+1)
+          v_m_r(:,:,:) = v(:,:,nx-1:nx+1)
+          w_m_r(:,:,:) = w(:,:,nx-1:nx+1)
        ENDIF
        IF ( outflow_s )  THEN
-          u_m_s(:,:,:,-2) = u(:,-1:1,:)
-          v_m_s(:,:,:,-2) = v(:,-1:1,:)
-          w_m_s(:,:,:,-2) = w(:,-1:1,:)
-          u_m_s(:,:,:,-1) = u(:,-1:1,:)
-          v_m_s(:,:,:,-1) = v(:,-1:1,:)
-          w_m_s(:,:,:,-1) = w(:,-1:1,:)
+          u_m_s(:,:,:) = u(:,-1:1,:)
+          v_m_s(:,:,:) = v(:,-1:1,:)
+          w_m_s(:,:,:) = w(:,-1:1,:)
        ENDIF
        IF ( outflow_n )  THEN
-          u_m_n(:,:,:,-2) = u(:,ny-1:ny+1,:)
-          v_m_n(:,:,:,-2) = v(:,ny-1:ny+1,:)
-          w_m_n(:,:,:,-2) = w(:,ny-1:ny+1,:)
-          u_m_n(:,:,:,-1) = u(:,ny-1:ny+1,:)
-          v_m_n(:,:,:,-1) = v(:,ny-1:ny+1,:)
-          w_m_n(:,:,:,-1) = w(:,ny-1:ny+1,:)
+          u_m_n(:,:,:) = u(:,ny-1:ny+1,:)
+          v_m_n(:,:,:) = v(:,ny-1:ny+1,:)
+          w_m_n(:,:,:) = w(:,ny-1:ny+1,:)
        ENDIF
 
@@ -803,5 +776,5 @@
 !--    including ghost points)
        e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w
-       IF ( moisture  .OR.  passive_scalar )  q_p = q
+       IF ( humidity  .OR.  passive_scalar )  q_p = q
 
     ELSE
Index: palm/trunk/SOURCE/init_grid.f90
===================================================================
--- palm/trunk/SOURCE/init_grid.f90	(revision 74)
+++ palm/trunk/SOURCE/init_grid.f90	(revision 75)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! storage of topography height arrays zu_s_inner and zw_s_inner
+! storage of topography height arrays zu_s_inner and zw_s_inner,
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -823,5 +824,5 @@
 !
 !-- Need to set lateral boundary conditions for l_wall
-    CALL exchange_horiz( l_wall, 0, 0 )
+    CALL exchange_horiz( l_wall )
 
     DEALLOCATE( corner_nl, corner_nr, corner_sl, corner_sr, nzb_local, &
Index: palm/trunk/SOURCE/init_pegrid.f90
===================================================================
--- palm/trunk/SOURCE/init_pegrid.f90	(revision 74)
+++ palm/trunk/SOURCE/init_pegrid.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! uxrp, vynp eliminated,
-! dirichlet/neumann changed to dirichlet/radiation, etc.
+! dirichlet/neumann changed to dirichlet/radiation, etc.,
+! poisfft_init is only called if fft-solver is switched on
 !
 ! Former revisions:
@@ -493,9 +494,4 @@
     nzta = nz
     nnz  = nz
-
-!
-!-- For non-cyclic boundaries extend array u (v) by one gridpoint
-!    IF ( bc_lr /= 'cyclic' )  uxrp = 1
-!    IF ( bc_ns /= 'cyclic' )  vynp = 1
 
 !
@@ -757,5 +753,4 @@
           inflow_r  = .TRUE.
        ENDIF
-!       uxrp      = 1
     ENDIF
 
@@ -774,22 +769,10 @@
           outflow_n = .TRUE.
        ENDIF
-!       vynp      = 1
-    ENDIF
-
-!
-!-- Additional MPI derived data type for the exchange of ghost points along x
-!-- needed in case of non-cyclic boundary conditions along y on the northmost
-!-- processors (for the exchange of the enlarged v array)
-    IF ( bc_ns /= 'cyclic'  .AND.  pnorth == MPI_PROC_NULL )  THEN
-       ngp_yz_p = ( nzt - nzb + 2 ) * ( nyn + vynp - nys + 3 )
-       CALL MPI_TYPE_VECTOR( nxr-nxl+3, nzt-nzb+2, ngp_yz_p, &
-                             MPI_REAL, type_xz_p, ierr )
-       CALL MPI_TYPE_COMMIT( type_xz_p, ierr )
-    ENDIF
+    ENDIF
+
 #else
     IF ( bc_lr == 'dirichlet/radiation' )  THEN
        inflow_l  = .TRUE.
        outflow_r = .TRUE.
-!       uxrp      = 1
     ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
        outflow_l = .TRUE.
@@ -803,5 +786,4 @@
        outflow_n = .TRUE.
        inflow_s  = .TRUE.
-!       vynp      = 1
     ENDIF
 #endif
@@ -809,5 +791,5 @@
     IF ( psolver == 'poisfft_hybrid' )  THEN
        CALL poisfft_hybrid_ini
-    ELSE
+    ELSEIF ( psolver == 'poisfft' )  THEN
        CALL poisfft_init
     ENDIF
Index: palm/trunk/SOURCE/init_pt_anomaly.f90
===================================================================
--- palm/trunk/SOURCE/init_pt_anomaly.f90	(revision 74)
+++ palm/trunk/SOURCE/init_pt_anomaly.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -70,5 +70,5 @@
 !
 !-- Exchange of boundary values for temperature
-    CALL exchange_horiz( pt, 0, 0 )
+    CALL exchange_horiz( pt )
 
 
Index: palm/trunk/SOURCE/init_rankine.f90
===================================================================
--- palm/trunk/SOURCE/init_rankine.f90	(revision 74)
+++ palm/trunk/SOURCE/init_rankine.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! uxrp, vynp eliminated, 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -129,6 +129,6 @@
 !
 !-- Exchange of boundary values for the velocities.
-    CALL exchange_horiz( u, uxrp,    0 )
-    CALL exchange_horiz( v,    0, vynp )
+    CALL exchange_horiz( u )
+    CALL exchange_horiz( v )
 !
 !-- Make velocity field nondivergent.
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 74)
+++ palm/trunk/SOURCE/modules.f90	(revision 75)
@@ -9,8 +9,9 @@
 ! +loop_optimization, netcdf_64bit_3d, zu_s_inner, zw_w_inner, id_var_zusi_*,
 ! id_var_zwwi_*, ts_value, u_nzb_p1_for_vfc, v_nzb_p1_for_vfc, pt_reference,
-! use_pt_reference, precipitation_amount_interval
-! +age_m in particle_type
-! -data_output_ts, dots_n
-! arrays dots_label and dots_unit now dimensioned with dots_max
+! use_pt_reference, precipitation_amount_interval, revision
+! +age_m in particle_type, moisture renamed humidity,
+! -data_output_ts, dots_n, uvmean_outflow, uxrp, vynp,
+! arrays dots_label and dots_unit now dimensioned with dots_max,
+! setting of palm version moved to main program
 !
 ! Former revisions:
@@ -81,6 +82,6 @@
     REAL, DIMENSION(:), ALLOCATABLE ::                                         &
           ddzu, dd2zu, dzu, ddzw, dzw, km_damp_x, km_damp_y, l_grid, pt_init,  &
-          q_init, rdf, ug, uvmean_outflow, uvmean_outflow_l, u_init,           &
-          u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, zu, zw
+          q_init, rdf, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,               &
+          v_nzb_p1_for_vfc, zu, zw
 
     REAL, DIMENSION(:,:), ALLOCATABLE ::                                       &
@@ -96,5 +97,6 @@
 
     REAL, DIMENSION(:,:,:), ALLOCATABLE ::                                     &
-          d, diss, l_wall, tend
+          d, diss, l_wall, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n,     &
+          v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s
 
     REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                             &
@@ -111,7 +113,5 @@
           vpt, vpt_m, w, w_m, w_p
 
-    REAL, DIMENSION(:,:,:,:), ALLOCATABLE ::  rif_wall, u_m_l, u_m_n, u_m_r,   &
-          u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s
-                                                    
+    REAL, DIMENSION(:,:,:,:), ALLOCATABLE ::  rif_wall
 
     SAVE
@@ -217,5 +217,5 @@
     CHARACTER (LEN=8)   ::  run_date, run_time
     CHARACTER (LEN=9)   ::  simulated_time_chr
-    CHARACTER (LEN=12)  ::  version = 'PALM   3.2'
+    CHARACTER (LEN=12)  ::  version = ' ', revision = ' '
     CHARACTER (LEN=16)  ::  loop_optimization = 'default', &
                             momentum_advec = 'pw-scheme', &
@@ -236,6 +236,6 @@
     CHARACTER (LEN=40)  ::  avs_data_file, topography = 'flat'
     CHARACTER (LEN=64)  ::  host
-    CHARACTER (LEN=80)  ::  log_message, run_description_header, run_identifier
-    CHARACTER (LEN=100) ::  initializing_actions = ' '
+    CHARACTER (LEN=80)  ::  log_message, run_identifier
+    CHARACTER (LEN=100) ::  initializing_actions = ' ', run_description_header
 
     CHARACTER (LEN=7),  DIMENSION(100) ::  do3d_comp_prec = ' '
@@ -293,7 +293,7 @@
                 first_call_advec_particles = .TRUE., &
                 force_print_header = .FALSE., galilei_transformation = .FALSE.,&
-                inflow_l = .FALSE., inflow_n = .FALSE., inflow_r = .FALSE., &
-                inflow_s = .FALSE., iso2d_output = .FALSE., &
-                mg_switch_to_pe0 = .FALSE., moisture = .FALSE., &
+                humidity = .FALSE., inflow_l = .FALSE., inflow_n = .FALSE., &
+                inflow_r = .FALSE., inflow_s = .FALSE., iso2d_output = .FALSE.,&
+                mg_switch_to_pe0 = .FALSE., &
                 netcdf_output = .FALSE., netcdf_64bit = .FALSE., &
                 netcdf_64bit_3d = .TRUE., &
@@ -528,5 +528,5 @@
     INTEGER ::  ngp_sums, nnx, nx = 0, nxa, nxl, nxr, nxra, nny, ny = 0, nya,  &
                 nyn, nyna, nys, nnz, nz = 0, nza, nzb, nzb_diff, nzt, nzta,    &
-                nzt_diff, uxrp = 0, vynp = 0
+                nzt_diff
 
     INTEGER, DIMENSION(:), ALLOCATABLE ::                                      &
@@ -889,8 +889,8 @@
 #if defined( __parallel )
     INTEGER ::  comm1dx, comm1dy, comm2d, comm_palm, ierr, myidx, myidy,       &
-                ndim = 2, ngp_y, ngp_yz_p, pleft, pnorth, pright, psouth,      &
+                ndim = 2, ngp_y, pleft, pnorth, pright, psouth,                &
                 sendrecvcount_xy, sendrecvcount_yz, sendrecvcount_zx,          &
                 sendrecvcount_zyd, sendrecvcount_yxd,                          &
-                type_x, type_x_int, type_xz_p, ibuf(12), pcoord(2), pdims(2),  &
+                type_x, type_x_int, ibuf(12), pcoord(2), pdims(2),             &
                 status(MPI_STATUS_SIZE)
 
Index: palm/trunk/SOURCE/palm.f90
===================================================================
--- palm/trunk/SOURCE/palm.f90	(revision 74)
+++ palm/trunk/SOURCE/palm.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! __vtk directives removed, write_particles is called only in case of particle
-! advection switched on, open unit 9 for debug output
+! advection switched on, open unit 9 for debug output,
+! setting of palm version moved from modules to here
 !
 ! Former revisions:
@@ -57,4 +58,6 @@
     CHARACTER (LEN=1) ::  cdum
     INTEGER           ::  i, run_description_header_i(80)
+
+    version = 'PALM 3.2'
 
 #if defined( __parallel )
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 74)
+++ palm/trunk/SOURCE/parin.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! +dt_max, netcdf_64bit_3d, precipitation_amount_interval in d3par,
-! +loop_optimization, pt_reference in inipar, -data_output_ts
+! +loop_optimization, pt_reference in inipar, -data_output_ts,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -58,8 +59,8 @@
                        dz_stretch_factor, dz_stretch_level, e_min, &
                        end_time_1d, fft_method, galilei_transformation, &
-                       grid_matching, inflow_disturbance_begin, &
+                       grid_matching, humidity, inflow_disturbance_begin, &
                        inflow_disturbance_end, initializing_actions, &
                        km_constant, km_damp_max, long_filter_factor, &
-                       loop_optimization, mixing_length_1d, moisture, &
+                       loop_optimization, mixing_length_1d, &
                        momentum_advec, netcdf_precision, npex, npey, nsor_ini, &
                        nx, ny, nz, omega, outflow_damping_width, &
@@ -117,6 +118,6 @@
 
 
-    NAMELIST /envpar/  host, maximum_cpu_time_allowed, run_identifier, &
-                       tasks_per_node, write_binary
+    NAMELIST /envpar/  host, maximum_cpu_time_allowed, revision, &
+                       run_identifier, tasks_per_node, write_binary
 
 
Index: palm/trunk/SOURCE/poismg.f90
===================================================================
--- palm/trunk/SOURCE/poismg.f90	(revision 74)
+++ palm/trunk/SOURCE/poismg.f90	(revision 75)
@@ -8,5 +8,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -59,5 +59,5 @@
 !
 !-- Some boundaries have to be added to divergence array
-    CALL exchange_horiz( d, 0, 0 )
+    CALL exchange_horiz( d )
     d(nzb,:,:) = d(nzb+1,:,:)
 
@@ -164,5 +164,5 @@
 !
 !-- Horizontal boundary conditions
-    CALL exchange_horiz( r, 0, 0 )
+    CALL exchange_horiz( r )
 
     IF ( bc_lr /= 'cyclic' )  THEN
@@ -257,5 +257,5 @@
 !
 !-- Horizontal boundary conditions
-    CALL exchange_horiz( f_mg, 0, 0 )
+    CALL exchange_horiz( f_mg )
 
     IF ( bc_lr /= 'cyclic' )  THEN
@@ -355,5 +355,5 @@
 !
 !-- Horizontal boundary conditions
-    CALL exchange_horiz( temp, 0, 0 )
+    CALL exchange_horiz( temp )
 
     IF ( bc_lr /= 'cyclic' )  THEN
@@ -627,5 +627,5 @@
 !
 !--       Horizontal boundary conditions
-          CALL exchange_horiz( p_mg, 0, 0 )
+          CALL exchange_horiz( p_mg )
 
           IF ( bc_lr /= 'cyclic' )  THEN
Index: palm/trunk/SOURCE/prandtl_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/prandtl_fluxes.f90	(revision 74)
+++ palm/trunk/SOURCE/prandtl_fluxes.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -97,5 +97,5 @@
 !
 !-- Compute z_p/L (corresponds to the Richardson-flux number)
-    IF ( .NOT. moisture ) THEN
+    IF ( .NOT. humidity )  THEN
        !$OMP PARALLEL DO PRIVATE( k, z_p )
        DO  i = nxl-1, nxr+1
@@ -274,5 +274,5 @@
 !
 !-- If required compute q*
-    IF ( moisture  .OR.  passive_scalar )  THEN
+    IF ( humidity  .OR.  passive_scalar )  THEN
        IF ( constant_waterflux )  THEN
 !
@@ -332,5 +332,5 @@
     CALL exchange_horiz_2d( usws )
     CALL exchange_horiz_2d( vsws )
-    IF ( moisture  .OR.  passive_scalar )  CALL exchange_horiz_2d( qsws )
+    IF ( humidity  .OR.  passive_scalar )  CALL exchange_horiz_2d( qsws )
 
 !
@@ -347,5 +347,5 @@
 !
 !-- Compute the vertical water/scalar flux
-    IF ( .NOT. constant_heatflux .AND. ( moisture .OR. passive_scalar ) ) THEN
+    IF ( .NOT. constant_heatflux .AND. ( humidity .OR. passive_scalar ) ) THEN
        !$OMP PARALLEL DO
        DO  i = nxl-1, nxr+1
Index: palm/trunk/SOURCE/pres.f90
===================================================================
--- palm/trunk/SOURCE/pres.f90	(revision 74)
+++ palm/trunk/SOURCE/pres.f90	(revision 75)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Volume flow control for non-cyclic boundary conditions added (currently only
+! for the north boundary!!), 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -54,4 +55,45 @@
        ALLOCATE( d(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     ENDIF
+
+!
+!-- Conserve the volume flow at the outflow in case of non-cyclic lateral
+!-- boundary conditions
+    IF ( conserve_volume_flow  .AND.  bc_ns == 'radiation/dirichlet')  THEN
+
+       volume_flow(2)   = 0.0
+       volume_flow_l(2) = 0.0
+
+       IF ( nyn == ny )  THEN
+          j = ny+1
+          DO  i = nxl, nxr
+!
+!--          Sum up the volume flow through the north boundary
+             DO  k = nzb_2d(j,i) + 1, nzt
+                volume_flow_l(2) = volume_flow_l(2) + v(k,j,i) * dzu(k)
+             ENDDO
+          ENDDO
+       ENDIF
+#if defined( __parallel )   
+       CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL, &
+                           MPI_SUM, comm1dx, ierr )   
+#else
+       volume_flow = volume_flow_l  
+#endif
+       volume_flow_offset(2) = ( volume_flow_initial(2) - volume_flow(2) )    &
+                               / volume_flow_area(2)                          
+
+       IF ( outflow_n )  THEN
+          j = nyn+1
+          DO  i = nxl, nxr
+             DO  k = nzb_v_inner(j,i) + 1, nzt
+                v(k,j,i) = v(k,j,i) + volume_flow_offset(2)
+             ENDDO
+          ENDDO
+       ENDIF
+
+       CALL exchange_horiz( v )
+
+    ENDIF
+
 
 !
@@ -322,5 +364,5 @@
 !
 !--    Exchange boundaries for p
-       CALL exchange_horiz( tend, 0, 0 )
+       CALL exchange_horiz( tend )
       
     ELSEIF ( psolver == 'sor' )  THEN
@@ -365,6 +407,6 @@
 !-- Correction of the provisional velocities with the current perturbation 
 !-- pressure just computed
-    IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  uvmean_outflow_l = 0.0
-    IF ( conserve_volume_flow )  THEN
+    IF ( conserve_volume_flow  .AND. &
+         ( bc_lr == 'cyclic'  .OR.  bc_ns == 'cyclic' ) )  THEN
        volume_flow_l(1) = 0.0
        volume_flow_l(2) = 0.0
@@ -393,36 +435,7 @@
 
 !
-!--       Sum up the horizontal velocity along the outflow plane (in case
-!--       of non-cyclic boundary conditions). The respective mean velocity
-!--       is calculated from this in routine boundary_conds.
-!          IF ( outflow_l  .AND.  i == nxl )  THEN
-!             !$OMP CRITICAL
-!             DO  k = nzb, nzt+1
-!                uvmean_outflow_l(k) = uvmean_outflow_l(k) + v(k,j,nxl)
-!             ENDDO
-!             !$OMP END CRITICAL
-!          ELSEIF ( outflow_r  .AND.  i == nxr )  THEN
-!             !$OMP CRITICAL
-!             DO  k = nzb, nzt+1
-!                uvmean_outflow_l(k) = uvmean_outflow_l(k) + v(k,j,nxr)
-!             ENDDO
-!             !$OMP END CRITICAL
-!          ELSEIF ( outflow_s  .AND.  j == nys )  THEN
-!             !$OMP CRITICAL
-!             DO  k = nzb, nzt+1
-!                uvmean_outflow_l(k) = uvmean_outflow_l(k) + u(k,nys,i)
-!             ENDDO
-!             !$OMP END CRITICAL
-!          ELSEIF ( outflow_n  .AND.  j == nyn )  THEN
-!             !$OMP CRITICAL
-!             DO  k = nzb, nzt+1
-!                uvmean_outflow_l(k) = uvmean_outflow_l(k) + u(k,nyn,i)
-!             ENDDO
-!             !$OMP END CRITICAL
-!          ENDIF
-
-!
 !--       Sum up the volume flow through the right and north boundary
-          IF ( conserve_volume_flow  .AND.  i == nx )  THEN
+          IF ( conserve_volume_flow  .AND.  bc_lr == 'cyclic'  .AND. &
+               i == nx )  THEN
              !$OMP CRITICAL
              DO  k = nzb_2d(j,i) + 1, nzt
@@ -431,5 +444,6 @@
              !$OMP END CRITICAL
           ENDIF
-          IF ( conserve_volume_flow  .AND.  j == ny )  THEN
+          IF ( conserve_volume_flow  .AND.  bc_ns == 'cyclic'  .AND. &
+               j == ny )  THEN
              !$OMP CRITICAL
              DO  k = nzb_2d(j,i) + 1, nzt
@@ -445,5 +459,6 @@
 !
 !-- Conserve the volume flow
-    IF ( conserve_volume_flow )  THEN
+    IF ( conserve_volume_flow  .AND. &
+         ( bc_lr == 'cyclic'  .OR.  bc_ns == 'cyclic' ) )  THEN
 
 #if defined( __parallel )   
@@ -461,10 +476,14 @@
        DO  i = nxl, nxr
           DO  j = nys, nyn
-             DO  k = nzb_u_inner(j,i) + 1, nzt
-                u(k,j,i) = u(k,j,i) + volume_flow_offset(1)
-             ENDDO
-             DO  k = nzb_v_inner(j,i) + 1, nzt
-                v(k,j,i) = v(k,j,i) + volume_flow_offset(2)
-             ENDDO
+             IF ( bc_lr == 'cyclic' )  THEN
+                DO  k = nzb_u_inner(j,i) + 1, nzt
+                   u(k,j,i) = u(k,j,i) + volume_flow_offset(1)
+                ENDDO
+             ENDIF
+             IF ( bc_ns == 'cyclic' )  THEN
+                DO  k = nzb_v_inner(j,i) + 1, nzt
+                   v(k,j,i) = v(k,j,i) + volume_flow_offset(2)
+                ENDDO
+             ENDIF
           ENDDO
        ENDDO
@@ -475,7 +494,7 @@
 !
 !-- Exchange of boundaries for the velocities
-    CALL exchange_horiz( u, uxrp,    0 )
-    CALL exchange_horiz( v,    0, vynp )
-    CALL exchange_horiz( w,    0,    0 )
+    CALL exchange_horiz( u )
+    CALL exchange_horiz( v )
+    CALL exchange_horiz( w )
 
 !
Index: palm/trunk/SOURCE/production_e.f90
===================================================================
--- palm/trunk/SOURCE/production_e.f90	(revision 74)
+++ palm/trunk/SOURCE/production_e.f90	(revision 75)
@@ -5,5 +5,6 @@
 ! -----------------
 ! Wall functions now include diabatic conditions, call of routine wall_fluxes_e,
-! reference temperature pt_reference can be used in buoyancy term
+! reference temperature pt_reference can be used in buoyancy term,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -358,5 +359,5 @@
 !
 !--       Calculate TKE production by buoyancy
-          IF ( .NOT. moisture )  THEN
+          IF ( .NOT. humidity )  THEN
 
              IF ( use_pt_reference )  THEN
@@ -756,5 +757,5 @@
 !
 !--    Calculate TKE production by buoyancy
-       IF ( .NOT. moisture )  THEN
+       IF ( .NOT. humidity )  THEN
 
           IF ( use_pt_reference )  THEN
Index: palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- palm/trunk/SOURCE/prognostic_equations.f90	(revision 74)
+++ palm/trunk/SOURCE/prognostic_equations.f90	(revision 75)
@@ -5,6 +5,7 @@
 ! -----------------
 ! checking for negative q and limiting for positive values,
-! z0 removed from arguments in calls of diffusion_u/v/w,
-! subroutine names changed to .._noopt, .._cache, and .._vector
+! z0 removed from arguments in calls of diffusion_u/v/w, uxrp, vynp eliminated,
+! subroutine names changed to .._noopt, .._cache, and .._vector,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -102,5 +103,5 @@
 !-- global communication
     CALL calc_mean_pt_profile( pt, 4 )
-    IF ( moisture )  CALL calc_mean_pt_profile( vpt, 44 )
+    IF ( humidity )  CALL calc_mean_pt_profile( vpt, 44 )
 
 !
@@ -117,5 +118,5 @@
 !
 !-- u-tendency terms with no communication
-    DO  i = nxl, nxr+uxrp
+    DO  i = nxl, nxr
        DO  j = nys, nyn
 !
@@ -186,5 +187,5 @@
 !-- v-tendency terms with no communication
     DO  i = nxl, nxr
-       DO  j = nys, nyn+vynp
+       DO  j = nys, nyn
 !
 !--       Tendency terms
@@ -273,5 +274,5 @@
           ENDIF
           CALL coriolis( i, j, 3 )
-          IF ( .NOT. moisture )  THEN
+          IF ( .NOT. humidity )  THEN
              CALL buoyancy( i, j, pt, 3, 4 )
           ELSE
@@ -410,5 +411,5 @@
 !
 !-- If required, compute prognostic equation for total water content / scalar
-    IF ( moisture  .OR.  passive_scalar )  THEN
+    IF ( humidity  .OR.  passive_scalar )  THEN
 
        CALL cpu_log( log_point(29), 'q/s-equation', 'start' )
@@ -550,5 +551,5 @@
              IF ( scalar_advec == 'bc-scheme'  .AND.  &
                   .NOT. use_upstream_for_tke )  THEN
-                IF ( .NOT. moisture )  THEN
+                IF ( .NOT. humidity )  THEN
                    CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, &
                                      l_grid, pt, rif, tend, zu )
@@ -575,5 +576,5 @@
                 IF ( tsc(2) == 2.0  .AND.  timestep_scheme(1:8) == 'leapfrog' )&
                 THEN
-                   IF ( .NOT. moisture )  THEN
+                   IF ( .NOT. humidity )  THEN
                       CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e_m, &
                                         km_m, l_grid, pt_m, rif_m, tend, zu )
@@ -583,5 +584,5 @@
                    ENDIF
                 ELSE
-                   IF ( .NOT. moisture )  THEN
+                   IF ( .NOT. humidity )  THEN
                       CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, &
                                         l_grid, pt, rif, tend, zu )
@@ -661,5 +662,5 @@
 !-- global communication
     CALL calc_mean_pt_profile( pt, 4 )
-    IF ( moisture )  CALL calc_mean_pt_profile( vpt, 44 )
+    IF ( humidity )  CALL calc_mean_pt_profile( vpt, 44 )
     IF ( .NOT. constant_diffusion )  CALL production_e_init
 
@@ -669,6 +670,6 @@
 !$OMP PARALLEL private (i,j,k)
 !$OMP DO
-    DO  i = nxl, nxr+uxrp       ! Additional levels for non cyclic boundary
-       DO  j = nys, nyn+vynp    ! conditions are included
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
 !
 !--       Tendency terms for u-velocity component
@@ -789,5 +790,5 @@
              ENDIF
              CALL coriolis( i, j, 3 )
-             IF ( .NOT. moisture )  THEN
+             IF ( .NOT. humidity )  THEN
                 CALL buoyancy( i, j, pt, 3, 4 )
              ELSE
@@ -881,5 +882,5 @@
 !--          If required, compute prognostic equation for total water content /
 !--          scalar
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
 
 !
@@ -954,5 +955,5 @@
                 IF ( tsc(2) == 2.0  .AND.  timestep_scheme(1:8) == 'leapfrog' )&
                 THEN
-                   IF ( .NOT. moisture )  THEN
+                   IF ( .NOT. humidity )  THEN
                       CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e_m, &
                                         km_m, l_grid, pt_m, rif_m, tend, zu )
@@ -962,5 +963,5 @@
                    ENDIF
                 ELSE
-                   IF ( .NOT. moisture )  THEN
+                   IF ( .NOT. humidity )  THEN
                       CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, &
                                         l_grid, pt, rif, tend, zu )
@@ -1032,5 +1033,5 @@
 !-- global communication
     CALL calc_mean_pt_profile( pt, 4 )
-    IF ( moisture )  CALL calc_mean_pt_profile( vpt, 44 )
+    IF ( humidity )  CALL calc_mean_pt_profile( vpt, 44 )
 
 !
@@ -1068,5 +1069,5 @@
 !
 !-- Prognostic equation for u-velocity component
-    DO  i = nxl, nxr+uxrp
+    DO  i = nxl, nxr
        DO  j = nys, nyn
           DO  k = nzb_u_inner(j,i)+1, nzt
@@ -1085,5 +1086,5 @@
     IF ( timestep_scheme(1:5) == 'runge' )  THEN
        IF ( intermediate_timestep_count == 1 )  THEN
-          DO  i = nxl, nxr+uxrp
+          DO  i = nxl, nxr
              DO  j = nys, nyn
                 DO  k = nzb_u_inner(j,i)+1, nzt
@@ -1094,5 +1095,5 @@
        ELSEIF ( intermediate_timestep_count < &
                 intermediate_timestep_count_max )  THEN
-          DO  i = nxl, nxr+uxrp
+          DO  i = nxl, nxr
              DO  j = nys, nyn
                 DO  k = nzb_u_inner(j,i)+1, nzt
@@ -1140,5 +1141,5 @@
 !-- Prognostic equation for v-velocity component
     DO  i = nxl, nxr
-       DO  j = nys, nyn+vynp
+       DO  j = nys, nyn
           DO  k = nzb_v_inner(j,i)+1, nzt
              v_p(k,j,i) = ( 1.0-tsc(1) ) * v_m(k,j,i) + tsc(1) * v(k,j,i) +    &
@@ -1157,5 +1158,5 @@
        IF ( intermediate_timestep_count == 1 )  THEN
           DO  i = nxl, nxr
-             DO  j = nys, nyn+vynp
+             DO  j = nys, nyn
                 DO  k = nzb_v_inner(j,i)+1, nzt
                    tv_m(k,j,i) = tend(k,j,i)
@@ -1166,5 +1167,5 @@
                 intermediate_timestep_count_max )  THEN
           DO  i = nxl, nxr
-             DO  j = nys, nyn+vynp
+             DO  j = nys, nyn
                 DO  k = nzb_v_inner(j,i)+1, nzt
                    tv_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tv_m(k,j,i)
@@ -1206,5 +1207,5 @@
     ENDIF
     CALL coriolis( 3 )
-    IF ( .NOT. moisture )  THEN
+    IF ( .NOT. humidity )  THEN
        CALL buoyancy( pt, 3, 4 )
     ELSE
@@ -1355,5 +1356,5 @@
 !
 !-- If required, compute prognostic equation for total water content / scalar
-    IF ( moisture  .OR.  passive_scalar )  THEN
+    IF ( humidity  .OR.  passive_scalar )  THEN
 
        CALL cpu_log( log_point(29), 'q/s-equation', 'start' )
@@ -1493,5 +1494,5 @@
        IF ( scalar_advec == 'bc-scheme'  .AND.  .NOT. use_upstream_for_tke )  &
        THEN
-          IF ( .NOT. moisture )  THEN
+          IF ( .NOT. humidity )  THEN
              CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, pt, &
                                rif, tend, zu )
@@ -1516,5 +1517,5 @@
           ENDIF
           IF ( tsc(2) == 2.0  .AND.  timestep_scheme(1:8) == 'leapfrog' )  THEN
-             IF ( .NOT. moisture )  THEN
+             IF ( .NOT. humidity )  THEN
                 CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e_m, km_m, l_grid, &
                                   pt_m, rif_m, tend, zu )
@@ -1524,5 +1525,5 @@
              ENDIF
           ELSE
-             IF ( .NOT. moisture )  THEN
+             IF ( .NOT. humidity )  THEN
                 CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, pt, &
                                   rif, tend, zu )
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 74)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! +loop_optimization, pt_reference
+! +loop_optimization, pt_reference, moisture renamed humidity
 !
 ! Former revisions:
@@ -212,6 +212,6 @@
           CASE ( 'mixing_length_1d' )
              READ ( 13 )  mixing_length_1d
-          CASE ( 'moisture' )
-             READ ( 13 )  moisture
+          CASE ( 'humidity' )
+             READ ( 13 )  humidity
           CASE ( 'momentum_advec' )
              READ ( 13 )  momentum_advec
Index: palm/trunk/SOURCE/sor.f90
===================================================================
--- palm/trunk/SOURCE/sor.f90	(revision 74)
+++ palm/trunk/SOURCE/sor.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! 2nd+3rd argument removed from exchange horiz
 !
 ! Former revisions:
@@ -98,5 +98,5 @@
 !
 !--    Exchange of boundary values for p.
-       CALL exchange_horiz( p, 0, 0 )
+       CALL exchange_horiz( p )
 
 !
@@ -143,5 +143,5 @@
 !
 !--    Exchange of boundary values for p.
-       CALL exchange_horiz( p, 0, 0 )
+       CALL exchange_horiz( p )
 
 !
Index: palm/trunk/SOURCE/swap_timelevel.f90
===================================================================
--- palm/trunk/SOURCE/swap_timelevel.f90	(revision 74)
+++ palm/trunk/SOURCE/swap_timelevel.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -56,5 +56,5 @@
                 e_m => e_1;  e => e_2;  e_p => e_3
              ENDIF
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 q_m => q_1;  q => q_2;  q_p => q_3
              ENDIF
@@ -69,5 +69,5 @@
                 e_m => e_2;  e => e_3;  e_p => e_1
              ENDIF
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 q_m => q_2;  q => q_3;  q_p => q_1
              ENDIF
@@ -82,5 +82,5 @@
                 e_m => e_3;  e => e_1;  e_p => e_2
              ENDIF
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 q_m => q_3;  q => q_1;  q_p => q_2
              ENDIF
@@ -105,5 +105,5 @@
                 e => e_1;  e_p => e_2
              ENDIF
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 q => q_1;  q_p => q_2
              ENDIF
@@ -119,5 +119,5 @@
                    vsws_m => vsws_1;  vsws => vsws_2
                    shf_m  => shf_1;   shf  => shf_2
-                   IF ( moisture  .OR.  passive_scalar )  THEN
+                   IF ( humidity  .OR.  passive_scalar )  THEN
                       qsws_m => qsws_1;  qsws => qsws_2
                    ENDIF
@@ -128,5 +128,5 @@
                 IF ( use_top_fluxes )  THEN
                    tswst_m => tswst_1;  tswst => tswst_2
-                   IF ( moisture  .OR.  passive_scalar )  THEN
+                   IF ( humidity  .OR.  passive_scalar )  THEN
                       qswst_m => qswst_1;  qswst => qswst_2
                    ENDIF
@@ -134,5 +134,5 @@
              ENDIF
 
-             IF ( moisture )  THEN
+             IF ( humidity )  THEN
                 vpt_m => vpt_1;  vpt => vpt_2
              ENDIF
@@ -151,5 +151,5 @@
                 e => e_2;  e_p => e_1
              ENDIF
-             IF ( moisture  .OR.  passive_scalar )  THEN
+             IF ( humidity  .OR.  passive_scalar )  THEN
                 q => q_2;  q_p => q_1
              ENDIF
@@ -164,5 +164,5 @@
                    vsws_m => vsws_2;  vsws => vsws_1
                    shf_m  => shf_2;   shf  => shf_1
-                   IF ( moisture  .OR.  passive_scalar )  THEN
+                   IF ( humidity  .OR.  passive_scalar )  THEN
                       qsws_m => qsws_2;  qsws => qsws_1
                    ENDIF
@@ -173,5 +173,5 @@
                 IF ( use_top_fluxes )  THEN
                    tswst_m  => tswst_2;  tswst => tswst_1
-                   IF ( moisture  .OR.  passive_scalar )  THEN
+                   IF ( humidity  .OR.  passive_scalar )  THEN
                       qswst_m => qswst_2;  qswst => qswst_1
                    ENDIF
@@ -179,5 +179,5 @@
              ENDIF
 
-             IF ( moisture )  THEN
+             IF ( humidity )  THEN
                 vpt_m => vpt_2;  vpt => vpt_1
              ENDIF
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 74)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 75)
@@ -7,5 +7,7 @@
 ! and counters,
 ! calls of prognostic_equations_.. changed to .._noopt, .._cache, and
-! .._vector, these calls are now controlled by switch loop_optimization
+! .._vector, these calls are now controlled by switch loop_optimization,
+! uxrp, vynp eliminated, 2nd+3rd argument removed from exchange horiz,
+! moisture renamed humidity
 !
 ! Former revisions:
@@ -136,15 +138,15 @@
 !--       Exchange of ghost points (lateral boundary conditions)
           CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'start' )
-          CALL exchange_horiz( u_p, uxrp,    0 )
-          CALL exchange_horiz( v_p,    0, vynp )
-          CALL exchange_horiz( w_p,    0,    0 )
-          CALL exchange_horiz( pt_p,   0,    0 )
-          IF ( .NOT. constant_diffusion       )  CALL exchange_horiz( e_p, 0, 0)
-          IF ( moisture  .OR.  passive_scalar )  CALL exchange_horiz( q_p, 0, 0)
+          CALL exchange_horiz( u_p )
+          CALL exchange_horiz( v_p )
+          CALL exchange_horiz( w_p )
+          CALL exchange_horiz( pt_p )
+          IF ( .NOT. constant_diffusion       )  CALL exchange_horiz( e_p )
+          IF ( humidity  .OR.  passive_scalar )  CALL exchange_horiz( q_p )
           IF ( cloud_droplets )  THEN
-             CALL exchange_horiz( ql,    0, 0 )
-             CALL exchange_horiz( ql_c,  0, 0 )
-             CALL exchange_horiz( ql_v,  0, 0 )
-             CALL exchange_horiz( ql_vp, 0, 0 )
+             CALL exchange_horiz( ql )
+             CALL exchange_horiz( ql_c )
+             CALL exchange_horiz( ql_v )
+             CALL exchange_horiz( ql_vp )
           ENDIF
 
@@ -182,6 +184,6 @@
              IF ( time_disturb >= dt_disturb )  THEN
                 IF ( hom(nzb+5,1,var_hom,0) < disturbance_energy_limit )  THEN
-                   CALL disturb_field( nzb_u_inner, tend, u, uxrp, 0    )
-                   CALL disturb_field( nzb_v_inner, tend, v ,   0, vynp )
+                   CALL disturb_field( nzb_u_inner, tend, u )
+                   CALL disturb_field( nzb_v_inner, tend, v )
                 ELSEIF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
 !
@@ -189,6 +191,6 @@
 !--                near the inflow throughout the whole simulation
                    dist_range = 1
-                   CALL disturb_field( nzb_u_inner, tend, u, uxrp, 0    )
-                   CALL disturb_field( nzb_v_inner, tend, v ,   0, vynp )
+                   CALL disturb_field( nzb_u_inner, tend, u )
+                   CALL disturb_field( nzb_v_inner, tend, v )
                    dist_range = 0
                 ENDIF
@@ -208,11 +210,11 @@
 !--       In case of a non-cyclic lateral wall, set the boundary conditions for
 !--       the velocities at the outflow
-          IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
-             CALL boundary_conds( 'outflow_uvw' )
-          ENDIF
+!          IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
+!             CALL boundary_conds( 'outflow_uvw' )
+!          ENDIF
 
 !
 !--       If required, compute virtuell potential temperature
-          IF ( moisture ) CALL compute_vpt
+          IF ( humidity ) CALL compute_vpt
 
 !
@@ -235,5 +237,5 @@
 !--          Compute the diffusion coefficients
              CALL cpu_log( log_point(17), 'diffusivities', 'start' )
-             IF ( .NOT. moisture ) THEN
+             IF ( .NOT. humidity ) THEN
                 CALL diffusivities( pt )
              ELSE
Index: palm/trunk/SOURCE/wall_fluxes.f90
===================================================================
--- palm/trunk/SOURCE/wall_fluxes.f90	(revision 74)
+++ palm/trunk/SOURCE/wall_fluxes.f90	(revision 75)
@@ -37,5 +37,5 @@
 ! Call for all grid points
 !------------------------------------------------------------------------------!
-    SUBROUTINE wall_fluxes( wall_flux, a, b, c1, c2, ixp, jyp, nzb_uvw_inner, &
+    SUBROUTINE wall_fluxes( wall_flux, a, b, c1, c2, nzb_uvw_inner, &
                             nzb_uvw_outer, wall )
 
@@ -48,5 +48,5 @@
        IMPLICIT NONE
 
-       INTEGER ::  i, ixp, j, jyp, k, wall_index
+       INTEGER ::  i, j, k, wall_index
 
        INTEGER, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1) ::  nzb_uvw_inner, &
@@ -55,6 +55,6 @@
        REAL ::  pts, pt_i, rifs, u_i, v_i, us_wall, vel_total, ws, wspts
 
-       REAL, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1)           ::  wall
-       REAL, DIMENSION(nzb:nzt+1,nys:nyn+jyp,nxl:nxr+ixp) ::  wall_flux
+       REAL, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1)   ::  wall
+       REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) ::  wall_flux
 
 
@@ -63,6 +63,6 @@
        wall_index = NINT( a+ 2*b + 3*c1 + 4*c2 )
 
-       DO  i = nxl, nxr+ixp
-          DO  j = nys, nyn+jyp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
 
              IF ( wall(j,i) /= 0.0 )  THEN
Index: palm/trunk/SOURCE/write_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/write_3d_binary.f90	(revision 74)
+++ palm/trunk/SOURCE/write_3d_binary.f90	(revision 75)
@@ -5,5 +5,5 @@
 ! -----------------
 ! +precipitation_amount, precipitation_rate_av, rif_wall, u_m_l, u_m_r, etc.,
-! z0_av
+! z0_av, moisture renamed humidity
 !
 ! Former revisions:
@@ -107,5 +107,5 @@
     ENDIF
     WRITE ( 14 )  'pt_m                ';  WRITE ( 14 )  pt_m
-    IF ( moisture  .OR. passive_scalar )  THEN
+    IF ( humidity  .OR. passive_scalar )  THEN
        WRITE ( 14 )  'q                   ';  WRITE ( 14 )  q 
        IF ( ALLOCATED( q_av ) )  THEN
@@ -209,5 +209,5 @@
        WRITE ( 14 )  'v_m_s               ';  WRITE ( 14 )  v_m_s
     ENDIF
-    IF ( moisture )  THEN
+    IF ( humidity )  THEN
        WRITE ( 14 )  'vpt                 ';  WRITE ( 14 )  vpt
        IF ( ALLOCATED( vpt_av ) )  THEN
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 74)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 75)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! +loop_optimization, pt_refrence
+! +loop_optimization, pt_refrence, moisture renamed humidity
 !
 ! Former revisions:
@@ -178,6 +178,6 @@
     WRITE ( 14 )  'mixing_length_1d              '
     WRITE ( 14 )  mixing_length_1d
-    WRITE ( 14 )  'moisture                      '
-    WRITE ( 14 )  moisture
+    WRITE ( 14 )  'humidity                      '
+    WRITE ( 14 )  humidity
     WRITE ( 14 )  'momentum_advec                '
     WRITE ( 14 )  momentum_advec
