## 1. Introduction

When the horizontal pressure-gradient force (PGF) is expressed in partial differential equation (PDE) form, and the vertical coordinate is a terrain-following (sigma) coordinate, the PGF splits into two terms that cannot be combined under a single gradient operator. In this case, the truncation errors of these terms do not cancel and lead to significant errors in steep terrain. Discussions of this problem in the meteorological and oceanographic literature are referenced below. In the planetary atmospheres context, we have encountered this problem when applying a hybrid isentropic-sigma coordinate model to Venus (Herrnstein and Dowling, 2007), and have noted that a similar split also arises when modelling ortho- and parahydrogen for gas-giant atmospheres (Dowling *et al.*, 1998).

Lin (1997) reviews the steep-terrain problem and prescribes an elegant solution: a two-dimensional (2D), plane-parallel, Green–Gauss pressure-gradient algorithm. This algorithn was further elucidated by Chu and Fan (2003) and is now offered as a finite-volume option in several models. Further advances along these lines have been made; e.g. Adcroft *et al.* (2008) derive a 2D Green–Gauss algorithm that takes into account the compressibility of seawater. Lin (2004) reviews the field and covers all aspects of the finite-volume approach, but still employs his 2D algorithm for the horizontal PGF (his Eq. (28)).

As elegant as they are, the above studies have not yet investigated the ramifications of applying 2D algorithms to three-dimensional (3D) atmospheres and oceans. Engineering computational fluid dynamics (CFD) models tend not to apply 2D algorithms to 3D problems, and hence provide little or no guidance on the efficacy of the approach.

Much CFD development has been done with 3D pressure-gradient algorithms for arbitrary grids, using both finite-volume and finite-element approaches, including the Green–Gauss and least-squares techniques, e.g. Mavriplis (2003), Christon (2009), and the references cited by Lin (2004). For the most part, these CFD algorithms have not yet been tested in the meteorological setting, which Lin (2004) points out has strong stratification unlike most gas-dynamics applications, and will have different cost-to-benefit criteria in general. One notable exception is the Operational Multiscale Environment Model with Grid Adaptivity (OMEGA; Bacon *et al.*, 2000), an unstructured-grid atmospheric model with a dynamical core designed around CFD techniques, which uses a 3D Green–Gauss PGF algorithm. However, a description of that algorithm is not available in the literature.

As far as we are aware, at the time of writing there are no 3D Green–Gauss pressure-gradient algorithms described in the meteorological literature. The 118-page review on finite-volume methods in meteorology by Machenhaur *et al.* (2009) is a tour de force on the continuity equation, but presents the PGF in PDE form (their Eqs (3.102)–(3.105) and (3.147)), or cites Lin's 2D algorithm (p. 101). Adcroft *et al.* (2004) describe a finite-volume option for the Massachusetts Institute of Technology general circulation model (MITgcm), but implement the PGF in PDE form times a differential volume (their Eqs (8a, b)). Sawyer and Mirin (2007) describe a horizontal-area average of the PDE-form pressure-gradient terms (their Eqs (14)–(16), (22), (23)). We feel it is important to start the conversation in meteorology about the 3D Green–Gauss approach to the horizontal PGF.

In section 2, we give a description of our extension of Lin's 2D Green–Gauss pressure-gradient algorithm to plane-parallel 3D geometry, starting with the traditional longitude–latitude grid and then proceeding to the general convex quadrilateral planform, which may be applied to the cubed-sphere grid. In section 3, we provide a simple cost-to-benefit analysis by comparing the 3D versus 2D truncation errors and runtime costs arising from a hydrostatic atmosphere in the vicinity of a Gaussian mountain. We show that the trade-off when switching from 2D to 3D is about a 10% reduction in PGF truncation error for a 1% increase in complete-model run time. In section 4, we summarize our results and discuss possibilities for future improvement.