are continued until a solid boundary or an open port is encountered, 

 while the internal mode computations stop at point 6. It immediately 

 follows that the last term in (62) vanishes. The coupling term 

 obtained by applying the external momentum equation at point 7 is 



-eg[U^]-j i([^i]6[|x(Hl/D)]A^' (63) 



which exactly balances the only remaining term in (62). Note that 

 the second part of the coupling term in (63) is omitted since it 

 involves \p^, which is zero. It can be shown from (59a,b) that all 

 the coupling terms are zero beyond point 7. As a result, the net 

 transfer of energy between modes is zero. 



In summary, with this form of coding, employing the average of 

 the products U[|5(H-l/D)] or \p[^(lii/D)], the only constraint needed 

 to fulfill the energy requirement is that the gradient of (Hj_/D) 

 along the points just inside the open boundary be zero. 



Therefore, the coupling terms, x^, and ^^, in the implicit 

 computations of the external mode momentum and mass conservation 

 equations, (41) and (43), are coded as follows: 



H = ^'^x i{\^i(I-i,J)[(Hi/D(I,J))-(H-L/D(I-J,J))] 



+i//5(I,J+J)[(Hi/D(l4rJ))-(Hi/D(I,J))]}. (64a) 



^i = ie{ujj{u5J(I-J,J)[(Hi/D(I,J))-(H-L/D(I-^,J))] 

 +u5J(I+J,J)[(Hj^/D(I+J,J))-(Hi/D(I,J))]} 

 +Uy{v5(I,J+J)e(J+^)[(Hi/D(I,J+J))-(Hi/D(I,J))] 

 +v5|(I,J-J)e(J-J)[(Hi/D(I,J))-(Hi/D(I,J-J))]}}. (64b) 



For the explicit calculations at odd time steps, Xj_, in (46) becomes 



31 



