## 1. Introduction

Representing orography accurately in numerical weather prediction systems is necessary to model downslope winds and local precipitation. Orography also exerts strong nonlocal influences: from the latent heat release due to convection, by directly forcing gravity waves and planetary waves, and by the atmospheric response to form drag and gravity wave drag. There are two main approaches to representing orography on a grid: terrain-following layers and cut cells, with the immersed (or embedded) boundary method (Simon et al. 2012) being similar to a cut-cell approach. All methods align cells in vertical columns. Most models are designed for a particular type of grid, and the study by Good et al. (2014) compared cut-cell results with terrain-following solutions implemented within different models. Instead, this study uses a single model to enable a like-for-like comparison between solutions using terrain-following and cut-cell grids.

With increasing horizontal model resolution, the discrete representation of terrain can become steeper, making accurate calculation of the horizontal pressure gradient more difficult when using terrain-following layers (Gary 1973; Steppeler et al. 2002). Numerical errors in this calculation result in spurious winds and can cause numerical instability (Fast 2003; Webster et al. 2003). Cut-cell methods seek to reduce the error that is associated with steep orography.

With terrain-following (TF) layers the terrain’s influence decays with height so that the bottommost layers follow the underlying surface closely while the uppermost layers are flat. There are two main approaches to minimizing errors associated with TF layers. First, by smoothing the effects of terrain with height, the influence of the terrain is reduced, hence errors in the calculated horizontal pressure gradient are also reduced aloft (Schär et al. 2002; Leuenberger et al. 2010; Klemp 2011). However, the error is not reduced at the ground where steep terrain remains unmodified.

Second, numerical errors can also be reduced by improving the accuracy in calculating the horizontal pressure gradient itself. Terrain-following layers are usually implemented using a coordinate transformation onto a rectangular computational domain, which introduces metric terms into the equations of motion. The techniques proposed by Klemp (2011) and Zängl (2012) both involve interpolation onto *z* levels in order to calculate the horizontal pressure gradient. This gave them the flexibility to design more accurate horizontal pressure gradient discretizations using more appropriate stencils. The technique proposed by Weller and Shahrokhi (2014) involved calculating pressure gradients in the direction aligned with the grid, thus ensuring curl-free pressure gradients and improving accuracy.

Despite their associated numerical errors, TF layers are in widespread operational use (Steppeler et al. 2003). They are attractive because their rectangular structure is simple to process by computer and link with parameterizations, and boundary layer resolution can be increased with variable spacing of vertical layers (Schär et al. 2002).

Cut cells is an alternative method in which the grid does not follow the terrain but, instead, cells that lie entirely below the terrain are removed, and those that intersect the surface are modified in shape so that they more closely fit the terrain. The resulting grid is orthogonal everywhere except near cells that have been cut. Hence, errors are still introduced when calculating the horizontal pressure gradient between cut and uncut cells.

The cut-cell method can create some very small cells that reduce computational efficiency (Klein et al. 2009), and several approaches have been tried to alleviate the problem. Yamazaki and Satomura (2010) combine small cells with horizontally or vertically adjacent cells. Steppeler et al. (2002) employ a thin-wall approximation to increase the computational volume of small cells without altering the terrain. Jebens et al. (2011) avoid the time step restriction associated with explicit schemes by using an implicit method for cut cells and a semiexplicit method elsewhere.

Some studies have shown examples where cut cells produce more accurate results when compared to TF coordinates. Spurious winds seen in TF coordinates are not present with cut cells and errors do not increase with steeper terrain (Good et al. 2014). A comparison of TF and cut cells using real initial data by Steppeler et al. (2013) found that 5-day forecasts of precipitation and wind over Asia in January 1989 were more accurate in the cut-cell model, although this result was dependent on using an old version of a model.

Another alternative method is the eta coordinate, described by Mesinger et al. (1988). This transformation, expressed in pressure coordinates, quantizes the surface pressure at each grid box using prescribed geometric heights. This results in terrain profiles having a staircase pattern which is known as “step” orography. The eta coordinate improves the accuracy of the horizontal pressure gradient calculation compared to the sigma coordinate (Mesinger et al. 1988).

In an experiment of orographically induced gravity waves, Gallus and Klemp (2000) found that horizontal flow along the lee slope was artificially weak in the eta model. Mesinger et al. (2012) offer an explanation for this behavior: air flowing along the lee slope cannot travel diagonally downward but must first travel horizontally, then vertically downward. However, lee slope winds are weakened because some of the air continues to be transported horizontally aloft.

Mesinger et al. (2012) refined the formulation to allow diagonal transport of momentum and temperature immediately above sloping terrain. This arrangement is similar to the finite-volume cut-cell method. The new method improved test results, increasing lee slope winds by 4–5 m s^{−1} (Mesinger et al. 2012).

This study uses a modified version of the fully compressible model from Weller and Shahrokhi (2014) to enable a like-for-like comparison between terrain-following and cut-cell grids for idealized, two-dimensional test cases from the literature. Section 2 presents the formulation of the terrain-following and cut-cell grids used in the experiments that follow. In section 3 we give the governing equations and outline the model from Weller and Shahrokhi (2014). Section 4 analyzes the results from three advection tests, a test of a stably stratified atmosphere initially at rest, and orographically induced gravity waves. Concluding remarks are made in section 5.

## 2. Grids

Here we describe the formulation of the terrain-following grids and the method of cut-cell grid construction. The techniques presented are used to define the grids for the experiments in section 4.

*H*is the height of the domain, and

*z*varies between

*h*and

*H*and

*H*. Using this coordinate, the terrain’s influence decays linearly with height but disappears only at the top of the domain. An example is shown in Fig. 1a.

*n*was introduced by Leuenberger et al. (2010) in order to increase cell thickness in the layers nearest the ground, allowing longer time steps. Leuenberger et al. (2010) found the exponent has an optimal value of

Most implementations of terrain-following layers use a coordinate system that makes the computational domain rectangular, but introduces metric terms into the equations of motion. Instead, the model employed in this study uses Cartesian coordinates and nonorthogonal grids. By doing so, results from the same model can be compared between terrain-following and cut-cell grids without modifying the equation set or discretization.

Cut-cell grids are generated in a different way to the typical shaving technique described by Adcroft et al. (1997). Starting from a uniform grid, all cell vertices that lie beneath the orography are moved up to the surface. Additionally, to avoid creating very thin cells, all vertices up to *q* is removed to create a triangular cell *p* is moved down because it is within

Illustration of a cut-cell grid (a) before and (b) after construction. The terrain surface, denoted by a heavy dotted line, intersects a uniform rectangular grid comprising six cells, *q* is removed to create a triangular cell, *p* is moved down because it is within

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Illustration of a cut-cell grid (a) before and (b) after construction. The terrain surface, denoted by a heavy dotted line, intersects a uniform rectangular grid comprising six cells, *q* is removed to create a triangular cell, *p* is moved down because it is within

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Illustration of a cut-cell grid (a) before and (b) after construction. The terrain surface, denoted by a heavy dotted line, intersects a uniform rectangular grid comprising six cells, *q* is removed to create a triangular cell, *p* is moved down because it is within

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Some small cells are generated but, unlike most cut-cell grids, cells are typically made smaller in height but their width is unaltered. (A grid that has these thin cells can be seen in Fig. 5c.) This technique has the advantage that cells are not shortened in the direction of flow and so there should be no additional constraints on the advective Courant number.

## 3. Models

Three models are used for the test cases in this study: two linear advection models and a model of the fully compressible Euler equations. All are operated in a two-dimensional *x*–*z* slice configuration.

The two finite-volume models make use of the upwind-biased multidimensional cubic advection scheme from Weller and Shahrokhi (2014), which is nonmonotonic and not flux corrected. The scheme uses a least squares approach to fit a multidimensional polynomial over an upwind-biased stencil that contains more cells than the number of polynomial coefficients. This fit is used to interpolate cell values onto face values for the discretization of the advection term using Guass’s divergence theorem. Following Lashley (2002) and Weller et al. (2009), the two cells on either side of the face we are interpolating onto are weighted in the least squares fit so that the fit goes nearly exactly through these cell centers but does not go exactly through the other points. This method worked well when used for terrain-following meshes by Weller and Shahrokhi (2014) but can be unstable in the presence of very small cut cells. This is because the least squares fit can generate a larger interpolation weight for the downwind cell than the upwind cell. To overcome this problem, wherever a large downwind cell interpolation weight is calculated by the least squares fit, the weighting of the upwind cell is increased for the least squares fitting and the fit is recalculated. This procedure is repeated until the interpolation weight of the upwind cell is greater than the interpolation weight of the downwind cell. More details of this approach and a study of its behavior is the subject of a future publication.

### a. Finite-volume linear advection model

*ϕ*is interpolated onto cell faces using one of two schemes: first, the centered linear scheme, which takes the average of the two neighboring cell values; second, the upwind-biased cubic scheme. The time derivative is solved using a three-stage, second order Runge–Kutta scheme defined as

*n*. This time-stepping scheme is used for consistency with the trapezoidal implicit scheme used for the fully compressible model, described in section 3c. To ensure that the discrete velocity field is nondivergent, velocities are prescribed at cell faces by differencing the streamfunction

### b. Finite-difference linear advection model

Once again, velocity fields are prescribed using a streamfunction defined at cell vertices [referred to as double staggered grid points by Schär et al. (2002)]. The original version of the code effectively smoothed the orography, interpolating the geometric height *z* at doubly staggered points from values at adjacent half levels in order to calculate the streamfunction. The modified version used here directly calculates the height at vertices to enable comparisons with the finite-volume model solutions.

### c. Finite-volume fully compressible model

*ρ*is the density,

*T*is the temperature,

*p*is the pressure,

*μ*is a damping function used for the sponge layer in the gravity waves test in section 4d.

The fully compressible model uses the C-grid staggering in the horizontal and the Lorenz staggering in the vertical such that *θ*, *ρ*, and

Acoustic and gravity waves are treated implicitly and advection is treated explicitly. The trapezoidal implicit treatment of fast waves and the Hodge operator suitable for nonorthogonal grids are described in the appendix. To avoid time-splitting errors between the advection and the fast waves, the advection is time stepped using a three-stage, second-order Runge–Kutta scheme. The advection terms of the momentum and *θ* equations, (7a) and (7c), are discretized in flux form using the upwind-biased cubic scheme.

## 4. Results

A series of two-dimensional tests are performed over idealized orography. For each test, results on terrain-following and cut-cell grids are compared. The first test from Schär et al. (2002) advects a tracer in a horizontal velocity field. Second, a new tracer advection test is formulated employing a terrain-following velocity field to challenge the advection scheme on cut-cell grids. The third test solves the Euler equations for a stably stratified atmosphere initially at rest, following Klemp (2011). Fourth, as specified by Schär et al. (2002), a test of orographically induced gravity waves is performed. Finally, another advection test is formulated that transports a stably stratified thermal profile in a terrain-following velocity field. No explicit diffusion is used in any of the tests. (The OpenFOAM implementation of the numerical model, grid generation utilities and test cases are available at https://github.com/hertzsprung/tf-cutcell-comparison/tree/shaw-weller-2015-mwr.)

### a. Horizontal advection

Following Schär et al. (2002), a tracer is transported above wave-shaped terrain by solving the advection equation for a prescribed horizontal wind. This test challenges the accuracy of the advection scheme in the presence of grid distortions.

The domain width is 301 km, taken as the horizontal distance between the inlet and outlet boundaries. The domain is 25 km high, discretized onto a grid with

*h*, such that

*u*

_{0}= 10 m s

^{−1},

*ϕ*is positioned upstream above the height of the terrain. It has the following shape:

*r*given by

*ϕ*

_{0}= 1 kg m

^{−3}is the maximum density of the tracer. At

The test was executed on the BTF, SLEVE, and cut-cell grids using a centered linear scheme and the upwind-biased cubic scheme. Results were also obtained on BTF and SLEVE grids with the fourth-order scheme from Schär et al. (2002) using the modified version of their code.

*ϕ*is the numerical tracer value,

Minimum and maximum tracer densities (kg m^{−3}) and *t* = 10 000 s in the horizontal and terrain-following tracer advection tests using centered linear and cubic upwind-biased schemes. For the horizontal advection test,

The results of the cubic upwind-biased scheme on TF and regular grids are comparable with those for the fourth-order centered scheme from Schär et al. (2002). The error is largest on the BTF grid with

The results of the horizontal advection test show that numerical errors are due either to misalignment of the flow with the grid, or to grid distortions. In the following section, we propose a new test in order to identify the cause of the errors.

### b. Terrain-following advection

In the horizontal advection test, results were least accurate on the BTF grid, where the grid was most nonorthogonal and flow was misaligned with the grid layers. Here, we formulate a new tracer advection test in which the velocity field is everywhere tangential to the basic terrain-following coordinate surfaces. On the BTF grid, the flow is then aligned with the grid, but the data in the multidimensional advection stencil are not uniformly distributed because the BTF grid is nonorthogonal. Conversely, on the cut-cell grid, the flow is misaligned with the grid but, except in the lowest layers, the grid is orthogonal. This test determines whether the primary source of numerical error is due to nonorthogonality or misalignment of the flow with grid layers.

*u*

_{0}= 10 m s

^{−1}, which is the horizontal wind speed where

*u*and

*w*, are then given by

*t*= 10 000 s the tracer has passed over the mountain. The horizontal position of the tracer center can be calculated by integrating along the trajectory to find

*t*, the time taken to pass from one side of the mountain to the other:

*x*(

*t*= 10 000 s) = 51 577.4 m. Because the velocity field is nondivergent, the flow accelerates over mountain ridges and the tracer travels 1577.4 m farther compared to advection in the purely horizontal velocity field. Tracer height is unchanged downwind of the mountains because advection is parallel to the coordinate surfaces.

Tracer contours at *t* = 0, 5000, and 10 000 s are shown in Fig. 3 using the centered linear scheme on the BTF grid and cut-cell grid (Figs. 3a and 3b, respectively). At *t* = 10 000 s, but this is not the case with centered linear scheme on the cut-cell grid. Here, the tracer has spread vertically due to increased numerical errors when the tracer is transported between layers. Dispersion errors are apparent with grid-scale oscillations that travel in the opposite direction to the wind (Fig. 3d) and some artifacts remain above the mountain peak.

Tracer contours advected in a terrain-following velocity field at *t* = 0, 5000, and 10 000 s using the centered linear scheme on (a) the BTF grid and (b) the cut-cell grid with contour intervals every 0.1. Errors at *t* = 10 000 s are shown for (c) the centered linear scheme on the BTF grid, (d) the centered linear scheme on the cut-cell grid, (e) the upwind-biased cubic scheme on the BTF grid, and (f) the upwind-biased cubic scheme on the cut-cell grid with contour intervals every 0.01. Negative contours are denoted by dotted lines. The terrain profile is also shown immediately above the *x* axis.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Tracer contours advected in a terrain-following velocity field at *t* = 0, 5000, and 10 000 s using the centered linear scheme on (a) the BTF grid and (b) the cut-cell grid with contour intervals every 0.1. Errors at *t* = 10 000 s are shown for (c) the centered linear scheme on the BTF grid, (d) the centered linear scheme on the cut-cell grid, (e) the upwind-biased cubic scheme on the BTF grid, and (f) the upwind-biased cubic scheme on the cut-cell grid with contour intervals every 0.01. Negative contours are denoted by dotted lines. The terrain profile is also shown immediately above the *x* axis.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Tracer contours advected in a terrain-following velocity field at *t* = 0, 5000, and 10 000 s using the centered linear scheme on (a) the BTF grid and (b) the cut-cell grid with contour intervals every 0.1. Errors at *t* = 10 000 s are shown for (c) the centered linear scheme on the BTF grid, (d) the centered linear scheme on the cut-cell grid, (e) the upwind-biased cubic scheme on the BTF grid, and (f) the upwind-biased cubic scheme on the cut-cell grid with contour intervals every 0.01. Negative contours are denoted by dotted lines. The terrain profile is also shown immediately above the *x* axis.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

A small improvement is obtained on the BTF grid by using the upwind-biased cubic scheme: as seen in Fig. 3e, errors are less than 0.02 in magnitude and errors are confined to the expected region of the tracer. However, results are substantially improved by using the upwind-biased cubic scheme on the cut-cell grid (Fig. 3f). Results on the SLEVE grid are comparable to those on the cut-cell grid except that the artifacts above the mountain peak with the centered linear scheme on the cut-cell grid are not present on the SLEVE grid (not shown).

The

We conclude from this test that accuracy depends upon alignment of the flow with the grid, and accuracy is not significantly reduced by grid distortions. Error on the BTF grid in the terrain-following advection test is comparable with the error on the SLEVE grid in the horizontal advection test.

### c. Stratified atmosphere initially at rest

An idealized terrain profile is defined along with a stably stratified atmosphere at rest in hydrostatic balance. The analytic solution is time invariant, but numerical errors in calculating the pressure gradient can give rise to spurious velocities that become more severe over steeper terrain (Klemp 2011). Cut-cell grids are often suggested as a technique for reducing these spurious circulations (Yamazaki and Satomura 2010; Jebens et al. 2011; Good et al. 2014).

The test setup follows the specification by Klemp (2011). The domain is 200 km wide and 20 km high, and the grid resolution is

*h*given by

Tests were performed with two different stability profiles, both having an initial potential temperature field has *N* = 0.01 s^{−1} everywhere, except for a more stable layer of *N* = 0.02 s^{−1}. Figure 4a shows where this inversion layer is positioned in the two tests: the “high inversion” test follows Klemp (2011), placing the layer between

Setup and results of a stratified atmosphere initially at rest. Tests are performed on four grids for two different stability profiles: (a) the placement of the inversion layer in the two profiles. The low inversion is positioned so that it intersects the terrain, shown immediately above the *x* axis. In each test, the inversion layer has a Brunt–Väisälä frequency *N* = 0.02 s^{−1}, and *N* = 0.01 s^{−1} elsewhere. (b) The maximum magnitude of spurious vertical velocity *w* (m s^{−1}) with results on BTF, SLEVE, and cut-cell grids using the model from Weller and Shahrokhi (2014), which includes a curl-free pressure gradient formulation. Results for the high inversion test are shown with solid lines and results for the low inversion test are shown with dashed lines.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Setup and results of a stratified atmosphere initially at rest. Tests are performed on four grids for two different stability profiles: (a) the placement of the inversion layer in the two profiles. The low inversion is positioned so that it intersects the terrain, shown immediately above the *x* axis. In each test, the inversion layer has a Brunt–Väisälä frequency *N* = 0.02 s^{−1}, and *N* = 0.01 s^{−1} elsewhere. (b) The maximum magnitude of spurious vertical velocity *w* (m s^{−1}) with results on BTF, SLEVE, and cut-cell grids using the model from Weller and Shahrokhi (2014), which includes a curl-free pressure gradient formulation. Results for the high inversion test are shown with solid lines and results for the low inversion test are shown with dashed lines.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Setup and results of a stratified atmosphere initially at rest. Tests are performed on four grids for two different stability profiles: (a) the placement of the inversion layer in the two profiles. The low inversion is positioned so that it intersects the terrain, shown immediately above the *x* axis. In each test, the inversion layer has a Brunt–Väisälä frequency *N* = 0.02 s^{−1}, and *N* = 0.01 s^{−1} elsewhere. (b) The maximum magnitude of spurious vertical velocity *w* (m s^{−1}) with results on BTF, SLEVE, and cut-cell grids using the model from Weller and Shahrokhi (2014), which includes a curl-free pressure gradient formulation. Results for the high inversion test are shown with solid lines and results for the low inversion test are shown with dashed lines.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

The Exner function of pressure is calculated so that it is in discrete hydrostatic balance in the vertical direction (Weller and Shahrokhi 2014). The damping function *μ* is set to 0 s^{−1}. Unlike Klemp (2011), there is no eddy diffusion in the equation set.

The test was integrated forward by 5 h using a time step ^{−1} was found on the BTF grid after 400 s, compared with a maximum of ~7 m s^{−1} found by Klemp (2011) using their improved horizontal pressure gradient formulation. Errors are two orders of magnitude smaller on the cut-cell grid with vertical velocities of ~1 × 10^{−4} m s^{−1}, but this advantage is lost when the inversion layer is lowered to intersect the terrain. Unlike the result from Klemp (2011), the SLEVE grid does not further reduce vertical velocities compared to the BTF grid. This implies that the numerics we are using are less sensitive to grid distortions.

Good et al. (2014) found the maximum vertical velocity in their cut-cell model was 1 × 10^{−12} m s^{−1}, which is better than any result obtained here. It is worth noting that our model stores values at the geometric center of cut cells, whereas the model used by Good et al. (2014) has cell centers at the center of the uncut cell, resulting in the center of some cut cells being below the ground (S.-J. Lock 2014, personal communication). This means that the grid is effectively regular when calculating horizontal and vertical gradients. This would account for the very small velocities found by Good et al. (2014).

The results in Fig. 4b have maximum errors that are comparable with Weller and Shahrokhi (2014) but, due to the more stable split into implicitly and explicitly treated terms (described in the appendix), the errors decay over time due to the dissipative nature of the advection scheme.

In summary, we reproduce the result found by Good et al. (2014) that cut cells can reduce spurious velocities over orography. However, in addition, we find that, with the right numerics, these errors can be very small on a BTF grid. We also find that, if changes in stratification intersect cut cells, spurious velocities on cut-cell grids are comparable with those on TF grids.

### d. Gravity waves

The test originally specified by Schär et al. (2002) prescribes flow over terrain with small-scale and large-scale undulations, which induces propagating and evanescent gravity waves.

Following Melvin et al. (2010), the domain is 300 km wide and 30 km high. The mountain profile has the same form as Eq. (20), but the gravity waves tests have a mountain height of

A uniform horizontal wind (*u*, *w*) = (10, 0) m s^{−1} is prescribed in the interior domain and at the inlet boundary. No normal flow is imposed at the top and bottom boundaries and the velocity field has a zero gradient outlet boundary condition.

*N*= 0.01 s

^{−1}everywhere, such that

*μ*is adapted from Melvin et al. (2010) such that

*x*

_{0}= −150 km is the leftmost limit of the domain, and

*x*

_{I}= −140 km is the rightmost extent of the inlet sponge layer. The sponge layer is only active on faces whose normal is vertical so that it damps vertical momentum only.

Note that, while the domain itself is 30 km in height, for the purposes of generating BTF grids, the domain height is set to 20 km because the sponge layer occupies the uppermost 10 km.

The simulation is integrated forward by 5 h and the time step,

Spatial and temporal resolutions used in the gravity waves test. The resolution of

Cut-cell grids used for the gravity waves and thermal advection tests at (a)

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Cut-cell grids used for the gravity waves and thermal advection tests at (a)

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Cut-cell grids used for the gravity waves and thermal advection tests at (a)

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

The ratio of minimum and maximum cell areas in the various grids is shown in Table 3, providing an indication of size of the smallest cut cells. As expected, there is almost no variation in cell sizes on the BTF grids. Small cells are generated on cut-cell grids at resolutions finer than

Cell area ratios of BTF and cut-cell grids used in the gravity waves and thermal advection tests. Cell sizes are almost uniform on BTF grids, but for the cut-cell grids the cell area ratio gives an indication of the smallest cell sizes.

At

Differences in potential temperature between the start and end of the gravity waves test on the BTF grid with

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Differences in potential temperature between the start and end of the gravity waves test on the BTF grid with

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Differences in potential temperature between the start and end of the gravity waves test on the BTF grid with

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Vertical profiles of potential temperature differences between the start and end of the gravity waves test on (a) the BTF grid and (b) the cut-cell grid. Results are compared with thermal advection tests results, showing differences in potential temperature between the numeric and analytic solutions at *t* = 18 000 s on (c) the BTF grid and (d) the cut-cell grid. The results are convergent, except for errors found in the lowest layers on the cut-cell grids.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Vertical profiles of potential temperature differences between the start and end of the gravity waves test on (a) the BTF grid and (b) the cut-cell grid. Results are compared with thermal advection tests results, showing differences in potential temperature between the numeric and analytic solutions at *t* = 18 000 s on (c) the BTF grid and (d) the cut-cell grid. The results are convergent, except for errors found in the lowest layers on the cut-cell grids.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Vertical profiles of potential temperature differences between the start and end of the gravity waves test on (a) the BTF grid and (b) the cut-cell grid. Results are compared with thermal advection tests results, showing differences in potential temperature between the numeric and analytic solutions at *t* = 18 000 s on (c) the BTF grid and (d) the cut-cell grid. The results are convergent, except for errors found in the lowest layers on the cut-cell grids.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

To summarize, results of the gravity waves test on all grids are in good agreement with the reference solution from Melvin et al. (2010). The potential temperature field converges, though errors are found in the lowest layers on the cut-cell grids. The source of the errors in the cut-cell grids will be investigated further with an advection test in section 4e.

### e. Terrain-following advection of thermal profile

The potential temperature anomalies in the gravity waves test do not converge with resolution when using the cut-cell grids. This may be due to differences in the wind fields between grids, or errors in the advection of potential temperature, among other possible causes. To help establish the primary source of error, a new advection test is formulated in which the initial potential temperature field from the gravity waves test is used. To eliminate any differences in wind fields, the field is advected in a fixed, terrain-following velocity field that mimics the flow in the gravity waves test.

*u*and

*w*components of velocity are given by Eq. (15), but

*θ*, and its boundary conditions, are the same as those of the initial potential temperature field in the gravity waves test. Following the gravity waves test, the simulation is integrated forward by 18 000 s, by which time the potential temperature initially upwind of the mountain will have cleared the mountain range. Hence, the analytic solution

Enlargements of the error field near the mountain are shown in Fig. 8 at ^{−7}. However, on the cut-cell grid, the error is about 10 times larger. Advection errors are apparent around mountainous terrain, with small cells having some of the largest errors. These errors are advected horizontally along the lee slope, forming stripes. The same error structure is present on all cut-cell grids.

Error in potential temperature (measured in K) in the thermal advection test at a resolution of *t =* 18 000 s are overlaid. Axes are in units of m.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Error in potential temperature (measured in K) in the thermal advection test at a resolution of *t =* 18 000 s are overlaid. Axes are in units of m.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

Error in potential temperature (measured in K) in the thermal advection test at a resolution of *t =* 18 000 s are overlaid. Axes are in units of m.

Citation: Monthly Weather Review 144, 6; 10.1175/MWR-D-15-0226.1

For comparison with the potential temperature anomalies in the gravity waves test, vertical profiles of potential temperature error are taken at

While the magnitude and structure of error on the cut-cell grids in this test differs from potential temperature anomalies in the gravity waves test, results on the BTF grids are in close agreement in both tests but not on the cut-cell grids. Therefore, it is likely that anomalies on the cut-cell grids in the gravity waves test are primarily due to errors in the advection of potential temperature through cut cells.

## 5. Conclusions

We have presented a like-for-like comparison between terrain-following and cut-cell grids using a single model. Accuracy on the BTF, SLEVE, and cut-cell grids was evaluated in a series of two-dimensional tests.

Across all tests, a high degree of accuracy was achieved for all grids. Even on the highly distorted BTF grid errors were often small in the tests presented here. In the first two tests, tracers were advected by horizontal and terrain-following velocity fields. We found that the accuracy of the upwind-biased cubic advection scheme depended upon alignment of the flow with the grid rather than on grid distortions. Spurious vertical velocities in the resting atmosphere tests were similar on terrain-following and cut-cell grids. In the gravity waves test, vertical velocities were in good agreement with the reference solution from Melvin et al. (2010) across all grids.

Cut-cell grids reduced errors in the horizontal advection test. Conversely, in the terrain-following tracer advection test, errors were large on the SLEVE and cut-cell grids where velocities were misaligned with the grids. Errors were also large on the cut-cell grids in the terrain-following thermal advection test. This result suggests that, in the gravity waves test, potential temperature errors in the cut-cell grids are primarily due to advection errors.

The cubic upwind-biased advection scheme takes an approach for treating small cut cells that differs from other existing approaches by adjusting weightings to ensure that advection remains upwind-biased near small cells. (The implementation of this technique in OpenFOAM is available at https://github.com/hertzsprung/AtmosFOAM/tree/shaw-weller-2015-mwr and will be described in greater detail a future publication.) Combined with semi-implicit time stepping and a new cut-cell generation technique that preserves cell length in the direction of the flow, small cells did not impose additional time step constraints. By using a suitable multidimensional advection scheme and a curl-free pressure gradient formulation, we did not find significant advantages of cut cells or smoothed coordinate systems unlike Good et al. (2014), Klemp (2011), and Schär et al. (2002). In contrast, errors that do not reduce with resolution are on cut-cell grids. No significant problems were found when using basic terrain-following grids.

## Acknowledgments

I am grateful to my cosupervisors John Methven and Terry Davies for their valuable input, and to Christoph Schär (ETH) for his assistance in reproducing his advection test results. The authors thank the two anonymous reviewers whose comments greatly improved this manuscript. I am thankful for the NERC studentship, which helped fund this work. Weller is funded by NERC Grant NE/H015698/1.

## APPENDIX

### Semi-Implicit Treatment of the Hodge Operator

*f*means “at face

*f*.” The contravariant momentum component, that is the flux across faces, is a diagnostic variable:

*f*with magnitude equal to the area of the face. If

**U**is the vector of all values of

**V**is the vector of all values of

**V**to

**U**:

*F*denotes midpoint interpolation from two surrounding cell values onto face

*f*:

*f*. Here

**U**is likely to be positive definite for meshes with sufficiently low nonorthogonality, although this has not been proved.

*θ*[Eq. (7c)] equations and the equation of state [Eq. (7d)] to form a Helmholtz equation to be solved implicitly, as described by Weller and Shahrokhi (2014). The semi-implicit solution technique with a Hodge operator can be defined by considering only a discretized form of the continuity equation:

*c*,

*c*, and

## REFERENCES

Adcroft, A., C. Hill, and J. Marshall, 1997: Representation of topography by shaved cells in a height coordinate ocean model.

,*Mon. Wea. Rev.***125**, 2293–2315, doi:10.1175/1520-0493(1997)125<2293:ROTBSC>2.0.CO;2.Fast, J. D., 2003: Forecasts of valley circulations using the terrain-following and step-mountain vertical coordinates in the Meso-Eta model.

,*Wea. Forecasting***18**, 1192–1206, doi:10.1175/1520-0434(2003)018<1192:FOVCUT>2.0.CO;2.Gal-Chen, T., and R. C. Somerville, 1975: On the use of a coordinate transformation for the solution of the Navier-Stokes equations.

,*J. Comput. Phys.***17**, 209–228, doi:10.1016/0021-9991(75)90037-6.Gallus, W. A., and J. B. Klemp, 2000: Behavior of flow over step orography.

,*Mon. Wea. Rev.***128**, 1153–1164, doi:10.1175/1520-0493(2000)128<1153:BOFOSO>2.0.CO;2.Gary, J. M., 1973: Estimate of truncation error in transformed coordinate, primitive equation atmospheric models.

,*J. Atmos. Sci.***30**, 223–233, doi:10.1175/1520-0469(1973)030<0223:EOTEIT>2.0.CO;2.Good, B., A. Gadian, S.-J. Lock, and A. Ross, 2014: Performance of the cut-cell method of representing orography in idealized simulations.

,*Atmos. Sci. Lett.***15**, 44–49, doi:10.1002/asl2.465.Jebens, S., O. Knoth, and R. Weiner, 2011: Partially implicit peer methods for the compressible Euler equations.

,*J. Comput. Phys.***230**, 4955–4974, doi:10.1016/j.jcp.2011.03.015.Klein, R., K. Bates, and N. Nikiforakis, 2009: Well-balanced compressible cut-cell simulation of atmospheric flow.

,*Philos. Trans. Roy. Soc. London***367**, 4559–4575, doi:10.1098/rsta.2009.0174.Klemp, J. B., 2011: A terrain-following coordinate with smoothed coordinate surfaces.

,*Mon. Wea. Rev.***139**, 2163–2169, doi:10.1175/MWR-D-10-05046.1.Lashley, R. K., 2002: Automatic generation of accurate advection schemes on unstructured grids and their application to meteorological problems. Ph.D. thesis, University of Reading, 247 pp. [Available online at http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.394176.]

Leuenberger, D., M. Koller, O. Fuhrer, and C. Schär, 2010: A generalization of the SLEVE vertical coordinate.

,*Mon. Wea. Rev.***138**, 3683–3689, doi:10.1175/2010MWR3307.1.Melvin, T., M. Dubal, N. Wood, A. Staniforth, and M. Zerroukat, 2010: An inherently mass-conserving iterative semi-implicit semi-Lagrangian discretization of the non-hydrostatic vertical-slice equations.

,*Quart. J. Roy. Meteor. Soc.***136**, 799–814, doi:10.1002/qj.603.Mesinger, F., Z. I. Janjić, S. Ničkovic, D. Gavrilov, and D. G. Deaven, 1988: The step-mountain coordinate: Model description and performance for cases of alpine lee cyclogenesis and for a case of an Appalachian redevelopment.

,*Mon. Wea. Rev.***116**, 1493–1518, doi:10.1175/1520-0493(1988)116<1493:TSMCMD>2.0.CO;2.Mesinger, F., and Coauthors, 2012: An upgraded version of the Eta model.

,*Meteor. Atmos. Phys.***116**, 63–79, doi:10.1007/s00703-012-0182-z.Schär, C., D. Leuenberger, O. Fuhrer, D. Lüthi, and C. Girard, 2002: A new terrain-following vertical coordinate formulation for atmospheric prediction models.

,*Mon. Wea. Rev.***130**, 2459–2480, doi:10.1175/1520-0493(2002)130<2459:ANTFVC>2.0.CO;2.Simon, J. S., K. A. Lundquist, and F. K. Chow, 2012: Application of the immersed boundary method to simulations of flow over steep, mountainous terrain.

*15th Conf. on Mountain Meteorology*, Steamboat, CO, Amer. Meteor. Soc., P45. [Available online at https://ams.confex.com/ams/15MountMet/webprogram/Paper210300.html.]Steppeler, J., H.-W. Bitzer, M. Minotte, and L. Bonaventura, 2002: Nonhydrostatic atmospheric modeling using a

*z*-coordinate representation.,*Mon. Wea. Rev.***130**, 2143–2149, doi:10.1175/1520-0493(2002)130<2143:NAMUAZ>2.0.CO;2.Steppeler, J., R. Hess, U. Schättler, and L. Bonaventura, 2003: Review of numerical methods for nonhydrostatic weather prediction models.

,*Meteor. Atmos. Phys.***82**, 287–301, doi:10.1007/s00703-001-0593-8.Steppeler, J., S.-H. Park, and A. Dobler, 2013: Forecasts covering one month using a cut-cell model.

,*Geosci. Model Dev.***6**, 875–882, doi:10.5194/gmd-6-875-2013.Thuburn, J., and C. Cotter, 2012: A framework for mimetic discretization of the rotating shallow-water equations on arbitrary polygonal grids.

,*SIAM J. Sci. Comput.***34**, B203–B225, doi:10.1137/110850293.Webster, S., A. Brown, D. Cameron, and C. Jones, 2003: Improvements to the representation of orography in the Met Office Unified Model.

,*Quart. J. Roy. Meteor. Soc.***129**, 1989–2010, doi:10.1256/qj.02.133.Weller, H., and A. Shahrokhi, 2014: Curl-free pressure gradients over orography in a solution of the fully compressible Euler equations with implicit treatment of acoustic and gravity waves.

,*Mon. Wea. Rev.***142**, 4439–4457, doi:10.1175/MWR-D-14-00054.1.Weller, H., H. G. Weller, and A. Fournier, 2009: Voronoi, Delaunay, and block-structured mesh refinement for solution of the shallow-water equations on the sphere.

,*Mon. Wea. Rev.***137**, 4208–4224, doi:10.1175/2009MWR2917.1.Yamazaki, H., and T. Satomura, 2010: Nonhydrostatic atmospheric modeling using a combined Cartesian grid.

,*Mon. Wea. Rev.***138**, 3932–3945, doi:10.1175/2010MWR3252.1.Zängl, G., 2012: Extending the numerical stability limit of terrain-following coordinate models over steep slopes.

,*Mon. Wea. Rev.***140**, 3722–3733, doi:10.1175/MWR-D-12-00049.1.