8 |
centered finite difference) in the fluid interior but allows |
centered finite difference) in the fluid interior but allows |
9 |
boundaries to intersect a regular grid allowing a more accurate |
boundaries to intersect a regular grid allowing a more accurate |
10 |
representation of the position of the boundary. We treat the |
representation of the position of the boundary. We treat the |
11 |
horizontal and veritical directions as seperable and thus slightly |
horizontal and veritical directions as seperable and differently. |
|
differently. |
|
12 |
|
|
13 |
Initialization of grid data is controlled by subroutine {\em |
\input{part2/notation} |
|
INI\_GRID} which in calls {\em INI\_VERTICAL\_GRID} to initialize the |
|
|
vertical grid, and then either of {\em INI\_CARTESIAN\_GRID}, {\em |
|
|
INI\_SPHERICAL\_POLAR\_GRID} or {\em INI\_CURV\-ILINEAR\_GRID} to |
|
|
initialize the horizontal grid for cartesian, spherical-polar or |
|
|
curvilinear coordinates respectively. |
|
|
|
|
|
The reciprocals of all grid quantities are pre-calculated and this is |
|
|
done in subroutine {\em INI\_MASKS\_ETC} which is called later by |
|
|
subroutine {\em INITIALIZE\_FIXED}. |
|
|
|
|
|
All grid descriptors are global arrays and stored in common blocks in |
|
|
{\em GRID.h} and a generally declared as {\em \_RS}. |
|
|
|
|
|
\fbox{ \begin{minipage}{4.75in} |
|
|
{\em S/R INI\_GRID} ({\em model/src/ini\_grid.F}) |
|
|
|
|
|
{\em S/R INI\_MASKS\_ETC} ({\em model/src/ini\_masks\_etc.F}) |
|
|
|
|
|
grid data: ({\em model/inc/GRID.h}) |
|
|
\end{minipage} } |
|
14 |
|
|
15 |
|
|
16 |
\subsection{The finite volume method: finite volumes versus finite difference} |
\subsection{The finite volume method: finite volumes versus finite difference} |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
\subsection{Grid initialization and data} |
91 |
|
|
92 |
|
Initialization of grid data is controlled by subroutine {\em |
93 |
|
INI\_GRID} which in calls {\em INI\_VERTICAL\_GRID} to initialize the |
94 |
|
vertical grid, and then either of {\em INI\_CARTESIAN\_GRID}, {\em |
95 |
|
INI\_SPHERICAL\_POLAR\_GRID} or {\em INI\_CURV\-ILINEAR\_GRID} to |
96 |
|
initialize the horizontal grid for cartesian, spherical-polar or |
97 |
|
curvilinear coordinates respectively. |
98 |
|
|
99 |
|
The reciprocals of all grid quantities are pre-calculated and this is |
100 |
|
done in subroutine {\em INI\_MASKS\_ETC} which is called later by |
101 |
|
subroutine {\em INITIALIZE\_FIXED}. |
102 |
|
|
103 |
|
All grid descriptors are global arrays and stored in common blocks in |
104 |
|
{\em GRID.h} and a generally declared as {\em \_RS}. |
105 |
|
|
106 |
|
\fbox{ \begin{minipage}{4.75in} |
107 |
|
{\em S/R INI\_GRID} ({\em model/src/ini\_grid.F}) |
108 |
|
|
109 |
|
{\em S/R INI\_MASKS\_ETC} ({\em model/src/ini\_masks\_etc.F}) |
110 |
|
|
111 |
|
grid data: ({\em model/inc/GRID.h}) |
112 |
|
\end{minipage} } |
113 |
|
|
114 |
|
|
115 |
\subsection{Horizontal grid} |
\subsection{Horizontal grid} |
116 |
|
|
449 |
\end{minipage} } |
\end{minipage} } |
450 |
|
|
451 |
|
|
452 |
\subsection{Continuity and horizontal pressure gradient terms} |
\section{Continuity and horizontal pressure gradient terms} |
453 |
|
|
454 |
The core algorithm is based on the ``C grid'' discretization of the |
The core algorithm is based on the ``C grid'' discretization of the |
455 |
continuity equation which can be summarized as: |
continuity equation which can be summarized as: |
486 |
addition of volume due to excess precipitation and run-off over |
addition of volume due to excess precipitation and run-off over |
487 |
evaporation and only enters the top-level of the {\em ocean} model. |
evaporation and only enters the top-level of the {\em ocean} model. |
488 |
|
|
489 |
\subsection{Hydrostatic balance} |
\section{Hydrostatic balance} |
490 |
|
|
491 |
The vertical momentum equation has the hydrostatic or |
The vertical momentum equation has the hydrostatic or |
492 |
quasi-hydrostatic balance on the right hand side. This discretization |
quasi-hydrostatic balance on the right hand side. This discretization |