/[MITgcm]/manual/s_algorithm/text/time_stepping.tex
ViewVC logotype

Diff of /manual/s_algorithm/text/time_stepping.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 16:45:41 2001 UTC revision 1.15 by cnh, Thu Feb 28 19:32:19 2002 UTC
# Line 1  Line 1 
1  % $Header$  % $Header$
2  % $Name$  % $Name$
3    
4    This chapter lays out the numerical schemes that are
5    employed in the core MITgcm algorithm. Whenever possible
6    links are made to actual program code in the MITgcm implementation.
7    The chapter begins with a discussion of the temporal discretization
8    used in MITgcm. This discussion is followed by sections that
9    describe the spatial discretization. The schemes employed for momentum
10    terms are described first, afterwards the schemes that apply to
11    passive and dynamically active tracers are described.
12    
13    
14    \section{Time-stepping}
15  The equations of motion integrated by the model involve four  The equations of motion integrated by the model involve four
16  prognostic equations for flow, $u$ and $v$, temperature, $\theta$, and  prognostic equations for flow, $u$ and $v$, temperature, $\theta$, and
17  salt/moisture, $S$, and three diagnostic equations for vertical flow,  salt/moisture, $S$, and three diagnostic equations for vertical flow,
# Line 70  temporary.} Line 81  temporary.}
81  \begin{figure}  \begin{figure}
82  \begin{center} \fbox{ \begin{minipage}{4.5in} \begin{tabbing}  \begin{center} \fbox{ \begin{minipage}{4.5in} \begin{tabbing}
83  aaa \= aaa \= aaa \= aaa \= aaa \= aaa \kill  aaa \= aaa \= aaa \= aaa \= aaa \= aaa \kill
84  FORWARD\_STEP \\  \proclink{FORWARD\_STEP}{../code/._model_src_forward_step.F} \\
85  \> DYNAMICS \\  \> DYNAMICS \\
86  \>\> TIMESTEP \` $u^*$,$v^*$ (\ref{eq:ustar-rigid-lid},\ref{eq:vstar-rigid-lid}) \\  \>\> TIMESTEP \` $u^*$,$v^*$ (\ref{eq:ustar-rigid-lid},\ref{eq:vstar-rigid-lid}) \\
87  \> SOLVE\_FOR\_PRESSURE \\  \> SOLVE\_FOR\_PRESSURE \\
# Line 162  The correspondence to the code is as fol Line 173  The correspondence to the code is as fol
173  \item  \item
174  the prognostic phase, equations \ref{eq:ustar-rigid-lid} and \ref{eq:vstar-rigid-lid},  the prognostic phase, equations \ref{eq:ustar-rigid-lid} and \ref{eq:vstar-rigid-lid},
175  stepping forward $u^n$ and $v^n$ to $u^{*}$ and $v^{*}$ is coded in  stepping forward $u^n$ and $v^n$ to $u^{*}$ and $v^{*}$ is coded in
176  {\em TIMESTEP.F}  \proclink{TIMESTEP}{../code/._model_src_timestep.F}
177  \item  \item
178  the vertical integration, $H \widehat{u^*}$ and $H  the vertical integration, $H \widehat{u^*}$ and $H
179  \widehat{v^*}$, divergence and inversion of the elliptic operator in  \widehat{v^*}$, divergence and inversion of the elliptic operator in
180  equation \ref{eq:elliptic} is coded in {\em  equation \ref{eq:elliptic} is coded in
181  SOLVE\_FOR\_PRESSURE.F}  \proclink{SOLVE\_FOR\_PRESSURE}{../code/._model_src_solve_for_pressure.F}
182  \item  \item
183  finally, the new flow field at time level $n+1$ given by equations  finally, the new flow field at time level $n+1$ given by equations
184  \ref{eq:un+1-rigid-lid} and \ref{eq:vn+1-rigid-lid} is calculated in {\em CORRECTION\_STEP.F}.  \ref{eq:un+1-rigid-lid} and \ref{eq:vn+1-rigid-lid} is calculated in
185    \proclink{CORRECTION\_STEP}{../code/._model_src_correction_step.F}.
186  \end{itemize}  \end{itemize}
187  The calling tree for these routines is given in  The calling tree for these routines is given in
188  Fig.~\ref{fig:call-tree-pressure-method}.  Fig.~\ref{fig:call-tree-pressure-method}.
# Line 558  The only difficulty with this approach i Line 570  The only difficulty with this approach i
570  connecting $u,v^n$ with $G_\theta^{n-1/2}$. The flow used to advect  connecting $u,v^n$ with $G_\theta^{n-1/2}$. The flow used to advect
571  tracers around is not naturally located in time. This could be avoided  tracers around is not naturally located in time. This could be avoided
572  by applying the Adams-Bashforth extrapolation to the tracer field  by applying the Adams-Bashforth extrapolation to the tracer field
573  itself and advection that around but this is not yet available. We're  itself and advecting that around but this approach is not yet
574  not aware of any detrimental effect of this feature. The difficulty  available. We're not aware of any detrimental effect of this
575  lies mainly in interpretation of what time-level variables and terms  feature. The difficulty lies mainly in interpretation of what
576  correspond to.  time-level variables and terms correspond to.
577    
578    
579  \section{Non-hydrostatic formulation}  \section{Non-hydrostatic formulation}
580  \label{sect:non-hydrostatic}  \label{sect:non-hydrostatic}
581    
582  [to be written...]  The non-hydrostatic formulation re-introduces the full vertical
583    momentum equation and requires the solution of a 3-D elliptic
584    equations for non-hydrostatic pressure perturbation. We still
585    intergrate vertically for the hydrostatic pressure and solve a 2-D
586    elliptic equation for the surface pressure/elevation for this reduces
587    the amount of work needed to solve for the non-hydrostatic pressure.
588    
589    The momentum equations are discretized in time as follows:
590    \begin{eqnarray}
591    \frac{1}{\Delta t} u^{n+1} + g \partial_x \eta^{n+1} + \partial_x \phi_{nh}^{n+1}
592    & = & \frac{1}{\Delta t} u^{n} + G_u^{(n+1/2)} \label{eq:discrete-time-u-nh} \\
593    \frac{1}{\Delta t} v^{n+1} + g \partial_y \eta^{n+1} + \partial_y \phi_{nh}^{n+1}
594    & = & \frac{1}{\Delta t} v^{n} + G_v^{(n+1/2)} \label{eq:discrete-time-v-nh} \\
595    \frac{1}{\Delta t} w^{n+1} + \partial_r \phi_{nh}^{n+1}
596    & = & \frac{1}{\Delta t} w^{n} + G_w^{(n+1/2)} \label{eq:discrete-time-w-nh} \\
597    \end{eqnarray}
598    which must satisfy the discrete-in-time depth integrated continuity,
599    equation~\ref{eq:discrete-time-backward-free-surface} and the local continuity equation
600    \begin{equation}
601    \partial_x u^{n+1} + \partial_y v^{n+1} + \partial_r w^{n+1} = 0
602    \label{eq:non-divergence-nh}
603    \end{equation}
604    As before, the explicit predictions for momentum are consolidated as:
605    \begin{eqnarray*}
606    u^* & = & u^n + \Delta t G_u^{(n+1/2)} \\
607    v^* & = & v^n + \Delta t G_v^{(n+1/2)} \\
608    w^* & = & w^n + \Delta t G_w^{(n+1/2)}
609    \end{eqnarray*}
610    but this time we introduce an intermediate step by splitting the
611    tendancy of the flow as follows:
612    \begin{eqnarray}
613    u^{n+1} = u^{**} - \Delta t \partial_x \phi_{nh}^{n+1}
614    & &
615    u^{**} = u^{*} - \Delta t g \partial_x \eta^{n+1} \\
616    v^{n+1} = v^{**} - \Delta t \partial_y \phi_{nh}^{n+1}
617    & &
618    v^{**} = v^{*} - \Delta t g \partial_y \eta^{n+1}
619    \end{eqnarray}
620    Substituting into the depth integrated continuity
621    (equation~\ref{eq:discrete-time-backward-free-surface}) gives
622    \begin{equation}
623    \partial_x H \partial_x \left( g \eta^{n+1} + \widehat{\phi}_{nh}^{n+1} \right)
624    +
625    \partial_y H \partial_y \left( g \eta^{n+1} + \widehat{\phi}_{nh}^{n+1} \right)
626     - \frac{\epsilon_{fs}\eta^*}{\Delta t^2}
627    = - \frac{\eta^*}{\Delta t^2}
628    \end{equation}
629    which is approximated by equation
630    \ref{eq:elliptic-backward-free-surface} on the basis that i)
631    $\phi_{nh}^{n+1}$ is not yet known and ii) $\nabla \widehat{\phi}_{nh}
632    << g \nabla \eta$. If \ref{eq:elliptic-backward-free-surface} is
633    solved accurately then the implication is that $\widehat{\phi}_{nh}
634    \approx 0$ so that thet non-hydrostatic pressure field does not drive
635    barotropic motion.
636    
637    The flow must satisfy non-divergence
638    (equation~\ref{eq:non-divergence-nh}) locally, as well as depth
639    integrated, and this constraint is used to form a 3-D elliptic
640    equations for $\phi_{nh}^{n+1}$:
641    \begin{equation}
642    \partial_{xx} \phi_{nh}^{n+1} + \partial_{yy} \phi_{nh}^{n+1} +
643    \partial_{rr} \phi_{nh}^{n+1} =
644    \partial_x u^{**} + \partial_y v^{**} + \partial_r w^{*}
645    \end{equation}
646    
647    The entire algorithm can be summarized as the sequential solution of
648    the following equations:
649    \begin{eqnarray}
650    u^{*} & = & u^{n} + \Delta t G_u^{(n+1/2)} \label{eq:ustar-nh} \\
651    v^{*} & = & v^{n} + \Delta t G_v^{(n+1/2)} \label{eq:vstar-nh} \\
652    w^{*} & = & w^{n} + \Delta t G_w^{(n+1/2)} \label{eq:wstar-nh} \\
653    \eta^* & = & \epsilon_{fs} \left( \eta^{n} +P-E+R \right)- \Delta t
654      \partial_x H \widehat{u^{*}}
655    + \partial_y H \widehat{v^{*}}
656    \\
657      \partial_x g H \partial_x \eta^{n+1}
658    + \partial_y g H \partial_y \eta^{n+1}
659    - \frac{\epsilon_{fs} \eta^{n+1}}{\Delta t^2}
660    & = &
661    - \frac{\eta^*}{\Delta t^2}
662    \label{eq:elliptic-nh}
663    \\
664    u^{**} & = & u^{*} - \Delta t g \partial_x \eta^{n+1} \label{eq:unx-nh}\\
665    v^{**} & = & v^{*} - \Delta t g \partial_y \eta^{n+1} \label{eq:vnx-nh}\\
666    \partial_{xx} \phi_{nh}^{n+1} + \partial_{yy} \phi_{nh}^{n+1} +
667    \partial_{rr} \phi_{nh}^{n+1} & = &
668    \partial_x u^{**} + \partial_y v^{**} + \partial_r w^{*} \\
669    u^{n+1} & = & u^{**} - \Delta t \partial_x \phi_{nh}^{n+1} \label{eq:un+1-nh}\\
670    v^{n+1} & = & v^{**} - \Delta t \partial_y \phi_{nh}^{n+1} \label{eq:vn+1-nh}\\
671    \partial_r w^{n+1} & = & - \partial_x u^{n+1} - \partial_y v^{n+1}
672    \end{eqnarray}
673    where the last equation is solved by vertically integrating for
674    $w^{n+1}$.
675    
676    
677    
# Line 611  $\eta^{n+1}$: {\bf etaN} (\em DYNVARS.h) Line 714  $\eta^{n+1}$: {\bf etaN} (\em DYNVARS.h)
714    
715    
716  Once ${\eta}^{n+1}$ has been found, substituting into  Once ${\eta}^{n+1}$ has been found, substituting into
717  \ref{eq-tDsC-Hmom} yields $\vec{\bf v}^{n+1}$ if the model is  \ref{eq:discrete-time-u,eq:discrete-time-v} yields $\vec{\bf v}^{n+1}$ if the model is
718  hydrostatic ($\epsilon_{nh}=0$):  hydrostatic ($\epsilon_{nh}=0$):
719  $$  $$
720  \vec{\bf v}^{n+1} = \vec{\bf v}^{*}  \vec{\bf v}^{n+1} = \vec{\bf v}^{*}
# Line 621  $$ Line 724  $$
724  This is known as the correction step. However, when the model is  This is known as the correction step. However, when the model is
725  non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an  non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an
726  additional equation for $\phi'_{nh}$. This is obtained by substituting  additional equation for $\phi'_{nh}$. This is obtained by substituting
727  \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-Vmom} into  \ref{eq:discrete-time-u-nh}, \ref{eq:discrete-time-v-nh} and \ref{eq:discrete-time-w-nh}
728  \ref{eq-tDsC-cont}:  into continuity:
729  \begin{equation}  \begin{equation}
730  \left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1}  \left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1}
731  = \frac{1}{\Delta t} \left(  = \frac{1}{\Delta t} \left(
# Line 702  In the code, $\beta,\gamma$ are defined Line 805  In the code, $\beta,\gamma$ are defined
805  {\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from  {\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from
806  the main data file "{\it data}" and are set by default to 1,1.  the main data file "{\it data}" and are set by default to 1,1.
807    
808  Equations \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-eta} are modified as follows:  Equations \ref{eq:ustar-backward-free-surface} --
809    \ref{eq:vn+1-backward-free-surface} are modified as follows:
810  $$  $$
811  \frac{ \vec{\bf v}^{n+1} }{ \Delta t }  \frac{ \vec{\bf v}^{n+1} }{ \Delta t }
812  + {\bf \nabla}_h b_s [ \beta {\eta}^{n+1} + (1-\beta) {\eta}^{n} ]  + {\bf \nabla}_h b_s [ \beta {\eta}^{n+1} + (1-\beta) {\eta}^{n} ]

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

  ViewVC Help
Powered by ViewVC 1.1.22