/[MITgcm]/manual/s_algorithm/text/spatial-discrete.tex
ViewVC logotype

Diff of /manual/s_algorithm/text/spatial-discrete.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by adcroft, Wed Aug 8 16:15:21 2001 UTC revision 1.2 by adcroft, Wed Aug 8 22:19:02 2001 UTC
# Line 3  Line 3 
3    
4  \section{Spatial discretization of the dynamical equations}  \section{Spatial discretization of the dynamical equations}
5    
6    Spatial discretization is carried out using the finite volume
7    method. This amounts to a grid-point method (namely second-order
8    centered finite difference) in the fluid interior but allows
9    boundaries to intersect a regular grid allowing a more accurate
10    representation of the position of the boundary. We treat the
11    horizontal and veritical directions as seperable and thus slightly
12    differently.
13    
14    Initialization of grid data is controlled by subroutine {\em
15    INI\_GRID} which in calls {\em INI\_VERTICAL\_GRID} to initialize the
16    vertical grid, and then either of {\em INI\_CARTESIAN\_GRID}, {\em
17    INI\_SPHERICAL\_POLAR\_GRID} or {\em INI\_CURV\-ILINEAR\_GRID} to
18    initialize the horizontal grid for cartesian, spherical-polar or
19    curvilinear coordinates respectively.
20    
21    The reciprocals of all grid quantities are pre-calculated and this is
22    done in subroutine {\em INI\_MASKS\_ETC} which is called later by
23    subroutine {\em INITIALIZE\_FIXED}.
24    
25    All grid descriptors are global arrays and stored in common blocks in
26    {\em GRID.h} and a generally declared as {\em \_RS}.
27    
28    \fbox{ \begin{minipage}{4.75in}
29    {\em S/R INI\_GRID} ({\em model/src/ini\_grid.F})
30    
31    {\em S/R INI\_MASKS\_ETC} ({\em model/src/ini\_masks\_etc.F})
32    
33    grid data: ({\em model/inc/GRID.h})
34    \end{minipage} }
35    
36    
37    \subsection{The finite volume method: finite volumes versus finite difference}
38    
39    The finite volume method is used to discretize the equations in
40    space. The expression ``finite volume'' actually has two meanings; one
41    involves invocation of the weak formulation (e.g. integral
42    formulation) and the other involves non-linear expressions for
43    interpolation of data (e.g. flux limiters). We use both but they can
44    and will be ddiscussed seperately. The finite volume method discretizes by invoking the weak formulation of the equations or integral form. For example, the 1-D advection-diffusion equation:
45    \begin{displaymath}
46    \partial_t \theta + \partial_x ( u \theta - \kappa \partial_x \theta ) = 0
47    \end{displaymath}
48    can be discretized by integrating of finite lengths $\Delta x$:
49    \begin{displaymath}
50    \Delta x \partial_t \theta + \delta_i ( F ) = 0
51    \end{displaymath}
52    is exact but where the flux
53    \begin{displaymath}
54    F = u \overline{\theta} - \frac{\kappa}{\Delta x_c} \partial_i \theta
55    \end{displaymath}
56    is approximate. The method for obtained $\overline{\theta}$ is
57    unspecified and non-lienar finite volume methods can be invoked.
58    
59    ....  INCOMPLETE
60    
61  \subsection{C grid staggering of variables}  \subsection{C grid staggering of variables}
62    
63  \begin{figure}  \begin{figure}
64  \centerline{ \resizebox{!}{2in}{ \includegraphics{part2/cgrid3d.eps}} }  \centerline{ \resizebox{!}{2in}{ \includegraphics{part2/cgrid3d.eps}} }
 \label{fig-cgrid3d}  
65  \caption{Three dimensional staggering of velocity components. This  \caption{Three dimensional staggering of velocity components. This
66  facilitates the natural discretization of the continuity and tracer  facilitates the natural discretization of the continuity and tracer
67  equations. }  equations. }
68    \label{fig:cgrid3d}
69  \end{figure}  \end{figure}
70    
71    The basic algorithm employed for stepping forward the momentum
72    equations is based on retaining non-divergence of the flow at all
73    times. This is most naturally done if the components of flow are
74    staggered in space in the form of an Arakawa C grid \cite{Arakawa70}.
75    
76    Fig. \ref{fig:cgrid3d} shows the components of flow ($u$,$v$,$w$)
77    staggered in space such that the zonal component falls on the
78    interface between continiuty cells in the zonal direction. Similarly
79    for the meridional and vertical directions.  The continiuty cell is
80    synonymous with tracer cells (they are one and the same).
81    
82    
83    
84    
85  \subsection{Horizontal grid}  \subsection{Horizontal grid}
86    
87  \begin{figure}  \begin{figure}
88  \centerline{ \begin{tabular}{cc}  \centerline{ \begin{tabular}{cc}
89    \resizebox{!}{2in}{ \includegraphics{part2/hgrid-Ac.eps}}    \raisebox{1.5in}{a)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Ac.eps}}
90  & \resizebox{!}{2in}{ \includegraphics{part2/hgrid-Az.eps}}  & \raisebox{1.5in}{b)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Az.eps}}
91  \\  \\
92    \resizebox{!}{2in}{ \includegraphics{part2/hgrid-Au.eps}}    \raisebox{1.5in}{c)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Au.eps}}
93  & \resizebox{!}{2in}{ \includegraphics{part2/hgrid-Av.eps}}  & \raisebox{1.5in}{d)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Av.eps}}
94  \end{tabular} }  \end{tabular} }
95  \label{fig-hgrid}  \caption{
96  \caption{Three dimensional staggering of velocity components. This  Staggering of horizontal grid descriptors (lengths and areas). The
97  facilitates the natural discretization of the continuity and tracer  grid lines indicate the tracer cell boundaries and are the reference
98  equations. }  grid for all panels. a) The area of a tracer cell, $A_c$, is bordered
99    by the lengths $\Delta x_g$ and $\Delta y_g$. b) The area of a
100    vorticity cell, $A_\zeta$, is bordered by the lengths $\Delta x_c$ and
101    $\Delta y_c$. c) The area of a u cell, $A_c$, is bordered by the
102    lengths $\Delta x_v$ and $\Delta y_f$. d) The area of a v cell, $A_c$,
103    is bordered by the lengths $\Delta x_f$ and $\Delta y_u$.}
104    \label{fig:hgrid}
105  \end{figure}  \end{figure}
106    
107    The model domain is decomposed into tiles and within each tile a
108    quasi-regular grid is used. A tile is the basic unit of domain
109    decomposition for parallelization but may be used whether parallized
110    or not; see section \ref{sect:tiles} for more details. Although the
111    tiles may be patched together in an unstructured manner
112    (i.e. irregular or non-tessilating pattern), the interior of tiles is
113    a structered grid of quadrilateral cells. The horizontal coordinate
114    system is orthogonal curvilinear meaning we can not necessarily treat
115    the two horizontal directions as seperable. Instead, each cell in the
116    horizontal grid is described by the length of it's sides and it's
117    area.
118    
119    The grid information is quite general and describes any of the
120    available coordinates systems, cartesian, spherical-polar or
121    curvilinear. All that is necessary to distinguish between the
122    coordinate systems is to initialize the grid data (discriptors)
123    appropriately.
124    
125    \marginpar{Caution!}
126    In the following, we refer to the orientation of quantities on the
127    computational grid using geographic terminology such as points of the
128    compass. This is purely for convenience but should note be confused
129    with the actual geographic orientation of model quantities.
130    
131    \marginpar{$A_c$: {\bf rAc}}
132    \marginpar{$\Delta x_g$: {\bf DXg}}
133    \marginpar{$\Delta y_g$: {\bf DYg}}
134    Fig.~\ref{fig:hgrid}a shows the tracer cell (synonymous with the
135    continuity cell). The length of the southern edge, $\Delta x_g$,
136    western edge, $\Delta y_g$ and surface area, $A_c$, presented in the
137    vertical are stored in arrays {\bf DXg}, {\bf DYg} and {\bf rAc}. The
138    ``g'' suffix indicates that the lengths are along the defining grid
139    boundaries. The ``c'' suffix associates the quantity with the cell
140    centers. The quantities are staggered in space and the indexing is
141    such that {\bf DXg(i,j)} is positioned to the south of {\bf rAc(i,j)}
142    and {\bf DYg(i,j)} positioned to the west.
143    
144    \marginpar{$A_\zeta$: {\bf rAz}}
145    \marginpar{$\Delta x_c$: {\bf DXc}}
146    \marginpar{$\Delta y_c$: {\bf DYc}}
147    Fig.~\ref{fig:hgrid}b shows the vorticity cell. The length of the
148    southern edge, $\Delta x_c$, western edge, $\Delta y_c$ and surface
149    area, $A_\zeta$, presented in the vertical are stored in arrays {\bf
150    DXg}, {\bf DYg} and {\bf rAz}.  The ``z'' suffix indicates that the
151    lengths are measured between the cell centers and the ``$\zeta$'' suffix
152    associates points with the vorticity points. The quantities are
153    staggered in space and the indexing is such that {\bf DXc(i,j)} is
154    positioned to the north of {\bf rAc(i,j)} and {\bf DYc(i,j)} positioned
155    to the east.
156    
157    \marginpar{$A_w$: {\bf rAw}}
158    \marginpar{$\Delta x_v$: {\bf DXv}}
159    \marginpar{$\Delta y_f$: {\bf DYf}}
160    Fig.~\ref{fig:hgrid}c shows the ``u'' or western (w) cell. The length of
161    the southern edge, $\Delta x_v$, eastern edge, $\Delta y_f$ and
162    surface area, $A_w$, presented in the vertical are stored in arrays
163    {\bf DXv}, {\bf DYf} and {\bf rAw}.  The ``v'' suffix indicates that
164    the length is measured between the v-points, the ``f'' suffix
165    indicates that the length is measured between the (tracer) cell faces
166    and the ``w'' suffix associates points with the u-points (w stands for
167    west). The quantities are staggered in space and the indexing is such
168    that {\bf DXv(i,j)} is positioned to the south of {\bf rAw(i,j)} and
169    {\bf DYf(i,j)} positioned to the east.
170    
171    \marginpar{$A_s$: {\bf rAs}}
172    \marginpar{$\Delta x_f$: {\bf DXf}}
173    \marginpar{$\Delta y_u$: {\bf DYu}}
174    Fig.~\ref{fig:hgrid}d shows the ``v'' or southern (s) cell. The length of
175    the northern edge, $\Delta x_f$, western edge, $\Delta y_u$ and
176    surface area, $A_s$, presented in the vertical are stored in arrays
177    {\bf DXf}, {\bf DYu} and {\bf rAs}.  The ``u'' suffix indicates that
178    the length is measured between the u-points, the ``f'' suffix
179    indicates that the length is measured between the (tracer) cell faces
180    and the ``s'' suffix associates points with the v-points (s stands for
181    south). The quantities are staggered in space and the indexing is such
182    that {\bf DXf(i,j)} is positioned to the north of {\bf rAs(i,j)} and
183    {\bf DYu(i,j)} positioned to the west.
184    
185    \fbox{ \begin{minipage}{4.75in}
186    {\em S/R INI\_CARTESIAN\_GRID} ({\em
187    model/src/ini\_cartesian\_grid.F})
188    
189    {\em S/R INI\_SPHERICAL\_POLAR\_GRID} ({\em
190    model/src/ini\_spherical\_polar\_grid.F})
191    
192    {\em S/R INI\_CURVILINEAR\_GRID} ({\em
193    model/src/ini\_curvilinear\_grid.F})
194    
195    $A_c$, $A_\zeta$, $A_w$, $A_s$: {\bf rAc}, {\bf rAz}, {\bf rAw}, {\bf rAs}
196    ({\em GRID.h})
197    
198    $\Delta x_g$, $\Delta y_g$: {\bf DXg}, {\bf DYg} ({\em GRID.h})
199    
200    $\Delta x_c$, $\Delta y_c$: {\bf DXc}, {\bf DYc} ({\em GRID.h})
201    
202    $\Delta x_f$, $\Delta y_f$: {\bf DXf}, {\bf DYf} ({\em GRID.h})
203    
204    $\Delta x_v$, $\Delta y_u$: {\bf DXv}, {\bf DYu} ({\em GRID.h})
205    
206    \end{minipage} }
207    
208    \subsubsection{Reciprocals of horizontal grid descriptors}
209    
210    %\marginpar{$A_c^{-1}$: {\bf RECIP\_rAc}}
211    %\marginpar{$A_\zeta^{-1}$: {\bf RECIP\_rAz}}
212    %\marginpar{$A_w^{-1}$: {\bf RECIP\_rAw}}
213    %\marginpar{$A_s^{-1}$: {\bf RECIP\_rAs}}
214    Lengths and areas appear in the denominator of expressions as much as
215    in the numerator. For efficiency and portability, we pre-calculate the
216    reciprocal of the horizontal grid quantities so that in-line divisions
217    can be avoided.
218    
219    %\marginpar{$\Delta x_g^{-1}$: {\bf RECIP\_DXg}}
220    %\marginpar{$\Delta y_g^{-1}$: {\bf RECIP\_DYg}}
221    %\marginpar{$\Delta x_c^{-1}$: {\bf RECIP\_DXc}}
222    %\marginpar{$\Delta y_c^{-1}$: {\bf RECIP\_DYc}}
223    %\marginpar{$\Delta x_f^{-1}$: {\bf RECIP\_DXf}}
224    %\marginpar{$\Delta y_f^{-1}$: {\bf RECIP\_DYf}}
225    %\marginpar{$\Delta x_v^{-1}$: {\bf RECIP\_DXv}}
226    %\marginpar{$\Delta y_u^{-1}$: {\bf RECIP\_DYu}}
227    For each grid descriptor (array) there is a reciprocal named using the
228    prefix {\bf RECIP\_}. This doubles the amount of storage in {\em
229    GRID.h} but they are all only 2-D descriptors.
230    
231    \fbox{ \begin{minipage}{4.75in}
232    {\em S/R INI\_MASKS\_ETC} ({\em
233    model/src/ini\_masks\_etc.F})
234    
235    $A_c^{-1}$: {\bf RECIP\_Ac} ({\em GRID.h})
236    
237    $A_\zeta^{-1}$: {\bf RECIP\_Az} ({\em GRID.h})
238    
239    $A_w^{-1}$: {\bf RECIP\_Aw} ({\em GRID.h})
240    
241    $A_s^{-1}$: {\bf RECIP\_As} ({\em GRID.h})
242    
243    $\Delta x_g^{-1}$, $\Delta y_g^{-1}$: {\bf RECIP\_DXg}, {\bf RECIP\_DYg} ({\em GRID.h})
244    
245    $\Delta x_c^{-1}$, $\Delta y_c^{-1}$: {\bf RECIP\_DXc}, {\bf RECIP\_DYc} ({\em GRID.h})
246    
247    $\Delta x_f^{-1}$, $\Delta y_f^{-1}$: {\bf RECIP\_DXf}, {\bf RECIP\_DYf} ({\em GRID.h})
248    
249    $\Delta x_v^{-1}$, $\Delta y_u^{-1}$: {\bf RECIP\_DXv}, {\bf RECIP\_DYu} ({\em GRID.h})
250    
251    \end{minipage} }
252    
253    \subsubsection{Cartesian coordinates}
254    
255    Cartesian coordinates are selected when the logical flag {\bf
256    using\-Cartes\-ianGrid} in namelist {\em PARM04} is set to true. The grid
257    spacing can be set to uniform via scalars {\bf dXspacing} and {\bf
258    dYspacing} in namelist {\em PARM04} or to variable resolution by the
259    vectors {\bf DELX} and {\bf DELY}. Units are normally
260    meters. Non-dimensional coordinates can be used by interpretting the
261    gravitational constant as the Rayleigh number.
262    
263    \subsubsection{Spherical-polar coordinates}
264    
265    Spherical coordinates are selected when the logical flag {\bf
266    using\-Spherical\-PolarGrid} in namelist {\em PARM04} is set to true. The
267    grid spacing can be set to uniform via scalars {\bf dXspacing} and
268    {\bf dYspacing} in namelist {\em PARM04} or to variable resolution by
269    the vectors {\bf DELX} and {\bf DELY}. Units of these namelist
270    variables are alway degrees. The horizontal grid descriptors are
271    calculated from these namelist variables have units of meters.
272    
273    \subsubsection{Curvilinear coordinates}
274    
275    Curvilinear coordinates are selected when the logical flag {\bf
276    using\-Curvil\-inear\-Grid} in namelist {\em PARM04} is set to true. The
277    grid spacing can not be set via the namelist. Instead, the grid
278    descriptors are read from data files, one for each descriptor. As for
279    other grids, the horizontal grid descriptors have units of meters.
280    
281    
282  \subsection{Vertical grid}  \subsection{Vertical grid}
283    
284  \begin{figure}  \begin{figure}
285  \centerline{ \begin{tabular}{cc}  \centerline{ \begin{tabular}{cc}
286    \raisebox{4in}{a)}    \raisebox{4in}{a)} \resizebox{!}{4in}{
287    \resizebox{!}{4in}{ \includegraphics{part2/vgrid-cellcentered.eps}}    \includegraphics{part2/vgrid-cellcentered.eps}} & \raisebox{4in}{b)}
288  &    \resizebox{!}{4in}{ \includegraphics{part2/vgrid-accurate.eps}}
  \raisebox{4in}{b)}  
  \resizebox{!}{4in}{ \includegraphics{part2/vgrid-accurate.eps}}  
289  \end{tabular} }  \end{tabular} }
 \label{fig-vgrid}  
290  \caption{Two versions of the vertical grid. a) The cell centered  \caption{Two versions of the vertical grid. a) The cell centered
291  approach where the interface depths are specified and the tracer  approach where the interface depths are specified and the tracer
292  points centered in between the interfaces. b) The interface centered  points centered in between the interfaces. b) The interface centered
293  approach where tracer levels are specified and the w-interfaces are  approach where tracer levels are specified and the w-interfaces are
294  centered in between.}  centered in between.}
295    \label{fig:vgrid}
296  \end{figure}  \end{figure}
297    
298    As for the horizontal grid, we use the suffixes ``c'' and ``f'' to
299    indicates faces and centers. Fig.~\ref{fig:vgrid}a shows the default
300    vertical grid used by the model.
301    \marginpar{$\Delta r_f$: {\bf DRf}}
302    \marginpar{$\Delta r_c$: {\bf DRc}}
303    $\Delta r_f$ is the difference in $r$
304    (vertical coordinate) between the faces (i.e. $\Delta r_f \equiv -
305    \delta_k r$ where the minus sign appears due to the convention that the
306    surface layer has index $k=1$.).
307    
308    The vertical grid is calculated in subroutine {\em
309    INI\_VERTICAL\_GRID} and specified via the vector {\bf DELR} in
310    namelist {\em PARM04}. The units of ``r'' are either meters or Pascals
311    depending on the isomorphism being used which in turn is dependent
312    only on the choise of equation of state.
313    
314    There are alternative namelist vectors {\bf DELZ} and {\bf DELP} which
315    dictate whether z- or
316    \marginpar{Caution!}
317    p- coordinates are to be used but we intend to
318    phase this out since they are redundant.
319    
320    The reciprocals $\Delta r_f^{-1}$ and $\Delta r_c^{-1}$ are
321    pre-calculated (also in subroutine {\em INI\_VERTICAL\_GRID}). All
322    vertical grid descriptors are stored in common blocks in {\em GRID.h}.
323    
324    The above grid (Fig.~\ref{fig:vgrid}a) is known as the cell centered
325    approach because the tracer points are at cell centers; the cell
326    centers are mid-way between the cell interfaces. An alternative, the
327    vertex or interface centered approach, is shown in
328    Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned
329    mid-way between the tracer nodes (no longer cell centers). This
330    approach is formally more accurate for evaluation of hydrostatic
331    pressure and vertical advection but historically the cell centered
332    approach has been used. An alternative form of subroutine {\em
333    INI\_VERTICAL\_GRID} is used to select the interface centered approach
334    but no run time option is currently available.
335    
336    \fbox{ \begin{minipage}{4.75in}
337    {\em S/R INI\_VERTICAL\_GRID} ({\em
338    model/src/ini\_vertical\_grid.F})
339    
340    $\Delta r_f$: {\bf DRf} ({\em GRID.h})
341    
342    $\Delta r_c$: {\bf DRc} ({\em GRID.h})
343    
344    $\Delta r_f^{-1}$: {\bf RECIP\_DRf} ({\em GRID.h})
345    
346    $\Delta r_c^{-1}$: {\bf RECIP\_DRc} ({\em GRID.h})
347    
348    \end{minipage} }
349    
350    
351  \subsection{Continuity and horizontal pressure gradient terms}  \subsection{Continuity and horizontal pressure gradient terms}
352    
# Line 59  continuity equation which can be summari Line 359  continuity equation which can be summari
359  \delta_i \Delta y_g \Delta r_f h_w u +  \delta_i \Delta y_g \Delta r_f h_w u +
360  \delta_j \Delta x_g \Delta r_f h_s v +  \delta_j \Delta x_g \Delta r_f h_s v +
361  \delta_k {\cal A}_c w & = & {\cal A}_c \delta_k (P-E)_{r=0}  \delta_k {\cal A}_c w & = & {\cal A}_c \delta_k (P-E)_{r=0}
362    \label{eq:discrete-continuity}
363  \end{eqnarray}  \end{eqnarray}
364  where the continuity equation has been most naturally discretized by  where the continuity equation has been most naturally discretized by
365  staggering the three components of velocity as shown in  staggering the three components of velocity as shown in
# Line 154  These terms are calculated in routines c Line 455  These terms are calculated in routines c
455  CALC\_MOM\_RHS} a collected into the global arrays {\bf Gu}, {\bf Gv},  CALC\_MOM\_RHS} a collected into the global arrays {\bf Gu}, {\bf Gv},
456  and {\bf Gw}.  and {\bf Gw}.
457    
458  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
459  {\em S/R CALC\_MOM\_RHS} ({\em pkg/mom\_fluxform/calc\_mom\_rhs.F})  {\em S/R CALC\_MOM\_RHS} ({\em pkg/mom\_fluxform/calc\_mom\_rhs.F})
460    
461  $G_u$: {\bf Gu} ({\em DYNVARS.h})  $G_u$: {\bf Gu} ({\em DYNVARS.h})
# Line 199  conservation of second moments, derived Line 500  conservation of second moments, derived
500  $u^2$ and $v^2$ and $w^2$ so that advection of momentum correctly  $u^2$ and $v^2$ and $w^2$ so that advection of momentum correctly
501  conserves kinetic energy.  conserves kinetic energy.
502    
503  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
504  {\em S/R MOM\_U\_ADV\_UU} ({\em mom\_u\_adv\_uu.F})  {\em S/R MOM\_U\_ADV\_UU} ({\em mom\_u\_adv\_uu.F})
505    
506  {\em S/R MOM\_U\_ADV\_VU} ({\em mom\_u\_adv\_vu.F})  {\em S/R MOM\_U\_ADV\_VU} ({\em mom\_u\_adv\_vu.F})
# Line 263  compatibility testing (set run-time logi Line 564  compatibility testing (set run-time logi
564  useNonconservingCoriolis} to {\em true} which otherwise defaults to  useNonconservingCoriolis} to {\em true} which otherwise defaults to
565  {\em false}).  {\em false}).
566    
567  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
568  {\em S/R MOM\_CDSCHEME} ({\em mom\_cdscheme.F})  {\em S/R MOM\_CDSCHEME} ({\em mom\_cdscheme.F})
569    
570  {\em S/R MOM\_U\_CORIOLIS} ({\em mom\_u\_coriolis.F})  {\em S/R MOM\_U\_CORIOLIS} ({\em mom\_u\_coriolis.F})
# Line 304  G_v^{metric} & = & \frac{ \overline{u}^{ Line 605  G_v^{metric} & = & \frac{ \overline{u}^{
605  where $\tan{\phi}$ is evaluated at the $u$ and $v$ points  where $\tan{\phi}$ is evaluated at the $u$ and $v$ points
606  respectively.  respectively.
607    
608  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
609  {\em S/R MOM\_U\_METRIC\_SPHERE} ({\em mom\_u\_metric\_sphere.F})  {\em S/R MOM\_U\_METRIC\_SPHERE} ({\em mom\_u\_metric\_sphere.F})
610    
611  {\em S/R MOM\_V\_METRIC\_SPHERE} ({\em mom\_v\_metric\_sphere.F})  {\em S/R MOM\_V\_METRIC\_SPHERE} ({\em mom\_v\_metric\_sphere.F})
# Line 339  G_w^{metric} & = & Line 640  G_w^{metric} & = &
640    \frac{1}{a} ( {\overline{u}^{ik}}^2 + {\overline{v}^{jk}}^2 )    \frac{1}{a} ( {\overline{u}^{ik}}^2 + {\overline{v}^{jk}}^2 )
641  \end{eqnarray}  \end{eqnarray}
642    
643  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
644  {\em S/R MOM\_U\_METRIC\_NH} ({\em mom\_u\_metric\_nh.F})  {\em S/R MOM\_U\_METRIC\_NH} ({\em mom\_u\_metric\_nh.F})
645    
646  {\em S/R MOM\_V\_METRIC\_NH} ({\em mom\_v\_metric\_nh.F})  {\em S/R MOM\_V\_METRIC\_NH} ({\em mom\_v\_metric\_nh.F})
# Line 391  The Laplacian viscosity coefficient, $A_ Line 692  The Laplacian viscosity coefficient, $A_
692  of $m^2 s^{-1}$. The bi-harmonic viscosity coefficient, $A_4$ ({\bf  of $m^2 s^{-1}$. The bi-harmonic viscosity coefficient, $A_4$ ({\bf
693  viscA4}), has units of $m^4 s^{-1}$.  viscA4}), has units of $m^4 s^{-1}$.
694    
695  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
696  {\em S/R MOM\_U\_XVISCFLUX} ({\em mom\_u\_xviscflux.F})  {\em S/R MOM\_U\_XVISCFLUX} ({\em mom\_u\_xviscflux.F})
697    
698  {\em S/R MOM\_U\_YVISCFLUX} ({\em mom\_u\_yviscflux.F})  {\em S/R MOM\_U\_YVISCFLUX} ({\em mom\_u\_yviscflux.F})
# Line 434  In fact, the above discretization is not Line 735  In fact, the above discretization is not
735  assumes that the bathymetry at velocity points is deeper than at  assumes that the bathymetry at velocity points is deeper than at
736  neighbouring vorticity points, e.g. $1-h_w < 1-h_\zeta$  neighbouring vorticity points, e.g. $1-h_w < 1-h_\zeta$
737    
738  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
739  {\em S/R MOM\_U\_SIDEDRAG} ({\em mom\_u\_sidedrag.F})  {\em S/R MOM\_U\_SIDEDRAG} ({\em mom\_u\_sidedrag.F})
740    
741  {\em S/R MOM\_V\_SIDEDRAG} ({\em mom\_v\_sidedrag.F})  {\em S/R MOM\_V\_SIDEDRAG} ({\em mom\_v\_sidedrag.F})
# Line 471  is even less consistent than for the hyd Line 772  is even less consistent than for the hyd
772  \cite{Waojz}). It is well known how to do this properly (see Griffies  \cite{Waojz}). It is well known how to do this properly (see Griffies
773  \cite{Griffies}) and is on the list of to-do's.  \cite{Griffies}) and is on the list of to-do's.
774    
775  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
776  {\em S/R MOM\_U\_RVISCLFUX} ({\em mom\_u\_rviscflux.F})  {\em S/R MOM\_U\_RVISCLFUX} ({\em mom\_u\_rviscflux.F})
777    
778  {\em S/R MOM\_V\_RVISCLFUX} ({\em mom\_v\_rviscflux.F})  {\em S/R MOM\_V\_RVISCLFUX} ({\em mom\_v\_rviscflux.F})
# Line 509  $r_b$ ({\bf bottomDragLinear}) has units Line 810  $r_b$ ({\bf bottomDragLinear}) has units
810  of the order 0.0002 $m s^{-1}$. $C_d$ ({\bf bottomDragQuadratic}) is  of the order 0.0002 $m s^{-1}$. $C_d$ ({\bf bottomDragQuadratic}) is
811  dimensionless with typical values in the range 0.001--0.003.  dimensionless with typical values in the range 0.001--0.003.
812    
813  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
814  {\em S/R MOM\_U\_BOTTOMDRAG} ({\em mom\_u\_bottomdrag.F})  {\em S/R MOM\_U\_BOTTOMDRAG} ({\em mom\_u\_bottomdrag.F})
815    
816  {\em S/R MOM\_V\_BOTTOMDRAG} ({\em mom\_v\_bottomdrag.F})  {\em S/R MOM\_V\_BOTTOMDRAG} ({\em mom\_v\_bottomdrag.F})
# Line 609  G_w & = & G_w^{fu} + G_w^{\zeta_1 v} + G Line 910  G_w & = & G_w^{fu} + G_w^{\zeta_1 v} + G
910  + G_w^{h-dissip} + G_w^{v-dissip}  + G_w^{h-dissip} + G_w^{v-dissip}
911  \end{eqnarray}  \end{eqnarray}
912    
913  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
914  {\em S/R CALC\_MOM\_RHS} ({\em pkg/mom\_vecinv/calc\_mom\_rhs.F})  {\em S/R CALC\_MOM\_RHS} ({\em pkg/mom\_vecinv/calc\_mom\_rhs.F})
915    
916  $G_u$: {\bf Gu} ({\em DYNVARS.h})  $G_u$: {\bf Gu} ({\em DYNVARS.h})
# Line 634  Relative vorticity is defined: Line 935  Relative vorticity is defined:
935  where ${\cal A}_\zeta$ is the area of the vorticity cell presented in  where ${\cal A}_\zeta$ is the area of the vorticity cell presented in
936  the vertical and $\Gamma$ is the circulation about that cell.  the vertical and $\Gamma$ is the circulation about that cell.
937    
938  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
939  {\em S/R MOM\_VI\_CALC\_RELVORT3} ({\em mom\_vi\_calc\_relvort3.F})  {\em S/R MOM\_VI\_CALC\_RELVORT3} ({\em mom\_vi\_calc\_relvort3.F})
940    
941  $\zeta_3$: {\bf vort3} (local to {\em calc\_mom\_rhs.F})  $\zeta_3$: {\bf vort3} (local to {\em calc\_mom\_rhs.F})
# Line 649  KE = \frac{1}{2} ( \overline{ u^2 }^i + Line 950  KE = \frac{1}{2} ( \overline{ u^2 }^i +
950  + \epsilon_{nh} \overline{ w^2 }^k )  + \epsilon_{nh} \overline{ w^2 }^k )
951  \end{equation}  \end{equation}
952    
953  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
954  {\em S/R MOM\_VI\_CALC\_KE} ({\em mom\_vi\_calc\_ke.F})  {\em S/R MOM\_VI\_CALC\_KE} ({\em mom\_vi\_calc\_ke.F})
955    
956  $KE$: {\bf KE} (local to {\em calc\_mom\_rhs.F})  $KE$: {\bf KE} (local to {\em calc\_mom\_rhs.F})
# Line 705  advection of absolute vorticity. Current Line 1006  advection of absolute vorticity. Current
1006  relative/absolute vorticity, centered/upwind/high order advection is  relative/absolute vorticity, centered/upwind/high order advection is
1007  available only through commented subroutine calls.  available only through commented subroutine calls.
1008    
1009  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1010  {\em S/R MOM\_VI\_CORIOLIS} ({\em mom\_vi\_coriolis.F})  {\em S/R MOM\_VI\_CORIOLIS} ({\em mom\_vi\_coriolis.F})
1011    
1012  {\em S/R MOM\_VI\_U\_CORIOLIS} ({\em mom\_vi\_u\_coriolis.F})  {\em S/R MOM\_VI\_U\_CORIOLIS} ({\em mom\_vi\_u\_coriolis.F})
# Line 736  G_v^{\zeta_1 w} & = & Line 1037  G_v^{\zeta_1 w} & = &
1037  }^k  }^k
1038  \end{eqnarray}  \end{eqnarray}
1039    
1040  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1041  {\em S/R MOM\_VI\_U\_VERTSHEAR} ({\em mom\_vi\_u\_vertshear.F})  {\em S/R MOM\_VI\_U\_VERTSHEAR} ({\em mom\_vi\_u\_vertshear.F})
1042    
1043  {\em S/R MOM\_VI\_V\_VERTSHEAR} ({\em mom\_vi\_v\_vertshear.F})  {\em S/R MOM\_VI\_V\_VERTSHEAR} ({\em mom\_vi\_v\_vertshear.F})
# Line 759  G_v^{\partial_y B} & = & Line 1060  G_v^{\partial_y B} & = &
1060  %\frac{1}{\Delta r_c} h_c \delta_k ( \phi' + KE )  %\frac{1}{\Delta r_c} h_c \delta_k ( \phi' + KE )
1061  \end{eqnarray}  \end{eqnarray}
1062    
1063  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1064  {\em S/R MOM\_VI\_U\_GRAD\_KE} ({\em mom\_vi\_u\_grad\_ke.F})  {\em S/R MOM\_VI\_U\_GRAD\_KE} ({\em mom\_vi\_u\_grad\_ke.F})
1065    
1066  {\em S/R MOM\_VI\_V\_GRAD\_KE} ({\em mom\_vi\_v\_grad\_ke.F})  {\em S/R MOM\_VI\_V\_GRAD\_KE} ({\em mom\_vi\_v\_grad\_ke.F})
# Line 782  D = \frac{1}{{\cal A}_c h_c} ( Line 1083  D = \frac{1}{{\cal A}_c h_c} (
1083  + \delta_j \Delta x_g h_s v )  + \delta_j \Delta x_g h_s v )
1084  \end{equation}  \end{equation}
1085    
1086  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1087  {\em S/R MOM\_VI\_CALC\_HDIV} ({\em mom\_vi\_calc\_hdiv.F})  {\em S/R MOM\_VI\_CALC\_HDIV} ({\em mom\_vi\_calc\_hdiv.F})
1088    
1089  $D$: {\bf hDiv} (local to {\em calc\_mom\_rhs.F})  $D$: {\bf hDiv} (local to {\em calc\_mom\_rhs.F})
# Line 813  D^* & = & \frac{1}{{\cal A}_c h_c} ( Line 1114  D^* & = & \frac{1}{{\cal A}_c h_c} (
1114  - \delta_j \Delta x_c \nabla^2 u )  - \delta_j \Delta x_c \nabla^2 u )
1115  \end{eqnarray}  \end{eqnarray}
1116    
1117  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1118  {\em S/R MOM\_VI\_HDISSIP} ({\em mom\_vi\_hdissip.F})  {\em S/R MOM\_VI\_HDISSIP} ({\em mom\_vi\_hdissip.F})
1119    
1120  $G_u^{h-dissip}$: {\bf uDiss} (local to {\em calc\_mom\_rhs.F})  $G_u^{h-dissip}$: {\bf uDiss} (local to {\em calc\_mom\_rhs.F})
# Line 839  In the interior the vertical stresses ar Line 1140  In the interior the vertical stresses ar
1140  \tau_{23} & = & A_v \frac{1}{\Delta r_c} \delta_k v  \tau_{23} & = & A_v \frac{1}{\Delta r_c} \delta_k v
1141  \end{eqnarray}  \end{eqnarray}
1142    
1143  \fbox{ \begin{minipage}{4.25in}  \fbox{ \begin{minipage}{4.75in}
1144  {\em S/R MOM\_U\_RVISCLFUX} ({\em mom\_u\_rviscflux.F})  {\em S/R MOM\_U\_RVISCLFUX} ({\em mom\_u\_rviscflux.F})
1145    
1146  {\em S/R MOM\_V\_RVISCLFUX} ({\em mom\_v\_rviscflux.F})  {\em S/R MOM\_V\_RVISCLFUX} ({\em mom\_v\_rviscflux.F})

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22