## 1. Introduction

Local grid refinement is a commonly used technique in atmospheric numerical modeling where the required resolution is much higher at some locations than others. Whether in the form of distinct two-way interactive nested grids (e.g., Clark and Farley 1984; Zhang et al. 1986; Skamarock and Klemp 1993; Walko et al. 1995) or a single grid with variable spacing (e.g., Schmidt 1977; Courtier and Geleyn 1988; Fox-Rabinovitz et al. 1997; St.-Cyr et al. 2008; Weller et al. 2009; Ringler et al. 2011), it is used as a means of most effectively utilizing available computational resources. The need for higher resolution over a limited region of a computational domain area may arise because of strong local gradients or small structures or a particular focus of interest in that region. Although computing resources continue to grow at a remarkable pace, there is a perpetual need to probe smaller fluid scales, as well as to conserve resources, and consequently, the benefits of local mesh refinement will almost certainly remain indefinitely.

Local mesh refinement has been explored in some global models, using a variety of techniques that are necessarily tied to the model’s gridding technique. For example, Fox-Rabinovitz et al. (1997) modified the latitude–longitude grid of an existing global model by reducing the latitudinal and longitudinal grid spacings within selected ranges of each, while preserving the horizontal logical structure of the grid. Although straightforward to implement, this approach has the disadvantage of creating grid cells of high aspect ratio in locations where refinement is unequal in the two directions. One drawback of high aspect cells is that the effective horizontal resolution is generally limited by the larger horizontal dimension, and the smaller dimension thus adds unnecessary computational cost. Another method that avoids this drawback while also preserving the logical grid structure is to remap a structured grid onto the globe using the Schmidt transformation (Schmidt 1977; Guo and Drake 2005). Courtier and Geleyn (1988) showed that the Schmidt transformation is the only possible conformal transformation of the sphere and that it has six degrees of freedom. Three of these are rigid rotational relocations of all points with no change of relative angles or spacing between them, and are thus of no consequence for local refinement. The remaining degrees of freedom are the magnification factor and the latitude and longitude of the pole of maximum magnification. The magnification factor alone determines the difference in resolution between this pole and its antipodes, and the resolution varies gradually and monotonically between those points; there exists no independent control over the shape or distribution of the magnification. This severely limits the versatility of the Schmidt transformation for local mesh refinement.

Horizontally unstructured grids allow much greater flexibility for specifying grid resolution as a function of geographic location. “Unstructured” in this sense means that grid cells and their position relative to neighbors cannot be identified solely from row and column indices in a rectangular array. In this sense, grid nesting schemes such as used in the Regional Atmospheric Modeling System (RAMS; Walko et al. 1995) and the fifth-generation Pennsylvania State University–National Center for Atmospheric Research Mesoscale Model (MM5; Zhang et al. 1986) are unstructured because, although each grid nest is itself structured, its location and connectivity with its parent grid requires supplementary information. These nesting schemes also introduce so-called hanging nodes in the mesh where special treatment is required to evaluate and apply transport between grid cells across the nesting boundary. A much more general and versatile unstructured grid with hanging nodes was recently applied (e.g., St.-Cyr et al. 2008). Our interest in this paper is with unstructured triangular meshes that are *conforming* [i.e., those that have no hanging nodes and allow uniform (seamless) communication methods at all locations]. A recent example of this approach is that of Weller et al. (2009).

The purpose of this paper is to present a particular method for constructing a refined grid region for a global Delaunay triangulation (or its dual-Voronoi diagram) that is highly efficient, direct (does not require iteration to determine the topological connectivity—although it typically does use iteration to optimize gridcell shape), and allows the interior refined grid cells to remain stationary as refined grid boundaries move dynamically. This latter property is important because any shift in gridcell location requires remapping of prognosed quantities, which results in significant dispersion. The following section describes the complete grid construction procedure, beginning with the generation of a quasi-uniform global triangular mesh and followed by details of refined grid construction. Section 3 evaluates and compares results of shallow-water test simulations on grids with and without local refinement using the Ocean–Land–Atmosphere Model (OLAM) in which the refinement technique has been implemented. A summary of the method and results are provided in section 4.

## 2. Mesh refinement procedure

Construction of OLAM’s unstructured grid begins with the generation of a quasi-uniform global triangular (Delaunay) mesh. This procedure is fully described in Walko and Avissar (2008a) and is similar to methods used in Sadourny et al. (1968), Williamson (1968), Heikes and Randall (1995a), Majewski et al. (2002), and Tomita et al. (2002). A regular icosahedron is projected radially onto the earth’s surface such that 2 of its 12 vertices lie at the North and South geographic Poles and the others are at latitudes of *N* × *N* smaller triangles in order to obtain a chosen grid resolution. Some models restrict *N* to powers of 2, but OLAM allows *N* to be any positive integer.

Subsequent local refinement of the global mesh consists of the following steps.

### a. Select a geographic area to be refined and double its resolution

A contiguous geographic region is selected for refinement. Each triangle of the existing Delaunay mesh that contains at least one vertex that lies inside the selected region is subdivided into four triangles by connecting the midpoints of its edges with new edges. Criteria for selection may involve direct user specification and/or properties of the numerical solution, and the refinement area may either be static or dynamically adaptive. There are no restrictions on size or shape, except that the area to be refined may not cross the perimeter of an area previously refined, given that refinement procedure may be recursive, as described below. A convenient method for defining a refined area that is implemented in OLAM is the user specification of the latitude–longitude coordinates of a sequence of points plus a radius of influence. The area thus selected consists of all grid cells that are less than that radius from any of the points or from any part of the line segments that connect consecutive points in the sequence.

### b. Expand the refined area as needed to eliminate concavities

We define a sharp exterior concavity as a vertex point along the perimeter of a refined area for which exactly one triangle containing it is unrefined, and a weak concavity as a vertex point where exactly two (adjacent) triangles are unrefined. For every such point, refinement is applied to those unrefined triangles, thus expanding the refined area. We discuss two variants of the mesh refinement procedure; the first (method A) requires elimination of both sharp and weak concavities, while the second (method B) requires only sharp concavities to be eliminated. However, method B also eliminates any pair of weak concavities that are adjacent to each other (i.e., any that occur at two vertices of the same unrefined triangle). Additionally, if any of the original 12 vertices of the global icosahedron (those that have only 5 adjacent edges and triangles) happens to lie along the perimeter of a refined region, refinement is extended to all triangles adjacent to that vertex, which incorporates it into the interior and off the boundary of the refined area. Method A expands the refined area into a sort of convex polygon shape with straight edges in the sense that at most vertices along the perimeter, the two adjacent edges (out of the total six) that also lie on the perimeter are opposites. Method B, on the other hand, admits curved boundaries of the refined area and rarely adds more than a few grid cells to it. Examples of refined areas at this stage of the process using methods A and B are shown in Fig. 1.

### c. Eliminate hanging nodes

This is the most complicated step of the grid refinement procedure and is discussed in detail. Hanging nodes in the present context are points that are shared by some triangles as vertices and shared by one additional triangle as a point along its edge, not at a vertex. The preceding construction steps produce hanging nodes along the boundary of the refined area, as can be seen in Fig. 1. Elimination of hanging nodes is necessary to preserve the conforming property of the triangulation, the rule that every triangle must share finite-length edges with exactly three other triangles. Unrefined triangles adjacent to the hanging nodes can be seen to have four such neighbors in Fig. 1. To correct this situation, a reconstruction is performed immediately outside the refined area that involves both the addition of new edges and the removal of old ones. There are many possible ways to perform the reconstruction, and we consider several examples. The simplest approach is presented for method A and consists of adding one edge for each hanging node, connecting it with the opposite vertex of the adjacent unrefined triangle, as shown in Fig. 2 (top left). This increases the number of edges from four to five at the hanging node location, while increasing the number from six to seven at the other end of the added edge. Pairing of five- and seven-edged nodes is fundamental to all variants of the reconstruction procedure that we describe, and is essentially the reason that the grid cannot be structured. It is also the basic ingredient that allows wide versatility in configuring mesh refinements, in contrast to the severe constraints imposed by the Schmidt transformation. The price to be paid for this versatility is that vertices with five or seven edges force at least some adjacent triangles to depart substantially from a quasi-equilateral shape, which degrades the accuracy of numerical schemes. For this reason, our method avoids departures of more than ±1 from 6 edges per vertex.

The number of five- and seven-edged vertices can be reduced by a more complex construction, as shown in Fig. 2 (middle left). Here, some previously existing edges (shown as dashed lines) were removed, while others were added. The result is that the seven-edged nodes are located one grid cell farther out from the refined mesh boundary, and the five- and seven-edged node pairs are half as numerous as in the previous example. This also means that the transition from coarse to fine resolution is made more gradually over the larger distance of two rows of grid cells instead of one, which is potentially beneficial for reducing numerical reflections that can result from abrupt changes in grid resolution. We let *M* denote this number of transition rows. Still further complexity in the construction can extend this trend, as shown in Fig. 2 (bottom left) where the 5- and 7-edged vertex pairs are now only *M* = 5). Given the wedged shape of these constructions and those which follow, we shall refer to the seven-edged vertex as the apex point of the construction.

The boundary structures shown thus far all apply to a straight section of the refined grid boundary in the sense that each boundary vertex is shared by exactly three refined triangles, except at each end of the section. This is the reason that all examples presented so far belong to method A. A straight section may have any arbitrary length, and it is thus not in general possible to exactly fill its length with repetitions of the large *M* = 5 construction in Fig. 2, with no length left over. The remaining length can be filled with the smaller *M* = 1 or 2 constructions, or the obvious *M* = 3 or 4 versions, which are not shown. When different sized constructions coexist along the refined grid perimeter, we define *M* to be the largest construction that is present. As long as the refined region is convex (i.e., it contains only sections that are straight edged and vertices that share exactly two refined triangles), the preceding constructions applied along each straight edge will eliminate all hanging nodes.

Where concavities exist along the exterior of the refined area, as seen for example in the top-left panel of Fig. 3, the preceding constructions are not possible because of interference between them from one side of the concavity to the other. This is true even for the *M* = 1 construction in Fig. 2 if it were applied to the two straight segments adjacent to the concave point. The result would be a single eight-edged apex point in the unrefined region being joined with a pair of five-edged vertices on the boundary. Thus, a different type of construction is required for a concavity. Such constructions are defined as belonging to method B. The middle-left and bottom-left panels of Fig. 3 show two methods for eliminating hanging nodes at concavities: one simpler and more abrupt in transition, and the other more complex and gradual. Both contain a single five- and seven-edged vertex pair. Interestingly, while the transition in resolution occurs over a distance of 1 and 2 grid cells in the two examples (*M* = 1 and *M* = 2, respectively), these constructions encompass twice as much of the perimeter length of their counterparts for method A.

Alternating concave and convex points may occur along a section of a refined grid perimeter, as seen in the top-right panel in Fig. 3. The concavities are too small to permit of the *M* = 2 construction in the bottom-left panel, but they do permit the *M* = 1 case, as shown in the middle-right panel. (In fact, given that refined areas typically have boundaries that are primarily convex, local concavities large enough to accommodate the *M* = 2 concave construction are relatively rare in practice.) On the other hand, it may be preferable to design a construction that is centered on the convex points, and our method for this is shown in the bottom-right panel in Fig. 3. Similar to the straight-edge construction in Fig. 2 (middle-left panel) the construction has a separation of 2 grid points between the 5- and 7-edged vertices (*M* = 2) and encompasses the same length of refined grid perimeter. Even though the *M* = 1 concave and *M* = 2 convex constructions are equally numerous along this section of the refined area boundary and result in the same number of 5- and 7-edged vertices, the more gradual transition (*M* = 2) between coarse and fine regions may result in less reflectivity of the transition zone. We discuss this further in section 3.

Extended straight sections of the refined grid perimeter may also exist for method B. Along such sections, the constructions of method A are applied, but the overall approach is still termed method B.

We note that each of the constructions possesses bilateral symmetry and is applied to a local section of refined grid perimeter that is itself bilaterally symmetric. This is a deliberate choice designed to minimize grid distortion. For the special case in which any of the 12 icosahedral 5-edged vertices happens to lie close enough outside a refined grid that it is within the construction zone of the transition region, the appropriate construction type is selected (from those in Figs. 2 and 3) and is positioned such that this vertex serves as the apex point of the construction. This maintains bilateral symmetry in the neighborhood of this vertex, and has the added advantage of producing an apex point with six edges instead of the usual seven, thus reducing grid distortion.

### d. Repeat steps a–c for additional refinements

A single grid refinement, consisting of steps a–c, may be performed as many times as desired. A refinement may be performed over any region, previously refined or not, as long as there is no overlap between the perimeters and boundary construction regions of any two refinement areas. If such overlap is imminent due to criteria for defining separate refined areas, both areas get combined into one. For example, if a dynamically moving refined area that follows, say, a hurricane, encroaches on a separate (e.g., stationary) refined area, an instruction is given to generate a single refined area that encompasses the areas of, and replaces, the original two.

### e. Optimize gridcell shape and size by iterative adjustment

Tomita et al. (2002) describe a procedure called “spring dynamics” for adjusting the shape and size of triangular grid cells on the quasi-uniform global grid. The method represents a physical analog in which each edge in the grid behaves as a spring that exerts an attractive or opposing force between its pair of endpoints (vertices) according to its own length, equilibrium length, and spring constant. Using a method such as successive relaxation, vertices are allowed to move under the combined force of the adjacent springs until the net force at each vertex becomes zero. Working with the quasi-uniform global grid of the Nonhydrostatic Icosahedral Atmospheric Model (NICAM), Tomita et al. chose spring constant and equilibrium spring length to be constant over all springs. They demonstrated that setting equilibrium length to the largest possible value for which the relaxation was numerically stable—which is close to the mean edge length over the entire mesh—produces the least spatial variation in gridcell size, and that the adjustment procedure significantly improves numerical accuracy in the model.

We apply the same procedure to our grid after all refinements have been made, except that it is of course necessary to specify the equilibrium spring length as a function of the local refinement. An obvious choice is to halve the equilibrium length in the interior of each refinement region to be consistent with step a above. Thus, if the mean size of a gridcell edge on the quasi-uniform global grid is 100 km, an equilibrium length of (approximately) 100 km would be specified for edges on that grid, 50 km would be the specified length within the first refinement area, 25 km would be specified inside a further refinement within that, etc.

The construction region just outside the refined area perimeter is a region of gradual transition in the number density of edges. This is illustrated in Fig. 4 with the aid of light gray lines drawn parallel to a section of the refined mesh perimeter over a distance equal to the periodic distance between consecutive constructions. The number of gridcell edges that traverse the gray lines (in the order from lowest to highest) are 6, 7, 9, 11, and 12, and the number of gridcell edges in between and parallel to the gray lines are 3, 4, 5, and 6, respectively. All other constructions described above (in Figs. 2 and 3) have an equivalent linear variation in edge number density. This motivates the following specification for equilibrium spring length *L*_{0}, given a reference value *L _{U}* that applies throughout the unrefined portion of the grid, including those edges that traverse the lowest gray line. We let

*L*

_{0}=

*L*for edges that are between and parallel to the bottom two gray lines, which are those that lie the same distance from the refined region perimeter as the apex points. We let

_{U}*L*

_{0}=

*L*/2 for edges that are between and parallel to the top two gray lines, which are those on the perimeter of the refined region. For edges that traverse or are between the middle three gray lines,

_{U}*L*

_{0}is assigned intermediate values consistent with the number density of edges. As mentioned previously, constructions of mixed sizes must generally be used along the perimeter, in the sense that their apex points are at different distances (numbers of edges) from the perimeter of the refined area, and smaller constructions are necessary where limited space along the perimeter does not permit larger ones. Consequently, we must decide how this should impact the specification of

*L*

_{0}. We have found it preferable to maintain a uniform width along the entire perimeter of the refined region of the zone over which

*L*

_{0}varies and for this width to be determined by the largest construction present (the value of

*M*). Thus, apex points of smaller constructions are adjacent to edges that all have

*L*/2 <

_{U}*L*

_{0}<

*L*. The right column of Fig. 2 shows the adjusted locations of vertices and edges after applying spring dynamics to the corresponding arrangements in the left column.

_{U}### f. Select triangular or hexagonal option for computational grid

If the triangular gridcell option is chosen, above steps complete the construction of the triangular mesh. Triangle barycenter locations are computed and interpreted as the location for mean gridcell scalar quantities such as mass, energy, and pressure. As discussed in Walko and Avissar (2008b), the line connecting the barycenters of two adjacent triangles is not in general orthogonal to the common edge between the triangles, and the numerical scheme takes this into account.

If the hexagonal option is chosen, the triangulation generated above is replaced by its dual grid, which is constructed by connecting the circumcenters of all pairs of adjacent triangles (Fig. 5). The dual grid consists principally of hexagons, one surrounding each vertex of the original triangulation that has six adjacent edges. Vertices of the triangulation that have five or seven edges are surrounded by pentagons or heptagons, respectively, in the dual grid. Each edge in the dual grid (or the linear extension of the edge, if necessary) is the perpendicular bisector of exactly one edge in the triangular grid, a result of choosing triangle circumcenters as the points to join. However, the converse is not true; edges in the dual grid do not in general bisect corresponding edges in the triangular grid, even though this would be a desirable property for improving numerical accuracy of computations based on the grid. In fact, the intersection points can occur close to or even beyond the endpoint of a dual-grid edge. Failure of corresponding edges between the two grids to intersect occurs when triangulation contains an obtuse angle between adjacent edges at a vertex. This is most likely at vertices that contain five edges, particularly along refined region perimeters where grid geometry is most complex. Obtuse angles are easily prevented by modifying step e above. In the spring dynamics adjustment process, we reduce the equilibrium spring length of a given edge if the opposite angle of either adjacent triangle becomes large. For any angle *α* that is larger than 72° (the mean angle size at a 5-edged vertex), we reduce the equilibrium length by the factor cos*α*/cos72. We have found that this modification consistently produces acute angles, satisfying the criterion of a Delaunay triangulation, and resulting in its dual grid satisfying the definition of a Voronoi diagram. Heikes and Randall (1995a,b) used a similar adjustment procedure for optimizing the angles (intersection points, for moving intersection points closer to midpoints of dual-grid edges) and demonstrated improvement in the accuracy of numerical computations on the mesh.

## 3. Shallow-water tests

Walko and Avissar (2008a,b) tested OLAM with a set of benchmark simulations that are commonly used to evaluate and compare models. The tests included several of the global shallow-water test cases (Williamson et al. 1992) as well as 3D simulations in both global and high-resolution limited-area domains. In all cases, OLAM was shown to produce solutions with comparable accuracy to other models. The previous tests were all run without local mesh refinement on uniform or quasi-uniform grids. Our main purpose here is to evaluate grid refinement in OLAM. The particular aim of this evaluation is twofold. First, we want to evaluate the impact of local mesh refinement on the accuracy of the solution compared with quasi-uniform meshes. Second, we want to compare the results and accuracy for different variations of the nesting scheme. Specifically, we examine the impact of the chosen number *M* of gridcell rows that span the transition from original to doubled resolution, and we also compare the two variants (methods A and B) of the construction of transition rows that were described in the previous section. Results for both the triangular and hexagonal mesh options will be presented and compared. We select shallow-water test case 5 (geostrophically balanced barotropic flow disturbed by a topographic barrier) as the basis of the intercomparison. This case is unique among the shallow-water experiments described in Williamson et al. in that a localized forcing is applied to the flow (by the mountain) and the highest amplitudes and strongest gradients of the disturbance occur in the general vicinity of the mountain, particularly in the early stages of the simulation. Thus, use of local mesh refinement in the region of the mountain is an obvious choice.

### a. Tests with triangular mesh

The numerical simulations conducted on the triangular mesh use the finite-volume-based OLAM dynamic core as described in Walko and Avissar (2008a), except that the Zalesak (1979) multidimensional flux corrected transport (FCT) scheme has been implemented for momentum and scalar advection. All simulations reported here used a time step of 180 s, regardless of horizontal grid spacing, in order to facilitate intercomparison and interpretation. Nevertheless, results were found to have little sensitivity to time step. OLAM solutions are compared against a high-resolution (T426) reference solution generated by the Spectral Transform Shallow Water Model (STSWM) and provided online by Pilar Ripodas and Deutscher Wetterdienst (available online at http://icon.enes.org/swm/stswm). Net changes in geopotential heights in the reference solution from days 0–15 were bicubicly interpolated to OLAM gridcell barycenters and subtracted from corresponding net changes predicted in OLAM to obtain a measure of OLAM model error.

We first carry out two simulations without local mesh refinement in order to establish points of reference for the refined mesh simulations. In the first simulation, the icosahedron is subdivided using *N* = 32, which results in 20 480 triangles covering the globe, while in the second, *N* = 64, resulting in 81 920 triangles. The height differences between the resulting solutions and the reference solution are shown in Fig. 6. Also provided are the *L*_{2} norms of the height differences, as defined in Williamson et al. (1992). The height difference field and *L*_{2} norm for *N* = 32 are comparable to those recently obtained for the triangular mesh by Weller et al. (2009) using different discretizations and numerical schemes. We note that our errors decrease a rate slightly slower than first order over this range of *N* even though Walko and Avissar (2008a,b) previously verified near-second-order convergence in most shallow-water tests. The reason for this remains to be investigated, but we suspect that convergence is being influenced by differential weighting that the FCT scheme gives to first- and second-order advective fluxes at the different resolutions.

We next introduce local mesh refinement over a roughly circular (or convex polygon) region that covers 10% of the globe and is centered on the mountain (the perimeter of the fully refined region is depicted in the top panel in Fig. 10, to be discussed later). We use *N* = 32 so that resolution in the unrefined and refined portions of the grid correspond to the top and bottom panels, respectively, in Fig. 6. We thus would expect (or hope) that simulated height errors with refinement would lie between those of the two experiments without local mesh refinement. For the first refined experiment, we set *M* = 1, which establishes the doubling of resolution suddenly over only a single row of grid cells, as in Fig. 2 (top). The height errors are shown in Fig. 7 (top). We find that the errors are about 50% larger than in the unrefined case with *N* = 32 (note that for this case alone, the color scale truncates the most extreme error values). This is obviously an undesirable result; one does not want to pay a price of reduced accuracy to obtain other benefits of using local mesh refinement. Next, we use *M* = 2 in order to make the transition more gradual between the coarse and fine regions of the grid. The results are shown in the middle panel in Fig. 7. This case performs much better, and height errors are now very similar to the unrefined case with *N* = 32. Increasing *M* to 3 results in further improvement (Fig. 7, bottom), with errors slightly smaller than for *M* = 2 and for the unrefined case with *N* = 32. The case for *M* = 5 is shown in Fig. 8 (top), and results in a slight improvement from *M* = 3.

Based on these results, we conclude that *M* = 1 should not be used, but that *M* ≥ 2 gives sufficient accuracy. We might also argue that *M* > 3 is unnecessary, and perhaps even undesirable because the number of grid cells impacted by refinement increases with *M*. In an application with dynamic grid adaptation, each change in the size and/or location of the refined grid requires regeneration of a portion of the grid and remapping of the prognostic fields. The transition rows are the most problematical because, unlike the interior of the refined area where new edges are added while old ones remain stationary, preexisting edges must move. Another potential disadvantage of large *M* even for static grids is that successive (telescoping) doublings of resolution must be separated from each other by at least *M* rows, so large *M* limits the allowable rapidity of the overall transition. However, the relative accuracy that is achieved with different values of *M* might lead to different conclusions under other conditions, particularly in more complex 3D atmospheric flows, and additional evaluation tests are needed.

The preceding mesh refinement experiments all use method A to construct the transition rows. As noted above, this method first eliminates all concavities, including weak ones, along the exterior perimeter of the refined region before constructing the transition rows, leading to the general polygon shape of the refined region. Method B is preferable in that it allows weak concavities and therefore a much wider range of shapes of the refined region. However, method B currently exists only in a form with *M* = 2. We repeat test case 5 with method B and show the results in Fig. 8 (bottom). Errors are very similar to those with method A and *M* = 2 shown in Fig. 7 (middle). We thus view method B as preferable, but think it would be of benefit to develop a more complex form with *M* = 3. As noted earlier, portions of the perimeter of the refined area using method B sometimes have alternating concave and convex points, and a choice exists to use either of the constructions shown in Fig. 3 (bottom right or the two middle panels). The result shown in Fig. 8 (bottom) uses the construction for the convex points in these areas. We did a separate simulation using the concave construction instead, and found the results to be slightly less accurate. This is expected because the concave constructions result in more abrupt change of resolution.

### b. Tests with hexagonal mesh

Two dynamic cores have been developed for the hexagonal mesh option in OLAM. One uses a finite-volume discretization of the momentum form of the equations of motion and is closely analogous to the triangle mesh version described in Walko and Avissar (2008a,b). This scheme is still being tested and refined, and will not be further mentioned here. The second dynamic core is based on the vector-invariant form of the equations of motion and uses the spatial discretization presented in Ringler et al. (2010). We have tested and compared two different temporal discretizations in this core. The first is the Runge–Kutta method of order 4 (RK4) method, which was also used in Ringler et al. (2010). The second is based on Walko and Avissar (2008a) and computes momentum tendencies using velocity values that have been extrapolated forward in time by one-half time step using the current and past time-level values. This approach was suggested by the second-order Adams–Bashforth method (AB2), which time-extrapolates velocity tendency rather than velocity itself, and was originally adopted as a means for providing consistency of advective transport for all quantities. For the experiments described here, both schemes yielded nearly identical results, while the RK4 method was (understandably) more computationally expensive. Results presented here used the time-extrapolation method.

Figure 9 shows results for shallow-water test case 5 on the hexagonal mesh for the cases of *N* = 32 and *N* = 64 without local mesh refinement, and for *N* = 32, method A, and *M* = 3 with mesh refinement. The top, middle, and bottom panels, respectively, compare directly with the triangle mesh simulations of Fig. 6 (top and bottom) and Fig. 7 (bottom). With the hexagonal mesh, we find that height errors with local mesh refinement are smaller than without refinement for *N* = 32, but larger than for *N* = 64 without refinement, which is qualitatively the same result as with the triangular mesh. Errors are slightly larger with hexagons than with triangles, and convergence with increasing *N* is somewhat slower. However, it must be noted for that for any given *N* (and specified refinement region), the hexagonal mesh has only half as many scalar values as the triangular mesh (while both have the same number of horizontal velocity values). Thus, it might be more fair to compare triangles with *N* = 32 against hexagons with *N* somewhat larger than 32 (*N* = 45 would give approximately the same number of scalar values, but twice the velocity values). We thus do not find any significant difference in height errors between the two meshes on the basis of these experiments.

We next compare the relative vertical vorticity in 3 of the preceding refined-mesh experiments: triangles with method A and *M* = 5, triangles with method B and *M* = 2, and hexagons with method A and *M* = 3. These results are shown in the top, middle, and bottom panels in Fig. 10 and correspond respectively to the height error fields in Fig. 8 (top), Fig. 8 (bottom), and Fig. 9 (bottom). Figure 10 also depicts the perimeter of the fully refined region of the grid. While the spatial pattern and amplitudes of the larger-scale vorticity maxima and minima are similar in all three experiments, the triangle mesh simulations are notably much noisier than the hexagon case. Animated sequences of vorticity plots reveal that the noise is mostly generated at the mesh refinement boundary (where grid distortion is highest) and advects downwind. Specific reasons for the superior performance of the experiment with hexagons are not investigated here; however, they involve not only the mesh itself but also the differences in formulation of the equations of motion. With triangles, a finite-volume discretization of the momentum form is used, and vorticity is not explicitly utilized. Furthermore, there is no explicit form of damping, other than the aforementioned FCT. With hexagons, the equations of motion are discretized in rotational form following Ringler et al. (2010), including application of the anticipated potential vorticity method (APVM) method for damping the computational mode in the vorticity field (an FCT is not implemented). In OLAM, we have implemented both gridding systems and different discretizations as a test bed for comparison, but it is becoming more clear from other recent studies (e.g., Gassmann 2011), that hexagonal meshes possess inherently superior properties to triangular meshes for shallow water as well as 3D atmospheric simulations. The mesh refinement scheme that we have presented here is applicable to both gridding systems.

## 4. Summary and discussion

We have described a method for constructing refined (higher resolution) regions of an unstructured triangular computational grid that preserves its conforming property, allows considerable flexibility in defining the size and shape of the refined regions and the abruptness of the transition to them, and uses a direct approach (without iterations) to configure the mesh topology. The method guarantees a mesh in which vertex points are shared by five, six, or seven edges only in order to keep triangles as close as possible to their optimal equilateral shape. We showed that by making the transition in resolution more spatially gradual, the number of vertices with five and seven adjacent edges is reduced, improving accuracy. Several variations of the construction method were compared with each other and with unrefined grids using shallow-water test simulations. These demonstrated improvement from local mesh refinement, provided the refinement is not too spatially abrupt. The results were shown to extend naturally to the dual mesh, composed primarily of hexagons with some pentagons and heptagons. Shallow-water tests on the hexagonal mesh yielded very similar results as for the triangular mesh, including improvement in the solution with local mesh refinement.

Similar results were demonstrated recently by Weller et al. (2009) using different numerical techniques on similar triangular and hexagonal meshes (as well as on a square mesh). For shallow-water test case 5, our study and theirs produced height errors of comparable magnitude. Their refined grid was generated by an iterative procedure in which topological connectivity between edges in the grid varies continually until the procedure converges. In this regard, it is very similar to the spherical centroidal Voronoi tessellation (CVT) method for generating grids (with or without local refinement), described for example by Ringler et al. (2008, 2011). The local refinement algorithms in Weller et al. (2009) and Ringler et al. (2011) generate meshes similar to ours, introducing pentagons and heptagons (or their triangle-mesh counterparts). The main advantage of our method is that grid connectivity is constructed noniteratively, resulting in extremely fast generation of the grid refinement. Only final adjustment of gridcell shapes is computed iteratively while keeping connectivity fixed, which provides for more rapid convergence. Moreover, this iterative adjustment may be confined entirely to the transition region between higher and lower resolution, resulting in even more rapid convergence. The efficiency of the refinement procedure and the small number of grid edges that need to move during refinement (only those in the transition region) make this scheme well suited to dynamic grid adaptivity. In such an application, as the refined area moves or changes size or shape, grid cells both in the interior and exterior remain unchanged, while only cells at the refined area boundary must be shifted and/or reconnected. This helps to keep errors associated with remapping to a minimum.

While we have shown that local mesh refinement has a near neutral or slightly beneficial impact on large-scale disturbances, its real benefit is that higher resolution can be obtained in locations of particular importance, without being required globally. For example, a separate study (Medvigy et al. 2008) found that local mesh refinement over the Andes Mountains improves OLAM simulations of interannual variability of precipitation over the Amazon basin. Here, we have provided additional demonstration that our method of refinement and its implementation in OLAM are a suitable approach to accomplish this goal.

The authors thank Almut Gassmann and an anonymous reviewer for their constructive comments on the manuscript. The original development of OLAM was supported by the Edmund T. Pratt, Jr., School of Engineering, Duke University, by funding from NASA and NSF, and by the Gordon and Betty Moore Foundation. The present work was supported by NSF Grant ATM0902197 and DOE Grant DESC0001287.

## REFERENCES

Clark, T. L., , and R. D. Farley, 1984: Severe downslope windstorm calculations in two and three spatial dimensions using anelastic interactive grid nesting: A possible mechanism for gustiness.

,*J. Atmos. Sci.***41**, 329–350.Courtier, P., , and J. F. Geleyn, 1988: A global model with variable resolution—Application to the shallow-water equations.

,*Quart. J. Roy. Meteor. Soc.***114**, 1321–1346.Fox-Rabinovitz, M. S., , G. L. Stenchikov, , M. J. Suarez, , and L. L. Takacs, 1997: A finite-difference GCM dynamical core with a variable-resolution stretched grid.

,*Mon. Wea. Rev.***125**, 2943–2968.Gassmann, A., 2011: Inspection of hexagonal and triangular C-grid discretizations of the shallow water equations.

,*J. Comput. Phys.***230**, 2706–2721.Guo, D. X., , and J. B. Drake, 2005: A global semi-Lagrangian spectral model of the shallow water equations with variable resolution.

,*J. Comput. Phys.***206**, 559–577.Heikes, R., , and D. A. Randall, 1995a: Numerical integration of the shallow-water equations on a twisted iscoahedral grid. Part I: Basic design and results of tests.

,*Mon. Wea. Rev.***123**, 1862–1880.Heikes, R., , and D. A. Randall, 1995b: Numerical integration of the shallow-water equations on a twisted iscoahedral grid. Part II: A detailed description of the grid and an analysis of numerical accuracy.

,*Mon. Wea. Rev.***123**, 1881–1887.Majewski, D., and Coauthors, 2002: The operational global icosahedral-hexagonal gridpoint model GME: description and high-resolution tests.

,*Mon. Wea. Rev.***130**, 319–338.Medvigy, D., , R. L. Walko, , and R. Avissar, 2008: Modeling interannual variability of the Amazon hydroclimate.

,*Geophys. Res. Lett.***35**, L15817, doi:10.10129/2008GL034941.Ringler, T., , L. Ju, , and M. Gunzburger, 2008: A multiresolution method for climate system modeling: Applications of spherical centroidal Voronoi tessellations.

,*Ocean Dyn.***58**, 475–498.Ringler, T., , J. Thuburn, , J. B. Klemp, , and W. C. Skamarock, 2010: A unified approach to energy conservation and potential vorticity dynamics for arbitrarily-structured C-grids.

,*J. Comput. Phys.***229**, 3065–3090.Ringler, T., , D. Jacobsen, , M. Gunzburger, , L. Ju, , M. Duda, , and W. Skamarock, 2011: Exploring a multiresolution modeling approach within the shallow-water equations.

,*Mon. Wea. Rev.***139**, 3348–3368.Sadourny, R., , A. Arakawa, , and Y. Mintz, 1968: Integration of the non-divergent barotropic vorticity equation with an icosahedral-hexagonal grid for the sphere.

,*Mon. Wea. Rev.***96**, 351–356.Schmidt, F., 1977: Variable fine mesh in spectral global model.

,*Beitr. Phys. Atmos.***50**, 211–217.Skamarock, W. C., , and J. B. Klemp, 1993: Adaptive grid refinement for two-dimensional and three-dimensional nonhydrostatic atmospheric flow.

,*Mon. Wea. Rev.***121**, 788–804.St.-Cyr, A., , C. Jablonowski, , J. M. Dennis, , H. M. Tufo, , and S. J. Thomas, 2008: A comparison of two shallow-water models with nonconforming adaptive grids.

,*Mon. Wea. Rev.***136**, 1898–1922.Tomita, H., , M. Satoh, , and K. Goto, 2002: An optimization of the icosahedral grid modified by spring dynamics.

,*J. Comput. Phys.***183**, 307–331.Walko, R. L., , and R. Avissar, 2008a: The Ocean–Land–Atmosphere Model (OLAM). Part I: Shallow-water tests.

,*Mon. Wea. Rev.***136**, 4033–4044.Walko, R. L., , and R. Avissar, 2008b: The Ocean–Land–Atmosphere Model (OLAM). Part II: Formulation and tests of the nonhydrostatic dynamic core.

,*Mon. Wea. Rev.***136**, 4045–4062.Walko, R. L., , C. J. Tremback, , R. A. Pielke Sr., , and W. R. Cotton, 1995: An interactive nesting procedure for stretched grids and variable nesting ratios.

,*J. Appl. Meteor.***34**, 994–999.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.Williamson, D. L., 1968: Integration of the barotropic vorticity equation on a spherical geodesic grid.

,*Tellus***20**, 642–653.Williamson, D. L., , J. B. Drake, , J. J. Hack, , R. Jakob, , and P. N. Swarztrauber, 1992: A standard test set for numerical approximations to the shallow-water equations in spherical geometry.

,*J. Comput. Phys.***102**, 221–224.Zalesak, S. T., 1979: Fully multidimensional flux-corrected transport algorithms for fluids.

,*J. Comput. Phys.***31**, 335–362.Zhang, D.-L., , H.-R. Chang, , N. L. Seaman, , T. T. Warner, , and J. M. Fritsch, 1986: A two-way interactive nesting procedure with variable terrain resolution.

,*Mon. Wea. Rev.***114**, 1330–1339.