“…The discretized momentum and free-surface equations read: where i, j, and k are the indices corresponding to the x direction, y direction, and z direction, m is the bottom layer index, M n is the free-surface layer index at time level n, and Fu and Fv contain the explicitly discretized advection and horizontal diffusion terms. The advection terms can be approximated, e.g., using a conservative upwind scheme as in Kleptsova et al [2010] or an Eulerian-Lagrangian scheme [e.g., Casulli and Cheng, 1990;Ham et al, 2006]. where r x and r y are the Taylor coefficients, which we determine from the logarithmic law of the wall: Equations (25) and (26) follow when u 1 and v 1 are taken as the velocities in the bottom layer, i.e., at z 1 5Dz n m =2, in (7).…”