/[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.9 by cnh, Wed Oct 24 15:21:27 2001 UTC revision 1.16 by jmc, Wed Oct 13 18:50:54 2004 UTC
# Line 8  method. This amounts to a grid-point met Line 8  method. This amounts to a grid-point met
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 differently.  horizontal and vertical directions as separable and differently.
12    
13  \input{part2/notation}  \input{part2/notation}
14    
15    
16  \subsection{The finite volume method: finite volumes versus finite difference}  \subsection{The finite volume method: finite volumes versus finite difference}
17    \begin{rawhtml}
18    <!-- CMIREDIR:finite_volume: -->
19    \end{rawhtml}
20    
21    
22    
23  The finite volume method is used to discretize the equations in  The finite volume method is used to discretize the equations in
24  space. The expression ``finite volume'' actually has two meanings; one  space. The expression ``finite volume'' actually has two meanings; one
# Line 37  the lengths $\Delta x_i$: Line 42  the lengths $\Delta x_i$:
42  \begin{displaymath}  \begin{displaymath}
43  \Delta x \partial_t \theta + \delta_i ( F ) = 0  \Delta x \partial_t \theta + \delta_i ( F ) = 0
44  \end{displaymath}  \end{displaymath}
45  is exact if $\theta(x)$ is peice-wise constant over the interval  is exact if $\theta(x)$ is piece-wise constant over the interval
46  $\Delta x_i$ or more generally if $\theta_i$ is defined as the average  $\Delta x_i$ or more generally if $\theta_i$ is defined as the average
47  over the interval $\Delta x_i$.  over the interval $\Delta x_i$.
48    
# Line 57  recovers the same ODE's resulting from f Line 62  recovers the same ODE's resulting from f
62  interior of a fluid. Differences arise at boundaries where a boundary  interior of a fluid. Differences arise at boundaries where a boundary
63  is not positioned on a regular or smoothly varying grid. This method  is not positioned on a regular or smoothly varying grid. This method
64  is used to represent the topography using lopped cell, see  is used to represent the topography using lopped cell, see
65  \cite{Adcroft98}. Subtle difference also appear in more than one  \cite{adcroft:97}. Subtle difference also appear in more than one
66  dimension away from boundaries. This happens because the each  dimension away from boundaries. This happens because the each
67  direction is discretized independantly in the finite difference method  direction is discretized independently in the finite difference method
68  while the integrating over finite volume implicitly treats all  while the integrating over finite volume implicitly treats all
69  directions simultaneously. Illustration of this is given in  directions simultaneously. Illustration of this is given in
70  \cite{Adcroft02}.  \cite{ac:02}.
71    
72  \subsection{C grid staggering of variables}  \subsection{C grid staggering of variables}
73    
# Line 79  equations. } Line 84  equations. }
84  The basic algorithm employed for stepping forward the momentum  The basic algorithm employed for stepping forward the momentum
85  equations is based on retaining non-divergence of the flow at all  equations is based on retaining non-divergence of the flow at all
86  times. This is most naturally done if the components of flow are  times. This is most naturally done if the components of flow are
87  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}.
88    
89  Fig. \ref{fig:cgrid3d} shows the components of flow ($u$,$v$,$w$)  Fig. \ref{fig:cgrid3d} shows the components of flow ($u$,$v$,$w$)
90  staggered in space such that the zonal component falls on the  staggered in space such that the zonal component falls on the
91  interface between continiuty cells in the zonal direction. Similarly  interface between continuity cells in the zonal direction. Similarly
92  for the meridional and vertical directions.  The continiuty cell is  for the meridional and vertical directions.  The continuity cell is
93  synonymous with tracer cells (they are one and the same).  synonymous with tracer cells (they are one and the same).
94    
95    
# Line 141  is bordered by the lengths $\Delta x_f$ Line 146  is bordered by the lengths $\Delta x_f$
146    
147  The model domain is decomposed into tiles and within each tile a  The model domain is decomposed into tiles and within each tile a
148  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
149  decomposition for parallelization but may be used whether parallized  decomposition for parallelization but may be used whether parallelized
150  or not; see section \ref{sect:tiles} for more details. Although the  or not; see section \ref{sect:tiles} for more details. Although the
151  tiles may be patched together in an unstructured manner  tiles may be patched together in an unstructured manner
152  (i.e. irregular or non-tessilating pattern), the interior of tiles is  (i.e. irregular or non-tessilating pattern), the interior of tiles is
153  a structered grid of quadrilateral cells. The horizontal coordinate  a structured grid of quadrilateral cells. The horizontal coordinate
154  system is orthogonal curvilinear meaning we can not necessarily treat  system is orthogonal curvilinear meaning we can not necessarily treat
155  the two horizontal directions as seperable. Instead, each cell in the  the two horizontal directions as separable. Instead, each cell in the
156  horizontal grid is described by the length of it's sides and it's  horizontal grid is described by the length of it's sides and it's
157  area.  area.
158    
159  The grid information is quite general and describes any of the  The grid information is quite general and describes any of the
160  available coordinates systems, cartesian, spherical-polar or  available coordinates systems, cartesian, spherical-polar or
161  curvilinear. All that is necessary to distinguish between the  curvilinear. All that is necessary to distinguish between the
162  coordinate systems is to initialize the grid data (discriptors)  coordinate systems is to initialize the grid data (descriptors)
163  appropriately.  appropriately.
164    
165  In the following, we refer to the orientation of quantities on the  In the following, we refer to the orientation of quantities on the
# Line 293  using\-Cartes\-ianGrid} in namelist {\em Line 298  using\-Cartes\-ianGrid} in namelist {\em
298  spacing can be set to uniform via scalars {\bf dXspacing} and {\bf  spacing can be set to uniform via scalars {\bf dXspacing} and {\bf
299  dYspacing} in namelist {\em PARM04} or to variable resolution by the  dYspacing} in namelist {\em PARM04} or to variable resolution by the
300  vectors {\bf DELX} and {\bf DELY}. Units are normally  vectors {\bf DELX} and {\bf DELY}. Units are normally
301  meters. Non-dimensional coordinates can be used by interpretting the  meters. Non-dimensional coordinates can be used by interpreting the
302  gravitational constant as the Rayleigh number.  gravitational constant as the Rayleigh number.
303    
304  \subsubsection{Spherical-polar coordinates}  \subsubsection{Spherical-polar coordinates}
# Line 347  The vertical grid is calculated in subro Line 352  The vertical grid is calculated in subro
352  INI\_VERTICAL\_GRID} and specified via the vector {\bf DELR} in  INI\_VERTICAL\_GRID} and specified via the vector {\bf DELR} in
353  namelist {\em PARM04}. The units of ``r'' are either meters or Pascals  namelist {\em PARM04}. The units of ``r'' are either meters or Pascals
354  depending on the isomorphism being used which in turn is dependent  depending on the isomorphism being used which in turn is dependent
355  only on the choise of equation of state.  only on the choice of equation of state.
356    
357  There are alternative namelist vectors {\bf DELZ} and {\bf DELP} which  There are alternative namelist vectors {\bf DELZ} and {\bf DELP} which
358  dictate whether z- or  dictate whether z- or
# Line 361  vertical grid descriptors are stored in Line 366  vertical grid descriptors are stored in
366    
367  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
368  approach because the tracer points are at cell centers; the cell  approach because the tracer points are at cell centers; the cell
369  centers are mid-way between the cell interfaces. An alternative, the  centers are mid-way between the cell interfaces.
370  vertex or interface centered approach, is shown in  This discretisation is selected when the thickness of the
371    levels are provided ({\bf delR}, parameter file {\em data},
372    namelist {\em PARM04})
373    An alternative, the vertex or interface centered approach, is shown in
374  Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned  Fig.~\ref{fig:vgrid}b. Here, the interior interfaces are positioned
375  mid-way between the tracer nodes (no longer cell centers). This  mid-way between the tracer nodes (no longer cell centers). This
376  approach is formally more accurate for evaluation of hydrostatic  approach is formally more accurate for evaluation of hydrostatic
377  pressure and vertical advection but historically the cell centered  pressure and vertical advection but historically the cell centered
378  approach has been used. An alternative form of subroutine {\em  approach has been used. An alternative form of subroutine {\em
379  INI\_VERTICAL\_GRID} is used to select the interface centered approach  INI\_VERTICAL\_GRID} is used to select the interface centered approach
380  but no run time option is currently available.  This form requires to specify $Nr+1$ vertical distances {\bf delRc}
381    (parameter file {\em data}, namelist {\em PARM04}, e.g.
382    {\em verification/ideal\_2D\_oce/input/data})
383    corresponding to surface to center, $Nr-1$ center to center, and center to
384    bottom distances.
385    %but no run time option is currently available.
386    
387  \fbox{ \begin{minipage}{4.75in}  \fbox{ \begin{minipage}{4.75in}
388  {\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 400  $\Delta r_c^{-1}$: {\bf RECIP\_DRc} ({\e
400    
401    
402  \subsection{Topography: partially filled cells}  \subsection{Topography: partially filled cells}
403    \begin{rawhtml}
404    <!-- CMIREDIR:topo_partial_cells: -->
405    \end{rawhtml}
406    
407  \begin{figure}  \begin{figure}
408  \begin{center}  \begin{center}
# Line 400  thickness of the open side is given by $ Line 416  thickness of the open side is given by $
416  \label{fig:hfacs}  \label{fig:hfacs}
417  \end{figure}  \end{figure}
418    
419  \cite{Adcroft97} presented two alternatives to the step-wise finite  \cite{adcroft:97} presented two alternatives to the step-wise finite
420  difference representation of topography. The method is known to the  difference representation of topography. The method is known to the
421  engineering community as {\em intersecting boundary method}. It  engineering community as {\em intersecting boundary method}. It
422  involves allowing the boundary to intersect a grid of cells thereby  involves allowing the boundary to intersect a grid of cells thereby
423  modifying the shape of those cells intersected. We suggested allowing  modifying the shape of those cells intersected. We suggested allowing
424  the topgoraphy to take on a peice-wise linear representation (shaved  the topography to take on a piece-wise linear representation (shaved
425  cells) or a simpler piecewise constant representaion (partial step).  cells) or a simpler piecewise constant representation (partial step).
426  Both show dramatic improvements in solution compared to the  Both show dramatic improvements in solution compared to the
427  traditional full step representation, the piece-wise linear being the  traditional full step representation, the piece-wise linear being the
428  best. However, the storage requirements are excessive so the simpler  best. However, the storage requirements are excessive so the simpler
# Line 420  the thickness of a level is determined a Line 436  the thickness of a level is determined a
436  \marginpar{$h_s$: {\bf hFacS}}  \marginpar{$h_s$: {\bf hFacS}}
437  The physical thickness of a tracer cell is given by $h_c(i,j,k) \Delta  The physical thickness of a tracer cell is given by $h_c(i,j,k) \Delta
438  r_f(k)$ and the physical thickness of the open side is given by  r_f(k)$ and the physical thickness of the open side is given by
439  $h_w(i,j,k) \Delta r_f(k)$. Three 3-D discriptors $h_c$, $h_w$ and  $h_w(i,j,k) \Delta r_f(k)$. Three 3-D descriptors $h_c$, $h_w$ and
440  $h_s$ are used to describe the geometry: {\bf hFacC}, {\bf hFacW} and  $h_s$ are used to describe the geometry: {\bf hFacC}, {\bf hFacW} and
441  {\bf hFacS} respectively. These are calculated in subroutine {\em  {\bf hFacS} respectively. These are calculated in subroutine {\em
442  INI\_MASKS\_ETC} along with there reciprocals {\bf RECIP\_hFacC}, {\bf  INI\_MASKS\_ETC} along with there reciprocals {\bf RECIP\_hFacC}, {\bf
# Line 471  continuity equation which can be summari Line 487  continuity equation which can be summari
487  \end{eqnarray}  \end{eqnarray}
488  where the continuity equation has been most naturally discretized by  where the continuity equation has been most naturally discretized by
489  staggering the three components of velocity as shown in  staggering the three components of velocity as shown in
490  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$
491  are the lengths between tracer points (cell centers). The grid lengths  are the lengths between tracer points (cell centers). The grid lengths
492  $\Delta x_g$, $\Delta y_g$ are the grid lengths between cell  $\Delta x_g$, $\Delta y_g$ are the grid lengths between cell
493  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 484  A}_c$.  The factors $h_w$ and $h_s$ are Line 500  A}_c$.  The factors $h_w$ and $h_s$ are
500  \marginpar{$h_s$: {\bf hFacS}}  \marginpar{$h_s$: {\bf hFacS}}
501    
502  The last equation, the discrete continuity equation, can be summed in  The last equation, the discrete continuity equation, can be summed in
503  the vertical to yeild the free-surface equation:  the vertical to yield the free-surface equation:
504  \begin{equation}  \begin{equation}
505  {\cal A}_c \partial_t \eta + \delta_i \sum_k \Delta y_g \Delta r_f h_w  {\cal A}_c \partial_t \eta + \delta_i \sum_k \Delta y_g \Delta r_f h_w
506  u + \delta_j \sum_k \Delta x_g \Delta r_f h_s v = {\cal  u + \delta_j \sum_k \Delta x_g \Delta r_f h_s v = {\cal
# Line 503  derived from the buoyancy equation exact Line 519  derived from the buoyancy equation exact
519  from the pressure gradient terms when forming the kinetic energy  from the pressure gradient terms when forming the kinetic energy
520  equation.  equation.
521    
522  In the ocean, using z-ccordinates, the hydrostatic balance terms are  In the ocean, using z-coordinates, the hydrostatic balance terms are
523  discretized:  discretized:
524  \begin{equation}  \begin{equation}
525  \epsilon_{nh} \partial_t w  \epsilon_{nh} \partial_t w
# Line 523  the atmosphere. Line 539  the atmosphere.
539    
540  The difference in approach between ocean and atmosphere occurs because  The difference in approach between ocean and atmosphere occurs because
541  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
542  energy conversion term $\alpha \omega$. The form of these consversion  energy conversion term $\alpha \omega$. The form of these conversion
543  terms is discussed at length in \cite{Adcroft01}.  terms is discussed at length in \cite{adcroft:02}.
544    
545  Because of the different representation of hydrostatic balance between  Because of the different representation of hydrostatic balance between
546  ocean and atmosphere there is no elegant way to represent both systems  ocean and atmosphere there is no elegant way to represent both systems

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22