/[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.11 by adcroft, Tue Nov 13 18:15:26 2001 UTC revision 1.23 by jmc, Fri Aug 27 13:08:18 2010 UTC
# Line 2  Line 2 
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
# Line 10  boundaries to intersect a regular grid a Line 13  boundaries to intersect a regular grid a
13  representation of the position of the boundary. We treat the  representation of the position of the boundary. We treat the
14  horizontal and vertical directions as separable and differently.  horizontal and vertical directions as separable and differently.
15    
 \input{part2/notation}  
   
16    
17  \subsection{The finite volume method: finite volumes versus finite difference}  \subsection{The finite volume method: finite volumes versus finite difference}
18    \begin{rawhtml}
19    <!-- CMIREDIR:finite_volume: -->
20    \end{rawhtml}
21    
22    
23    
24  The finite volume method is used to discretize the equations in  The finite volume method is used to discretize the equations in
25  space. The expression ``finite volume'' actually has two meanings; one  space. The expression ``finite volume'' actually has two meanings; one
# Line 68  directions simultaneously. Illustration Line 74  directions simultaneously. Illustration
74    
75  \begin{figure}  \begin{figure}
76  \begin{center}  \begin{center}
77  \resizebox{!}{2in}{ \includegraphics{part2/cgrid3d.eps}}  \resizebox{!}{2in}{ \includegraphics{s_algorithm/figs/cgrid3d.eps}}
78  \end{center}  \end{center}
79  \caption{Three dimensional staggering of velocity components. This  \caption{Three dimensional staggering of velocity components. This
80  facilitates the natural discretization of the continuity and tracer  facilitates the natural discretization of the continuity and tracer
# Line 120  grid data: ({\em model/inc/GRID.h}) Line 126  grid data: ({\em model/inc/GRID.h})
126  \begin{figure}  \begin{figure}
127  \begin{center}  \begin{center}
128  \begin{tabular}{cc}  \begin{tabular}{cc}
129    \raisebox{1.5in}{a)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Ac.eps}}    \raisebox{1.5in}{a)}\resizebox{!}{2in}{ \includegraphics{s_algorithm/figs/hgrid-Ac.eps}}
130  & \raisebox{1.5in}{b)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Az.eps}}  & \raisebox{1.5in}{b)}\resizebox{!}{2in}{ \includegraphics{s_algorithm/figs/hgrid-Az.eps}}
131  \\  \\
132    \raisebox{1.5in}{c)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Au.eps}}    \raisebox{1.5in}{c)}\resizebox{!}{2in}{ \includegraphics{s_algorithm/figs/hgrid-Au.eps}}
133  & \raisebox{1.5in}{d)}\resizebox{!}{2in}{ \includegraphics{part2/hgrid-Av.eps}}  & \raisebox{1.5in}{d)}\resizebox{!}{2in}{ \includegraphics{s_algorithm/figs/hgrid-Av.eps}}
134  \end{tabular}  \end{tabular}
135  \end{center}  \end{center}
136  \caption{  \caption{
# Line 133  grid lines indicate the tracer cell boun Line 139  grid lines indicate the tracer cell boun
139  grid for all panels. a) The area of a tracer cell, $A_c$, is bordered  grid for all panels. a) The area of a tracer cell, $A_c$, is bordered
140  by the lengths $\Delta x_g$ and $\Delta y_g$. b) The area of a  by the lengths $\Delta x_g$ and $\Delta y_g$. b) The area of a
141  vorticity cell, $A_\zeta$, is bordered by the lengths $\Delta x_c$ and  vorticity cell, $A_\zeta$, is bordered by the lengths $\Delta x_c$ and
142  $\Delta y_c$. c) The area of a u cell, $A_c$, is bordered by the  $\Delta y_c$. c) The area of a u cell, $A_w$, is bordered by the
143  lengths $\Delta x_v$ and $\Delta y_f$. d) The area of a v cell, $A_c$,  lengths $\Delta x_v$ and $\Delta y_f$. d) The area of a v cell, $A_s$,
144  is bordered by the lengths $\Delta x_f$ and $\Delta y_u$.}  is bordered by the lengths $\Delta x_f$ and $\Delta y_u$.}
145  \label{fig:hgrid}  \label{fig:hgrid}
146  \end{figure}  \end{figure}
# Line 142  is bordered by the lengths $\Delta x_f$ Line 148  is bordered by the lengths $\Delta x_f$
148  The model domain is decomposed into tiles and within each tile a  The model domain is decomposed into tiles and within each tile a
149  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
150  decomposition for parallelization but may be used whether parallelized  decomposition for parallelization but may be used whether parallelized
151  or not; see section \ref{sect:tiles} for more details. Although the  or not; see section \ref{sect:domain_decomposition} for more details.
152  tiles may be patched together in an unstructured manner  Although the tiles may be patched together in an unstructured manner
153  (i.e. irregular or non-tessilating pattern), the interior of tiles is  (i.e. irregular or non-tessilating pattern), the interior of tiles is
154  a structured grid of quadrilateral cells. The horizontal coordinate  a structured grid of quadrilateral cells. The horizontal coordinate
155  system is orthogonal curvilinear meaning we can not necessarily treat  system is orthogonal curvilinear meaning we can not necessarily treat
# Line 180  rAc(i,j)} and {\bf DYg(i,j)} positioned Line 186  rAc(i,j)} and {\bf DYg(i,j)} positioned
186  Fig.~\ref{fig:hgrid}b shows the vorticity cell. The length of the  Fig.~\ref{fig:hgrid}b shows the vorticity cell. The length of the
187  southern edge, $\Delta x_c$, western edge, $\Delta y_c$ and surface  southern edge, $\Delta x_c$, western edge, $\Delta y_c$ and surface
188  area, $A_\zeta$, presented in the vertical are stored in arrays {\bf  area, $A_\zeta$, presented in the vertical are stored in arrays {\bf
189  DXg}, {\bf DYg} and {\bf rAz}.  DXc}, {\bf DYc} and {\bf rAz}.
190  \marginpar{$A_\zeta$: {\bf rAz}}  \marginpar{$A_\zeta$: {\bf rAz}}
191  \marginpar{$\Delta x_c$: {\bf DXc}}  \marginpar{$\Delta x_c$: {\bf DXc}}
192  \marginpar{$\Delta y_c$: {\bf DYc}}  \marginpar{$\Delta y_c$: {\bf DYc}}
# Line 321  other grids, the horizontal grid descrip Line 327  other grids, the horizontal grid descrip
327  \begin{center}  \begin{center}
328    \begin{tabular}{cc}    \begin{tabular}{cc}
329    \raisebox{4in}{a)} \resizebox{!}{4in}{    \raisebox{4in}{a)} \resizebox{!}{4in}{
330    \includegraphics{part2/vgrid-cellcentered.eps}} & \raisebox{4in}{b)}    \includegraphics{s_algorithm/figs/vgrid-cellcentered.eps}} & \raisebox{4in}{b)}
331    \resizebox{!}{4in}{ \includegraphics{part2/vgrid-accurate.eps}}    \resizebox{!}{4in}{ \includegraphics{s_algorithm/figs/vgrid-accurate.eps}}
332  \end{tabular}  \end{tabular}
333  \end{center}  \end{center}
334  \caption{Two versions of the vertical grid. a) The cell centered  \caption{Two versions of the vertical grid. a) The cell centered
# Line 361  vertical grid descriptors are stored in Line 367  vertical grid descriptors are stored in
367    
368  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
369  approach because the tracer points are at cell centers; the cell  approach because the tracer points are at cell centers; the cell
370  centers are mid-way between the cell interfaces. An alternative, the  centers are mid-way between the cell interfaces.
371  vertex or interface centered approach, is shown in  This discretization is selected when the thickness of the
372    levels are provided ({\bf delR}, parameter file {\em data},
373    namelist {\em PARM04})
374    An alternative, the vertex or interface centered approach, is shown in
375  Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned  Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned
376  mid-way between the tracer nodes (no longer cell centers). This  mid-way between the tracer nodes (no longer cell centers). This
377  approach is formally more accurate for evaluation of hydrostatic  approach is formally more accurate for evaluation of hydrostatic
378  pressure and vertical advection but historically the cell centered  pressure and vertical advection but historically the cell centered
379  approach has been used. An alternative form of subroutine {\em  approach has been used. An alternative form of subroutine {\em
380  INI\_VERTICAL\_GRID} is used to select the interface centered approach  INI\_VERTICAL\_GRID} is used to select the interface centered approach
381  but no run time option is currently available.  This form requires to specify $Nr+1$ vertical distances {\bf delRc}
382    (parameter file {\em data}, namelist {\em PARM04}, e.g.
383    {\em verification/ideal\_2D\_oce/input/data})
384    corresponding to surface to center, $Nr-1$ center to center, and center to
385    bottom distances.
386    %but no run time option is currently available.
387    
388  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
389  {\em S/R INI\_VERTICAL\_GRID} ({\em  {\em S/R INI\_VERTICAL\_GRID} ({\em
# Line 387  $\Delta r_c^{-1}$: {\bf RECIP\_DRc} ({\e Line 401  $\Delta r_c^{-1}$: {\bf RECIP\_DRc} ({\e
401    
402    
403  \subsection{Topography: partially filled cells}  \subsection{Topography: partially filled cells}
404    \begin{rawhtml}
405    <!-- CMIREDIR:topo_partial_cells: -->
406    \end{rawhtml}
407    
408  \begin{figure}  \begin{figure}
409  \begin{center}  \begin{center}
410  \resizebox{4.5in}{!}{\includegraphics{part2/vgrid-xz.eps}}  \resizebox{4.5in}{!}{\includegraphics{s_algorithm/figs/vgrid-xz.eps}}
411  \end{center}  \end{center}
412  \caption{  \caption{
413  A schematic of the x-r plane showing the location of the  A schematic of the x-r plane showing the location of the
# Line 457  $h_s^{-1}$: {\bf RECIP\_hFacS} ({\em GRI Line 474  $h_s^{-1}$: {\bf RECIP\_hFacS} ({\em GRI
474    
475    
476  \section{Continuity and horizontal pressure gradient terms}  \section{Continuity and horizontal pressure gradient terms}
477    \begin{rawhtml}
478    <!-- CMIREDIR:continuity_and_horizontal_pressure: -->
479    \end{rawhtml}
480    
481    
482  The core algorithm is based on the ``C grid'' discretization of the  The core algorithm is based on the ``C grid'' discretization of the
483  continuity equation which can be summarized as:  continuity equation which can be summarized as:
# Line 471  continuity equation which can be summari Line 492  continuity equation which can be summari
492  \end{eqnarray}  \end{eqnarray}
493  where the continuity equation has been most naturally discretized by  where the continuity equation has been most naturally discretized by
494  staggering the three components of velocity as shown in  staggering the three components of velocity as shown in
495  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$
496  are the lengths between tracer points (cell centers). The grid lengths  are the lengths between tracer points (cell centers). The grid lengths
497  $\Delta x_g$, $\Delta y_g$ are the grid lengths between cell  $\Delta x_g$, $\Delta y_g$ are the grid lengths between cell
498  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
# Line 495  addition of volume due to excess precipi Line 516  addition of volume due to excess precipi
516  evaporation and only enters the top-level of the {\em ocean} model.  evaporation and only enters the top-level of the {\em ocean} model.
517    
518  \section{Hydrostatic balance}  \section{Hydrostatic balance}
519    \begin{rawhtml}
520    <!-- CMIREDIR:hydrostatic_balance: -->
521    \end{rawhtml}
522    
523  The vertical momentum equation has the hydrostatic or  The vertical momentum equation has the hydrostatic or
524  quasi-hydrostatic balance on the right hand side. This discretization  quasi-hydrostatic balance on the right hand side. This discretization

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.22