The compact finite difference schemes have been found to give simple ways of reaching the objectives of high accuracy and low computational cost. During the past two decades, the compact schemes have been used extensively for numerical simulation of various fluid dynamics problems. These methods have also been applied for numerical solution of some prototype geophysical fluid dynamics problems (e.g., shallow water equations). Most of the compact finite difference schemes are symmetric (usually with 3 or 5 point stencil) and finding each derivative requires a matrix inversion. However, by splitting the derivative operator of a central compact scheme into one-sided forward and backward operators, a family of compact MacCormack-type schemes can be derived. While these classes of compact schemes are as accurate as the original central compact methods used to derive the one-sided forward and backward operators, they need less computational work per point. In addition, the one-sided nature of the method is an essential advantage of the method especially when severe gradients are present. These two features (i.e. high accuracy and low computational cost) makes the compact MacCormack-type scheme an attractive candidate for numerical models of the atmosphere and oceans.
This work focuses on the application of the fourth-order compact MacCormack-type scheme for numerical solution of the unsteady and non-linear Rossby adjustment problem (one and two dimensional cases). The second-order MacCormack method is also used for numerical solution of the equations. In the one-dimensional case, a single layer shallow water model is used to study the unsteady and nonlinear Rossby adjustment problem. The conservative form of the two-dimensional shallow water equations is used to study the unsteady and nonlinear Rossby adjustment problem in the two-dimensional case. For both cases, the time evolution of a fluid layer initially at rest with a discontinuity in the height filed is considered for numerical simulations.
Examination of the accuracy and efficiency of the fourth-order compact MacCormack scheme for some analytical linear and nonlinear prototype problems, indicates the superiority of the fourth-order compact MacCormack scheme over the fourth-order centered compact, second-order centered and second-order MacCormack finite difference schemes especially in the presence of a discontinuity in numerical solution.
For the Rossby adjustment problem, results show a clear improvement of the numerical solution, in particular near the discontinuity generated by the fourth-order compact MacCormack scheme compared to the second-order MacCormack method. Moreover, the overhead computational cost of the fourth-order scheme over the second-order method is very low. It is also observed that to keep the numerical stability it is necessary to use a compact spatial filter with the fourth-order compact MacCormack-type scheme at each time step.