\hypertarget{Discrete_Grids_horizontal_grids}{}\section{Horizontal grids}\label{Discrete_Grids_horizontal_grids}
The placement of model variables on the horizontal C-\/grid is illustrated here\+:


\begin{DoxyImage}
\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{Arakawa_C_grid.png}
\doxyfigcaption{M\+O\+M6 uses an Arakawa C grid staggering of variables with a North-\/\+East indexing convention.}
\end{DoxyImage}


Scalars are located at the $h$-\/points, velocities are staggered such that $u$-\/points and $v$-\/points are not co-\/located, and vorticities are located at $q$-\/points. The indexing for points ( $i,j$) in the logically-\/rectangular domain is such that $i$ increases in the $x$ direction (eastward for spherical polar coordinates), and $j$ increases in the $y$ direction (northward for spherical polar coordinates). A $q$-\/point with indices ( $i,j$) lies to the upper right (northeast) of the $h$-\/point with the same indices. The index for the vertical dimension $k$ increases with depth, although the vertical coordinate $z$, measured from the mean surface level $z = 0$, decreases with depth.

When the horizontal grid is generated, it is actually computed on the "supergrid" at twice the nominal resolution of the model. The grid file contains the grid metrics and the areas of this fine grid. The model then decomposes it into the four staggered grids, along with computing the grid metrics as shown here\+:

\begin{DoxyImage}
\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{Grid_metrics.png}
\doxyfigcaption{The grid metrics around both $h$-points and $q$-points.}
\end{DoxyImage}

The model carries both the metrics as well as their inverses, for instance, IdyT = 1/dyT. There are also the areas and the inverse areas for all four grid locations. areaT and area\+Bu are the sum of the four areas from the supergrid surrounding each h-\/point and each q-\/point, respectively. The velocity faces can be partially blocked and their areas are adjusted accordingly, where $dy\_Cu$ and $dx\_Cv$ are the blocked distances at $u$ and $v$ points, respectively.

\begin{eqnarray} \mbox{areaCu}_{i,j} &= dxCu_{i,j} * dy\_Cu_{i,j} \\ \mbox{areaCv}_{i,j} &= dx\_Cv_{i,j} * dyCv_{i,j} \\ \mbox{IareaCu}_{i,j} &= 1 / \mbox{areaCu}_{i,j} \\ \mbox{IareaCv}_{i,j} &= 1 / \mbox{areaCv}_{i,j} \end{eqnarray}

The horizontal grids can be spherical, tripole, regional, or cubed sphere. The default is for grids to be re-\/entrant in the $x$-\/direction; this needs to be turned off for regional grids.\hypertarget{Discrete_Grids_vertical_grids}{}\section{Vertical grids}\label{Discrete_Grids_vertical_grids}
The placement of model variables in the vertical is illustrated here\+:

\begin{DoxyImage}
\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{cell_3d.png}
\doxyfigcaption{The MOM6 interfaces are at vertical location $e$ which are separated by the layer thicknesses $h$.}
\end{DoxyImage}

The vertical coordinate is Lagrangian in that the interfaces between the layers are free to move up and down with time. The interfaces have target depths or target densities, depending on the desired vertical coordinate system. They can even have target sigma values for terrain-\/following coordinates or you can design a hybrid coordinate in which different interfaces have differing behavior. In any case, the interfaces move with the fluid during the dynamic timesteps and then get reset during a remapping operation. See section \hyperlink{ALE_Timestep}{A\+LE Timestep} for details. 