Because the free surface dynamics are included in the above equations and the rigid lid approximation is not invoked to filter out the external surface gravity waves, the solutions will involve adjustment due to both internal and external gravity waves. It is therefore necessary to solve these equations at a time step dictated by the Courant--Friedrichs--Levy (CFL) condition for the fast external gravity waves to avoid numerical instabilities. It is generally unnecessary to obtain solutions at such a high temporal resolution, and it is also prohibitively expensive. It is therefore desirable to eliminate external mode calculations as far as possible. This is achieved by a technique called mode-splitting [60], which involves separating out the external and internal mode equations and solving each of them separately at the appropriate time steps dictated by the respective gravity wave speeds, making sure that the two calculations are consistent and synchronous with each other. The principal advantage of this method is significant savings in computing time, because the vertically integrated, barotropic equations governing external modes are fewer and much simpler to solve. The baroclinic (or vertical structure) equations, on the other hand, are more expensive to solve and are solved at much larger time steps dictated by the slow speed of internal gravity waves, under this scheme. The barotropic equations still need to be solved at smaller time steps determined by the fast external gravity waves, but these calculations are only a small fraction of the total.