## 2 Material and Methods
### Model Description
#### 2.1.2 Boundary Conditions  
Boundary conditions are needed to solve Equations (1) and (2). These conditions are set at the free surface and at the bottom and involve both velocities and tangential stresses. Both ROMS and Delft3D apply the vertical boundary conditions at the bottom reference level \(z_{ob}\) where velocity is zero. Such a height is evaluated as \(z_{ob}=z_{r}/30\), where \(z_{r}\) is the Nikuradse roughness length scale. Both the numerical models use the reference level to compute the drag coefficient \(C_{3D}\). In ROMS, it is defined as  
\[C_{3D_{R}}=\left(\frac{\kappa}{\log(\frac{\Delta z_{b}}{2z_{ob}})}\right)^{2} \tag{5}\]  
which is slightly different from the one of Delft3D  
\[C_{3D_{D}}=\left(\frac{\kappa}{\log(1+\frac{\Delta z_{b}}{2z_{ob}})}\right)^{ 2}. \tag{6}\]  
Such a difference is present since ROMS was developed for ocean circulations characterised by very deep bathymetry, whereas Delft3D was initially intended for shallow flows of coastal areas. The former case is, therefore, insensible to the summation present in Equation (6), since for very deep flows \(1+\frac{\Delta z_{b}}{2z_{ob}}\approx\frac{\Delta z_{b}}{2z_{ob}}\).  
The drag coefficient \(C_{3D}\) is the constant of proportionality between the bed velocity \(\mathbf{U_{b}}=(U_{b},V_{b})\) and the bottom tangential stress \(\mathbf{\tau_{b}}=(\tau_{b}^{x},\tau_{b}^{y})\) using the typical quadratic closure:  
\[(\tau_{b}^{x},\tau_{b}^{y})=(\rho_{0}C_{3D}U_{b}\sqrt{U_{b}^{2}+V_{b}^{2}},\rho _{0}C_{3D}V_{b}\sqrt{U_{b}^{2}+V_{b}^{2}}). \tag{7}\]  
The models use \(\mathbf{\tau_{b}}\) to compute the bed friction velocity vector \(\mathbf{u_{b}^{*}}=(u_{b}^{*},\tau_{b}^{*})\) through the relation:  
\[\mathbf{u_{b}^{*}}=\sqrt{\frac{\mathbf{\tau_{b}}}{\rho_{0}}}. \tag{8}\]  
Bottom boundary conditions for velocity \(\mathbf{U_{b}}=(U_{b},V_{b})\) are computed by assuming a logarithmic velocity profile in the lowest computational cell:\[\mathbf{U_{b}}=\frac{\mathbf{u_{b}^{*}}}{\kappa}\log\left(1+\frac{\Delta z_{b}}{2z_{ob}}\right) \tag{9}\]  
where \(\kappa\) is the von [PERSON]'s constant equal to 0.41, \(\Delta z_{b}\) is the distance to the computational grid point closest to the bed and \(z_{ob}\) is the reference level where velocity goes to zero. A typical drag coefficient \(C_{3D}\) is adopted to relate tangential stresses at the bed with velocities at the first bottom layer.  
Boundary conditions at the bottom and at the free surface involve the vertical eddy viscosity \(v_{v}\) and relate the derivatives of the plane components of velocity with the respective tangential stresses. Vertical velocity is instead obtained from continuity. At the free surface, i.e., for \(z=\zeta(x,y,t)\), being \(\zeta(x,y,t)\) the free surface elevation above reference plane, the following conditions hold:  
\[\frac{\partial U}{\partial z}=\frac{\tau_{s}^{x}(x,y,t)}{\rho_{0}v_{v}}, \quad\frac{\partial V}{\partial z}=\frac{\tau_{s}^{y}(x,y,t)}{\rho_{0}v_{v}}, \quad W=\frac{\partial\zeta}{\partial t}. \tag{10}\]  
At the bottom, for \(z=-h(x,y)\), where \(h(x,y)\) is the depth below the reference plane, the conditions are:  
\[\frac{\partial U}{\partial z}=\frac{\tau_{b}^{x}(x,y,t)}{\rho_{0}v_{v}},\quad \frac{\partial V}{\partial z}=\frac{\tau_{b}^{y}(x,y,t)}{\rho_{0}v_{v}},\quad W =(U,V)\cdot\
abla h. \tag{11}\]