gotm - a wrapper to call GOTM (Source File: gotm.F90)

INTERFACE:

    subroutine gotm()
DESCRIPTION:

Here, the turbulence module of the General Ocean Turbulence Model (GOTM, see www.gotm.net and Umlauf et al. (2005)) is called. First, all necessary parameters are transformed to suit with a 1D water column model, i.e., 3D fields are transformed to a vertical vector, 2D horizontal fields are converted to a scalar. The transformed 3D fields are the layer heights hn $\rightarrow$ h, the shear squared SS $\rightarrow$ SS1d, the buoyancy frequency squared NN $\rightarrow$ NN1d, the turbulent kinetic energy tke $\rightarrow$ tke1d, the dissipation rate eps $\rightarrow$ eps1d (from which the integral length scale L1d is calculated), the eddy viscosity num $\rightarrow$ num1d, and the eddy diffusivity nuh $\rightarrow$ nuh1d. The scalars are the surface and bottom friction velocities, u_taus and u_taub, respectively, the surface roughness parameter z0s (which is currently hard-coded), and the bottom roughess parameter z0b. Then, the GOTM turbulence module do_turbulence is called with all the transformed parameters discussed above. Finally, the vertical vectors tke1d, eps1d, num1d and nuh1d are transformed back to 3D fields.

In case that the compiler option STRUCTURE_FRICTION is switched on, the additional turbulence production by structures in the water column is calculated by calculating the total production as

$\displaystyle P_{tot} = P +C \left(u^2+v^2\right)^{3/2},$ (132)

with the shear production $P$, and the structure friction coefficient $C$. The latter is calculated in the routine structure_friction_3d.F90.

There are furthermore a number of compiler options provided, e.g. for an older GOTM version, for barotropic calcuations, and for simple parabolic viscosity profiles circumventing the GOTM turbulence module. USES:

    use halo_zones, only: update_3d_halo,wait_halo,H_TAG
    use domain, only: imin,imax,jmin,jmax,kmax,az,min_depth,crit_depth
    use variables_2d, only: D,zub,zvb,z
    use variables_3d, only: dt,kmin,ho,hn,tke,eps,SS,num,taus,taub
 #ifndef NO_BAROCLINIC
    use variables_3d, only: NN,nuh
 #endif
    use variables_3d, only: avmback,avhback
 #ifdef STRUCTURE_FRICTION
    use variables_3d, only: uu,vv,hun,hvn,sf
 #endif
    use turbulence, only: do_turbulence,cde
    use turbulence, only: tke1d => tke, eps1d => eps, L1d => L
    use turbulence, only: num1d => num, nuh1d => nuh
    use getm_timers, only: tic, toc, TIM_GOTM, TIM_GOTMTURB, TIM_GOTMH
    IMPLICIT NONE
REVISION HISTORY:
    Original author(s): Karsten Bolding & Hans Burchard
LOCAL VARIABLES:
    integer                   :: i,j,k
    REALTYPE                  :: u_taus,u_taub,z0s,z0b
    REALTYPE                  :: h(0:kmax),dry,zz
    REALTYPE                  :: NN1d(0:kmax),SS1d(0:kmax)
    REALTYPE                  :: xP(0:kmax)