The bottom friction terms in both equations are also treated implicitly 

 to ensure unconditional numerical stability in shallow waters. The vertical 

 implicit scheme is essential since applying an explicit scheme in shallow 

 water environment may require an exceedingly small time step on the order of a 

 few seconds. In addition, care must be taken to ensure that the 

 vertically-integrated perturbation velocities at each horizontal location 

 (i,j) always equal to zero: 



K K 



max max 



E "'iJ.K = E v'i,j.K = (3.8) 



K=l K=l 



The computations of the u' and v' equations are governed by a stability 

 criterion similar to equation (3.5), except with the vertically-integrated 

 velocities replaced by the local three-dimensional velocities. After u'""*"^ 

 and v'" are obtained, u and v can be computed from: 



j^n+l , ^j.n+1 ^ u"^Vh"^^ (3.9) 



^n+l , y.n+1 ^ vn+l/^n+l (3,10) 



Following these, the vertical velocities oj""*" and w""*" can be computed 



from: 



,-n+l = 



H"^l K 



y /_AHu_ ^ AHv \ n+1 



La 



nil g /_AHiL. Mlv.\n^l ^^ 3^^ 



KM 

 p( i+o 1 



H 



„n+l = H"+l a.n+1 + ^ ^--^ 



e At 



46 



(3.12) 



