Appendix C: Grid Description¶
This chapter provides a brief introduction to the common types of grids used in the MPAS framework.
C.1 Horizontal Grid¶
The MPAS grid system requires the definition of seven elements composed of two types of cells, two types of lines, and three types of points. These elements are depicted in Figure C.1 and defined in Table C.1. These elements can be defined on either the plane or the surface of the sphere.
The two types of cells form the following two meshes:
Primal Mesh
A mesh composed of Voronoi regions
Each corner of a primal mesh cell is uniquely associated with the center of a Dual Mesh cell
The center of each mesh cell \(P_{i}\) is denoted by \(x_{i}\)
The boundary of a given primal mesh cell \(P_{i}\) is composed of the set of lines that connect the \(x_{v}\) locations of associated dual mesh cells \(D_{v}\)
Dual Mesh
A mesh composed of Dulaunay triangles
Each “center” of a Dual Mesh cell is uniquely associated with a specific corner of a Primal Mesh cell
The center of any the Dual mesh cell, ,:math:D_{v} is denoted by \(x_{v}\)
The boundary of a given Dual mesh cell \(D_{v}\) is composed of the set of lines that connect the \(x_{i}\) locations of the associated primal mesh cells \(P_{i}\)
Since the two line segments crossing at \(x_{e}\) are orthogonal, these line segments form a convenient local coordinate system for each edge. At each \(x_{e}\) location a unit vector \(n_{e}\) is defined to be parallel to the line connecting primal mesh cells. A second unit vector \(t_{e}\) is defined such that \(t_{e} = k \times n_{e}\).
Table C.2 provides the names of all elements and all sets of elements as used in the MPAS framework. Elements appear twice in the table when described in the grid file in more than one way, e.g. points are described with both cartesian and latitude/longitude coordinates. An ncdump -h
of any MPAS grid, output or restart file will contain all variable names shown in second column of Table C.2.
In addition to these seven element types, we require the definition of sets of elements. In all, eight different types of sets are required and these are defined and explained in Table C.3 and Figure C.2. The notation is always of the form of, for example, \(i \in CE(e)\), where the \(LHS\) indicates the type of element to be gathered (cells) based on the RHS relation to another type of element (edges).
The angle of each edge in an MPAS grid is provided in the variable \(angleEdge\). The angle given is the angle between a vector pointing north and a vector pointing in the positive tangential direction of the edge. Referring to Figure C.3,
\(angleEdge = arcsin || \hat{n} \times \hat{v} ||\) |
where \(\hat{n}\) is the unit vector pointing north and \(\hat{v}\) is the unit vector pointing from \(verticesOnEdge(1,iEdge)\) to \(verticesOnEdge(2, iEdge)\).
C.2 Vertical Grid¶
The vertical coordinate in MPAS-Atmosphere is \(\zeta\) and has units of length, where \(\theta \leq \zeta \leq z_{t}\) and \(z_{t}\) is the height of the model top. The relationship between the vertical coordinate and height in the physical domain is given as
\(z = \zeta + Ah_{s} ( x, y, \zeta )\)
where \((x, y)\) denotes a location on the horizontal mesh and \(\zeta\) is the vertical coordinate (\(\zeta\) is directed radially outward from the surface of the sphere, or perpendicular to the horizontal \((x,y)\) plane in a Cartesian coordinate MPAS-A configuration). MPAS-A can be configured with the traditional Gal-Chen and Somerville terrain-following coordinate by setting \(h_{s} (x, y, \zeta) = h(x, y)\) and \(A = [1 - \zeta \div z_{t}]\), where \(h(x, y)\) is the terrain height. Alternatively, A can be modified to allow a more rapid or less rapid transition to the constant-height upper boundary condition. Additionally, a constant-height coordinate can be specified at some intermediate height below \(h_{t}\).
The influence of the terrain on any coordinate surface \(\zeta\) can be influenced by the specification of \(h_{s} (x, y, \zeta)\). Specifically, \(h_{s}\) can be set such that \(h_{s} (x, y, 0) = h(x, y)\) (i.e. terrain following at the surface), and progressively filtered fields of \(h(x, y)\) can be used at \(\zeta > 0\) in \(h_{s} (x, y, \zeta)\), such that the small-scale features in the topography are quickly filtered from the coordinate. Example MPAS-A vertical meshes are given in Figure C.4.
On the MPAS-A mesh C-grid staggering, the state variables \(u\), \(\rho\), \(\theta\) and scalars are located halfway between \(\omega\) levels in both physical height and in the coordinate \(\zeta\). Variables associated with the coordinate systems used in the MPAS-A solver, and possibly appearing in its input, output or history files, are defined in Table C.4 and depicted in Figure C.5.
Further information about the vertical coordinate can be found in A Terrain-Following Coordinate with Smoothed Coordinate Surfaces.
Figures¶
Figure C.1¶

Figure C.1: Definition of elements used to build the MPAS grid. Also see Table C.1.¶
Figure C.2¶

Figure C.2: Definition of element groups used to reference connections in the MPAS grid. Also see Table C.3.¶
Figure C.3¶

Figure C.3: The angle of an edge refers to the angle between a vector pointing north at an edge location and a vector pointing in the positive tangential velocity direction of the edge.¶
Figure C.4¶

Figure C.4: Example MPAS-A vertical meshes using terrain following (left) and smoothed (right) vertical coordinates.¶
Figure C.5¶

Figure C.5: Vertical distribution of the variables in MPAS-A. Also see Table C.4.¶
Tables¶
Table C.1¶
Table C.1: Definition of elements used to build the MPAS grid
Element |
Type |
Definition |
---|---|---|
\(x_{i}\) |
point |
location of center of primal-mesh cells |
\(x_{v}\) |
point |
location of center of dual-mesh cells |
\(x_{e}\) |
point |
location of edge points where velocity is defined |
\(d_{e}\) |
line segment |
distance between neighboring \(x_{i}\) locations |
\(l_{e}\) |
line segment |
distance between neighboring \(x_{v}\) locations |
\(P_{i}\) |
cell |
a cell on the primal-mesh |
\(D_{v}\) |
cell |
a cell on the dual-mesh |
Given a wind vector (\(u_{\perp}\) , \(u_{\parallel}\)) defined in term of components orthogonal to and parallel to the edge, the earth-relative wind \((u, v)\) may be recovered as

where \(\alpha = angleEdge\).
Table C.2¶
Table C.2: Variable names used to describe an MPAS grid
Element |
Name |
Size |
Comment |
---|---|---|---|
\(x_{i}\) |
\({x,y,z}Cell\) |
\(nCells\) |
cartesian location of \(x_{i}\) |
\(x_{i}\) |
\({lon,lat}Cell\) |
\(nCells\) |
longitude and latitude of \(x_{i}\) |
\(x_{v}\) |
\({x,y,z}Vertex\) |
\(nVertices\) |
cartesian location of \(x_{v}\) |
\(x_{v}\) |
\({lon,lat}Vertex\) |
\(nVertices\) |
longitude and latitude of \(x_{v}\) |
\(x_{e}\) |
\({x,y,z}Edge\) |
\(nEdges\) |
cartesian location of \(x_{e}\) |
\(x_{e}\) |
\({lon,lat}Edge\) |
nEdges |
longitude and latitude of \(x_{e}\) |
\(d_{e}\) |
\(dcEdge\) |
\(nEdges\) |
distance between \(x_{i}\) locations |
\(l_{e}\) |
\(dvEdge\) |
\(nEdges\) |
distance between \(x_{v}\) locations |
\(e \in EC(i)\) |
\(edgesOnCell\) |
\((nEdgesMax,nCells)\) |
edges that define \(P_{i}\) |
\(e \in EV(v)\) |
\(edgesOnVertex\) |
\((3,nCells)\) |
edges that define \(D_{v}\) |
\(i \in CE(e)\) |
\(cellsOnEdge\) |
\((2,nEdges)\) |
primal-mesh cells that share edge \(e\) |
\(i \in CV(v)\) |
\(cellsOnVertex\) |
\((3,nVertices)\) |
primal-mesh cells that define \(D_{v}\) |
\(v \in VE(e)\) |
\(verticesOnEdge\) |
\((2,nEdges)\) |
dual-mesh cells that share edge \(e\) |
\(v \in VI(i)\) |
\(verticesOnCell\) |
\((nEdgesMax,nCells)\) |
vertices that define \(P_{i}\) |
Table C.3¶
Table C.3: Definition of element groups used to reference connections in the MPAS grid. Examples are provided in Figure C.2
Syntax |
Output |
---|---|
\(e \in EC(i)\) |
set of edges that define the boundary of \(P_{i}\) |
\(e \in EV(v)\) |
set of edges that define the boundary of \(D_{v}\) |
\(i \in CE(e)\) |
two primal-mesh cells that share edge \(e\) |
\(i \in CV(v)\) |
set of primal-mesh cells that form the vertices of dual mesh cell \(D_{v}\) |
\(v \in VE(e)\) |
the two dual-mesh cells that share edge \(e\) |
\(v \in VI(i)\) |
the set of dual-mesh cells that form the vertices of primal-mesh cell \(P_{i}\) |
\(e \in ECP(e)\) |
edges of cell pair meeting at edge \(e\) |
\(e \in ECV(v,i)\) |
edge pair associated with vertex \(v\) and mesh cell \(i\) |
Table C.4¶
Table C.4: Vertical coordinate variables in MPAS-Atmosphere.
level is the integer model level (usually specified with index \(k\) where \(k = 1\) is the lowest model level and physical height increases with increasing \(k\)). \(\Delta\) denotes a vertical difference between levels, and cell is a given mesh cell on the primary mesh.
Variable |
Definition |
---|---|
\(zgrid(level,cell)\) |
physical height of the \(\omega\) points in meters |
\(zw(level)\) |
\(\zeta\) at \(\omega\) levels |
\(zu(level)\) |
\(\zeta\) at \(u\) levels; \(zu(k) = [z \omega (k+1) + z \omega (k)] \div 2\) |
\(dzw(level)\) |
\(\Delta \zeta\) at \(u\) levels; \(dz \omega (k) = z \omega (k+1) - z \omega (k)\) |
\(dzu(level)\) |
\(\Delta \zeta\) at \(\omega\) levels; \(dzu(k) = [dz \omega (k+1) + dz \omega (k)] \div 2\) |
\(rdzw(level)\) |
\(1 \div [dz \omega ]\) |
\(rdzu(level)\) |
\(1 \div dzu\) |
\(zz(level,cell)\) |
\(\Delta \zeta \div \Delta z\) at u levels; \((z \omega (k+1) - z \omega (k)) \div (zgrid(k+1,cell) - zgrid(k,cell))\) |
\(fzm(level)\) |
weight for linear interpolation to \(\omega (k)\) point for \(u(k)\) level variable |
\(fzp(level)\) |
weight for linear interpolation to \(\omega (k)\) point for \(u(k-1)\) level variable |