2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
The convention used in this section is as follows: |
The convention used in this section is as follows: |
5 |
Time is "discretize" using a time step $\Delta t$ |
Time is ``discretized'' using a time step $\Delta t$ |
6 |
and $\Phi^n$ refers to the variable $\Phi$ |
and $\Phi^n$ refers to the variable $\Phi$ |
7 |
at time $t = n \Delta t$ . We used the notation $\Phi^{(n)}$ |
at time $t = n \Delta t$ . We use the notation $\Phi^{(n)}$ |
8 |
when time interpolation is required to estimate the value of $\phi$ |
when time interpolation is required to estimate the value of $\phi$ |
9 |
at the time $n \Delta t$. |
at the time $n \Delta t$. |
10 |
|
|
12 |
|
|
13 |
The discretization in time of the model equations (cf section I ) |
The discretization in time of the model equations (cf section I ) |
14 |
does not depend of the discretization in space of each |
does not depend of the discretization in space of each |
15 |
term, so that this section can be read independently. |
term and so this section can be read independently. |
|
Also for this purpose, we will refers to the continuous |
|
|
space-derivative form of model equations, and focus on |
|
|
the time discretization. |
|
16 |
|
|
17 |
The continuous form of the model equations is: |
The continuous form of the model equations is: |
18 |
|
|
63 |
- \vec{\bf v} \cdot {\bf \nabla} \dot{r} |
- \vec{\bf v} \cdot {\bf \nabla} \dot{r} |
64 |
+ {\cal F}_{\dot{r}} |
+ {\cal F}_{\dot{r}} |
65 |
\end{eqnarray*} |
\end{eqnarray*} |
66 |
The exact form of all the "{\it G}"s terms is described in the next |
The exact form of all the ``{\it G}''s terms is described in the next |
67 |
section (). Here its sufficient to mention that they contains |
section \ref{sect:discrete}. Here its sufficient to mention that they contains |
68 |
all the RHS terms except the pressure / geo- potential terms. |
all the RHS terms except the pressure/geo-potential terms. |
69 |
|
|
70 |
The switch $\epsilon_{nh}$ allows to activate the non hydrostatic |
The switch $\epsilon_{nh}$ allows one to activate the non-hydrostatic |
71 |
mode ($\epsilon_{nh}=1$) for the ocean model. Otherwise, |
mode ($\epsilon_{nh}=1$) for the ocean model. Otherwise, in the |
72 |
in the hydrostatic limit $\epsilon_{nh} = 0$ |
hydrostatic limit $\epsilon_{nh} = 0$ and equation \ref{eq-tCsC-Vmom} |
73 |
and equation \ref{eq-tCsC-Vmom} vanishes. |
is not used. |
74 |
|
|
75 |
The equation for $\eta$ is obtained by integrating the |
As discussed in section \ref{sect:1.3.6.2}, the equation for $\eta$ is |
76 |
continuity equation over the entire depth of the fluid, |
obtained by integrating the continuity equation over the entire depth |
77 |
from $R_{fixed}(x,y)$ up to $R_o(x,y)$ |
of the fluid, from $R_{fixed}(x,y)$ up to $R_o(x,y)$. The linear free |
78 |
(Linear free surface): |
surface evolves according to: |
79 |
\begin{eqnarray} |
\begin{eqnarray} |
80 |
\epsilon_{fs} \partial_t \eta = |
\epsilon_{fs} \partial_t \eta = |
81 |
\left. \dot{r} \right|_{r=r_{surf}} + \epsilon_{fw} (P-E) = |
\left. \dot{r} \right|_{r=r_{surf}} + \epsilon_{fw} (P-E) = |
84 |
\label{eq-tCsC-eta} |
\label{eq-tCsC-eta} |
85 |
\end{eqnarray} |
\end{eqnarray} |
86 |
|
|
87 |
Where $\epsilon_{fs}$,$\epsilon_{fw}$ are two flags to |
Here, $\epsilon_{fs}$ is a flag to switch between the free-surface, |
88 |
distinguish between a free-surface equation ($\epsilon_{fs}=1$) |
$\epsilon_{fs}=1$, and a rigid-lid, $\epsilon_{fs}=0$. The flag |
89 |
or the rigid-lid approximation ($\epsilon_{fs}=0$); |
$\epsilon_{fw}$ determines whether an exchange of fresh water is |
90 |
and to distinguish when exchange of Fresh-Water is included |
included at the ocean surface (natural BC) ($\epsilon_{fw} = 1$) or |
91 |
at the ocean surface (natural BC) ($\epsilon_{fw} = 1$) |
not ($\epsilon_{fw} = 0$). |
|
or not ($\epsilon_{fw} = 0$). |
|
92 |
|
|
93 |
The hydrostatic potential is found by |
The hydrostatic potential is found by integrating (equation |
94 |
integrating \ref{eq-tCsC-hyd} with the boundary condition that |
\ref{eq-tCsC-hyd}) with the boundary condition that |
95 |
$\phi'_{hyd}(r=R_o) = 0$: |
$\phi'_{hyd}(r=R_o) = 0$: |
96 |
\begin{eqnarray*} |
\begin{eqnarray*} |
97 |
& & |
& & |
105 |
|
|
106 |
\subsection{General method} |
\subsection{General method} |
107 |
|
|
108 |
An overview of the general method is presented hereafter, |
An overview of the general method is now presented with explicit |
109 |
with explicit references to the Fortran code. This part |
references to the Fortran code. We often refer to the discretized |
110 |
often refers to the discretized equations of the model |
equations of the model that are detailed in the following sections. |
111 |
that are detailed in the following sections. |
|
112 |
|
The general algorithm consist of a ``predictor step'' that computes |
113 |
The general algorithm consist in a "predictor step" that computes |
the forward tendencies ("G" terms") comprising of explicit-in-time |
114 |
the forward tendencies ("G" terms") and all |
terms and the ``first guess'' values (star notation): $\theta^*, S^*, |
115 |
the "first guess" values (star notation): |
\vec{\bf v}^*$ (and $\dot{r}^*$ in non-hydrostatic mode). This is done |
116 |
$\theta^*, S^*, \vec{\bf v}^*$ (and $\dot{r}^*$ |
in the two routines {\it THERMODYNAMICS} and {\it DYNAMICS}. |
117 |
in non-hydrostatic mode). This is done in the two routines |
|
118 |
{\it THERMODYNAMICS} and {\it DYNAMICS}. |
Terms that are integrated implicitly in time are handled at the end of |
119 |
|
the {\it THERMODYNAMICS} and {\it DYNAMICS} routines. Then the |
120 |
Then the implicit terms that appear on the left hand side (LHS) |
surface pressure and non hydrostatic pressure are solved for in ({\it |
121 |
of equations \ref{eq-tDsC-theta} - \ref{eq-tDsC-cont}, |
SOLVE\_FOR\_PRESSURE}). |
122 |
are solved as follows: |
|
123 |
Since implicit vertical diffusion and viscosity terms |
Finally, in the ``corrector step'', (routine {\it |
124 |
are independent from the barotropic flow adjustment, |
THE\_CORRECTION\_STEP}) the new values of $u,v,w,\theta,S$ are |
125 |
they are computed first, solving a 3 diagonal Nr x Nr linear system, |
determined (see details in \ref{sect:II.1.3}). |
126 |
and incorporated at the end of the {\it THERMODYNAMICS} and |
|
127 |
{\it DYNAMICS} routines. |
At this point, the regular time stepping process is complete. However, |
128 |
Then the surface pressure and non hydrostatic pressure |
after the correction step there are optional adjustments such as |
129 |
are evaluated ({\it SOLVE\_FOR\_PRESSURE}); |
convective adjustment or filters (zonal FFT filter, shapiro filter) |
130 |
|
that can be applied on both momentum and tracer fields, just prior to |
131 |
Finally, within a "corrector step', |
incrementing the time level to $n+1$. |
132 |
(routine {\it THE\_CORRECTION\_STEP}) |
|
133 |
the new values of $u,v,w,\theta,S$ |
Since the pressure solver precision is of the order of the ``target |
134 |
are derived according to the above equations |
residual'' and can be lower than the the computer truncation error, |
135 |
(see details in II.1.3). |
and also because some filters might alter the divergence part of the |
136 |
|
flow field, a final evaluation of the surface r anomaly $\eta^{n+1}$ |
137 |
At this point, the regular time step is over, but |
is performed in {\it CALC\_EXACT\_ETA}. This ensures exact volume |
138 |
the correction step contains also other optional |
conservation. Note that there is no need for an equivalent |
139 |
adjustments such as convective adjustment algorithm, or filters |
non-hydrostatic ``exact conservation'' step, since by default $w$ is |
140 |
(zonal FFT filter, shapiro filter) |
already computed after the filters are applied. |
141 |
that applied on both momentum and tracer fields. |
|
142 |
just before setting the $n+1$ new time step value. |
Optional forcing terms (usually part of a physics ``package''), that |
143 |
|
account for a specific source or sink process (e.g. condensation as a |
144 |
Since the pressure solver precision is of the order of |
sink of water vapor Q) are generally incorporated in the main |
145 |
the "target residual" that could be lower than the |
algorithm as follows: at the the beginning of the time step, the |
146 |
the computer truncation error, and also because some filters |
additional tendencies are computed as a function of the present state |
147 |
might alter the divergence part of the flow field, |
(time step $n$) and external forcing; then within the main part of |
148 |
a final evaluation of the surface r anomaly $\eta^{n+1}$ |
model, only those new tendencies are added to the model variables. |
|
is performed, according to \ref{eq-tDsC-eta} ({\it CALC\_EXACT\_ETA}). |
|
|
This ensures a perfect volume conservation. |
|
|
Note that there is no need for an equivalent Non-hydrostatic |
|
|
"exact conservation" step, since W is already computed after |
|
|
the filters applied. |
|
|
|
|
|
Regarding optional forcing terms (usually part of a "package"), |
|
|
that account for a specific source or sink term (e.g.: condensation |
|
|
as a sink of water vapor Q), they are generally incorporated |
|
|
in the main algorithm as follows; |
|
|
At the the beginning of the time step, |
|
|
the additional tendencies are computed |
|
|
as 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. |
|
149 |
|
|
150 |
[more details needed]\\ |
[more details needed]\\ |
151 |
|
|
153 |
|
|
154 |
[more about C\_grid, A\_grid conversion \& drag term]\\ |
[more about C\_grid, A\_grid conversion \& drag term]\\ |
155 |
|
|
156 |
|
|
157 |
|
|
158 |
\subsection{Standard synchronous time stepping} |
\subsection{Standard synchronous time stepping} |
159 |
|
|
160 |
In the standard formulation, the surface pressure is |
In the standard formulation, the surface pressure is evaluated at time |
161 |
evaluated at time step n+1 (implicit method). |
step n+1 (an implicit method). Equations \ref{eq-tCsC-theta} to |
162 |
The above set of equations is then discretized in time |
\ref{eq-tCsC-cont} are then discretized in time as follows: |
|
as follows: |
|
163 |
\begin{eqnarray} |
\begin{eqnarray} |
164 |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
165 |
\theta^{n+1} & = & \theta^* |
\theta^{n+1} & = & \theta^* |
218 |
\dot{r} ^{n} + \Delta t G_{\dot{r}} ^{(n+1/2)} |
\dot{r} ^{n} + \Delta t G_{\dot{r}} ^{(n+1/2)} |
219 |
\end{eqnarray} |
\end{eqnarray} |
220 |
|
|
221 |
Note that implicit vertical terms (viscosity and diffusivity) are |
Note that implicit vertical viscosity and diffusivity terms are not |
222 |
not considered as part of the "{\it G}" terms, but are |
considered as part of the ``{\it G}'' terms, but are written |
223 |
written separately here. |
separately here. |
224 |
|
|
225 |
To ensure a second order time discretization for both |
The default time-stepping method is the Adams-Bashforth quasi-second |
226 |
momentum and tracer, |
order scheme in which the ``G'' terms are extrapolated forward in time |
227 |
The "{\it G}" terms are "extrapolated" forward in time |
from time-levels $n-1$ and $n$ to time-level $n+1/2$ and provides a |
228 |
(Adams Bashforth time stepping) |
simple but stable algorithm: |
229 |
from the values computed at time step $n$ and $n-1$ |
\begin{equation} |
230 |
to the time $n+1/2$: |
G^{(n+1/2)} = G^n + (1/2+\epsilon_{AB}) (G^n - G^{n-1}) |
231 |
$$G^{(n+1/2)} = G^n + (1/2+\epsilon_{AB}) (G^n - G^{n-1})$$ |
\end{equation} |
232 |
A small number for the parameter $\epsilon_{AB}$ is generally used |
where $\epsilon_{AB}$ is a small number used to stabilize the time |
233 |
to stabilize this time stepping. |
stepping. |
234 |
|
|
235 |
In the standard non-stagger formulation, |
In the standard non-staggered formulation, the Adams-Bashforth time |
236 |
the Adams-Bashforth time stepping is also applied to the |
stepping is also applied to the hydrostatic pressure/geo-potential |
237 |
hydrostatic (pressure / geo-) potential term $\nabla_h \Phi'_{hyd}$. |
gradient, $\nabla_h \Phi'_{hyd}$. Note that presently, this term is in |
238 |
Note that presently, this term is in fact incorporated to the |
fact incorporated to the $\vec{\bf G}_{\vec{\bf v}}$ arrays ({\bf |
239 |
$\vec{\bf G}_{\vec{\bf v}}$ arrays ({\bf gU,gV}). |
gU,gV}). |
240 |
|
\marginpar{JMC: Clarify this term?} |
241 |
|
|
242 |
|
|
243 |
\subsection{Stagger baroclinic time stepping} |
\subsection{Stagger baroclinic time stepping} |
244 |
|
|
245 |
An alternative is to evaluate $\phi'_{hyd}$ with the |
An alternative to synchronous time-stepping is to stagger the momentum |
246 |
new tracer fields, and step forward the momentum after. |
and tracer fields in time. This allows the evaluation and gradient of |
247 |
This option is known as stagger baroclinic time stepping, |
$\phi'_{hyd}$ to be centered in time with out needing to use the |
248 |
since tracer and momentum are step forward in time one after the other. |
Adams-Bashforth extrapoltion. This option is known as staggered |
249 |
It can be activated turning on a running flag parameter |
baroclinic time stepping because tracer and momentum are stepped |
250 |
{\bf staggerTimeStep} in file "{\it data}"). |
forward-in-time one after the other. It can be activated by turning |
251 |
|
on a run-time parameter {\bf staggerTimeStep} in namelist ``{\it |
252 |
The main advantage of this time stepping compared to a synchronous one, |
PARM01}''. |
253 |
is a better stability, specially regarding internal gravity waves, |
|
254 |
and a very natural implementation of a 2nd order in time |
The main advantage of staggered time-stepping compared to synchronous, |
255 |
hydrostatic pressure / geo- potential term. |
is improved stability to internal gravity wave motions and a very |
256 |
In the other hand, a synchronous time step might be better |
natural implementation of a 2nd order in time hydrostatic |
257 |
for convection problems; Its also make simpler time dependent forcing |
pressure/geo-potential gradient term. However, synchronous |
258 |
and diagnostic implementation ; and allows a more efficient threading. |
time-stepping might be better for convection problems, time dependent |
259 |
|
forcing and diagnosing the model are also easier and it allows a more |
260 |
Although the stagger time step does not affect deeply the |
efficient parallel decomposition. |
|
structure of the code --- a switch allows to evaluate the |
|
|
hydrostatic pressure / geo- potential from new $\theta,S$ |
|
|
instead of the Adams-Bashforth estimation --- |
|
|
this affect the way the time discretization is presented : |
|
261 |
|
|
262 |
\begin{eqnarray*} |
The staggered baroclinic time-stepping scheme is equations |
263 |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
\ref{eq-tDsC-theta} to \ref{eq-tDsC-cont} except that \ref{eq-tDsC-hyd} is replaced with: |
264 |
\theta^{n+1/2} & = & \theta^* |
\begin{equation} |
265 |
\\ |
{\phi'_{hyd}}^{n+1/2} = \int_{r'}^{R_o} b'(\theta^{n+1/2},S^{n+1/2},r) |
266 |
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
dr |
267 |
S^{n+1/2} & = & S^* |
\end{equation} |
268 |
\end{eqnarray*} |
and the time-level for tracers has been shifted back by half: |
|
with |
|
269 |
\begin{eqnarray*} |
\begin{eqnarray*} |
270 |
\theta^* & = & |
\theta^* & = & |
271 |
\theta ^{(n-1/2)} + \Delta t G_{\theta} ^{(n)} |
\theta ^{(n-1/2)} + \Delta t G_{\theta} ^{(n)} |
272 |
\\ |
\\ |
273 |
S^* & = & |
S^* & = & |
274 |
S ^{(n-1/2)} + \Delta t G_{S} ^{(n)} |
S ^{(n-1/2)} + \Delta t G_{S} ^{(n)} |
|
\end{eqnarray*} |
|
|
And |
|
|
\begin{eqnarray*} |
|
|
%{b'}^{n+1/2} & = & b'(\theta^{n+1/2},S^{n+1/2},r) |
|
|
%\\ |
|
|
%\partial_r {\phi'_{hyd}}^{n+1/2} & = & {-b'}^{n+1/2} |
|
|
{\phi'_{hyd}}^{n+1/2} & = & \int_{r'}^{R_o} b'(\theta^{n+1/2},S^{n+1/2},r) dr |
|
|
%\label{eq-tDsC-hyd} |
|
275 |
\\ |
\\ |
276 |
\vec{\bf v} ^{n+1} |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
277 |
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
\theta^{n+1/2} & = & \theta^* |
|
+ \epsilon_{nh} \Delta t {\bf \nabla}_h {\phi'_{nh}}^{n+1} |
|
|
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
|
|
& = & |
|
|
\vec{\bf v}^* |
|
|
%\label{eq-tDsC-Hmom} |
|
|
\\ |
|
|
\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} |
|
|
\\ |
|
|
\epsilon_{nh} \left( \dot{r} ^{n+1} |
|
|
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
|
|
\right) |
|
|
& = & \epsilon_{nh} \dot{r}^* |
|
|
%\label{eq-tDsC-Vmom} |
|
|
\\ |
|
|
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
|
|
& = & 0 |
|
|
%\label{eq-tDsC-cont} |
|
|
\end{eqnarray*} |
|
|
with |
|
|
\begin{eqnarray*} |
|
|
\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} |
|
278 |
\\ |
\\ |
279 |
\dot{r}^* & = & |
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
280 |
\dot{r} ^{n} + \Delta t G_{\dot{r}} ^{(n+1/2)} |
S^{n+1/2} & = & S^* |
281 |
\end{eqnarray*} |
\end{eqnarray*} |
282 |
|
|
|
%--------------------------------------------------------------------- |
|
283 |
|
|
284 |
\subsection{Surface pressure} |
\subsection{Surface pressure} |
285 |
|
|
300 |
\label{eq-solve2D_rhs} |
\label{eq-solve2D_rhs} |
301 |
\end{eqnarray} |
\end{eqnarray} |
302 |
|
|
303 |
Once ${\eta}^{n+1}$ has been found substituting into \ref{eq-tDsC-Hmom} |
Once ${\eta}^{n+1}$ has been found, substituting into |
304 |
would yield $\vec{\bf v}^{n+1}$ if the model is hydrostatic |
\ref{eq-tDsC-Hmom} yields $\vec{\bf v}^{n+1}$ if the model is |
305 |
($\epsilon_{nh}=0$): |
hydrostatic ($\epsilon_{nh}=0$): |
306 |
$$ |
$$ |
307 |
\vec{\bf v}^{n+1} = \vec{\bf v}^{*} |
\vec{\bf v}^{n+1} = \vec{\bf v}^{*} |
308 |
- \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
- \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
310 |
|
|
311 |
This is known as the correction step. However, when the model is |
This is known as the correction step. However, when the model is |
312 |
non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an |
non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an |
313 |
additional equation for $\phi'_{nh}$. This is obtained by |
additional equation for $\phi'_{nh}$. This is obtained by substituting |
314 |
substituting \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-Vmom} into |
\ref{eq-tDsC-Hmom} and \ref{eq-tDsC-Vmom} into |
315 |
\ref{eq-tDsC-cont}: |
\ref{eq-tDsC-cont}: |
316 |
\begin{equation} |
\begin{equation} |
317 |
\left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1} |
\left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1} |
333 |
- \epsilon_{nh} \Delta t {\bf \nabla}_h {\phi'_{nh}}^{n+1} |
- \epsilon_{nh} \Delta t {\bf \nabla}_h {\phi'_{nh}}^{n+1} |
334 |
\end{equation} |
\end{equation} |
335 |
and the vertical velocity is found by integrating the continuity |
and the vertical velocity is found by integrating the continuity |
336 |
equation vertically. |
equation vertically. Note that, for the convenience of the restart |
337 |
Note that, for convenience regarding the restart procedure, |
procedure, the vertical integration of the continuity equation has |
338 |
the integration of the continuity equation has been |
been moved to the beginning of the time step (instead of at the end), |
|
moved at the beginning of the time step (instead of at the end), |
|
339 |
without any consequence on the solution. |
without any consequence on the solution. |
340 |
|
|
341 |
Regarding the implementation, all those computation are done |
Regarding the implementation of the surface pressure solver, all |
342 |
within the routine {\it SOLVE\_FOR\_PRESSURE} and its dependent |
computation are done within the routine {\it SOLVE\_FOR\_PRESSURE} and |
343 |
{\it CALL}s. |
its dependent calls. The standard method to solve the 2D elliptic |
344 |
The standard method to solve the 2D elliptic problem (\ref{eq-solve2D}) |
problem (\ref{eq-solve2D}) uses the conjugate gradient method (routine |
345 |
uses the conjugate gradient method (routine {\it CG2D}); The |
{\it CG2D}); the solver matrix and conjugate gradient operator are |
346 |
the solver matrix and conjugate gradient operator are only function |
only function of the discretized domain and are therefore evaluated |
347 |
of the discretized domain and are therefore evaluated separately, |
separately, before the time iteration loop, within {\it INI\_CG2D}. |
348 |
before the time iteration loop, within {\it INI\_CG2D}. |
The computation of the RHS $\eta^*$ is partly done in {\it |
349 |
The computation of the RHS $\eta^*$ is partly |
CALC\_DIV\_GHAT} and in {\it SOLVE\_FOR\_PRESSURE}. |
350 |
done in {\it CALC\_DIV\_GHAT} and in {\it SOLVE\_FOR\_PRESSURE}. |
|
351 |
|
The same method is applied for the non hydrostatic part, using a |
352 |
The same method is applied for the non hydrostatic part, using |
conjugate gradient 3D solver ({\it CG3D}) that is initialized in {\it |
353 |
a conjugate gradient 3D solver ({\it CG3D}) that is initialized |
INI\_CG3D}. The RHS terms of 2D and 3D problems are computed together |
354 |
in {\it INI\_CG3D}. The RHS terms of 2D and 3D problems |
at the same point in the code. |
355 |
are computed together, within the same part of the code. |
|
356 |
|
|
|
\newpage |
|
|
%----------------------------------------------------------------------------------- |
|
357 |
\subsection{Crank-Nickelson barotropic time stepping} |
\subsection{Crank-Nickelson barotropic time stepping} |
358 |
|
|
359 |
The full implicit time stepping described previously is unconditionally stable |
The full implicit time stepping described previously is |
360 |
but damps the fast gravity waves, resulting in a loss of |
unconditionally stable but damps the fast gravity waves, resulting in |
361 |
gravity potential energy. |
a loss of potential energy. The modification presented now allows one |
362 |
The modification presented hereafter allows to combine an implicit part |
to combine an implicit part ($\beta,\gamma$) and an explicit part |
363 |
($\beta,\gamma$) and an explicit part ($1-\beta,1-\gamma$) for the surface |
($1-\beta,1-\gamma$) for the surface pressure gradient ($\beta$) and |
364 |
pressure gradient ($\beta$) and for the barotropic flow divergence ($\gamma$). |
for the barotropic flow divergence ($\gamma$). |
365 |
\\ |
\\ |
366 |
For instance, $\beta=\gamma=1$ is the previous fully implicit scheme; |
For instance, $\beta=\gamma=1$ is the previous fully implicit scheme; |
367 |
$\beta=\gamma=1/2$ is the non damping (energy conserving), unconditionally |
$\beta=\gamma=1/2$ is the non damping (energy conserving), unconditionally |
398 |
[ \gamma \vec{\bf v}^* + (1-\gamma) \vec{\bf v}^{n}] dr |
[ \gamma \vec{\bf v}^* + (1-\gamma) \vec{\bf v}^{n}] dr |
399 |
\end{eqnarray*} |
\end{eqnarray*} |
400 |
\\ |
\\ |
401 |
In the hydrostatic case ($\epsilon_{nh}=0$), |
In the hydrostatic case ($\epsilon_{nh}=0$), allowing us to find |
402 |
this allow to find ${\eta}^{n+1}$, according to: |
${\eta}^{n+1}$, thus: |
403 |
$$ |
$$ |
404 |
\epsilon_{fs} {\eta}^{n+1} - |
\epsilon_{fs} {\eta}^{n+1} - |
405 |
{\bf \nabla}_h \cdot \beta\gamma \Delta t^2 b_s (R_o - R_{fixed}) |
{\bf \nabla}_h \cdot \beta\gamma \Delta t^2 b_s (R_o - R_{fixed}) |
413 |
$$ |
$$ |
414 |
|
|
415 |
The non-hydrostatic part is solved as described previously. |
The non-hydrostatic part is solved as described previously. |
416 |
\\ \\ |
|
417 |
N.B: |
Note that: |
418 |
\\ |
\begin{enumerate} |
419 |
a) The non-hydrostatic part of the code has not yet been |
\item The non-hydrostatic part of the code has not yet been |
420 |
updated, %since it falls out of the purpose of this test, |
updated, so that this option cannot be used with $(\beta,\gamma) \neq (1,1)$. |
421 |
so that this option cannot be used with $(\beta,\gamma) \neq (1,1)$. |
\item The stability criteria with Crank-Nickelson time stepping |
422 |
\\ |
for the pure linear gravity wave problem in cartesian coordinates is: |
423 |
b) To remind, the stability criteria with the Crank-Nickelson time stepping |
\begin{itemize} |
424 |
for the pure linear gravity wave problem in cartesian coordinate is: |
\item $\beta + \gamma < 1$ : unstable |
425 |
\\ |
\item $\beta \geq 1/2$ and $ \gamma \geq 1/2$ : stable |
426 |
$\star$~ $\beta + \gamma < 1$ : unstable |
\item $\beta + \gamma \geq 1$ : stable if |
|
\\ |
|
|
$\star$~ $\beta \geq 1/2$ and $ \gamma \geq 1/2$ : stable |
|
|
\\ |
|
|
$\star$~ $\beta + \gamma \geq 1$ : stable if |
|
|
%, for all wave length $(k\Delta x,l\Delta y)$ |
|
427 |
$$ |
$$ |
428 |
c_{max}^2 (\beta - 1/2)(\gamma - 1/2) + 1 \geq 0 |
c_{max}^2 (\beta - 1/2)(\gamma - 1/2) + 1 \geq 0 |
429 |
$$ |
$$ |
438 |
c_{max} = 2 \Delta t \: \sqrt{g H} \: |
c_{max} = 2 \Delta t \: \sqrt{g H} \: |
439 |
\sqrt{ \frac{1}{\Delta x^2} + \frac{1}{\Delta y^2} } |
\sqrt{ \frac{1}{\Delta x^2} + \frac{1}{\Delta y^2} } |
440 |
$$ |
$$ |
441 |
|
\end{itemize} |
442 |
|
\end{enumerate} |
443 |
|
|