Index: palm/trunk/DOC/app/chapter_4.1.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.1.html	(revision 102)
+++ palm/trunk/DOC/app/chapter_4.1.html	(revision 103)
@@ -1880,5 +1880,5 @@
 condition must be used for the potential temperature (see <a href="chapter_4.1.html#bc_pt_t">bc_pt_t</a>),
 because otherwise the resolved scale may contribute to
-the top flux so that a constant value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
+the top flux so that a constant flux value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
 <p><span style="font-weight: bold;">Note:</span><br>The
 application of a top heat flux additionally requires the setting of
@@ -1887,5 +1887,27 @@
 Prandtl-layer is available at the top boundary so far.</p><p>See
 also <a href="#surface_heatflux">surface_heatflux</a>.</p>
-</td></tr><tr><td style="vertical-align: top;"><a name="top_salinityflux"></a><span style="font-weight: bold;">top_salinityflux</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">no prescribed<br>
+</td></tr><tr><td style="vertical-align: top;"><a name="top_momentumflux_u"></a><span style="font-weight: bold;">top_momentumflux_u</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">no prescribed momentumflux</span></td><td style="vertical-align: top;">Momentum flux along x at the top boundary (in m2/s2).<br><p>If a value is assigned to this parameter, the internal
+two-dimensional u-momentum flux field <span style="font-family: monospace;">uswst</span> is
+initialized with the value of <span style="font-weight: bold;">top_momentumflux_u</span> as
+top (horizontally homogeneous) boundary condition for the u-momentum equation.</p><p><span style="font-weight: bold;">Notes:</span><br>The
+application of a top momentum flux additionally requires the setting of
+initial parameter <a href="chapter_4.1.html#use_top_fluxes">use_top_fluxes</a>
+= .T.. Setting of <span style="font-weight: bold;">top_momentumflux_u</span> requires setting of <a href="#top_momentumflux_v">top_momentumflux_v</a> also.</p><p>A&nbsp;Neumann
+condition should be used for the u velocity component (see <a href="chapter_4.1.html#bc_uv_t">bc_uv_t</a>),
+because otherwise the resolved scale may contribute to
+the top flux so that a constant flux value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
+<span style="font-weight: bold;"></span><p>No
+Prandtl-layer is available at the top boundary so far.</p></td></tr><tr><td style="vertical-align: top;"><a name="top_momentumflux_v"></a><span style="font-weight: bold;">top_momentumflux_v</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">no prescribed momentumflux</span></td><td style="vertical-align: top;">Momentum flux along y at the top boundary (in m2/s2).<br><p>If a value is assigned to this parameter, the internal
+two-dimensional v-momentum flux field <span style="font-family: monospace;">vswst</span> is
+initialized with the value of <span style="font-weight: bold;">top_momentumflux_v</span> as
+top (horizontally homogeneous) boundary condition for the v-momentum equation.</p><p><span style="font-weight: bold;">Notes:</span><br>The
+application of a top momentum flux additionally requires the setting of
+initial parameter <a href="chapter_4.1.html#use_top_fluxes">use_top_fluxes</a>
+= .T.. Setting of <span style="font-weight: bold;">top_momentumflux_v</span> requires setting of <a href="chapter_4.1.html#top_momentumflux_u">top_momentumflux_u</a> also.</p><p>A&nbsp;Neumann
+condition should be used for the v velocity component (see <a href="chapter_4.1.html#bc_uv_t">bc_uv_t</a>),
+because otherwise the resolved scale may contribute to
+the top flux so that a constant flux value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
+<span style="font-weight: bold;"></span><p>No
+Prandtl-layer is available at the top boundary so far.</p></td></tr><tr><td style="vertical-align: top;"><a name="top_salinityflux"></a><span style="font-weight: bold;">top_salinityflux</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">no prescribed<br>
 salinityflux</span></td><td style="vertical-align: top;"><p>Kinematic
 salinity flux at the top boundary, i.e. the sea surface (in psu m/s).&nbsp; </p>
@@ -1896,5 +1918,5 @@
 condition must be used for the salinity (see <a href="chapter_4.1.html#bc_sa_t">bc_sa_t</a>),
 because otherwise the resolved scale may contribute to
-the top flux so that a constant value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
+the top flux so that a constant flux value cannot be guaranteed.<span style="font-style: italic;"></span>&nbsp;</p>
 <p><span style="font-weight: bold;">Note:</span><br>The
 application of a salinity flux at the model top additionally requires the setting of
@@ -2077,6 +2099,5 @@
 = <i>.TRUE.</i>, the user-assigned top fluxes are used
 instead
-(see <a href="chapter_4.1.html#top_heatflux">top_heatflux</a>).</p><p>Currently,
-only a value for the sensible heatflux can be assigned. In case of <span style="font-weight: bold;">use_top_fluxes</span> = <span style="font-style: italic;">.TRUE.</span>, the latent
+(see <a href="chapter_4.1.html#top_heatflux">top_heatflux</a>, <a href="#top_momentumflux_u">top_momentumflux_u</a>, <a href="#top_momentumflux_v">top_momentumflux_v</a>, <a href="#top_salinityflux">top_salinityflux</a>).</p><p>Currently, no value for the latent heatflux can be assigned. In case of <span style="font-weight: bold;">use_top_fluxes</span> = <span style="font-style: italic;">.TRUE.</span>, the latent
 heat flux at the top will be automatically set to zero.</p></td></tr><tr>
 <td style="vertical-align: top;"> <p><a name="use_ug_for_galilei_tr"></a><b>use_ug_for_galilei_tr</b></p>
Index: palm/trunk/DOC/app/chapter_4.2.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.2.html	(revision 102)
+++ palm/trunk/DOC/app/chapter_4.2.html	(revision 103)
@@ -1020,5 +1020,5 @@
 average's statistics. <span lang="en-GB"><font face="Thorndale, serif"><span style="font-weight: bold;"></span><span style="font-weight: bold;"></span></font></span><a href="chapter_4.1.html#dt"><span lang="en-GB"></span></a><font face="Thorndale, serif"><span lang="en-GB"></span></font><span lang="en-GB"></span><br> </p><p>For
 more explanations see parameter <a href="#dt_averaging_input">dt_averaging_input</a>.<a href="chapter_4.1.html#dt"><span lang="en-GB"></span></a><font face="Thorndale, serif"><span lang="en-GB"></span></font></p></td>
-</tr> <tr> <td style="vertical-align: top;"><a name="dt_data_output"></a><span style="font-weight: bold;">dt_data_output</span><br>
+</tr> <tr><td style="vertical-align: top;"><a name="dt_coupling"></a><span style="font-weight: bold;">dt_coupling</span></td><td style="vertical-align: top;">R</td><td style="vertical-align: top;"><span style="font-style: italic;">9999999.9</span></td><td style="vertical-align: top;">Temporal interval for the data exchange in case of runs with coupled models (e.g. atmosphere - ocean) (in s).<br><br>This parameter has an effect only in case of a run with coupled models.<br>It is available starting from version 3.3a. A more detailed explanation will be given soon.</td></tr><tr> <td style="vertical-align: top;"><a name="dt_data_output"></a><span style="font-weight: bold;">dt_data_output</span><br>
 </td> <td style="vertical-align: top;">R<br> </td>
 <td style="vertical-align: top;"><span style="font-style: italic;">9999999.9</span><br>
Index: palm/trunk/DOC/app/chapter_4.6.html
===================================================================
--- palm/trunk/DOC/app/chapter_4.6.html	(revision 102)
+++ palm/trunk/DOC/app/chapter_4.6.html	(revision 103)
@@ -367,5 +367,5 @@
 interval of&nbsp;data which are subject to temporal averaging of <font face="Thorndale, serif"><font size="3">vertical
 profiles and/or spectra&nbsp;(</font></font>in <font face="Thorndale, serif"><font size="3">s).&nbsp;</font></font></td>
-</tr> <tr> <td><a href="chapter_4.2.html#dt_data_output"><span style="font-weight: bold;">dt_data_output</span></a></td>
+</tr> <tr><td align="undefined" valign="undefined"><a style="font-weight: bold;" href="chapter_4.2.html#dt_coupling">dt_coupling</a></td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined">9999999.9</td><td align="undefined" valign="undefined">Temporal interval for the data exchange in case of runs with coupled models (e.g. atmosphere - ocean) (in s).</td></tr><tr> <td><a href="chapter_4.2.html#dt_data_output"><span style="font-weight: bold;">dt_data_output</span></a></td>
 <td>R</td> <td>R</td> <td><span style="font-style: italic;">9999999.9</span></td>
 <td> <p lang="en-GB"><font face="Thorndale"><font face="Thorndale, serif">Temporal interval</font>
@@ -1371,5 +1371,5 @@
 <td>I</td> <td>C * 40</td> <td><span style="font-style: italic;">'flat'</span></td> <td>Topography
 mode.</td> </tr> <tr><td><a style="font-weight: bold;" href="chapter_4.1.html#top_heatflux">top_heatflux</a></td><td>I</td><td>R</td><td><span style="font-style: italic;">no prescribed heatflux</span></td><td>Kinematic
-sensible heat flux at the top surface (in K m/s).</td></tr><tr><td align="undefined" valign="undefined"><a href="chapter_4.1.html#top_salinityflux"><span style="font-weight: bold;">top_salinityflux</span></a></td><td align="undefined" valign="undefined">I</td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined"><span style="font-style: italic;">no prescribed</span><br style="font-style: italic;"><span style="font-style: italic;">salinityflux</span></td><td align="undefined" valign="undefined">Kinematic
+sensible heat flux at the top surface (in K m/s).</td></tr><tr><td align="undefined" valign="undefined"><a href="chapter_4.1.html#top_momentumflux_u"><span style="font-weight: bold;">top_momentumflux_u</span></a></td><td align="undefined" valign="undefined">I</td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined"><span style="font-style: italic;">no prescribed momentumflux</span></td><td align="undefined" valign="undefined">Momentum flux along x at the top boundary (in m2/s2).</td></tr><tr><td align="undefined" valign="undefined"><a style="font-weight: bold;" href="chapter_4.1.html#top_momentumflux_v">top_momentumflux_v</a></td><td align="undefined" valign="undefined">I</td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined"><span style="font-style: italic;">no prescribed momentumflux</span></td><td align="undefined" valign="undefined">Momentum flux along y at the top boundary (in m2/s2).</td></tr><tr><td align="undefined" valign="undefined"><a href="chapter_4.1.html#top_salinityflux"><span style="font-weight: bold;">top_salinityflux</span></a></td><td align="undefined" valign="undefined">I</td><td align="undefined" valign="undefined">R</td><td align="undefined" valign="undefined"><span style="font-style: italic;">no prescribed</span><br style="font-style: italic;"><span style="font-style: italic;">salinityflux</span></td><td align="undefined" valign="undefined">Kinematic
 salinity flux at the top boundary, i.e. the sea surface (in psu m/s).</td></tr><tr>
 <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#ug_surface"><b>ug_surface</b></a></p>
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 102)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 103)
@@ -1083,4 +1083,16 @@
     IF ( surface_heatflux == 9999999.9 )  constant_heatflux     = .FALSE.
     IF ( top_heatflux     == 9999999.9 )  constant_top_heatflux = .FALSE.
+    IF ( top_momentumflux_u /= 9999999.9  .AND.  &
+         top_momentumflux_v /= 9999999.9 )  THEN
+       constant_top_momentumflux = .TRUE.
+    ELSEIF (  .NOT. ( top_momentumflux_u == 9999999.9  .AND.  &
+           top_momentumflux_v == 9999999.9 ) )  THEN   
+       IF ( myid == 0 )  THEN
+          PRINT*, '+++ check_parameters:'
+          PRINT*, '    both, top_momentumflux_u AND top_momentumflux_v'
+          PRINT*, '    must be set'
+       ENDIF
+       CALL local_stop
+    ENDIF
 
 !
Index: palm/trunk/SOURCE/diffusion_u.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_u.f90	(revision 102)
+++ palm/trunk/SOURCE/diffusion_u.f90	(revision 103)
@@ -204,5 +204,5 @@
 !--          Vertical diffusion at the first gridpoint below the top boundary,
 !--          if the momentum flux at the top is prescribed by the user
-             IF ( use_top_fluxes )  THEN
+             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
                 k = nzt
 !
@@ -368,5 +368,5 @@
 !--    Vertical diffusion at the first gridpoint below the top boundary,
 !--    if the momentum flux at the top is prescribed by the user
-       IF ( use_top_fluxes )  THEN
+       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
           k = nzt
 !
Index: palm/trunk/SOURCE/diffusion_v.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_v.f90	(revision 102)
+++ palm/trunk/SOURCE/diffusion_v.f90	(revision 103)
@@ -202,5 +202,5 @@
 !--          Vertical diffusion at the first gridpoint below the top boundary,
 !--          if the momentum flux at the top is prescribed by the user
-             IF ( use_top_fluxes )  THEN
+             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
                 k = nzt
 !
@@ -367,5 +367,5 @@
 !--    Vertical diffusion at the first gridpoint below the top boundary,
 !--    if the momentum flux at the top is prescribed by the user
-       IF ( use_top_fluxes )  THEN
+       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
           k = nzt
 !
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 102)
+++ palm/trunk/SOURCE/header.f90	(revision 103)
@@ -5,4 +5,5 @@
 ! -----------------
 ! Output of informations for coupled model runs (boundary conditions etc.)
+! + output of momentumfluxes at the top boundary
 !
 ! Former revisions:
@@ -462,4 +463,5 @@
        WRITE ( io, 304 )
        IF ( coupling_mode == 'uncoupled' )  THEN
+          WRITE ( io, 319 )  top_momentumflux_u, top_momentumflux_v
           IF ( constant_top_heatflux )  THEN
              WRITE ( io, 306 )  top_heatflux
@@ -1349,4 +1351,6 @@
 318 FORMAT (/'       outflow damping layer width: ',I3,' gridpoints with km_', &
                     'max =',F5.1,' m**2/s')
+319 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
+            '                                          v: ',F9.6,' m**2/s**2')
 320 FORMAT (//' List output:'/ &
              ' -----------'//  &
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 102)
+++ palm/trunk/SOURCE/modules.f90	(revision 103)
@@ -5,6 +5,7 @@
 ! Actual revisions:
 ! -----------------
-! +comm_inter, coupling_char, coupling_mode, dt_coupling, ngp_xy, port_name,
-! time_coupling, type_xy, uswst*, vswst*
+! +comm_inter, constant_top_momentumflux, coupling_char, coupling_mode,
+! dt_coupling, ngp_xy, port_name, time_coupling, top_momentumflux_u|v,
+! type_xy, uswst*, vswst*
 !
 ! Former revisions:
@@ -311,4 +312,5 @@
                 conserve_volume_flow = .FALSE., constant_diffusion = .FALSE., &
                 constant_heatflux = .TRUE., constant_top_heatflux = .TRUE., &
+                constant_top_momentumflux = .FALSE., &
                 constant_top_salinityflux = .TRUE., &
                 constant_waterflux = .TRUE., create_disturbances = .TRUE., &
@@ -396,6 +398,6 @@
              time_do_sla = 0.0, time_dvrp = 0.0, time_prel = 0.0, &
              time_restart = 9999999.9, time_run_control = 0.0, &
-             top_heatflux = 9999999.9, top_momentumflux_u = 0.0, &
-             top_momentumflux_v = 0.0, top_salinityflux = 9999999.9, &
+             top_heatflux = 9999999.9, top_momentumflux_u = 9999999.9, &
+             top_momentumflux_v = 9999999.9, top_salinityflux = 9999999.9, &
              ug_surface = 0.0, u_gtrans = 0.0, &
              ups_limit_e = 0.0, ups_limit_pt = 0.0, ups_limit_u = 0.0, &
