2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
\section{Spatial discretization of the dynamical equations} |
\section{Spatial discretization of the dynamical equations} |
5 |
|
\begin{rawhtml} |
6 |
|
<!-- CMIREDIR:spatial_discretization_of_dyn_eq: --> |
7 |
|
\end{rawhtml} |
8 |
|
|
9 |
Spatial discretization is carried out using the finite volume |
Spatial discretization is carried out using the finite volume |
10 |
method. This amounts to a grid-point method (namely second-order |
method. This amounts to a grid-point method (namely second-order |
17 |
|
|
18 |
|
|
19 |
\subsection{The finite volume method: finite volumes versus finite difference} |
\subsection{The finite volume method: finite volumes versus finite difference} |
20 |
|
\begin{rawhtml} |
21 |
|
<!-- CMIREDIR:finite_volume: --> |
22 |
|
\end{rawhtml} |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
The finite volume method is used to discretize the equations in |
The finite volume method is used to discretize the equations in |
27 |
space. The expression ``finite volume'' actually has two meanings; one |
space. The expression ``finite volume'' actually has two meanings; one |
65 |
interior of a fluid. Differences arise at boundaries where a boundary |
interior of a fluid. Differences arise at boundaries where a boundary |
66 |
is not positioned on a regular or smoothly varying grid. This method |
is not positioned on a regular or smoothly varying grid. This method |
67 |
is used to represent the topography using lopped cell, see |
is used to represent the topography using lopped cell, see |
68 |
\cite{Adcroft98}. Subtle difference also appear in more than one |
\cite{adcroft:97}. Subtle difference also appear in more than one |
69 |
dimension away from boundaries. This happens because the each |
dimension away from boundaries. This happens because the each |
70 |
direction is discretized independently in the finite difference method |
direction is discretized independently in the finite difference method |
71 |
while the integrating over finite volume implicitly treats all |
while the integrating over finite volume implicitly treats all |
72 |
directions simultaneously. Illustration of this is given in |
directions simultaneously. Illustration of this is given in |
73 |
\cite{Adcroft02}. |
\cite{ac:02}. |
74 |
|
|
75 |
\subsection{C grid staggering of variables} |
\subsection{C grid staggering of variables} |
76 |
|
|
87 |
The basic algorithm employed for stepping forward the momentum |
The basic algorithm employed for stepping forward the momentum |
88 |
equations is based on retaining non-divergence of the flow at all |
equations is based on retaining non-divergence of the flow at all |
89 |
times. This is most naturally done if the components of flow are |
times. This is most naturally done if the components of flow are |
90 |
staggered in space in the form of an Arakawa C grid \cite{Arakawa70}. |
staggered in space in the form of an Arakawa C grid \cite{arakawa:77}. |
91 |
|
|
92 |
Fig. \ref{fig:cgrid3d} shows the components of flow ($u$,$v$,$w$) |
Fig. \ref{fig:cgrid3d} shows the components of flow ($u$,$v$,$w$) |
93 |
staggered in space such that the zonal component falls on the |
staggered in space such that the zonal component falls on the |
150 |
The model domain is decomposed into tiles and within each tile a |
The model domain is decomposed into tiles and within each tile a |
151 |
quasi-regular grid is used. A tile is the basic unit of domain |
quasi-regular grid is used. A tile is the basic unit of domain |
152 |
decomposition for parallelization but may be used whether parallelized |
decomposition for parallelization but may be used whether parallelized |
153 |
or not; see section \ref{sect:tiles} for more details. Although the |
or not; see section \ref{sect:domain_decomposition} for more details. |
154 |
tiles may be patched together in an unstructured manner |
Although the tiles may be patched together in an unstructured manner |
155 |
(i.e. irregular or non-tessilating pattern), the interior of tiles is |
(i.e. irregular or non-tessilating pattern), the interior of tiles is |
156 |
a structured grid of quadrilateral cells. The horizontal coordinate |
a structured grid of quadrilateral cells. The horizontal coordinate |
157 |
system is orthogonal curvilinear meaning we can not necessarily treat |
system is orthogonal curvilinear meaning we can not necessarily treat |
369 |
|
|
370 |
The above grid (Fig.~\ref{fig:vgrid}a) is known as the cell centered |
The above grid (Fig.~\ref{fig:vgrid}a) is known as the cell centered |
371 |
approach because the tracer points are at cell centers; the cell |
approach because the tracer points are at cell centers; the cell |
372 |
centers are mid-way between the cell interfaces. An alternative, the |
centers are mid-way between the cell interfaces. |
373 |
vertex or interface centered approach, is shown in |
This discretization is selected when the thickness of the |
374 |
|
levels are provided ({\bf delR}, parameter file {\em data}, |
375 |
|
namelist {\em PARM04}) |
376 |
|
An alternative, the vertex or interface centered approach, is shown in |
377 |
Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned |
Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned |
378 |
mid-way between the tracer nodes (no longer cell centers). This |
mid-way between the tracer nodes (no longer cell centers). This |
379 |
approach is formally more accurate for evaluation of hydrostatic |
approach is formally more accurate for evaluation of hydrostatic |
380 |
pressure and vertical advection but historically the cell centered |
pressure and vertical advection but historically the cell centered |
381 |
approach has been used. An alternative form of subroutine {\em |
approach has been used. An alternative form of subroutine {\em |
382 |
INI\_VERTICAL\_GRID} is used to select the interface centered approach |
INI\_VERTICAL\_GRID} is used to select the interface centered approach |
383 |
but no run time option is currently available. |
This form requires to specify $Nr+1$ vertical distances {\bf delRc} |
384 |
|
(parameter file {\em data}, namelist {\em PARM04}, e.g. |
385 |
|
{\em verification/ideal\_2D\_oce/input/data}) |
386 |
|
corresponding to surface to center, $Nr-1$ center to center, and center to |
387 |
|
bottom distances. |
388 |
|
%but no run time option is currently available. |
389 |
|
|
390 |
\fbox{ \begin{minipage}{4.75in} |
\fbox{ \begin{minipage}{4.75in} |
391 |
{\em S/R INI\_VERTICAL\_GRID} ({\em |
{\em S/R INI\_VERTICAL\_GRID} ({\em |
403 |
|
|
404 |
|
|
405 |
\subsection{Topography: partially filled cells} |
\subsection{Topography: partially filled cells} |
406 |
|
\begin{rawhtml} |
407 |
|
<!-- CMIREDIR:topo_partial_cells: --> |
408 |
|
\end{rawhtml} |
409 |
|
|
410 |
\begin{figure} |
\begin{figure} |
411 |
\begin{center} |
\begin{center} |
419 |
\label{fig:hfacs} |
\label{fig:hfacs} |
420 |
\end{figure} |
\end{figure} |
421 |
|
|
422 |
\cite{Adcroft97} presented two alternatives to the step-wise finite |
\cite{adcroft:97} presented two alternatives to the step-wise finite |
423 |
difference representation of topography. The method is known to the |
difference representation of topography. The method is known to the |
424 |
engineering community as {\em intersecting boundary method}. It |
engineering community as {\em intersecting boundary method}. It |
425 |
involves allowing the boundary to intersect a grid of cells thereby |
involves allowing the boundary to intersect a grid of cells thereby |
476 |
|
|
477 |
|
|
478 |
\section{Continuity and horizontal pressure gradient terms} |
\section{Continuity and horizontal pressure gradient terms} |
479 |
|
\begin{rawhtml} |
480 |
|
<!-- CMIREDIR:continuity_and_horizontal_pressure: --> |
481 |
|
\end{rawhtml} |
482 |
|
|
483 |
|
|
484 |
The core algorithm is based on the ``C grid'' discretization of the |
The core algorithm is based on the ``C grid'' discretization of the |
485 |
continuity equation which can be summarized as: |
continuity equation which can be summarized as: |
494 |
\end{eqnarray} |
\end{eqnarray} |
495 |
where the continuity equation has been most naturally discretized by |
where the continuity equation has been most naturally discretized by |
496 |
staggering the three components of velocity as shown in |
staggering the three components of velocity as shown in |
497 |
Fig.~\ref{fig-cgrid3d}. The grid lengths $\Delta x_c$ and $\Delta y_c$ |
Fig.~\ref{fig:cgrid3d}. The grid lengths $\Delta x_c$ and $\Delta y_c$ |
498 |
are the lengths between tracer points (cell centers). The grid lengths |
are the lengths between tracer points (cell centers). The grid lengths |
499 |
$\Delta x_g$, $\Delta y_g$ are the grid lengths between cell |
$\Delta x_g$, $\Delta y_g$ are the grid lengths between cell |
500 |
corners. $\Delta r_f$ and $\Delta r_c$ are the distance (in units of |
corners. $\Delta r_f$ and $\Delta r_c$ are the distance (in units of |
518 |
evaporation and only enters the top-level of the {\em ocean} model. |
evaporation and only enters the top-level of the {\em ocean} model. |
519 |
|
|
520 |
\section{Hydrostatic balance} |
\section{Hydrostatic balance} |
521 |
|
\begin{rawhtml} |
522 |
|
<!-- CMIREDIR:hydrostatic_balance: --> |
523 |
|
\end{rawhtml} |
524 |
|
|
525 |
The vertical momentum equation has the hydrostatic or |
The vertical momentum equation has the hydrostatic or |
526 |
quasi-hydrostatic balance on the right hand side. This discretization |
quasi-hydrostatic balance on the right hand side. This discretization |
550 |
The difference in approach between ocean and atmosphere occurs because |
The difference in approach between ocean and atmosphere occurs because |
551 |
of the direct use of the ideal gas equation in forming the potential |
of the direct use of the ideal gas equation in forming the potential |
552 |
energy conversion term $\alpha \omega$. The form of these conversion |
energy conversion term $\alpha \omega$. The form of these conversion |
553 |
terms is discussed at length in \cite{Adcroft01}. |
terms is discussed at length in \cite{adcroft:02}. |
554 |
|
|
555 |
Because of the different representation of hydrostatic balance between |
Because of the different representation of hydrostatic balance between |
556 |
ocean and atmosphere there is no elegant way to represent both systems |
ocean and atmosphere there is no elegant way to represent both systems |