Lagrangian particle random walk


INTERFACE:

   subroutine lagrange(nlev,dt,zlev,nuh,w,npar,active,zi,zp)
DESCRIPTION:

Here a Lagrangian particle random walk for spatially inhomogeneous turbulence according to Visser (1997) is implemented. With the random walk, the particle $ i$ is moved from the vertical position $ z_i^n$ to $ z_i^{n+1}$ according to the following algorithm:

\begin{displaymath}\begin{array}{rcl} z_i^{n+1} &=& z^n_i + \partial_z \nu_t (z^...
...al_z \nu_t (z^n_i)\Delta t) \Delta t\right\}^{1/2}, \end{array}\end{displaymath} (243)

where $ R$ is a random process with $ \langle R \rangle =0$ (zero mean) and and the variance $ \langle R^2 \rangle=r$. Set visc_corr=.true. for evaluating eddy viscosity in a semi-implicit way. A background viscosity (visc_back) may be set. The variance $ r$ of the random walk scheme (rnd_var) has to be set manually as well here.


USES:

   IMPLICIT NONE
INPUT PARAMETERS:
   integer, intent(in)                 :: nlev
   REALTYPE, intent(in)                :: dt
   REALTYPE, intent(in)                :: zlev(0:nlev)
   REALTYPE, intent(in)                :: nuh(0:nlev)
   REALTYPE, intent(in)                :: w
   integer, intent(in)                 :: npar
   logical, intent(in)                 :: active(npar)
INPUT/OUTPUT PARAMETERS:
   integer, intent(inout)              :: zi(npar)
   REALTYPE, intent(inout)             :: zp(npar)
REVISION HISTORY:
   Original author(s): Hans Burchard & Karsten Bolding
LOCAL VARIABLES:
   integer            :: i,n
   REALTYPE           :: rnd(npar),rnd_var_inv
   REALTYPE,parameter :: visc_back=0.e-6,rnd_var=0.333333333
   REALTYPE           :: depth,dz(nlev),dzn(nlev),step,zp_old
   REALTYPE           :: visc,rat,dt_inv,zloc
   logical,parameter  :: visc_corr=.false.



Karsten Bolding 2012-12-28