1 |
% $Header$ |
% $Header$ |
2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
The convention used in this section is as follows: |
The equations of motion integrated by the model involve four |
5 |
Time is ``discretized'' using a time step $\Delta t$ |
prognostic equations for flow, $u$ and $v$, temperature, $\theta$, and |
6 |
and $\Phi^n$ refers to the variable $\Phi$ |
salt/moisture, $S$, and three diagnostic equations for vertical flow, |
7 |
at time $t = n \Delta t$ . We use the notation $\Phi^{(n)}$ |
$w$, density/buoyancy, $\rho$/$b$, and pressure/geo-potential, |
8 |
when time interpolation is required to estimate the value of $\phi$ |
$\phi_{hyd}$. In addition, the surface pressure or height may by |
9 |
at the time $n \Delta t$. |
described by either a prognostic or diagnostic equation and if |
10 |
|
non-hydrostatics terms are included then a diagnostic equation for |
11 |
\section{Time integration} |
non-hydrostatic pressure is also solved. The combination of prognostic |
12 |
|
and diagnostic equations requires a model algorithm that can march |
13 |
The discretization in time of the model equations (cf section I ) |
forward prognostic variables while satisfying constraints imposed by |
14 |
does not depend of the discretization in space of each |
diagnostic equations. |
15 |
term and so this section can be read independently. |
|
16 |
|
Since the model comes in several flavours and formulation, it would be |
17 |
The continuous form of the model equations is: |
confusing to present the model algorithm exactly as written into code |
18 |
|
along with all the switches and optional terms. Instead, we present |
19 |
|
the algorithm for each of the basic formulations which are: |
20 |
|
\begin{enumerate} |
21 |
|
\item the semi-implicit pressure method for hydrostatic equations |
22 |
|
with a rigid-lid, variables co-located in time and with |
23 |
|
Adams-Bashforth time-stepping, \label{it:a} |
24 |
|
\item as \ref{it:a}. but with an implicit linear free-surface, \label{it:b} |
25 |
|
\item as \ref{it:a}. or \ref{it:b}. but with variables staggered in time, |
26 |
|
\label{it:c} |
27 |
|
\item as \ref{it:a}. or \ref{it:b}. but with non-hydrostatic terms included, |
28 |
|
\item as \ref{it:b}. or \ref{it:c}. but with non-linear free-surface. |
29 |
|
\end{enumerate} |
30 |
|
|
31 |
|
In all the above configurations it is also possible to substitute the |
32 |
|
Adams-Bashforth with an alternative time-stepping scheme for terms |
33 |
|
evaluated explicitly in time. Since the over-arching algorithm is |
34 |
|
independent of the particular time-stepping scheme chosen we will |
35 |
|
describe first the over-arching algorithm, known as the pressure |
36 |
|
method, with a rigid-lid model in section |
37 |
|
\ref{sect:pressure-method-rigid-lid}. This algorithm is essentially |
38 |
|
unchanged, apart for some coefficients, when the rigid lid assumption |
39 |
|
is replaced with a linearized implicit free-surface, described in |
40 |
|
section \ref{sect:pressure-method-linear-backward}. These two flavours |
41 |
|
of the pressure-method encompass all formulations of the model as it |
42 |
|
exists today. The integration of explicit in time terms is out-lined |
43 |
|
in section \ref{sect:adams-bashforth} and put into the context of the |
44 |
|
overall algorithm in sections \ref{sect:adams-bashforth-sync} and |
45 |
|
\ref{sect:adams-bashforth-staggered}. Inclusion of non-hydrostatic |
46 |
|
terms requires applying the pressure method in three dimensions |
47 |
|
instead of two and this algorithm modification is described in section |
48 |
|
\ref{sect:non-hydrostatic}. Finally, the free-surface equation may be |
49 |
|
treated more exactly, including non-linear terms, and this is |
50 |
|
described in section \ref{sect:nonlinear-freesurface}. |
51 |
|
|
52 |
|
|
53 |
|
\section{Pressure method with rigid-lid} \label{sect:pressure-method-rigid-lid} |
54 |
|
|
55 |
|
\begin{figure} |
56 |
|
\begin{center} |
57 |
|
\resizebox{4.0in}{!}{\includegraphics{part2/pressure-method-rigid-lid.eps}} |
58 |
|
\end{center} |
59 |
|
\caption{ |
60 |
|
A schematic of the evolution in time of the pressure method |
61 |
|
algorithm. A prediction for the flow variables at time level $n+1$ is |
62 |
|
made based only on the explicit terms, $G^{(n+^1/_2)}$, and denoted |
63 |
|
$u^*$, $v^*$. Next, a pressure field is found such that $u^{n+1}$, |
64 |
|
$v^{n+1}$ will be non-divergent. Conceptually, the $*$ quantitites |
65 |
|
exist at time level $n+1$ but they are intermediate and only |
66 |
|
temporary.} |
67 |
|
\label{fig:pressure-method-rigid-lid} |
68 |
|
\end{figure} |
69 |
|
|
70 |
|
\begin{figure} |
71 |
|
\begin{center} \fbox{ \begin{minipage}{4.5in} \begin{tabbing} |
72 |
|
aaa \= aaa \= aaa \= aaa \= aaa \= aaa \kill |
73 |
|
FORWARD\_STEP \\ |
74 |
|
\> DYNAMICS \\ |
75 |
|
\>\> TIMESTEP \` $u^*$,$v^*$ (\ref{eq:ustar-rigid-lid},\ref{eq:vstar-rigid-lid}) \\ |
76 |
|
\> SOLVE\_FOR\_PRESSURE \\ |
77 |
|
\>\> CALC\_DIV\_GHAT \` $H\widehat{u^*}$,$H\widehat{v^*}$ (\ref{eq:elliptic}) \\ |
78 |
|
\>\> CG2D \` $\eta^{n+1}$ (\ref{eq:elliptic}) \\ |
79 |
|
\> THE\_CORRECTION\_STEP \\ |
80 |
|
\>\> CALC\_GRAD\_PHI\_SURF \` $\nabla \eta^{n+1}$ \\ |
81 |
|
\>\> CORRECTION\_STEP \` $u^{n+1}$,$v^{n+1}$ (\ref{eq:un+1-rigid-lid},\ref{eq:vn+1-rigid-lid}) |
82 |
|
\end{tabbing} \end{minipage} } \end{center} |
83 |
|
\caption{Calling tree for the pressure method alogtihm} |
84 |
|
\label{fig:call-tree-pressure-method} |
85 |
|
\end{figure} |
86 |
|
|
87 |
|
The horizontal momentum and continuity equations for the ocean |
88 |
|
(\ref{eq:ocean-mom} and \ref{eq:ocean-cont}), or for the atmosphere |
89 |
|
(\ref{eq:atmos-mom} and \ref{eq:atmos-cont}), can be summarized by: |
90 |
\begin{eqnarray} |
\begin{eqnarray} |
91 |
\partial_t \theta & = & G_\theta |
\partial_t u + g \partial_x \eta & = & G_u \\ |
92 |
\label{eq-tCsC-theta} |
\partial_t v + g \partial_y \eta & = & G_v \\ |
93 |
\\ |
\partial_x u + \partial_y v + \partial_z w & = & 0 |
|
\partial_t S & = & G_s |
|
|
\label{eq-tCsC-salt} |
|
|
\\ |
|
|
b' & = & b'(\theta,S,r) |
|
|
\\ |
|
|
\partial_r \phi'_{hyd} & = & -b' |
|
|
\label{eq-tCsC-hyd} |
|
|
\\ |
|
|
\partial_t \vec{\bf v} |
|
|
+ {\bf \nabla}_h b_s \eta |
|
|
+ \epsilon_{nh} {\bf \nabla}_h \phi'_{nh} |
|
|
& = & \vec{\bf G}_{\vec{\bf v}} |
|
|
- {\bf \nabla}_h \phi'_{hyd} |
|
|
\label{eq-tCsC-Hmom} |
|
|
\\ |
|
|
\epsilon_{nh} \frac {\partial{\dot{r}}}{\partial{t}} |
|
|
+ \epsilon_{nh} \partial_r \phi'_{nh} |
|
|
& = & \epsilon_{nh} G_{\dot{r}} |
|
|
\label{eq-tCsC-Vmom} |
|
|
\\ |
|
|
{\bf \nabla}_h \cdot \vec{\bf v} + \partial_r \dot{r} |
|
|
& = & 0 |
|
|
\label{eq-tCsC-cont} |
|
94 |
\end{eqnarray} |
\end{eqnarray} |
95 |
where |
where we are adopting the oceanic notation for brevity. All terms in |
96 |
\begin{eqnarray*} |
the momentum equations, except for surface pressure gradient, are |
97 |
G_\theta & = & |
encapsulated in the $G$ vector. The continuity equation, when |
98 |
- \vec{\bf v} \cdot {\bf \nabla} \theta + {\cal Q}_\theta |
integrated over the fluid depth, $H$, and with the rigid-lid/no normal |
99 |
\\ |
flow boundary conditions applied, becomes: |
100 |
G_S & = & |
\begin{equation} |
101 |
- \vec{\bf v} \cdot {\bf \nabla} S + {\cal Q}_S |
\partial_x H \widehat{u} + \partial_y H \widehat{v} = 0 |
102 |
\\ |
\label{eq:rigid-lid-continuity} |
103 |
\vec{\bf G}_{\vec{\bf v}} |
\end{equation} |
104 |
|
Here, $H\widehat{u} = \int_H u dz$ is the depth integral of $u$, |
105 |
|
similarly for $H\widehat{v}$. The rigid-lid approzimation sets $w=0$ |
106 |
|
at the lid so that it does not move but allows a pressure to be |
107 |
|
exerted on the fluid by the lid. The horizontal momentum equations and |
108 |
|
vertically integrated continuity equation are be discretized in time |
109 |
|
and space as follows: |
110 |
|
\begin{eqnarray} |
111 |
|
u^{n+1} + \Delta t g \partial_x \eta^{n+1} |
112 |
|
& = & u^{n} + \Delta t G_u^{(n+1/2)} |
113 |
|
\label{eq:discrete-time-u} |
114 |
|
\\ |
115 |
|
v^{n+1} + \Delta t g \partial_y \eta^{n+1} |
116 |
|
& = & v^{n} + \Delta t G_v^{(n+1/2)} |
117 |
|
\label{eq:discrete-time-v} |
118 |
|
\\ |
119 |
|
\partial_x H \widehat{u^{n+1}} |
120 |
|
+ \partial_y H \widehat{v^{n+1}} & = & 0 |
121 |
|
\label{eq:discrete-time-cont-rigid-lid} |
122 |
|
\end{eqnarray} |
123 |
|
As written here, terms on the LHS all involve time level $n+1$ and are |
124 |
|
referred to as implicit; the implicit backward time stepping scheme is |
125 |
|
being used. All other terms in the RHS are explicit in time. The |
126 |
|
thermodynamic quantities are integrated forward in time in parallel |
127 |
|
with the flow and will be discussed later. For the purposes of |
128 |
|
describing the pressure method it suffices to say that the hydrostatic |
129 |
|
pressure gradient is explicit and so can be included in the vector |
130 |
|
$G$. |
131 |
|
|
132 |
|
Substituting the two momentum equations into the depth integrated |
133 |
|
continuity equation eliminates $u^{n+1}$ and $v^{n+1}$ yeilding an |
134 |
|
elliptic equation for $\eta^{n+1}$. Equations |
135 |
|
\ref{eq:discrete-time-u}, \ref{eq:discrete-time-v} and |
136 |
|
\ref{eq:discrete-time-cont-rigid-lid} can then be re-arranged as follows: |
137 |
|
\begin{eqnarray} |
138 |
|
u^{*} & = & u^{n} + \Delta t G_u^{(n+1/2)} \label{eq:ustar-rigid-lid} \\ |
139 |
|
v^{*} & = & v^{n} + \Delta t G_v^{(n+1/2)} \label{eq:vstar-rigid-lid} \\ |
140 |
|
\partial_x \Delta t g H \partial_x \eta^{n+1} |
141 |
|
+ \partial_y \Delta t g H \partial_y \eta^{n+1} |
142 |
& = & |
& = & |
143 |
- \vec{\bf v} \cdot {\bf \nabla} \vec{\bf v} |
\partial_x H \widehat{u^{*}} |
144 |
- f \hat{\bf k} \wedge \vec{\bf v} |
+ \partial_y H \widehat{v^{*}} \label{eq:elliptic} |
|
+ \vec{\cal F}_{\vec{\bf v}} |
|
145 |
\\ |
\\ |
146 |
G_{\dot{r}} |
u^{n+1} & = & u^{*} - \Delta t g \partial_x \eta^{n+1} \label{eq:un+1-rigid-lid}\\ |
147 |
& = & |
v^{n+1} & = & v^{*} - \Delta t g \partial_y \eta^{n+1} \label{eq:vn+1-rigid-lid} |
|
- \vec{\bf v} \cdot {\bf \nabla} \dot{r} |
|
|
+ {\cal F}_{\dot{r}} |
|
|
\end{eqnarray*} |
|
|
The exact form of all the ``{\it G}''s terms is described in the next |
|
|
section \ref{sect:discrete}. Here its sufficient to mention that they contains |
|
|
all the RHS terms except the pressure/geo-potential terms. |
|
|
|
|
|
The switch $\epsilon_{nh}$ allows one to activate the non-hydrostatic |
|
|
mode ($\epsilon_{nh}=1$) for the ocean model. Otherwise, in the |
|
|
hydrostatic limit $\epsilon_{nh} = 0$ and equation \ref{eq-tCsC-Vmom} |
|
|
is not used. |
|
|
|
|
|
As discussed in section \ref{sect:1.3.6.2}, the equation for $\eta$ is |
|
|
obtained by integrating the continuity equation over the entire depth |
|
|
of the fluid, from $R_{fixed}(x,y)$ up to $R_o(x,y)$. The linear free |
|
|
surface evolves according to: |
|
|
\begin{eqnarray} |
|
|
\epsilon_{fs} \partial_t \eta = |
|
|
\left. \dot{r} \right|_{r=r_{surf}} + \epsilon_{fw} (P-E) = |
|
|
- {\bf \nabla} \cdot \int_{R_{fixed}}^{R_o} \vec{\bf v} dr |
|
|
+ \epsilon_{fw} (P-E) |
|
|
\label{eq-tCsC-eta} |
|
148 |
\end{eqnarray} |
\end{eqnarray} |
149 |
|
Equations \ref{eq:ustar-rigid-lid} to \ref{eq:vn+1-rigid-lid}, solved |
150 |
|
sequentially, represent the pressure method algorithm used in the |
151 |
|
model. The essence of the pressure method lies in the fact that any |
152 |
|
explicit prediction for the flow would lead to a divergence flow field |
153 |
|
so a pressure field must be found that keeps the flow non-divergent |
154 |
|
over each step of the integration. The particular location in time of |
155 |
|
the pressure field is somewhat ambiguous; in |
156 |
|
Fig.~\ref{fig:pressure-method-rigid-lid} we depicted as co-located |
157 |
|
with the future flow field (time level $n+1$) but it could equally |
158 |
|
have been drawn as staggered in time with the flow. |
159 |
|
|
160 |
|
The correspondance to the code is as follows: |
161 |
|
\begin{itemize} |
162 |
|
\item |
163 |
|
the prognostic phase, equations \ref{eq:ustar-rigid-lid} and \ref{eq:vstar-rigid-lid}, |
164 |
|
stepping forward $u^n$ and $v^n$ to $u^{*}$ and $v^{*}$ is coded in |
165 |
|
{\em TIMESTEP.F} |
166 |
|
\item |
167 |
|
the vertical integration, $H \widehat{u^*}$ and $H |
168 |
|
\widehat{v^*}$, divergence and invertion of the elliptic operator in |
169 |
|
equation \ref{eq:elliptic} is coded in {\em |
170 |
|
SOLVE\_FOR\_PRESSURE.F} |
171 |
|
\item |
172 |
|
finally, the new flow field at time level $n+1$ given by equations |
173 |
|
\ref{eq:un+1-rigid-lid} and \ref{eq:vn+1-rigid-lid} is calculated in {\em CORRECTION\_STEP.F}. |
174 |
|
\end{itemize} |
175 |
|
The calling tree for these routines is given in |
176 |
|
Fig.~\ref{fig:call-tree-pressure-method}. |
177 |
|
|
178 |
|
|
179 |
Here, $\epsilon_{fs}$ is a flag to switch between the free-surface, |
|
180 |
$\epsilon_{fs}=1$, and a rigid-lid, $\epsilon_{fs}=0$. The flag |
\paragraph{Need to discuss implicit viscosity somewhere:} |
181 |
$\epsilon_{fw}$ determines whether an exchange of fresh water is |
\begin{eqnarray} |
182 |
included at the ocean surface (natural BC) ($\epsilon_{fw} = 1$) or |
\frac{1}{\Delta t} u^{n+1} - \partial_z A_v \partial_z u^{n+1} |
183 |
not ($\epsilon_{fw} = 0$). |
+ g \partial_x \eta^{n+1} & = & \frac{1}{\Delta t} u^{n} + |
184 |
|
G_u^{(n+1/2)} |
|
The hydrostatic potential is found by integrating (equation |
|
|
\ref{eq-tCsC-hyd}) with the boundary condition that |
|
|
$\phi'_{hyd}(r=R_o) = 0$: |
|
|
\begin{eqnarray*} |
|
|
& & |
|
|
\int_{r'}^{R_o} \partial_r \phi'_{hyd} dr = |
|
|
\left[ \phi'_{hyd} \right]_{r'}^{R_o} = |
|
|
\int_{r'}^{R_o} - b' dr |
|
185 |
\\ |
\\ |
186 |
\Rightarrow & & |
\frac{1}{\Delta t} v^{n+1} - \partial_z A_v \partial_z v^{n+1} |
187 |
\phi'_{hyd}(x,y,r') = \int_{r'}^{R_o} b' dr |
+ g \partial_y \eta^{n+1} & = & \frac{1}{\Delta t} v^{n} + G_v^{(n+1/2)} |
188 |
\end{eqnarray*} |
\end{eqnarray} |
189 |
|
|
|
\subsection{General method} |
|
|
|
|
|
An overview of the general method is now presented with explicit |
|
|
references to the Fortran code. We often refer to the discretized |
|
|
equations of the model that are detailed in the following sections. |
|
|
|
|
|
The general algorithm consist of a ``predictor step'' that computes |
|
|
the forward tendencies ("G" terms") comprising of explicit-in-time |
|
|
terms and the ``first guess'' values (star notation): $\theta^*, S^*, |
|
|
\vec{\bf v}^*$ (and $\dot{r}^*$ in non-hydrostatic mode). This is done |
|
|
in the two routines {\it THERMODYNAMICS} and {\it DYNAMICS}. |
|
|
|
|
|
Terms that are integrated implicitly in time are handled at the end of |
|
|
the {\it THERMODYNAMICS} and {\it DYNAMICS} routines. Then the |
|
|
surface pressure and non hydrostatic pressure are solved for in ({\it |
|
|
SOLVE\_FOR\_PRESSURE}). |
|
|
|
|
|
Finally, in the ``corrector step'', (routine {\it |
|
|
THE\_CORRECTION\_STEP}) the new values of $u,v,w,\theta,S$ are |
|
|
determined (see details in \ref{sect:II.1.3}). |
|
|
|
|
|
At this point, the regular time stepping process is complete. However, |
|
|
after the correction step there are optional adjustments such as |
|
|
convective adjustment or filters (zonal FFT filter, shapiro filter) |
|
|
that can be applied on both momentum and tracer fields, just prior to |
|
|
incrementing the time level to $n+1$. |
|
|
|
|
|
Since the pressure solver precision is of the order of the ``target |
|
|
residual'' and can be lower than the the computer truncation error, |
|
|
and also because some filters might alter the divergence part of the |
|
|
flow field, a final evaluation of the surface r anomaly $\eta^{n+1}$ |
|
|
is performed in {\it CALC\_EXACT\_ETA}. This ensures exact volume |
|
|
conservation. Note that there is no need for an equivalent |
|
|
non-hydrostatic ``exact conservation'' step, since by default $w$ is |
|
|
already computed after the filters are applied. |
|
|
|
|
|
Optional forcing terms (usually part of a physics ``package''), that |
|
|
account for a specific source or sink process (e.g. condensation as a |
|
|
sink of water vapor Q) are generally incorporated in the main |
|
|
algorithm as follows: at the the beginning of the time step, the |
|
|
additional tendencies are computed as a function of the present state |
|
|
(time step $n$) and external forcing; then within the main part of |
|
|
model, only those new tendencies are added to the model variables. |
|
|
|
|
|
[more details needed]\\ |
|
|
|
|
|
The atmospheric physics follows this general scheme. |
|
|
|
|
|
[more about C\_grid, A\_grid conversion \& drag term]\\ |
|
190 |
|
|
191 |
|
\section{Pressure method with implicit linear free-surface} |
192 |
|
\label{sect:pressure-method-linear-backward} |
193 |
|
|
194 |
|
The rigid-lid approximation filters out external gravity waves |
195 |
|
subsequently modifying the dispersion relation of barotropic Rossby |
196 |
|
waves. The discrete form of the elliptic equation has some zero |
197 |
|
eigen-values which makes it a potentially tricky or inefficient |
198 |
|
problem to solve. |
199 |
|
|
200 |
\subsection{Standard synchronous time stepping} |
The rigid-lid approximation can be easily replaced by a linearization |
201 |
|
of the free-surface equation which can be written: |
202 |
In the standard formulation, the surface pressure is evaluated at time |
\begin{equation} |
203 |
step n+1 (an implicit method). Equations \ref{eq-tCsC-theta} to |
\partial_t \eta + \partial_x H \widehat{u} + \partial_y H \widehat{v} = P-E+R |
204 |
\ref{eq-tCsC-cont} are then discretized in time as follows: |
\label{eq:linear-free-surface=P-E+R} |
205 |
|
\end{equation} |
206 |
|
which differs from the depth integrated continuity equation with |
207 |
|
rigid-lid (\ref{eq:rigid-lid-continuity}) by the time-dependent term |
208 |
|
and fresh-water source term. |
209 |
|
|
210 |
|
Equation \ref{eq:discrete-time-cont-rigid-lid} in the rigid-lid |
211 |
|
pressure method is then replaced by the time discretization of |
212 |
|
\ref{eq:linear-free-surface=P-E+R} which is: |
213 |
|
\begin{equation} |
214 |
|
\eta^{n+1} |
215 |
|
+ \Delta t \partial_x H \widehat{u^{n+1}} |
216 |
|
+ \Delta t \partial_y H \widehat{v^{n+1}} |
217 |
|
= |
218 |
|
\eta^{n} |
219 |
|
+ \Delta t ( P - E + R ) |
220 |
|
\label{eq:discrete-time-backward-free-surface} |
221 |
|
\end{equation} |
222 |
|
where the use of flow at time level $n+1$ makes the method implicit |
223 |
|
and backward in time. The is the preferred scheme since it still |
224 |
|
filters the fast unresolved wave motions by damping them. A centered |
225 |
|
scheme, such as Crank-Nicholson, would alias the energy of the fast |
226 |
|
modes onto slower modes of motion. |
227 |
|
|
228 |
|
As for the rigid-lid pressure method, equations |
229 |
|
\ref{eq:discrete-time-u}, \ref{eq:discrete-time-v} and |
230 |
|
\ref{eq:discrete-time-backward-free-surface} can be re-arranged as follows: |
231 |
\begin{eqnarray} |
\begin{eqnarray} |
232 |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
u^{*} & = & u^{n} + \Delta t G_u^{(n+1/2)} \label{eq:ustar-backward-free-surface} \\ |
233 |
\theta^{n+1} & = & \theta^* |
v^{*} & = & v^{n} + \Delta t G_v^{(n+1/2)} \label{eq:vstar-backward-free-surface} \\ |
234 |
\label{eq-tDsC-theta} |
\eta^* & = & \epsilon_{fs} \left( \eta^{n} +P-E+R \right)- \Delta t |
235 |
\\ |
\partial_x H \widehat{u^{*}} |
236 |
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
+ \partial_y H \widehat{v^{*}} |
237 |
S^{n+1} & = & S^* |
\\ |
238 |
\label{eq-tDsC-salt} |
\partial_x g H \partial_x \eta^{n+1} |
239 |
\\ |
+ \partial_y g H \partial_y \eta^{n+1} |
240 |
%{b'}^{n} & = & b'(\theta^{n},S^{n},r) |
- \frac{\epsilon_{fs} \eta^{n+1}}{\Delta t^2} |
|
%\partial_r {\phi'_{hyd}}^{n} & = & {-b'}^{n} |
|
|
%\\ |
|
|
{\phi'_{hyd}}^{n} & = & \int_{r'}^{R_o} b'(\theta^{n},S^{n},r) dr |
|
|
\label{eq-tDsC-hyd} |
|
|
\\ |
|
|
\vec{\bf v} ^{n+1} |
|
|
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
|
|
+ \epsilon_{nh} \Delta t {\bf \nabla} {\phi'_{nh}}^{n+1} |
|
|
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
|
241 |
& = & |
& = & |
242 |
\vec{\bf v}^* |
- \frac{\eta^*}{\Delta t^2} |
243 |
\label{eq-tDsC-Hmom} |
\label{eq:elliptic-backward-free-surface} |
|
\\ |
|
|
\epsilon_{fs} {\eta}^{n+1} + \Delta t |
|
|
{\bf \nabla}_h \cdot \int_{R_{fixed}}^{R_o} \vec{\bf v}^{n+1} dr |
|
|
& = & |
|
|
\epsilon_{fs} {\eta}^{n} + \epsilon_{fw} \Delta_t (P-E)^{n} |
|
|
\nonumber |
|
|
\\ |
|
|
% = \epsilon_{fs} {\eta}^{n} & + & \epsilon_{fw} \Delta_t (P-E)^{n} |
|
|
\label{eq-tDsC-eta} |
|
|
\\ |
|
|
\epsilon_{nh} \left( \dot{r} ^{n+1} |
|
|
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
|
|
\right) |
|
|
& = & \epsilon_{nh} \dot{r}^* |
|
|
\label{eq-tDsC-Vmom} |
|
244 |
\\ |
\\ |
245 |
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
u^{n+1} & = & u^{*} - \Delta t g \partial_x \eta^{n+1} \label{eq:un+1-backward-free-surface}\\ |
246 |
& = & 0 |
v^{n+1} & = & v^{*} - \Delta t g \partial_y \eta^{n+1} \label{eq:vn+1-backward-free-surface} |
|
\label{eq-tDsC-cont} |
|
247 |
\end{eqnarray} |
\end{eqnarray} |
248 |
where |
Equations~\ref{eq:ustar-backward-free-surface} |
249 |
|
to~\ref{eq:vn+1-backward-free-surface}, solved sequentially, represent |
250 |
|
the pressure method algorithm with a backward implicit, linearized |
251 |
|
free surface. The method is still formerly a pressure method because |
252 |
|
in the limit of large $\Delta t$ the rigid-lid method is |
253 |
|
reovered. However, the implicit treatment of the free-surface allows |
254 |
|
the flow to be divergent and for the surface pressure/elevation to |
255 |
|
respond on a finite time-scale (as opposed to instantly). To recovere |
256 |
|
the rigid-lid formulation, we introduced a switch-like parameter, |
257 |
|
$\epsilon_{fs}$, which selects between the free-surface and rigid-lid; |
258 |
|
$\epsilon_{fs}=1$ allows the free-surface to evolve; $\epsilon_{fs}=0$ |
259 |
|
imposes the rigid-lid. The evolution in time and location of variables |
260 |
|
is exactly as it was for the rigid-lid model so that |
261 |
|
Fig.~\ref{fig:pressure-method-rigid-lid} is still |
262 |
|
applicable. Similarly, the calling sequence, given in |
263 |
|
Fig.~\ref{fig:call-tree-pressure-method}, is as for the |
264 |
|
pressure-method. |
265 |
|
|
266 |
|
|
267 |
|
\section{Explicit time-stepping: Adams-Bashforth} |
268 |
|
\label{sect:adams-bashforth} |
269 |
|
|
270 |
|
In describing the the pressure method above we deferred describing the |
271 |
|
time discretization of the explicit terms. We have historically used |
272 |
|
the quasi-second order Adams-Bashforth method for all explicit terms |
273 |
|
in both the momentum and tracer equations. This is still the default |
274 |
|
mode of operation but it is now possible to use alternate schemes for |
275 |
|
tracers (see section \ref{sect:tracer-advection}). |
276 |
|
|
277 |
|
\begin{figure} |
278 |
|
\begin{center} \fbox{ \begin{minipage}{4.5in} \begin{tabbing} |
279 |
|
aaa \= aaa \= aaa \= aaa \= aaa \= aaa \kill |
280 |
|
FORWARD\_STEP \\ |
281 |
|
\> THERMODYNAMICS \\ |
282 |
|
\>\> CALC\_GT \\ |
283 |
|
\>\>\> GAD\_CALC\_RHS \` $G_\theta^n = G_\theta( u, \theta^n )$ \\ |
284 |
|
\>\>\> EXTERNAL\_FORCING \` $G_\theta^n = G_\theta^n + {\cal Q}$ \\ |
285 |
|
\>\>\> ADAMS\_BASHFORTH2 \` $G_\theta^{(n+1/2)}$ (\ref{eq:adams-bashforth2}) \\ |
286 |
|
\>\> TIMESTEP\_TRACER \` $\tau^*$ (\ref{eq:taustar}) \\ |
287 |
|
\>\> IMPLDIFF \` $\tau^{(n+1)}$ (\ref{eq:tau-n+1-implicit}) |
288 |
|
\end{tabbing} \end{minipage} } \end{center} |
289 |
|
\caption{ |
290 |
|
Calling tree for the Adams-Bashforth time-stepping of temperature with |
291 |
|
implicit diffusion.} |
292 |
|
\label{fig:call-tree-adams-bashforth} |
293 |
|
\end{figure} |
294 |
|
|
295 |
|
In the previous sections, we summarized an explicit scheme as: |
296 |
|
\begin{equation} |
297 |
|
\tau^{*} = \tau^{n} + \Delta t G_\tau^{(n+1/2)} |
298 |
|
\label{eq:taustar} |
299 |
|
\end{equation} |
300 |
|
where $\tau$ could be any prognostic variable ($u$, $v$, $\theta$ or |
301 |
|
$S$) and $\tau^*$ is an explicit estimate of $\tau^{n+1}$ and would be |
302 |
|
exact if not for implicit-in-time terms. The parenthesis about $n+1/2$ |
303 |
|
indicates that the term is explicit and extrapolated forward in time |
304 |
|
and for this we use the quasi-second order Adams-Bashforth method: |
305 |
|
\begin{equation} |
306 |
|
G_\tau^{(n+1/2)} = ( 3/2 + \epsilon_{AB}) G_\tau^n |
307 |
|
- ( 1/2 + \epsilon_{AB}) G_\tau^{n-1} |
308 |
|
\label{eq:adams-bashforth2} |
309 |
|
\end{equation} |
310 |
|
This is a linear extrapolation, forward in time, to |
311 |
|
$t=(n+1/2+{\epsilon_{AB}})\Delta t$. An extrapolation to the mid-point |
312 |
|
in time, $t=(n+1/2)\Delta t$, corresponding to $\epsilon_{AB}=0$, |
313 |
|
would be second order accurate but is weakly unstable for oscillatory |
314 |
|
terms. A small but finite value for $\epsilon_{AB}$ stabilizes the |
315 |
|
method. Strictly speaking, damping terms such as diffusion and |
316 |
|
dissipation, and fixed terms (forcing), do not need to be inside the |
317 |
|
Adams-Bashforth extrapolation. However, in the current code, it is |
318 |
|
simpler to include these terms and this can be justified if the flow |
319 |
|
and forcing evolves smoothly. Problems can, and do, arise when forcing |
320 |
|
or motions are high frequency and this corresponds to a reduced |
321 |
|
stability compared to a simple forward time-stepping of such terms. |
322 |
|
|
323 |
|
A stability analysis for an oscillation equation should be given at this point. |
324 |
|
\marginpar{AJA needs to find his notes on this...} |
325 |
|
|
326 |
|
A stability analysis for a relaxation equation should be given at this point. |
327 |
|
\marginpar{...and for this too.} |
328 |
|
|
329 |
|
|
330 |
|
\section{Implicit time-stepping: backward method} |
331 |
|
|
332 |
|
Vertical diffusion and viscosity can be treated implicitly in time |
333 |
|
using the backward method which is an intrinsic scheme. For tracers, |
334 |
|
the time discrretized equation is: |
335 |
|
\begin{equation} |
336 |
|
\tau^{n+1} - \Delta t \partial_r \kappa_v \partial_r \tau^{n+1} = |
337 |
|
\tau^{n} + \Delta t G_\tau^{(n+1/2)} |
338 |
|
\label{eq:implicit-diffusion} |
339 |
|
\end{equation} |
340 |
|
where $G_\tau^{(n+1/2)}$ is the remaining explicit terms extrapolated |
341 |
|
using the Adams-Bashforth method as described above. Equation |
342 |
|
\ref{eq:implicit-diffusion} can be split split into: |
343 |
\begin{eqnarray} |
\begin{eqnarray} |
344 |
\theta^* & = & |
\tau^* & = & \tau^{n} + \Delta t G_\tau^{(n+1/2)} |
345 |
\theta ^{n} + \Delta t G_{\theta} ^{(n+1/2)} |
\label{eq:taustar-implicit} \\ |
346 |
\\ |
\tau^{n+1} & = & {\cal L}_\tau^{-1} ( \tau^* ) |
347 |
S^* & = & |
\label{eq:tau-n+1-implicit} |
|
S ^{n} + \Delta t G_{S} ^{(n+1/2)} |
|
|
\\ |
|
|
\vec{\bf v}^* & = & |
|
|
\vec{\bf v}^{n} + \Delta t \vec{\bf G}_{\vec{\bf v}} ^{(n+1/2)} |
|
|
+ \Delta t {\bf \nabla}_h {\phi'_{hyd}}^{(n+1/2)} |
|
|
\\ |
|
|
\dot{r}^* & = & |
|
|
\dot{r} ^{n} + \Delta t G_{\dot{r}} ^{(n+1/2)} |
|
348 |
\end{eqnarray} |
\end{eqnarray} |
349 |
|
where ${\cal L}_\tau^{-1}$ is the inverse of the operator |
|
Note that implicit vertical viscosity and diffusivity terms are not |
|
|
considered as part of the ``{\it G}'' terms, but are written |
|
|
separately here. |
|
|
|
|
|
The default time-stepping method is the Adams-Bashforth quasi-second |
|
|
order scheme in which the ``G'' terms are extrapolated forward in time |
|
|
from time-levels $n-1$ and $n$ to time-level $n+1/2$ and provides a |
|
|
simple but stable algorithm: |
|
350 |
\begin{equation} |
\begin{equation} |
351 |
G^{(n+1/2)} = G^n + (1/2+\epsilon_{AB}) (G^n - G^{n-1}) |
{\cal L} = \left[ 1 + \Delta t \partial_r \kappa_v \partial_r \right] |
352 |
\end{equation} |
\end{equation} |
353 |
where $\epsilon_{AB}$ is a small number used to stabilize the time |
Equation \ref{eq:taustar-implicit} looks exactly as \ref{eq:taustar} |
354 |
stepping. |
while \ref{eq:tau-n+1-implicit} involves an operator or matrix |
355 |
|
inversion. By re-arranging \ref{eq:implicit-diffusion} in this way we |
356 |
In the standard non-staggered formulation, the Adams-Bashforth time |
have cast the method as an explicit prediction step and an implicit |
357 |
stepping is also applied to the hydrostatic pressure/geo-potential |
step allowing the latter to be inserted into the over all algorithm |
358 |
gradient, $\nabla_h \Phi'_{hyd}$. Note that presently, this term is in |
with minimal interference. |
359 |
fact incorporated to the $\vec{\bf G}_{\vec{\bf v}}$ arrays ({\bf |
|
360 |
gU,gV}). |
Fig.~\ref{fig:call-tree-adams-bashforth} shows the calling sequence for |
361 |
\marginpar{JMC: Clarify ``this term''?} |
stepping forward a tracer variable such as temperature. |
362 |
|
|
363 |
\fbox{ \begin{minipage}{4.75in} |
In order to fit within the pressure method, the implicit viscosity |
364 |
{\em S/R TIMESTEP} ({\em timestep.F}) |
must not alter the barotropic flow. In other words, it can on ly |
365 |
|
redistribute momentum in the vertical. The upshot of this is that |
366 |
$G_u^n$: {\bf Gu} ({\em DYNVARS.h}) |
although vertical viscosity may be backward implicit and |
367 |
|
unconditionally stable, no-slip boundary conditions may not be made |
368 |
$G_u^{n-1}, u^*$: {\bf GuNm1} ({\em DYNVARS.h}) |
implicit and are thus cast as a an explicit drag term. |
369 |
|
|
370 |
$G_v^n$: {\bf Gv} ({\em DYNVARS.h}) |
\section{Synchronous time-stepping: variables co-located in time} |
371 |
|
\label{sect:adams-bashforth-sync} |
372 |
$G_v^{n-1}, v^*$: {\bf GvNm1} ({\em DYNVARS.h}) |
|
373 |
|
\begin{figure} |
374 |
$G_u^{(n+1/2)}$: {\bf GuTmp} (local) |
\begin{center} |
375 |
|
\resizebox{5.0in}{!}{\includegraphics{part2/adams-bashforth-sync.eps}} |
376 |
$G_v^{(n+1/2)}$: {\bf GvTmp} (local) |
\end{center} |
377 |
|
\caption{ |
378 |
\end{minipage} } |
A schematic of the explicit Adams-Bashforth and implicit time-stepping |
379 |
|
phases of the algorithm. All prognostic variables are co-located in |
380 |
|
time. Explicit tendancies are evaluated at time level $n$ as a |
381 |
|
function of the state at that time level (dotted arrow). The explicit |
382 |
|
tendancy from the previous time level, $n-1$, is used to extrapolate |
383 |
|
tendancies to $n+1/2$ (dashed arrow). This extrapolated tendancy |
384 |
|
allows variables to be stably integrated forward-in-time to render an |
385 |
|
estimate ($*$-variables) at the $n+1$ time level (solid |
386 |
|
arc-arrow). The operator ${\cal L}$ formed from implicit-in-time terms |
387 |
|
is solved to yield the state variables at time level $n+1$. } |
388 |
|
\label{fig:adams-bashforth-sync} |
389 |
|
\end{figure} |
390 |
|
|
391 |
|
\begin{figure} |
392 |
|
\begin{center} \fbox{ \begin{minipage}{4.5in} \begin{tabbing} |
393 |
|
aaa \= aaa \= aaa \= aaa \= aaa \= aaa \kill |
394 |
|
FORWARD\_STEP \\ |
395 |
|
\> THERMODYNAMICS \\ |
396 |
|
\>\> CALC\_GT \\ |
397 |
|
\>\>\> GAD\_CALC\_RHS \` $G_\theta^n = G_\theta( u, \theta^n )$ (\ref{eq:Gt-n-sync})\\ |
398 |
|
\>\>\> EXTERNAL\_FORCING \` $G_\theta^n = G_\theta^n + {\cal Q}$ \\ |
399 |
|
\>\>\> ADAMS\_BASHFORTH2 \` $G_\theta^{(n+1/2)}$ (\ref{eq:Gt-n+5-sync}) \\ |
400 |
|
\>\> TIMESTEP\_TRACER \` $\tau^*$ (\ref{eq:tstar-sync}) \\ |
401 |
|
\>\> IMPLDIFF \` $\tau^{(n+1)}$ (\ref{eq:t-n+1-sync}) \\ |
402 |
|
\> DYNAMICS \\ |
403 |
|
\>\> CALC\_PHI\_HYD \` $\phi_{hyd}^n$ (\ref{eq:phi-hyd-sync}) \\ |
404 |
|
\>\> MOM\_FLUXFORM or MOM\_VECINV \` $G_{\vec{\bf v}}^n$ (\ref{eq:Gv-n-sync})\\ |
405 |
|
\>\> TIMESTEP \` $\vec{\bf v}^*$ (\ref{eq:Gv-n+5-sync}, \ref{eq:vstar-sync}) \\ |
406 |
|
\>\> IMPLDIFF \` $\vec{\bf v}^{**}$ (\ref{eq:vstarstar-sync}) \\ |
407 |
|
\> SOLVE\_FOR\_PRESSURE \\ |
408 |
|
\>\> CALC\_DIV\_GHAT \` $\eta^*$ (\ref{eq:nstar-sync}) \\ |
409 |
|
\>\> CG2D \` $\eta^{n+1}$ (\ref{eq:elliptic-sync}) \\ |
410 |
|
\> THE\_CORRECTION\_STEP \\ |
411 |
|
\>\> CALC\_GRAD\_PHI\_SURF \` $\nabla \eta^{n+1}$ \\ |
412 |
|
\>\> CORRECTION\_STEP \` $u^{n+1}$,$v^{n+1}$ (\ref{eq:v-n+1-sync}) |
413 |
|
\end{tabbing} \end{minipage} } \end{center} |
414 |
|
\caption{ |
415 |
|
Calling tree for the overall synchronous algorithm using |
416 |
|
Adams-Bashforth time-stepping.} |
417 |
|
\label{fig:call-tree-adams-bashforth-sync} |
418 |
|
\end{figure} |
419 |
|
|
420 |
|
The Adams-Bashforth extrapolation of explicit tendancies fits neatly |
421 |
|
into the pressure method algorithm when all state variables are |
422 |
|
co-locacted in time. Fig.~\ref{fig:adams-bashforth-sync} illustrates |
423 |
|
the location of variables in time and the evolution of the algorithm |
424 |
|
with time. The algorithm can be represented by the sequential solution |
425 |
|
of the follow equations: |
426 |
|
\begin{eqnarray} |
427 |
|
G_{\theta,S}^{n} & = & G_{\theta,S} ( u^n, \theta^n, S^n ) |
428 |
|
\label{eq:Gt-n-sync} \\ |
429 |
|
G_{\theta,S}^{(n+1/2)} & = & (3/2+\epsilon_{AB}) G_{\theta,S}^{n}-(1/2+\epsilon_{AB}) G_{\theta,S}^{n-1} |
430 |
|
\label{eq:Gt-n+5-sync} \\ |
431 |
|
(\theta^*,S^*) & = & (\theta^{n},S^{n}) + \Delta t G_{\theta,S}^{(n+1/2)} |
432 |
|
\label{eq:tstar-sync} \\ |
433 |
|
(\theta^{n+1},S^{n+1}) & = & {\cal L}^{-1}_{\theta,S} (\theta^*,S^*) |
434 |
|
\label{eq:t-n+1-sync} \\ |
435 |
|
\phi^n_{hyd} & = & \int b(\theta^n,S^n) dr |
436 |
|
\label{eq:phi-hyd-sync} \\ |
437 |
|
\vec{\bf G}_{\vec{\bf v}}^{n} & = & \vec{\bf G}_{\vec{\bf v}} ( \vec{\bf v}^n, \phi^n_{hyd} ) |
438 |
|
\label{eq:Gv-n-sync} \\ |
439 |
|
\vec{\bf G}_{\vec{\bf v}}^{(n+1/2)} & = & (3/2 + \epsilon_{AB} ) \vec{\bf G}_{\vec{\bf v}}^{n} - (1/2 + \epsilon_{AB} ) \vec{\bf G}_{\vec{\bf v}}^{n-1} |
440 |
|
\label{eq:Gv-n+5-sync} \\ |
441 |
|
\vec{\bf v}^{*} & = & \vec{\bf v}^{n} + \Delta t \vec{\bf G}_{\vec{\bf v}}^{(n+1/2)} |
442 |
|
\label{eq:vstar-sync} \\ |
443 |
|
\vec{\bf v}^{**} & = & {\cal L}_{\vec{\bf v}}^{-1} ( \vec{\bf v}^* ) |
444 |
|
\label{eq:vstarstar-sync} \\ |
445 |
|
\eta^* & = & \epsilon_{fs} \left( \eta^{n} +P-E+R \right)- \Delta t |
446 |
|
\nabla \cdot H \widehat{ \vec{\bf v}^{**} } |
447 |
|
\label{eq:nstar-sync} \\ |
448 |
|
\nabla \cdot g H \nabla \eta^{n+1} - \frac{\epsilon_{fs} \eta^{n+1}}{\Delta t^2} |
449 |
|
& = & - \frac{\eta^*}{\Delta t^2} |
450 |
|
\label{eq:elliptic-sync} \\ |
451 |
|
\vec{\bf v}^{n+1} & = & \vec{\bf v}^{*} - \Delta t g \nabla \eta^{n+1} |
452 |
|
\label{eq:v-n+1-sync} |
453 |
|
\end{eqnarray} |
454 |
|
Fig.~\ref{fig:adams-bashforth-sync} illustrates the location of |
455 |
|
variables in time and evolution of the algorithm with time. The |
456 |
|
Adams-Bashforth extrapolation of the tracer tendancies is illustrated |
457 |
|
byt the dashed arrow, the prediction at $n+1$ is indicated by the |
458 |
|
solid arc. Inversion of the implicit terms, ${\cal |
459 |
|
L}^{-1}_{\theta,S}$, then yields the new tracer fields at $n+1$. All |
460 |
|
these operations are carried out in subroutine {\em THERMODYNAMICS} an |
461 |
|
subsidiaries, which correspond to equations \ref{eq:Gt-n-sync} to |
462 |
|
\ref{eq:t-n+1-sync}. |
463 |
|
Similarly illustrated is the Adams-Bashforth extrapolation of |
464 |
|
accelerations, stepping forward and solving of implicit viscosity and |
465 |
|
surface pressure gradient terms, corresponding to equations |
466 |
|
\ref{eq:Gv-n-sync} to \ref{eq:v-n+1-sync}. |
467 |
|
These operations are carried out in subroutines {\em DYNAMCIS}, {\em |
468 |
|
SOLVE\_FOR\_PRESSURE} and {\em THE\_CORRECTION\_STEP}. This, then, |
469 |
|
represents an entire algorithm for stepping forward the model one |
470 |
|
time-step. The corresponding calling tree is given in |
471 |
|
\ref{fig:call-tree-adams-bashforth-sync}. |
472 |
|
|
473 |
|
\section{Staggered baroclinic time-stepping} |
474 |
|
\label{sect:adams-bashforth-staggered} |
475 |
|
|
476 |
|
\begin{figure} |
477 |
|
\begin{center} |
478 |
|
\resizebox{5.5in}{!}{\includegraphics{part2/adams-bashforth-staggered.eps}} |
479 |
|
\end{center} |
480 |
|
\caption{ |
481 |
|
A schematic of the explicit Adams-Bashforth and implicit time-stepping |
482 |
|
phases of the algorithm but with staggering in time of thermodynamic |
483 |
|
variables with the flow. Explicit thermodynamics tendancies are |
484 |
|
evaluated at time level $n-1/2$ as a function of the thermodynamics |
485 |
|
state at that time level $n$ and flow at time $n$ (dotted arrow). The |
486 |
|
explicit tendancy from the previous time level, $n-3/2$, is used to |
487 |
|
extrapolate tendancies to $n$ (dashed arrow). This extrapolated |
488 |
|
tendancy allows thermo-dynamics variables to be stably integrated |
489 |
|
forward-in-time to render an estimate ($*$-variables) at the $n+1/2$ |
490 |
|
time level (solid arc-arrow). The implicit-in-time operator ${\cal |
491 |
|
L_{\theta,S}}$ is solved to yield the thermodynamic variables at time |
492 |
|
level $n+1/2$. These are then used to calculate the hydrostatic |
493 |
|
pressure/geo-potential, $\phi_{hyd}$ (vertical arrows). The |
494 |
|
hydrostatic pressure gradient is evaluated directly an time level |
495 |
|
$n+1/2$ in stepping forward the flow variables from $n$ to $n+1$ |
496 |
|
(solid arc-arrow). } |
497 |
|
\label{fig:adams-bashforth-staggered} |
498 |
|
\end{figure} |
499 |
|
|
500 |
|
For well stratified problems, internal gravity waves may be the |
501 |
|
limiting process for determining a stable time-step. In the |
502 |
|
circumstance, it is more efficient to stagger in time the |
503 |
|
thermodynamic variables with the flow |
504 |
|
variables. Fig.~\ref{fig:adams-bashforth-staggered} illustrates the |
505 |
|
staggering and algorith. The key difference between this and |
506 |
|
Fig.~\ref{fig:adams-bashforth-sync} is that the new thermodynamics |
507 |
|
fields are used to compute the hydrostatic pressure at time level |
508 |
|
$n+1/2$. The essentially allows the gravity wave terms to leap-frog in |
509 |
|
time giving second order accuracy and more stability. |
510 |
|
|
511 |
|
The essential change in the staggered algorithm is the calculation of |
512 |
|
hydrostatic pressure which, in the context of the synchronous |
513 |
|
algorithm involves replacing equation \ref{eq:phi-hyd-sync} with |
514 |
|
\begin{displaymath} |
515 |
|
\phi_{hyd}^n = \int b(\theta^{n+1},S^{n+1}) dr |
516 |
|
\end{displaymath} |
517 |
|
but the pressure gradient must also be taken out of the |
518 |
|
Adams-Bashforth extrapoltion. Also, retaining the integer time-levels, |
519 |
|
$n$ and $n+1$, does not give a user the sense of where variables are |
520 |
|
located in time. Instead, we re-write the entire algorithm, |
521 |
|
\ref{eq:Gt-n-sync} to \ref{eq:v-n+1-sync}, annotating the |
522 |
|
position in time of variables appropriately: |
523 |
|
\begin{eqnarray} |
524 |
|
G_{\theta,S}^{n-1/2} & = & G_{\theta,S} ( u^n, \theta^{n-1/2}, S^{n-1/2} ) |
525 |
|
\label{eq:Gt-n-staggered} \\ |
526 |
|
G_{\theta,S}^{(n)} & = & (3/2+\epsilon_{AB}) G_{\theta,S}^{n-1/2}-(1/2+\epsilon_{AB}) G_{\theta,S}^{n-3/2} |
527 |
|
\label{eq:Gt-n+5-staggered} \\ |
528 |
|
(\theta^*,S^*) & = & (\theta^{n},S^{n}) + \Delta t G_{\theta,S}^{(n)} |
529 |
|
\label{eq:tstar-staggered} \\ |
530 |
|
(\theta^{n+1/2},S^{n+1/2}) & = & {\cal L}^{-1}_{\theta,S} (\theta^*,S^*) |
531 |
|
\label{eq:t-n+1-staggered} \\ |
532 |
|
\phi^{n+1/2}_{hyd} & = & \int b(\theta^{n+1/2},S^{n+1/2}) dr |
533 |
|
\label{eq:phi-hyd-staggered} \\ |
534 |
|
\vec{\bf G}_{\vec{\bf v}}^{n} & = & \vec{\bf G}_{\vec{\bf v}} ( \vec{\bf v}^n ) |
535 |
|
\label{eq:Gv-n-staggered} \\ |
536 |
|
\vec{\bf G}_{\vec{\bf v}}^{(n+1/2)} & = & (3/2 + \epsilon_{AB} ) \vec{\bf G}_{\vec{\bf v}}^{n} - (1/2 + \epsilon_{AB} ) \vec{\bf G}_{\vec{\bf v}}^{n-1} |
537 |
|
\label{eq:Gv-n+5-staggered} \\ |
538 |
|
\vec{\bf v}^{*} & = & \vec{\bf v}^{n} + \Delta t \left( \vec{\bf G}_{\vec{\bf v}}^{(n+1/2)} - \nabla \phi_{hyd}^{n+1/2} \right) |
539 |
|
\label{eq:vstar-staggered} \\ |
540 |
|
\vec{\bf v}^{**} & = & {\cal L}_{\vec{\bf v}}^{-1} ( \vec{\bf v}^* ) |
541 |
|
\label{eq:vstarstar-staggered} \\ |
542 |
|
\eta^* & = & \epsilon_{fs} \left( \eta^{n} +P-E+R \right)- \Delta t |
543 |
|
\nabla \cdot H \widehat{ \vec{\bf v}^{**} } |
544 |
|
\label{eq:nstar-staggered} \\ |
545 |
|
\nabla \cdot g H \nabla \eta^{n+1} - \frac{\epsilon_{fs} \eta^{n+1}}{\Delta t^2} |
546 |
|
& = & - \frac{\eta^*}{\Delta t^2} |
547 |
|
\label{eq:elliptic-staggered} \\ |
548 |
|
\vec{\bf v}^{n+1} & = & \vec{\bf v}^{*} - \Delta t g \nabla \eta^{n+1} |
549 |
|
\label{eq:v-n+1-staggered} |
550 |
|
\end{eqnarray} |
551 |
|
The calling sequence is unchanged from |
552 |
|
Fig.~\ref{fig:call-tree-adams-bashforth-sync}. The staggered algorithm |
553 |
|
is activated with the run-time flag {\bf staggerTimeStep=.TRUE.} in |
554 |
|
{\em PARM01} of {\em data}. |
555 |
|
|
556 |
|
The only difficulty with this approach is apparent in equation |
557 |
|
$\ref{eq:Gt-n-staggered}$ and illustrated by the dotted arrow |
558 |
|
connecting $u,v^n$ with $G_\theta^{n-1/2}$. The flow used to advect |
559 |
|
tracers around is not naturally located in time. This could be avoided |
560 |
|
by applying the Adams-Bashforth extrapolation to the tracer field |
561 |
|
itself and advection that around but this is not yet available. We're |
562 |
|
not aware of any detrimental effect of this feature. The difficulty |
563 |
|
lies mainly in interpretation of what time-level variables and terms |
564 |
|
correspond to. |
565 |
|
|
566 |
|
|
567 |
\subsection{Stagger baroclinic time stepping} |
\section{Non-hydrostatic formulation} |
568 |
|
\label{sect:non-hydrostatic} |
569 |
|
|
570 |
An alternative to synchronous time-stepping is to stagger the momentum |
[to be written...] |
|
and tracer fields in time. This allows the evaluation and gradient of |
|
|
$\phi'_{hyd}$ to be centered in time with out needing to use the |
|
|
Adams-Bashforth extrapoltion. This option is known as staggered |
|
|
baroclinic time stepping because tracer and momentum are stepped |
|
|
forward-in-time one after the other. It can be activated by turning |
|
|
on a run-time parameter {\bf staggerTimeStep} in namelist ``{\it |
|
|
PARM01}''. |
|
571 |
|
|
|
The main advantage of staggered time-stepping compared to synchronous, |
|
|
is improved stability to internal gravity wave motions and a very |
|
|
natural implementation of a 2nd order in time hydrostatic |
|
|
pressure/geo-potential gradient term. However, synchronous |
|
|
time-stepping might be better for convection problems, time dependent |
|
|
forcing and diagnosing the model are also easier and it allows a more |
|
|
efficient parallel decomposition. |
|
572 |
|
|
|
The staggered baroclinic time-stepping scheme is equations |
|
|
\ref{eq-tDsC-theta} to \ref{eq-tDsC-cont} except that \ref{eq-tDsC-hyd} is replaced with: |
|
|
\begin{equation} |
|
|
{\phi'_{hyd}}^{n+1/2} = \int_{r'}^{R_o} b'(\theta^{n+1/2},S^{n+1/2},r) |
|
|
dr |
|
|
\end{equation} |
|
|
and the time-level for tracers has been shifted back by half: |
|
|
\begin{eqnarray*} |
|
|
\theta^* & = & |
|
|
\theta ^{(n-1/2)} + \Delta t G_{\theta} ^{(n)} |
|
|
\\ |
|
|
S^* & = & |
|
|
S ^{(n-1/2)} + \Delta t G_{S} ^{(n)} |
|
|
\\ |
|
|
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
|
|
\theta^{n+1/2} & = & \theta^* |
|
|
\\ |
|
|
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
|
|
S^{n+1/2} & = & S^* |
|
|
\end{eqnarray*} |
|
573 |
|
|
574 |
|
|
575 |
\subsection{Surface pressure} |
\section{Variants on the Free Surface} |
576 |
|
|
577 |
Substituting \ref{eq-tDsC-Hmom} into \ref{eq-tDsC-cont}, assuming |
We now descibe the various formulations of the free-surface that |
578 |
$\epsilon_{nh} = 0$ yields a Helmholtz equation for ${\eta}^{n+1}$: |
include non-linear forms, implicit in time using Crank-Nicholson, |
579 |
|
explicit and [one day] split-explicit. First, we'll reiterate the |
580 |
|
underlying algorithm but this time using the notation consistent with |
581 |
|
the more general vertical coordinate $r$. The elliptic equation for |
582 |
|
free-surface coordinate (units of $r$), correpsonding to |
583 |
|
\ref{eq:discrete-time-backward-free-surface}, and |
584 |
|
assuming no non-hydrostatic effects ($\epsilon_{nh} = 0$) is: |
585 |
\begin{eqnarray} |
\begin{eqnarray} |
586 |
\epsilon_{fs} {\eta}^{n+1} - |
\epsilon_{fs} {\eta}^{n+1} - |
587 |
{\bf \nabla}_h \cdot \Delta t^2 (R_o-R_{fixed}) |
{\bf \nabla}_h \cdot \Delta t^2 (R_o-R_{fixed}) {\bf \nabla}_h b_s |
588 |
{\bf \nabla}_h b_s {\eta}^{n+1} |
{\eta}^{n+1} = {\eta}^* |
|
= {\eta}^* |
|
589 |
\label{eq-solve2D} |
\label{eq-solve2D} |
590 |
\end{eqnarray} |
\end{eqnarray} |
591 |
where |
where |