============================ Appendix C: Grid Description ============================ | This chapter provides a brief introduction to the common types of grids used in the MPAS framework. | | C.1 |nbsp| |nbsp| |nbsp| 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 :ref:`Figure C.1` and defined in :ref:`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: .. container:: row m-0 p-0 .. container:: col-md-12 pl-0 pr-3 py-3 m-0 .. container:: card px-0 h-100 .. rst-class:: card-header-def .. rubric:: Primal Mesh .. container:: card-body-def * 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 :math:`P_{i}` is denoted by :math:`x_{i}` * The boundary of a given primal mesh cell :math:`P_{i}` is composed of the set of lines that connect the :math:`x_{v}` locations of associated dual mesh cells :math:`D_{v}` .. container:: col-md-12 pl-0 pr-3 py-3 m-0 .. container:: card px-0 h-100 .. rst-class:: card-header-def .. rubric:: Dual Mesh .. container:: card-body-def * 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 :math:`x_{v}` * The boundary of a given Dual mesh cell :math:`D_{v}` is composed of the set of lines that connect the :math:`x_{i}` locations of the associated primal mesh cells :math:`P_{i}` Since the two line segments crossing at :math:`x_{e}` are orthogonal, these line segments form a convenient local coordinate system for each edge. At each :math:`x_{e}` location a unit vector :math:`n_{e}` is defined to be parallel to the line connecting primal mesh cells. A second unit vector :math:`t_{e}` is defined such that :math:`t_{e} = k \times n_{e}`. :ref:`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 :ref:`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 :ref:`Table C.3` and :ref:`Figure C.2`. The notation is always of the form of, for example, :math:`i \in CE(e)`, where the :math:`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 :math:`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 :ref:`Figure C.3`, .. csv-table:: :align: center :math:`angleEdge = arcsin || \hat{n} \times \hat{v} ||`, where :math:`\hat{n}` is the unit vector pointing north and :math:`\hat{v}` is the unit vector pointing from :math:`verticesOnEdge(1,iEdge)` to :math:`verticesOnEdge(2, iEdge)`. | | | C.2 |nbsp| |nbsp| |nbsp| Vertical Grid ====================================== The vertical coordinate in MPAS-Atmosphere is :math:`\zeta` and has units of length, where :math:`\theta \leq \zeta \leq z_{t}` and :math:`z_{t}` is the height of the model top. The relationship between the vertical coordinate and height in the physical domain is given as :math:`z = \zeta + Ah_{s} ( x, y, \zeta )` where :math:`(x, y)` denotes a location on the horizontal mesh and :math:`\zeta` is the vertical coordinate (:math:`\zeta` is directed radially outward from the surface of the sphere, or perpendicular to the horizontal :math:`(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 :math:`h_{s} (x, y, \zeta) = h(x, y)` and :math:`A = [1 - \zeta \div z_{t}]`, where :math:`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 :math:`h_{t}`. The influence of the terrain on any coordinate surface :math:`\zeta` can be influenced by the specification of :math:`h_{s} (x, y, \zeta)`. Specifically, :math:`h_{s}` can be set such that :math:`h_{s} (x, y, 0) = h(x, y)` (i.e. terrain following at the surface), and progressively filtered fields of :math:`h(x, y)` can be used at :math:`\zeta > 0` in :math:`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 :ref:`Figure C.4`. On the MPAS-A mesh C-grid staggering, the state variables :math:`u`, :math:`\rho`, :math:`\theta` and scalars are located halfway between :math:`\omega` levels in both physical height and in the coordinate :math:`\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 :ref:`Table C.4` and depicted in :ref:`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 ---------- .. figure:: ./../../images/ug/variablePosition.png :align: center :width: 600 Figure C.1: Definition of elements used to build the MPAS grid. Also see :ref:`Table C.1`. | | .. _Figure C.2: Figure C.2 ---------- .. figure:: ./../../images/ug/gridConnectivity.png :align: center :width: 650 Figure C.2: Definition of element groups used to reference connections in the MPAS grid. Also see :ref:`Table C.3`. | | .. _Figure C.3: Figure C.3 ---------- .. figure:: ./../../images/ug/angleEdge.png :align: center :width: 500 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 ---------- .. figure:: ./../../images/ug/MPAS-A_vertical_mesh.png Figure C.4: Example MPAS-A vertical meshes using terrain following (left) and smoothed (right) vertical coordinates. | | .. _Figure C.5: Figure C.5 ---------- .. figure:: ./../../images/ug/vertical_coordinate_mpas_a.png :align: center :width: 300 Figure C.5: Vertical distribution of the variables in MPAS-A. Also see :ref:`Table C.4`. | | | Tables ====== | .. _Table C.1: Table C.1 --------- **Table C.1: Definition of elements used to build the MPAS grid** .. csv-table:: :header: Element, Type, Definition :math:`x_{i}`, point, location of center of primal-mesh cells :math:`x_{v}`, point, location of center of dual-mesh cells :math:`x_{e}`, point, location of edge points where velocity is defined :math:`d_{e}`, line segment, distance between neighboring :math:`x_{i}` locations :math:`l_{e}`, line segment, distance between neighboring :math:`x_{v}` locations :math:`P_{i}`, cell, a cell on the primal-mesh :math:`D_{v}`, cell, a cell on the dual-mesh | Given a wind vector (:math:`u_{\perp}` , :math:`u_{\parallel}`) defined in term of components orthogonal to and parallel to the edge, the earth-relative wind :math:`(u, v)` may be recovered as | .. figure:: ./../../images/ug/angleEdge_equation.png :align: center :height: 100px :width: 300px where :math:`\alpha = angleEdge`. | | .. _Table C.2: Table C.2 --------- **Table C.2: Variable names used to describe an MPAS grid** .. csv-table:: :header: Element, Name, Size, Comment :escape: \ :math:`x_{i}`, :math:`{x\,y\,z}Cell`, :math:`nCells`, cartesian location of :math:`x_{i}` :math:`x_{i}`, :math:`{lon\,lat}Cell`, :math:`nCells`, longitude and latitude of :math:`x_{i}` :math:`x_{v}`, :math:`{x\,y\,z}Vertex`, :math:`nVertices`, cartesian location of :math:`x_{v}` :math:`x_{v}`, :math:`{lon\,lat}Vertex`, :math:`nVertices`, longitude and latitude of :math:`x_{v}` :math:`x_{e}`, :math:`{x\,y\,z}Edge`, :math:`nEdges`, cartesian location of :math:`x_{e}` :math:`x_{e}`, :math:`{lon\,lat}Edge`, nEdges, longitude and latitude of :math:`x_{e}` :math:`d_{e}`, :math:`dcEdge`, :math:`nEdges`, distance between :math:`x_{i}` locations :math:`l_{e}`, :math:`dvEdge`, :math:`nEdges`, distance between :math:`x_{v}` locations :math:`e \\in EC(i)`, :math:`edgesOnCell`, :math:`(nEdgesMax\,nCells)`, edges that define :math:`P_{i}` :math:`e \\in EV(v)`, :math:`edgesOnVertex`, :math:`(3\,nCells)`, edges that define :math:`D_{v}` :math:`i \\in CE(e)`, :math:`cellsOnEdge`, :math:`(2\,nEdges)`, primal-mesh cells that share edge :math:`e` :math:`i \\in CV(v)`, :math:`cellsOnVertex`, :math:`(3\,nVertices)`, primal-mesh cells that define :math:`D_{v}` :math:`v \\in VE(e)`, :math:`verticesOnEdge`, :math:`(2\,nEdges)`, dual-mesh cells that share edge :math:`e` :math:`v \\in VI(i)`, :math:`verticesOnCell`, :math:`(nEdgesMax\,nCells)`, vertices that define :math:`P_{i}` | | .. _Table C.3: Table C.3 --------- **Table C.3: Definition of element groups used to reference connections in the MPAS grid.** Examples are provided in :ref:`Figure C.2` .. csv-table:: :header: Syntax, Output :escape: \ :math:`e \\in EC(i)`, set of edges that define the boundary of :math:`P_{i}` :math:`e \\in EV(v)`, set of edges that define the boundary of :math:`D_{v}` :math:`i \\in CE(e)`, two primal-mesh cells that share edge :math:`e` :math:`i \\in CV(v)`, set of primal-mesh cells that form the vertices of dual mesh cell :math:`D_{v}` :math:`v \\in VE(e)`, the two dual-mesh cells that share edge :math:`e` :math:`v \\in VI(i)`, the set of dual-mesh cells that form the vertices of primal-mesh cell :math:`P_{i}` :math:`e \\in ECP(e)`, edges of cell pair meeting at edge :math:`e` :math:`e \\in ECV(v\,i)`, edge pair associated with vertex :math:`v` and mesh cell :math:`i` | | .. _Table C.4: Table C.4 --------- **Table C.4: Vertical coordinate variables in MPAS-Atmosphere.** |br| *level* is the integer model level (usually specified with index :math:`k` where :math:`k = 1` is the lowest model level and physical height increases with increasing :math:`k`). :math:`\Delta` denotes a vertical difference between levels, and cell is a given mesh cell on the primary mesh. .. csv-table:: :header: Variable, Definition :escape: \ :math:`zgrid(level\,cell)`, physical height of the :math:`\\omega` points in meters :math:`zw(level)`, :math:`\\zeta` at :math:`\\omega` levels :math:`zu(level)`, :math:`\\zeta` at :math:`u` levels; :math:`zu(k) = [z \\omega (k+1) + z \\omega (k)] \\div 2` :math:`dzw(level)`, :math:`\\Delta \\zeta` at :math:`u` levels; :math:`dz \\omega (k) = z \\omega (k+1) - z \\omega (k)` :math:`dzu(level)`, :math:`\\Delta \\zeta` at :math:`\\omega` levels; :math:`dzu(k) = [dz \\omega (k+1) + dz \\omega (k)] \\div 2` :math:`rdzw(level)`, :math:`1 \\div [dz \\omega ]` :math:`rdzu(level)`, :math:`1 \\div dzu` :math:`zz(level\,cell)`, :math:`\\Delta \\zeta \\div \\Delta z` at u levels; :math:`(z \\omega (k+1) - z \\omega (k)) \\div (zgrid(k+1\,cell) - zgrid(k\,cell))` :math:`fzm(level)`, weight for linear interpolation to :math:`\\omega (k)` point for :math:`u(k)` level variable :math:`fzp(level)`, weight for linear interpolation to :math:`\\omega (k)` point for :math:`u(k-1)` level variable | | | | .. rst-class:: horizbuttons-next-m * `Next: Appendix D: Description of Model Fields -> <./appD_fields.html>`_ |