## The U-momentum equation

INTERFACE:

   subroutine uequation(nlev,dt,cnpar,tx,num,gamu,Method)

DESCRIPTION:

This subroutine computes the transport of momentum in -direction according to

 (12)

where denotes the material derivative of , the free surface elevation and the mean buoyancy defined in (33). is the sum of the turbulent and viscous transport terms modelled according to

 (13)

In this equation, and are the turbulent and molecular diffusivities of momentum, respectively, and denotes the non-local flux of momentum, see section 4.

Coriolis rotation is accounted for as described in section 3.4. The external pressure gradient (second term on right hand side) is applied here only if surface slopes are directly given. Otherwise, the gradient is computed as described in section 3.7, see Burchard (1999). The internal pressure gradient (third term on right hand side) is calculated in intpressure.F90, see section 3.8. The fifth term on the right hand side allows for nudging the velocity to observed profiles with the relaxation time scale . This is useful for initialising velocity profiles in case of significant inertial oscillations. Bottom friction is implemented implicitly using the fourth term on the right hand side. Implicit friction may be applied on all levels in order to allow for inner friction terms such as seagrass friction (see section 10.1).

Diffusion is numerically treated implicitly, see equations (7)- (9). The tri-diagonal matrix is solved then by a simplified Gauss elimination. Vertical advection is included, and it must be non-conservative, which is ensured by setting the local variable adv_mode=0, see section 8.5 on page .

USES:

   use meanflow,     only: gravity,avmolu
use meanflow,     only: h,u,uo,v,w,avh
use meanflow,     only: drag,SS,runtimeu
use observations, only: uProf,vel_relax_tau,vel_relax_ramp
use observations, only: idpdx,dpdx
use util,         only: Dirichlet,Neumann
use util,         only: oneSided,zeroDivergence

IMPLICIT NONE

INPUT PARAMETERS:

number of vertical layers
integer, intent(in)                 :: nlev

time step (s)
REALTYPE, intent(in)                :: dt

numerical "implicitness" parameter
REALTYPE, intent(in)                :: cnpar

wind stress in x-direction
divided by rho_0 (m^2/s^2)
REALTYPE, intent(in)                :: tx

diffusivity of momentum (m^2/s)
REALTYPE, intent(in)                :: num(0:nlev)

non-local flux of momentum (m^2/s^2)
REALTYPE, intent(in)                :: gamu(0:nlev)

method to compute external

   REALTYPE, parameter                 :: long=1.0D15

   Original author(s): Lars Umlauf