## Abstract

A spherical 2D adaptive mesh refinement (AMR) technique is applied to the so-called Lin–Rood advection algorithm, which is built upon a conservative and oscillation-free finite-volume discretization in flux form. The AMR design is based on two modules: a block-structured data layout and a spherical AMR grid library for parallel computer architectures. The latter defines and manages the adaptive blocks in spherical geometry, provides user interfaces for interpolation routines, and supports the communication and load-balancing aspects for parallel applications. The adaptive grid simulations are guided by user-defined adaptation criteria. Both statically and dynamically adaptive setups that start from a regular block-structured latitude–longitude grid are supported. All blocks are logically rectangular, self-similar, and independent data units that are split into four in the event of refinement requests, thereby doubling the horizontal resolution. Grid coarsenings reverse this refinement principle. Refinement and coarsening levels are constrained so that there is a uniform 2:1 mesh ratio at all fine–coarse-grid interfaces. The adaptive advection model is tested using three standard advection tests with increasing complexity. These include the transport of a cosine bell around the sphere, the advection of a slotted cylinder, and a smooth deformational flow that describes the roll-up of two vortices. The latter two examples exhibit very sharp edges and gradients that challenge not only the numerical scheme but also the AMR approach. The adaptive simulations show that all features of interest are reliably detected and tracked with high-resolution grids. These are steered by either a threshold- or gradient-based adaptation criterion that depends on the characteristics of the advected tracer field. The additional resolution clearly helps preserve the shape and amplitude of the transported tracer while saving computing resources in comparison to uniform-grid model runs.

## 1. Introduction

Adaptive mesh refinement (AMR) techniques provide an attractive framework for atmospheric flows since they allow improved spatial resolutions in limited regions without requiring a fine-grid resolution throughout the entire model domain. The model regions at high resolution are kept at a minimum and can be individually tailored toward the atmospheric flow conditions. A solution-adaptive grid is a virtual necessity for resolving a problem with different length scales. To avoid, for example, underresolving high-gradient regions in the problem, or conversely, overresolving low-gradient regions at the expense of more critical regions, solution adaptation is a powerful tool saving several orders of magnitude in computing resources for many problems (Gombosi et al. 2004).

Climate and weather models, or generally speaking computational fluid dynamics codes, are among the many applications that are characterized by multiscale phenomena and their resulting interactions. But although today’s atmospheric general circulation models (GCMs), and in particular weather prediction codes, are already capable of uniformly resolving horizontal scales of order 25 km (Temperton 2004), the atmospheric motions of interest span many more scales than those captured in a fixed-resolution model run. As an example, the resolution of convective motions and cloud dynamics may require resolutions of order 1 km or even finer mesh sizes (Bryan et al. 2003). The widely varying spatial and temporal scales, in addition to the nonlinearity of the dynamical system, raise an interesting and challenging modeling problem. Solving such a problem more efficiently and accurately requires variable resolution.

Today, AMR techniques are rarely applied to atmospheric flow simulations. More commonly, two alternative nonuniform-grid approaches are utilized. These are the widely used nested and stretched grid techniques, both of which can be implemented in a statically or dynamically adaptive way [see also Fox-Rabinovitz et al. (1997) for an overview]. The fundamental differences between AMR and the nested or stretched grid strategies lie in their flexibilities to adapt readily to arbitrary flow situations. While AMR varies the number of grid points as demanded by the adaptation criterion and evolving flow features, the total number of grid points in nested or stretched meshes stays constant during the simulation. They may therefore be considered global remapping approaches that, in case of dynamic remappings, move the fine-resolution regions at the expense of other coarsened model areas. Recent examples of dynamic grid deformations include Iselin et al. (2002) and Prusa and Smolarkiewicz (2003). Iselin et al. (2002) applied flow-dependent weighting functions to steer the varying grid resolution whereas Prusa and Smolarkiewicz (2003) used a priori information about the evolving flow field for their remapping strategy. AMR, on the other hand, adds and removes grid points locally without affecting the resolution in distant model domains and, most importantly, does not require a priori knowledge of future refinement regions. Both aspects are a strength of the AMR design. However, despite the differences between the three nonuniform-grid paradigms they all have one aspect in common. The varying resolution can cause artificial reflections and refractions of waves due to incompatible mechanisms at fine–coarse-grid interfaces. As an example, a traveling wave may undergo false reflections or aliasing when propagating from the fine grid to the coarse domain. Therefore, special attention needs to be paid to the fine–coarse-grid interface conditions. Here, mass-conserving interpolation and flux-matching mechanisms that foster the smooth transport of the advected feature across varying grid resolutions are employed.

Introduced in this paper is a 2D adaptive grid technique on the sphere, which is built upon a block-structured data layout and an AMR grid library for parallel computer architectures (Oehmke and Stout 2001; Oehmke 2004). For conciseness, the discussion is focused on an adaptive advection problem, although the underlying principles are readily applicable to nonlinear model setups (Jablonowski 2004; Jablonowski et al. 2004). These are further addressed in a future paper that illustrates the AMR technique for 2D shallow water and 3D primitive equation models. In general, atmospheric dynamics on all scales is dominated by the advection process. A precise numerical solution of the advection problem is therefore fundamentally important to the overall accuracy of atmospheric flow solvers and tracer transport schemes. To date, various dynamically adaptive advection codes have been presented in the atmospheric science literature. These include the 2D passive advection algorithms by Behrens (1996) and Behrens et al. (2000) who formulated an adaptive grid triangulation method in the *x–y* plane. Kessler (1999) implemented a finite-element advection technique and evaluated different refinement criteria for the adaptive transport process. Another AMR advection study by Stevens and Bretherton (1996) concentrated on numerical aspects of adaptive multilevel solvers, and Tomlin et al. (1997) investigated adaptive gridding options for modeling chemical transports with multiscale sources. In particular, the analysis of Tomlin et al. (1997) was focused on the interactions among emission plumes and the ambient air. Similar emission scenarios were also discussed by Odman et al. (1997), Sarma et al. (1999), and Srivastava et al. (2000) in their adaptive air quality studies. In addition, Bacon et al. (2000) and Boybeyi et al. (2001) introduced the adaptive regional weather and tracer transport model OMEGA (Operational Multiscale Environmental Model with Grid Adaptivity), which is based on unstructured, triangulated meshes with rotated Cartesian coordinates. The triangulations can statically or dynamically be adapted to user-defined regions or features of interest. This operational modeling system has mainly been designed for real-time aerosol and gas hazard predictions.

Most recently and most relevant to the study presented here, Hubbard and Nikiforakis (2003) described the design of an adaptive 3D passive advection code for tracer transport problems on the sphere. They utilized an extended version of the publicly available Berger–Oliger AMR grid library (Berger and Oliger 1984) which was originally designed for logically rectangular block-data approaches in Cartesian coordinates. To date the Berger–Oliger AMR approach has also been used multiple times in the context of limited-area or regional atmospheric modeling in Cartesian geometry. Examples include Skamarock et al. (1989) and Skamarock and Klemp (1993) who investigated adaptive meshes for regional weather prediction applications. Furthermore, the movable nested grids for cyclone track predictions by Fulton (1997, 2001) as well as the adaptive ocean model by Blayo and Debreu (1999) are based on the Berger–Oliger AMR design. The main differences between Berger and Oliger (1984), Hubbard and Nikiforakis (2003), and the AMR approach discussed here are the underlying space–time refinement paradigms, the native coordinate systems and grid hierarchies, the AMR user interfaces, and most importantly, the software engineering aspects like the parallel computing support for modern distributed-memory hardware architectures. This parallel computing support is not provided by the Berger–Oliger AMR library but will become fundamentally important for more complex fully nonlinear AMR applications, especially in 3D. Therefore, the AMR library proposed here has built-in parallel communication and dynamic load-balancing mechanisms.

The paper is organized as follows. In section 2 the basic AMR design principles are explained. This section includes a discussion of the block-data grid configuration in spherical geometry, the refinement and coarsening strategies, as well as the interpolation, averaging, and numerical flux-matching mechanisms at fine–coarse-grid interfaces. In addition, the functionality of the AMR grid library is described. Section 3 reviews the so-called Lin–Rood finite-volume advection algorithm (Lin and Rood 1996, referred to as LR96 hereafter), which serves as an example application for the adaptive mesh approach. The adaptive transport code is tested using three standard advection examples that increase in complexity. In particular, these are the transport of a cosine bell around the sphere at various rotation angles, the advection of a slotted cylinder, and a smooth deformational flow (cyclogenesis) problem. The model setups, error measures, test definitions, and the results of the adaptive advection simulations are presented in section 4. Section 5 summarizes the findings and outlines the future potential of AMR for nonlinear atmospheric flow problems.

## 2. AMR design on the sphere

To date, dynamically adaptive meshes in atmospheric modeling have mostly been applied to limited-area models in Cartesian geometry. Cartesian grids are well suited for AMR techniques since the physical locations of neighboring grid points are uniquely defined by their coordinate positions. This is in contrast to global grids in spherical geometry, especially if regular latitude–longitude grids with converging meridians are selected as discussed here. The main differences occur at the pole points due to the singularity of the grid and its coordinate system. The identification of neighbors across the poles, together with the cross-polar sign reversal of the velocity components in spherical coordinates (see also Hubbard and Nikiforakis 2003), adds extra complexity to the AMR approach on the sphere. As a consequence, the AMR design in spherical coordinates needs special provisions for polar regions that take a 180° shift in longitudinal direction for cross-polar neighbors into account. This is further discussed in section 2b. In addition, the periodicity of the spherical grid in longitudinal direction needs to be supported by the AMR library.

### a. Block-structured adaptive grids

The AMR approach is based on a 2D block-structured data configuration in spherical coordinates that only requires minimal changes to the preexisting Lin–Rood transport algorithm (LR96). The concept of the block-data structure is displayed in Fig. 1, which shows an orthographic projection of the earth with a blocked latitude–longitude grid. Each self-similar block is logically rectangular and comprises a constant number of *N _{x}* ×

*N*× grid cells in longitudinal and latitudinal direction. Here,

_{y}*N*= 9 and

_{x}*N*= 6 grid points per block are selected with

_{y}*B*×

_{x}*B*= 8 × 6 blocks on the entire sphere. These parameters correspond to a 5° × 5° uniform mesh resolution. The computational grid can then be viewed as a collection of individual blocks that are independent data units. Here the block-data principle is solely applied to the horizontal directions so that the whole vertical column is contained in a block in case of 3D model configurations. Other block-data approaches, as described in Stout et al. (1997), MacNeice et al. (2000), and Hubbard and Nikiforakis (2003), employ a 3D strategy that includes a block distribution in the vertical direction as well.

_{y}The block-data structure is well suited for adaptive mesh applications. The basic AMR principle is illustrated in Fig. 2. Starting from an initial mesh at constant resolution with, for example, 3 × 3 cells per block, a *parent* block is divided into four *children* in the event of refinement requests. Each child becomes an independent new block with the same number of grid cells in each dimension, thereby doubling the horizontal resolution in the region of interest. Coarsening, on the other hand, reverses the refinement principle. Then four children are coalesced into a single self-similar parent block, which reduces the grid resolution in each direction by a factor of 2. Both the refinement and coarsening steps are mass-conservative. In the present AMR setup, neighboring blocks can only differ by one refinement level, guaranteeing a uniform 2:1 mesh resolution at fine–coarse-grid interfaces. As a result, continuously cascading refinement regions are created that provide a desired buffer zone around the blocks at the finest nesting level (see also section 4b).

Each block is surrounded by ghost cell regions that share the information along adjacent block interfaces. This makes each block independent of its neighbors since the solution technique can now be individually applied to each block. The ghost cell information ensures that the requirements for the numerical stencils are satisfied. The advection algorithm then loops over all available blocks on the sphere before a communication step with ghost cell exchanges becomes necessary. The number of required ghost cells highly depends on the numerical scheme. In the LR96 advection scheme the piecewise parabolic method (PPM) (Colella and Woodward 1984) is chosen. As a consequence, three ghost cells in each horizontal direction are needed. Note that all ghost regions are at the same resolution as the inner domain of the block. There are two types of interfaces in the adaptive grid configuration as illustrated in Fig. 3. If the adjacent blocks are at the same refinement level (Fig. 3a) the neighboring information can easily be exchanged since the data locations overlap. The ghost cell data are then assigned the appropriate solution values of the neighboring block, which is indicated by the gray-shaded areas. If, on the other hand, the resolution changes between adjacent blocks (Fig. 3b), averaging and interpolation routines are invoked at fine–coarse mesh boundaries. Here, an interpolation method is chosen that is based on the PPM approach. This conservative and monotonic remapping technique matches the order of accuracy of the underlying LR96 advection algorithm.

It is important to note that the adapted blocks do not overlay each other in the AMR approach presented here. Instead, each block is assigned a unique surface patch on the sphere and, as a consequence, any coarse-grid information is no longer accessible in refined regions. This is in contrast to the AMR block-data design by Berger and Oliger (1984). In particular, the Berger–Oliger AMR method is built upon a hierarchy of nested grids that are individually sized and, furthermore, all actively used during the simulation. The solution is then concurrently computed on all blocks at all refinement levels, and in a second step, the coarse resolution data are overwritten wherever the fine-resolution nests overlap. This approach adds overhead to the AMR simulation but, on the other hand, allows a Richardson-type estimation of the local truncation error. Such an adaptation criterion was for example used by Skamarock (1989). In the study presented here, a flow-based refinement criterion is examined instead. Also note that the Berger–Oliger library allows the refinement factor between neighboring blocks to be any positive integer number whereas a constant 2:1 ratio is chosen for the AMR approach here. This guarantees rather accurate inflow and outflow conditions at the fine–coarse-grid interfaces, but on the other hand, limits the flexibility of the adapted grid. For 3D applications, the Berger–Oliger library also supports refinements in the vertical direction. Another difference between the AMR approaches lies in their time-stepping procedures. The Berger–Oliger AMR design provides smaller time steps at fine resolutions and as a result, the solvers are subcycled in the nested domains. This requires temporal interpolations of the coarse boundary data during the subcycling steps, which are not applied in the AMR approach here. Instead, the time step is held constant at all refinement levels, which provides instantaneous updates of the boundary information. Only spatial interpolations are invoked in the ghost regions at fine–coarse-grid interfaces. However, there are also limitations to such an approach. The chosen time step must be numerically stable on the finest grid in an adapted model run. Therefore, overhead is added to the coarse-resolution regions that do not require a short time step for stability reasons. These pros and cons of the two time-stepping techniques need to be further examined for future AMR applications.

In general, the Berger–Oliger AMR design is based on Cartesian meshes. Thus, special extensions for polar regions were introduced by Hubbard and Nikiforakis (2003) when customizing the approach for global grids on the sphere. By contrast, the AMR grid library applied here is specifically designed for spherical coordinate systems. Therefore, it has built-in pole point provisions, provides user interfaces for application-specific interpolation and averaging routines, and most importantly, supports the AMR approach on today’s parallel computing architectures. An overview of the AMR library is given in the following section.

### b. Overview of the AMR grid library

The adaptive blocks are managed by a spherical adaptive grid library for distributed memory architectures (Oehmke and Stout 2001; Oehmke 2004). The library functions can be accessed via Fortran90 subroutine calls. In brief, the characteristics and functions of the library are listed as follows.

*Sphere*. The library provides functions for the creation of a sphere that is built upon a block-structured latitude–longitude grid configuration. In addition, reduced spherical grids are supported that widen the zonal grid intervals in polar regions. In both cases, the size of the blocks as well as the number of blocks on the sphere are user defined and determine the initial, and thereby coarsest, resolution of the adaptive simulation. Overall, the library maintains and initializes the geometric information and allows the reinitialization of the geometry data after adaptations have occurred. Here, each block covers a unique surface patch on the sphere.*Bookkeeping*. The library maintains the adjacency information for all blocks at arbitrary refinement levels. These comprise the cross-polar neighbors for blocks at the pole points, which are shifted by 180° in longitudinal direction. A schematic view of the neighboring blocks is shown in Fig. 4. In this constant resolution example, each block has eight neighbors, which includes the neighboring blocks in the cross directions. The communication in the cross direction is provided to allow for a wide range of user-selected algorithms. In the transport example discussed in this paper, the cross directions are needed for the cross derivatives of the interpolation algorithm (see below) as well as the advective-form inner operators of the Lin–Rood advection scheme (Lin and Rood 1996). In a more general setting with varying neighboring resolutions, the number of neighbors lies between 6 and 12.*Iterators*. Iterators enable the user to loop over all assigned blocks on a given processor. They can be viewed as pointers that pick out the next independent block index for application-specific calculations. Note that consecutive blocks in the data structure may lie at arbitrary positions on the sphere.*Communication*. The library provides transfer functions that manage the ghost cell updates on parallel computer architectures. The communication is either based on the message passing interface (MPI) library or memory copies. The former is invoked for neighboring blocks on different processors whereas memory copies speed up the ghost cell exchange for neighbors on the same processor. The transfer module utilizes send-and-receive buffers and accesses the block-adjacency information during the ghost cell exchange. The details of the parallel communication are hidden from the user. Instead, user-friendly communication functions are provided.*Load-balancing*. The load-balancing module redistributes the blocks among the processors during the adaptive model run. Currently, the dynamic load-balancing strategy is guided by the total number of blocks. Here, the goal is to assign an approximately equal number of blocks to each processor. For the future, a space-filling-curve load-balancing approach is planned that takes data locality aspects into account (Dennis 2003; Behrens and Zimmermann 2000). Note that the parallel performance, especially of complex adaptive 3D GCM applications, strongly depends on an efficient domain decomposition and load-balancing strategy.*Adaptation module*. The library manages the coarsenings and refinements of the blocks based on adaptation flags. These flags are set via library functions during a model run and guided by user-defined adaptation criteria. The adaptation module redefines the block connectivity after adaptations occurred and enforces the constraint that adjacent blocks can differ by no more than one refinement level.*User interface*. User-defined subroutines need to be provided that specify the algorithms for split-and-join and ghost cell operations. These routines include the interpolation and averaging procedures for the initialization of new blocks and the data exchange algorithms for neighboring blocks at both identical and varying resolutions.

Adaptive blocks are well suited for distributed-memory computing concepts. Since ghosted blocks are self-sufficient they can be readily distributed among many processors. During the simulation each processor then iterates over its assigned blocks to solve the model equations on a block-by-block basis. When ghost cell exchanges are required all processors reach a synchronization point and execute a parallel exchange of ghost cell information. A schematic view of the program flow is presented in Fig. 5, which shows the time loop of the adaptive grid application discussed in this paper. In particular, an adaptation cycle of *n* = 1 is chosen that checks the adaptation criterion at every time step. Refinements are triggered if the refinement flag for one or more grid points in a block is set. Coarsenings, on the other hand, are slightly harder to activate. They not only require all four children to set the coarsening flag but also must ensure a uniform 2:1 mesh ratio at all fine–coarse-grid boundaries after an adaptation step. This is checked by the adaptation module of the AMR library. Note that the gray-shaded areas in Fig. 5 indicate the AMR library calls that are added to the advection model. In general, such an AMR principle is universally applicable to any flow solver that can utilize block-structured data setups on the sphere.

### c. Fine–coarse-grid interfaces

In an adaptive model run, neighboring blocks at different resolutions require the use of interpolation and averaging routines to update the ghost cell regions at every time step. In addition, blocks need to be reinitialized after adaptation requests. An overview of these AMR user routines for the ghost cell exchange is presented below. In addition, a flux-matching strategy at fine–coarse-grid interfaces is discussed that ensures mass conservation in an adapted application.

#### 1) Interpolation method

A suitable interpolation technique for the ghost cell update in an AMR application is required to be (a) monotonic, (b) conservative, and (c) consistent with the selected transport algorithm. These three design principles lead to a natural 2D extension of the underlying 1D finite-volume PPM algorithm as applied in LR96. Details of PPM’s 1D reconstruct–evolve–average principle can be found in Carpenter et al. (1990) and Colella and Woodward (1984) who also show schematic diagrams of the PPM strategy. In short, each cell holds cell-averaged model quantities that are pieced together in either latitudinal or longitudinal direction to construct a parabolic reconstruction of the selected field. This is also called a “subgrid distribution,” which can be made monotonic. Here, the 1D subgrid distributions serve as building blocks for a PPM-like reconstruction algorithm in 2D.

To use the PPM approach for the interpolation of a conservative scalar *h* in an adaptive application, two steps become necessary. First, a monotonic subgrid distribution *h*(*x*,*y*) is computed that is based on the coarse-grid data. Then the subgrid distribution is integrated over the nested fine-grid regions, which guarantees the conservative mapping of the coarse-grid information.

For the 2D extension of the PPM algorithm, a biparabolic function needs to be defined. As shown by Rančić (1992), a full 2D extension of the PPM scheme requires the calculation of nine coefficients, which leads to a rather computationally expensive method. Therefore, a quasi-biparabolic approach with six components is derived that modifies the scheme proposed by Nair and Machenhauer (2002) with five coefficients. Here, a directionally bias-free cross-term is added to the Nair and Machenhauer (2002) algorithm that helps smooth the subgrid distribution near sharp edges. A similar mixed derivative term was also introduced by van Leer (1985) in an alternative definition of a 2D biparabolic subgrid function. The piecewise parabolic subgrid distribution *h*(*x*, *y*) for a discrete cell-averaged scalar field *h* at the cell center (*i*, *j*) is given by

The indices (*i*, *j*) are dropped for conciseness. Here, *δa ^{x}*,

*δa*indicate the slopes, and

^{y}*b*,

^{x}*b*indicate the curvature terms of the parabola in longitudinal and latitudinal direction, respectively. These 1D coefficients are defined in Carpenter et al. (1990) who used the notation

^{y}*δa*for

*δa*and

^{x}*δa*,

^{y}*a*

_{6}for

*b*and

^{x}*b*, and 〈

^{y}*a*〉 for

*h*. All coefficients are monotonized as in LR96’s monotonic Flux-Form Semi-Lagrangian (FFSL-3) scheme. The cross-term consists of the two components

*c*and

^{xy}*c*that are averaged to avoid a directional bias.

^{yx}In particular, *c ^{xy}* and

*c*at a cell center (

^{yx}*i*,

*j*) are determined by

where Δ*a ^{x}* and Δ

*a*are the centered-difference slopes

^{y}which are further monotonized via the van Leer (1977) monotonized-central (MC) slope limiter. This limiter is given by

The MC slope limiter is also applied to Δ*a ^{y}* with respect to the

*y*direction and both cross components

*c*and

^{xy}*c*. Furthermore, the cell-averaged value

^{yx}*h*is defined as

where *x*, *y* are the local normalized coordinates in each grid cell with *x*, *y* ∈ [−1/2, 1/2]. For the spherical coordinate system (*λ*, *ϕ*) they are given as in Nair and Machenhauer (2002):

with Δ*λ _{i}* = (

*λ*

_{i}_{+1}−

*λ*), Δ

_{i}*μ*= (

_{j}*μ*

_{j}_{+1}−

*μ*) and

_{j}*μ*= sin

_{j}*ϕ*[for the derivation see Nair and Machenhauer (2002)]. It is important to point out that the

_{j}*μ*coordinates are no longer equidistant and become increasingly compressed in polar regions. Nevertheless, the parameters of the parabola in Eq. (1) are computed in the equidistant (

*λ*,

*ϕ*) grid point space. This approximation of the

*h*(

*x*,

*y*) =

*h*[

*x*(

*λ*),

*y*(

*μ*)] distribution is motivated by Veldman and Verstappen (1998) who discussed the advection–diffusion problem for nonuniform meshes. They found that equidistant estimates of the derivatives maintain the skew-symmetry of the problem. As an alternative, a more complex nonequidistant formulation for the parameters of the parabola (Colella and Woodward 1984) can also be used.

In a second step, the coarse-grid data are remapped via analytic integrals. If assuming that the fine-grid region lies within the lower and upper limits *x* ∈ [*x _{l}*,

*x*],

_{u}*y*∈ [

*y*,

_{l}*y*] inside a coarse-grid cell, the new

_{u}*h*value for the refined mesh is determined by

^{r}with Δ*x* = (*x _{u}* −

*x*) and Δ

_{l}*y*= (

*y*−

_{u}*y*). The limits of the integral are also schematically shown in Fig. 6 for the lower-right refined cell

_{l}*h*

^{r}_{4}. Here, the coarse-grid symbol

*h*corresponds to

^{c}*h*in Eq. (10). Note that in practice, the position of

*y*in Fig. 6 is slightly off-centered due to the nonequidistant

_{u}*μ*distribution. As an aside, in this specific configuration with equidistant normalized

*x*coordinates (

*x*

^{2}

_{u}+

*x*+

_{u}x_{l}*x*

^{2}

_{l}) = ¼ holds in each of the four refined grid boxes. Therefore, the

*b*expression (third term on the right-hand side) in Eq. (10) is identical to zero.

^{x}#### 2) Averaging

Averaging routines need to be invoked for join-operations in newly coarsened model domains and during fine-to-coarse ghost cell transfers. For the cell-centered variables as shown in Fig. 6, this averaging step involves the four fine-resolution grid cells (dotted contours) that are entirely contained in the corresponding coarse-grid domain (dashed contour). Then the coarse-grid cell mean *h ^{c}* can be determined by the weighted average

where *A ^{c}*,

*A*stand for the area of the coarse and refined spherical surface patches, and

^{r}*h*

^{r}_{i}symbolizes the fine-grid cell means in the

*i*th grid box. This averaging strategy is mass-conservative.

#### 3) Flux updates

In the LR96 transport algorithm, neighboring grid cells exchange flux information across cell edges to prognosticate the time evolution of the advected quantity (details in section 3). However, at a fine–coarse-grid interface the numerical fluxes on the coarse grid are not consistent with the accumulated fluxes on the fine grid. The differences result, for example, from the approximations of the subgrid distributions in the two domains. Therefore, flux corrections at fine–coarse-grid interfaces are imperative to ensure global mass conservation. Because of the constant time step at all refinement levels, the numerical fluxes are readily available at any given time. Neither temporal interpolations nor flux accumulations at the interfaces are required. By contrast, both techniques are essential for AMR approaches with subcycled time steps in refined domains (Berger and Colella 1989). Here, it is assumed that the fine-resolution fluxes are more accurate than the corresponding flux in the coarse area. Therefore, the fine-grid fluxes are averaged and consequently override the coarse-grid flux at the interface. This flux-matching strategy is schematically displayed in Fig. 7. The figure shows the locations of the coarse- and fine-grid fluxes in latitudinal (*G*) and longitudinal (*F*) direction at the mesh boundaries. The arrows point from the two fine-grid fluxes to the coarse neighboring flux that is replaced at every time step. In this 2D design, the flux-matching condition becomes

where *f* symbolizes the fluxes *F* or *G*. As before, the superscripts *c* and *r* stand for the coarse and refined grid and *A* represents the area of a spherical surface patch. One of these surface weights is symbolically indicated by the dashed grid box for the lower-left cell. Note that each flux is considered a new cell center for the computation of the area weights that vary spatially in contrast to equivalent weights in a Cartesian setup. This flux update algorithm ensures mass conservation up to machine precision.

## 3. Review of the finite-volume advection algorithm

The AMR advection algorithm is built upon the LR96 finite-volume scheme, which utilizes advanced oscillation-free numerical approaches to solving the transport equation in conservation form. Details of the algorithm in spherical geometry are provided in Lin and Rood (1997) who applied the finite-volume concepts to the shallow water framework. Here, only a brief overview of the relevant transport equation in the shallow water system is given.

The model equation for the adaptive advection experiments is the conservation law

for the free surface height *h* of the shallow water system. Here, **V** = (*u*, *υ*)^{T} is the two-dimensional vector velocity, and **∇** · represents the horizontal divergence operator. The corresponding integral form of the conservation law can be derived when integrating Eq. (13) over the control volume Ω and time *t* (see also LeVeque 2002):

where *n* denotes the discrete time level, and Δ*t* = *t _{n}*

_{+1}−

*t*stands for the duration of a time step. In the following derivation, only two-dimensional control volumes with surface areas

_{n}*A*

_{Ω}are considered. Eq. (14) can be rewritten as

where the overbar () symbolizes the spatial average over the area *A*_{Ω} and **F** = (1/Δ*t*)∫^{tn+1}_{tn} h**V ***dt* indicates the temporal average of the flux vector. Applying the Gauss divergence theorem yields

in which **n̂** is an outward-pointing unit normal vector to the boundary ∂Ω of the control volume and *dl* is an infinitesimal line segment along the contour. Thus, the discrete representation of the conservation law becomes

where the sum comprises the four line segments with lengths *l _{i}* that surround a rectangular 2D region;

**F**

*symbolizes the time-averaged flux vectors at the cell interfaces, and*

_{i}**n̂**

_{i}indicates the unit normal vectors to the

*i*th contour line. Assuming an orthogonal

*x*–

*y*control volume with surface area

*A*

_{i,j}= Δ

*x*

_{i,j}Δ

*y*

_{i,j}and corresponding 1D numerical fluxes

*F*and

*G*in

*x*and

*y*direction, Eq. (17) is equivalent to

in which the indices *i*, *j* define the gridpoint position of the cell center, and the half index represents the boundaries of the grid box. In such a Cartesian setup, the lengths of the line segments Δ*x _{i,j}* = [

*x*

_{i}_{+(1/2),}

*−*

_{j}*x*

_{i}_{−(1/2),}

*] and Δ*

_{j}*y*= [

_{i,j}*y*

_{i,j}_{+(1/2)}−

*y*

_{i,j}_{−(1/2)}] are independent of the

*y*and

*x*direction, respectively. This is in contrast to grids in spherical geometry where Δ

*x*

_{i,j}, Δ

*y*

_{i,j}and the surface area

*A*

_{i,j}in Eq. (18) are substituted with the corresponding representation in spherical space:

Here, *a* = 6.371229 × 10^{6} m represents the earth’s radius and Δ*λ _{i}* = [

*λ*

_{i}_{+(1/2)}−

*λ*

_{i}_{−(1/2)}] and Δ

*ϕ*= [

_{i}*ϕ*

_{j}_{+(1/2)}−

*ϕ*

_{j}_{−(1/2)}] denote the longitudinal (

*λ*) and latitudinal (

*ϕ*) grid spacings measured in radians. In the Lin–Rood advection algorithm though (Lin and Rood 1997), a slightly different flux-differencing approach has been chosen that corresponds to Eq. (18) if

*A*

_{i,j}is replaced with the approximation

*A*

_{i,j}=

*a*

^{2}cos

*ϕ*Δ

_{j}*λ*Δ

_{i}*ϕ*. As a result, the discrete conservation law for the cell-averaged free surface height in spherical coordinates becomes

_{j}with

Here, *G*_{net} and *F*_{net} denote the net fluxes through the interfaces in latitudinal and longitudinal direction that solely determine the rate of change of the spatially averaged scalar field *h*. This notation corresponds exactly to the Eqs. (4)–(5) in Lin and Rood (1997) when defining the time-averaged fluxes as 𝒳 and 𝒴 and omitting the subscript “net” in the preceding equations. Note that Eq. (22) still contains a directional bias when operating splitting methods are applied. Therefore, the following directional-bias free 2D scheme is employed:

where *g* and *f* symbolize advection operators in latitudinal and longitudinal direction, respectively. These advective operators avoid a deformational error (details in LR96). In particular, LR96 combined a first-order Euler upwind scheme in advective form (inner operator) with higher-order finite-volume methods in flux form (outer operator). Both a second-order van Leer–type flux algorithm (van Leer 1974, 1977) and the third-order PPM scheme were implemented for the flux calculations that are both monotonic, upstream-biased, and fully conservative. For the adaptive advection experiments discussed here, the PPM approach has been chosen for the fluxes *F* and *G*. Details of the flux computations and monotonicity constraints are provided in Carpenter et al. (1990), Colella and Woodward (1984), and LR96 (with monotonicity constraint FFSL-3). Note that the scheme is in fact not strictly monotonic in two dimensions. As explained in LR96, very minor violations of the monotonicity constraint can be observed near sharp edges due to the application of purely 1D monotonicity operators. The time-stepping scheme is explicit and stable for zonal and meridional Courant numbers [Courant–Friedrichs–Lewy (CFL) criterion] |CFL| < 1. This restriction arises since the semi-Lagrangian extension of the LR96 algorithm is not utilized in the AMR model experiments to keep the width of the ghost cell regions small. Note that the variables *u*, *υ*, and *h* for the advection experiment are staggered as in the Arakawa C grid with originally (prior to the AMR extension) two cell centers at the poles. For the adaptive mesh implementations though, this base C-grid configuration needed to be shifted by half a grid length in latitudinal direction. Such a shift places velocity points at the poles and avoids fixed polar mass centers that would inhibit the flexible AMR principle.

## 4. Results

The advection algorithm is one of the fundamental building blocks of atmospheric flow simulations. It is therefore imperative to evaluate its performance not only in the adaptive model runs but also in the nonadapted model setups. This allows comparisons of the AMR approach to both analytic reference solutions and uniform-grid model experiments. This section discusses results from three standard advection tests with increasing complexity. These are the transport of a cosine bell, the advection of a slotted cylinder and a smooth deformational flow that describes the roll-up of two vortices.

Different adaptation criteria are assessed. In general, each criterion is compared to a problem-dependent threshold value. If one or more grid points within a block exceed this user-determined limit the block is flagged for refinement. If, on the other hand, the grid points in an adapted block no longer meet the adaptation criterion the coarsening flag in the corresponding block is set. The refinement criterion is examined at each time step, which is determined dynamically during the simulation to match a chosen |CFL| = 0.95 limit. All adaptations occur consecutively until either the user-defined maximum refinement level or the initial resolution is reached. The mesh cannot be coarsened further than the initial layout. Here, the block configuration *B _{x}* = 8,

*B*= 6,

_{y}*N*= 9,

_{x}*N*= 6 (as introduced in Fig. 1) is chosen for all test cases with a maximum refinement level between 0 and 4. Such a setup corresponds to the uniform Δ

_{y}*λ*, Δ

*ϕ*grid spacings 5°, 2.5°, 1.25°, 0.625°, and 0.3125° at the individual nesting levels. They are further explained in Table 1, which gives an overview of the corresponding resolutions in spherical coordinates and physical space. The effect of the converging meridians in the latitude–longitude grid can clearly be seen at all refinement levels. This significantly reduces the physical grid spacings in polar regions and, as a consequence, the maximum allowable time step for stable computations.

All three passive advection tests are driven by prescribed wind speeds. These are reinitialized analytically whenever adaptations occur during the course of the simulation. In addition, the initial geopotential height field is reinitialized analytically if initial adaptations are requested. This is the case for the cosine bell and slotted cylinder test scenarios. During the model runs though, the geopotential height field in newly adapted blocks is initialized via the conservative averaging algorithm and the PPM-based interpolation method as discussed earlier.

### a. Error statistics

The performance of the advection tests is quantitatively measured using the standard normalized *l*_{1}, *l*_{2}, *l*_{∞} error norms and the height error *h*_{max}. They are defined as in Williamson et al. (1992). For the adaptive grid runs, the following approximation to the global integral of the scalar field *h* is adopted:

In particular, the integral is replaced by three nested sums that loop over the total number of blocks *N _{b}* and all grid cells. As before,

*N*and

_{y}*N*denote the number of latitudinal and longitudinal grid points per block and

_{x}*m*stands for the block index. The spherical area weights

*A*

_{i,j}

_{,}

*are defined as in Eq. (21) and take the particular resolution Δ*

_{m}*λ*, Δ

*ϕ*in the

*m*th block into account. The normalization factor

*A*

_{sp}= 4

*πa*

^{2}indicates the surface area of the whole sphere. In a parallel computing setup, each processor then loops over its assigned blocks and computes a partial sum, which is collectively communicated over the network to determine the global value.

### b. Adaptive advection experiments

#### 1) Transport of a cosine bell

The first test of the 2D adaptive finite-volume advection model is the passive transport of a cosine bell around the sphere (Williamson et al. 1992; shallow water test case 1). The advecting wind field is given by

where *u* and *υ* stand for the nondivergent zonal and meridional velocities with maximum wind speed *u*_{0} = 2*πa*/(12 days) ≈ 38.61 m s^{−1}. Various flow orientation angles *α* to the equator can be chosen. Here, *α* = 0°, *α* = 45°, and *α* = 90° are tested that define the advection of the cosine bell along the equator, at a 45° angle through the Tropics and midlatitudes as well as the transport across the poles.

The initial distribution of the free surface height *h* is defined as

with radius *R* = *a*/3 and the peak amplitude *h*_{0} = 1000 m. Here, *r* denotes the great circle distance

between a position (*λ*, *ϕ*) and the center of the cosine bell, initially set to (*λ _{c}*,

*ϕ*) = (3

_{c}*π*/2, 0). For convenience, pointwise values instead of cell averages are used for the initialization and validation. In general, the numerical scheme is expected to translate the cosine bell without any change of shape. The bell then reaches its initial position after one full revolution at the end of model day 12.

The refinement criterion for the adaptive transport of the cosine bell is a simple threshold criterion that assesses the value of the geopotential height at each grid point. In particular, if the geopotential height exceeds the user-determined limit *h* ≥ 53 m the block is flagged for refinement. This sensitive value corresponds to approximately 5% of the initial peak with max(*h*) ≈ 1000 m. The threshold is chosen since the adapted blocks now tightly bind the cosine bell, which is also illustrated in Fig. 8. This keeps the total number of adapted blocks in the given example small while covering most of the traveling feature with the adaptive block structure. Any smaller threshold would trigger a wider refinement area.

Figure 8 explains the basic adaptation principle and gives insight into the load-balancing strategy on parallel computing platforms. The left column shows four snapshots of the adaptive *α* = 90° simulation at day 0, 1, 3, and 4 with three refinement levels. The adapted blocks reliably track the geopotential height field of the cosine bell as indicated by the overlaid block distribution. It can clearly be seen that the cosine bell passes over the North Pole without distortions or noise. The pole point itself with its converging grid lines is spread out in the chosen equidistant cylindrical map projection. This emphasizes the numerous grid boxes in polar regions that need to be refined for transport processes at high latitudes. They severely restrict the maximum allowable time step that obeys the |CFL| = 0.95 condition in polar regions. For example, in this simulation with three refinement levels and a maximum zonal wind speed of *u* ≈ 38.61 m s^{−1} at the poles, the adaptive time step depends greatly on the position of the cosine bell. It varies between Δ*t* ≈ 597.3 s in equatorial regions and Δ*t* ≈ 9.3 s at very high latitudes. The right column in Fig. 8 displays the corresponding distribution of the adaptive blocks in a parallel execution mode. Here four processors are used and are indicated by the gray shadings. The current load-balancing strategy assumes an equal workload per block and therefore, assigns an approximately equal number of blocks to each processor. If needed, new blocks are readily redistributed after adaptations occurred. Here, the redistribution of the blocks does not take data locality issues into account. For the future, a space-filling-curve load-balancing approach (Dennis 2003; Behrens and Zimmermann 2000) is planned that improves the data locality and thereby is expected to reduce the communication across the parallel network. Note that the parallel speedups that can be achieved with the AMR library highly depend on several factors. Among them are the size of the blocks, the ratio between compute cells and ghost cells, the workload per block, and the frequency of the ghost cell updates due to the algorithmic design, the data locality of the blocks, and the performance of the network. These issues will be thoroughly discussed in a different publication.

The cosine bell is advected once around the sphere and reaches its initial position after 12 days. Then the solution can be compared to the initial conditions that serve as the true reference field. A closer examination of the final states at refinement level 1 (2.5°) and different rotation parameters *α* is illustrated in Fig. 9, which also presents the overlaid true solution with dotted contours. Here it is shown that the cosine bell undergoes a stretching in the flow direction which is typically observed for monotonic finite-volume advection algorithms (LR96; Nair and Machenhauer 2002; Hubbard and Nikiforakis 2003). The effect is clearly visible at this relatively coarse resolution and diminishes significantly with decreasing grid sizes (Fig. 10). As pointed out by Nair and Machenhauer (2002) the degradation of the shape is caused by the monotonicity constraint that translates into slightly less accurate error norms in comparison to, for example, positive definite methods. Nevertheless, in practice the advantages of the monotonicity-preserving advection algorithm outweigh the slight decrease in accuracy [see also comparisons in van Leer (1977)].

Figure 10 confirms that the shape of the cosine bell after one revolution is well preserved at high resolutions. The figure depicts a sequence of model runs with increasing number of refinement levels at rotation angle *α* = 45°. This transport direction represents the “worst case” scenario for the advection algorithm with underlying operator splitting approach. The results at the highest refinement levels 3 and 4 are almost indistinguishable from each other. It is also interesting to note that the cosine bells at the higher resolutions (Figs. 10c–e) no longer show the small phase error, which is visible in the coarser runs (Figs. 10a–b). The solutions then resemble the true solution very closely, which is demonstrated in Fig. 10f. Figure 10f displays the difference of the cosine bell at refinement level 4 with the analytic reference state. The differences mainly develop along the edges in the 45° flow direction. In particular, the leading edge in the upper-right corner shows slightly enhanced geopotential height values, whereas the tail in the lower left corner drops below the reference state. These errors are small in comparison to the peak amplitude of the cosine bell. In general, the same type of error patterns can also be found in nonadapted model runs.

In addition, it is interesting to assess the adaptive model performance with a cross polar flow field at *α* = 90°. Dynamic adaptations in polar regions are demanding since they involve many more adapted blocks close to the poles as discussed before. Nevertheless, the adapted advection scheme performs satisfactorily at all three refinement levels displayed in Fig. 11. Here, three snapshots of the cosine bell at day 2, 3, and 4 (from the bottom to the top) in a North Polar stereographic projection are shown. There are no visible distortions of the height field at any resolution as the cosine bell approaches, passes over, and leaves the North Pole. The increased resolution clearly helps preserve the shape and peak amplitude.

The overall performance of the adaptive advection tests with different rotation angles and increasing refinement levels is summarized in Table 2. The table shows not only the normalized *l*_{1}, *l*_{2}, *l*_{∞}, and *h*_{max} errors after one revolution but also contains information on the final peak amplitude, the minimum and maximum number of blocks during the 12-day forecast period, the number of total time steps as well as the CPU time measured on one processor of a SUN Ultra 60 workstation. In addition, the error statistics of selected uniform-grid model runs (1.25°) are listed for comparison. It can clearly be observed that the cosine bell is successfully tracked in all adapted model simulations. This is not only true for the *l*_{1} and *l*_{2} error norms that assess the overall shape, but also for the peak amplitudes evaluated by the *l*_{∞} errors. The peak amplitudes improve considerably with increasing refinement levels. An approximately second order convergence rate can be found for the rotation angles *α* = 0° and *α* = 90°. For *α* = 45° though, the convergence rate drops slightly below second order.

Table 2 furthermore shows that the CPU time in the adapted runs is significantly reduced in comparison to the uniform-resolution model simulations. For example, when comparing the uniform 1.25° runs with the corresponding adapted runs at refinement level 2 the speedup factors are approximately 7, 33, and 10 for the rotation angle *α* = 0°, *α* = 45°, and *α* = 90°, respectively. The speedup is determined by two main factors. First, the number of blocks and therefore the overall workload is decreased in the adapted simulations. Second, the total number of time steps necessary for the 12-day integration is drastically reduced. The latter is due to the fact that the adaptive time step can be greatly increased if the fine grid does not cover the polar regions. In particular, this effect can be seen in the *α* = 45° case where the time step in the uniform run solely depends on the CFL restriction at the poles. This consequently leads to a rather short time step and large number of iterations. In the corresponding adapted run, the grid around the poles is mostly kept at the coarse resolution so that the time step is mainly determined by the traveling cosine bell. The latter is also true for the *α* = 0° test case, where the time step exclusively relies on the true advective wind speeds and grid distances at the equator. Therefore, an identical number of time steps is required for both the uniform and adapted runs at the 1.25° resolution and the computational savings are exclusively due to the reduced workload.

The error norms for the adaptive simulations in Table 2 compare well to similar monotonic and conservative advection schemes presented in the literature. For example, the errors of the *α* = 90° run with one refinement level (2.5°) closely resemble the corresponding error measures for the weighted average flux (WAF) scheme in Hubbard and Nikiforakis (2003), the FFSL-3 algorithm in LR96 and the cell-integrated semi-Lagrangian method with monotonic option (CISL-M) in Nair and Machenhauer (2002) at comparable resolutions (and a slightly wider bell radius *R* = *a*7*π*/64). This is important to note since the latter two algorithms are semi-Lagrangian-type schemes that only require very few time steps for one revolution of the cosine bell. Both schemes finish after 256 integration steps, whereas the adaptive finite-volume model needs 4085 time steps due to the CFL restriction. Therefore, it is emphasized that the error norms match despite the large difference in the number of time steps. The sheer number of integration steps has significant implications on the model results. This has already been documented in Table 2, which shows that the error norms of the adapted runs at refinement level 2 for nonzero rotation angles are in fact slightly lower than the errors of the uniform-grid runs. The effect can be linked to the reduced number of integration steps. An even clearer example is given in Table 3, which assesses the performance of the *α* = 0° advection test with different maximum CFL numbers. As the CFL numbers decrease, the resulting number of time steps for one revolution increases, which leads to considerably less accurate results in this constant-flow test case. Here, an increased number of time steps adds numerical diffusion to the transport problem, which flattens the peak of the cosine bell. A similar time-stepping effect was also observed by Stevens and Bretherton (1996).

The time traces of the normalized *l*_{2} and *l*_{∞} error norms with *α* = 45° and *α* = 90° are illustrated in Fig. 12. The figure displays the evolution of the errors at three different refinement levels that show the expected decline of the solution error at finer resolutions. The norms are slightly sensitive to the rotation angle, especially in comparison to the *α* = 0° values listed in Table 2. This is in contrast to findings by Taylor et al. (1997) who utilized a high-order spectral element method on a cubed-sphere computational grid. The trace of the *l*_{∞} norm is rather noisy at low resolutions and, additionally, shows distinct spikes when the cosine bell is transported over the poles. This was also observed by Rasch (1994) and Nair and Machenhauer (2002). These spikes are not a consequence of the dynamically adaptive grid implementation, but also occur in uniform-grid model runs. As pointed out by Jakob-Chien et al. (1995) the source of the noise is the discrete sampling of the numerical and reference solution. Here the reference solution is computed analytically during the course of the integration. This leads to an occasional small increase in the peak amplitude of the reference field depending on the distance of the center to the closest grid point. This effect diminishes with increasing resolution.

#### 2) Transport of a slotted cylinder

In the second example the cosine bell is replaced with a slotted cylinder. All other parameters and flow fields stay the same as discussed above. Such an advection test was originally proposed by Zalesak (1979) and has recently been applied in spherical geometry by Nair et al. (2003) and Lipscomb and Ringler (2005). The slotted cylinder exhibits very sharp nonsmooth edges in comparison to the rather smoothly varying cosine bell. Therefore, it challenges not only the numerical scheme but also the interpolation algorithm in an adaptive model simulation. The radius of the cylinder is set to *R* = *a* × *π*/4 with a slot of width *a* × *π*/8 and length *a* × 3*π*/8. This rather wide slotted cylinder is chosen to allow grid coarsenings within the slot. As in Lipscomb and Ringler (2005), the initial height of the cylinder is set to *h* = 1000 m, whereas *h* is set to zero for all *r* > *R* and inside the slot. The long axis of the slot is perpendicular to the equator and the cylinder is initially centered at (*λ _{c}*,

*ϕ*) = (3

_{c}*π*/2, 0). The flow orientation angle

*α*= 30°, which avoids any grid symmetries along the trajectory path, is selected.

The model is run for 12 days, which completes a full revolution of the advected cylinder. As before, the initial conditions then serve as the true reference solution. Four refinement levels are used that start from a coarse 5° × 5° base grid. Here, a grid-scale-dependent gradient criterion is applied that flags a block for refinement if one or more grid points with grid indices (*i*, *j*) exceed the user-defined threshold

for 0 ≤ *i* ≤ *N _{x}* and 0 ≤

*j*≤

*N*. This criterion evaluates the local height difference between neighboring cells, which incorporates some ghost cell information along a block boundary. A similar criterion was also formulated by Hubbard and Nikiforakis (2003) who evaluated

_{y}*ξ*with centered differences.

Figures 13a–e show snapshots of the adaptive simulation at model day 0, 3, 6, 9, and 12. The positive height field is shaded in gray with overlaid adapted blocks. It can clearly be seen that the grid is refined along the sharp edges of the advected cylinder and kept coarse elsewhere. At this high resolution within the refined area (0.3125°) there is some minor numerical diffusion along the sharp edges. This leads to a slight broadening of the cylinder and its refined area during the course of the simulation. The broadening can also be seen in Fig. 13f, which shows a cross section of the slotted cylinder along the equator for four different refinement levels at day 12. Here, the slotted cylinder can be compared to its reference shape. The adapted grids clearly help preserve the sharpness of the edges with increased resolution. This trend seems to level off at refinement levels 3 and 4, which visually overlay each other.

The performance of the refined and corresponding uniform-resolution model runs after one revolution (day 12) is quantitatively measured in Table 4. The table lists not only the normalized *l*_{2} and *l*_{∞} geopotential height error norms but also gives information on the minimum and maximum number of blocks during the 12-day simulation, the total number of time steps, and the CPU time on a single AMD Opteron processor. The model runs are grouped according to their finest grid resolution. It can be seen that the *l*_{2} errors of the adaptive and corresponding uniform-resolution runs closely match and slowly decrease with increasing resolution. This error reduction cannot be observed for the *l*_{∞} norms that measure the maximum deviations from the reference solution. In particular, the *l*_{∞} norms stay almost constant. Here, the reduced convergence rate of both error norms is most likely due to the highly nonsmooth characteristics of the initial dataset. Overall, the AMR simulations show considerable speedup factors of about 17 and 120 at the two highest resolutions.

#### 3) Smooth deformational flow

An even more challenging advection test is the deformational flow (cyclogenesis) problem. This test was first suggested by Doswell (1984) and has been formulated for spherical geometries by Nair et al. (1999, 2002. Here, the smooth variant of the test that describes the simultaneous roll-up of two vortices is chosen.

The vortices are centered at the poles of a rotated spherical coordinate system (*λ*′, *ϕ*′). This rotation is defined with respect to the regular (*λ*, *ϕ*) coordinates such that the North Pole of the rotated system is located at (*λ*_{0}, *ϕ*_{0}) in the (*λ*, *ϕ*) reference frame. The vortices are characterized by the normalized tangential velocity

with the radial distance of the vortex *ρ*′ = *r*_{0} cos*ϕ*′ and the constant *r*_{0} = 3. The representation of the wind speeds (*u*, *υ*) in the unrotated coordinates is described in Nair et al. (1999). Note that all variables are nondimensional and that the radius of the earth *a* is set to 1.

The angular velocity *ω*′ is defined by

which is used for the computation of the scalar field Ψ. In particular, Ψ is given by

which also serves as the analytic reference solution at times *t* > 0. Here, the constant *d* = 5 determines the characteristic width of the two vortices. In addition, the parameters (*λ*_{0}, *ϕ*_{0}) = (*π*/2, *π*/18) are chosen which point to the location (10°N, 90°E). This avoids any grid symmetry effects during the simulation.

The adaptive advection model is run for three nondimensional time units. As before, up to four refinement levels are tested that start from the coarse 5° × 5° initial grid. The chosen refinement criterion is based on the gradient of the scalar field Ψ. In particular, if the magnitude of the gradient exceeds the threshold |**∇**Ψ| ≥ 1 at one or more grid points in a given block the block is flagged for refinement. Note that such a criterion is independent of the block resolution and therefore contrasts the resolution-sensitive nearest neighbor refinement strategy (*ξ*) discussed in the previous section. An example of an adapted model run with four refinement levels is displayed in Fig. 14. The figure shows the scalar field Ψ with its corresponding block distribution at times 0, 1, and *t* = 3. As it can be seen in Figs. 14a and 14d no initial adaptations are invoked. The first refinements are triggered shortly before *t* = 1 is reached. This is illustrated in Fig. 14e, which only exhibits two of the four maximum refinement levels. The missing two refinement stages are invoked immediately after this time stamp. At *t* = 3 the two vortices have matured and developed very sharp gradients that are now covered by an extended refined area. Overall, the evolving roll-up of the scalar is well captured by the adaptive model simulation. No noise or distortions at fine–coarse-grid boundaries are visible.

A quantitative comparison of the refined and corresponding uniform model runs is presented in Table 5. The table lists the normalized *l*_{2} and *l*_{∞} error norms of the scalar field Ψ, an overview of the CPU times on a single AMD Opteron processor as well as the number of blocks and time steps at *t* = 3. As before, the model runs are grouped according to their finest grid resolution. It is interesting to note that the coarse 5° base-resolution runs only show small improvements in the error statistics when refined up to a refinement level of 4. On the contrary, the errors slightly increase at refinement level 4. It suggests that the initial errors on the coarse mesh (until *t* = 1) cannot be successfully recovered by later refinement regions that are initialized via interpolations from the coarser mesh. Therefore, even an AMR run must reasonably represent the solution on the coarsest mesh if accuracy is expected to be gained in the refined areas. A good compromise between accuracy and computational costs are the 1.25° model simulations with one or two refinement levels. They show the smallest error measures even in comparison to the uniform high-resolution model runs 0.625° and 0.3125°. This is mainly attributable to the reduced number of integration steps that also lead to the considerable speedup factors of ≈8.6 and ≈108, respectively.

## 5. Conclusions

A spherical 2D AMR technique has been applied to a revised version of the conservative and monotonic Lin and Rood (1996) advection algorithm. The adaptive grid design is based on two building blocks: a block-structured data layout and a spherical AMR grid library for parallel computer architectures. The library contains special provisions for ghost cell exchanges in polar regions and supports both static and dynamic grid adaptations. Furthermore, it has built-in parallel communication and load-balancing support, which reduces the development time for parallel AMR applications. The latter is especially important for more complex, nonlinear AMR models in 3D.

Three advection examples with increasing complexity have been tested. These include the advection of a cosine bell around the sphere at different rotation angles, the transport of a slotted cylinder with sharp edges, and a smooth deformational cyclogenesis test case that describes the roll-up of two vortices. Up to four refinement levels have been tested with a minimal mesh spacing of 0.3125°. The adaptations were guided by user-defined adaptation criteria. In particular, simple height- and gradient-based refinement strategies were chosen that triggered refinements whenever the problem-specific threshold values were reached. All three test examples showed that the chosen features of interest were reliably detected and tracked by the refinement regions. The additional resolution clearly helped preserve the shape and amplitude of the transported field while saving computing resources in comparison to uniform-grid model runs. Overall, the adaptive simulations demonstrate that AMR might be a viable option for atmospheric transport schemes. For practical applications, the adaptation criterion can then be tailored toward the specific advected quantities and flow conditions.

The AMR block design is readily applicable to nonlinear model configurations that can utilize a block-data structure on the sphere. This research effort is therefore a step toward a statically and dynamically adaptive GCM that can focus its resolution on user-determined regions or features of interest. The refined domains could, for example, include static adaptations in mountainous terrain or dynamic adaptations for cyclones or convective regions. Tests with an adaptive nonlinear 2D and 3D version of the finite-volume dynamical core have already been successfully performed and will be discussed in a follow-up paper.

Whether adaptive mesh approaches for climate and weather research will prevail in the future will crucially depend on two major aspects. First, it must be shown that adaptive atmospheric modeling is not just feasible, but also accurate with respect to the resulting flow patterns and furthermore, capable of detecting the features of interest reliably in 3D setups. Second, adaptive model simulations must also be computationally less expensive than comparable uniform high-resolution runs. We argue that both goals are within reach for future atmospheric model generations.

## Acknowledgments

We thank S.-J. Lin (Geophysical Fluid Dynamics Laboratory, Princeton, New Jersey) and K. Yeh (NASA Goddard Space Flight Center, Greenbelt, Maryland) for their support and discussions about the Lin–Rood advection algorithm. We also wish to thank the two anonymous reviewers for their suggestions and helpful comments. This work was supported by NASA Headquarters under the Earth System Science Fellowship Grant NGT5-30359. In addition, partial funding was provided by the Department of Energy under the SciDAC Grant DE-FG02-01ER63248.

## REFERENCES

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

**,**

## Footnotes

* Current affiliation: Geophysical Fluid Dynamics Laboratory, Princeton, New Jersey

*Corresponding author address:* Dr. Christiane Jablonowski, University of Michigan, Department of Atmospheric, Oceanic, and Space Sciences, 2455 Hayward St., Ann Arbor, MI 48109. Email: cjablono@umich.edu