21 |
|
|
22 |
\begin{eqnarray} |
\begin{eqnarray} |
23 |
\partial_t \theta & = & G_\theta |
\partial_t \theta & = & G_\theta |
24 |
|
\label{eq-tCsC-theta} |
25 |
\\ |
\\ |
26 |
\partial_t S & = & G_s |
\partial_t S & = & G_s |
27 |
|
\label{eq-tCsC-salt} |
28 |
\\ |
\\ |
29 |
b' & = & b'(\theta,S,r) |
b' & = & b'(\theta,S,r) |
30 |
\\ |
\\ |
31 |
\partial_r \phi'_{hyd} & = & -b' |
\partial_r \phi'_{hyd} & = & -b' |
32 |
\label{eq-r-split-hyd} |
\label{eq-tCsC-hyd} |
33 |
\\ |
\\ |
34 |
\partial_t \vec{\bf v} |
\partial_t \vec{\bf v} |
35 |
+ {\bf \nabla}_h b_s \eta |
+ {\bf \nabla}_h b_s \eta |
36 |
+ \epsilon_{nh} {\bf \nabla}_h \phi'_{nh} |
+ \epsilon_{nh} {\bf \nabla}_h \phi'_{nh} |
37 |
& = & \vec{\bf G}_{\vec{\bf v}} |
& = & \vec{\bf G}_{\vec{\bf v}} |
38 |
- {\bf \nabla}_h \phi'_{hyd} |
- {\bf \nabla}_h \phi'_{hyd} |
39 |
\label{eq-r-split-hmom} |
\label{eq-tCsC-Hmom} |
40 |
\\ |
\\ |
41 |
\epsilon_{nh} \frac {\partial{\dot{r}}}{\partial{t}} |
\epsilon_{nh} \frac {\partial{\dot{r}}}{\partial{t}} |
42 |
+ \epsilon_{nh} \partial_r \phi'_{nh} |
+ \epsilon_{nh} \partial_r \phi'_{nh} |
43 |
& = & \epsilon_{nh} G_{\dot{r}} |
& = & \epsilon_{nh} G_{\dot{r}} |
44 |
\label{eq-r-split-rdot} |
\label{eq-tCsC-Vmom} |
45 |
\\ |
\\ |
46 |
{\bf \nabla}_h \cdot \vec{\bf v} + \partial_r \dot{r} |
{\bf \nabla}_h \cdot \vec{\bf v} + \partial_r \dot{r} |
47 |
& = & 0 |
& = & 0 |
48 |
\label{eq-r-cont} |
\label{eq-tCsC-cont} |
49 |
\end{eqnarray} |
\end{eqnarray} |
50 |
where |
where |
51 |
\begin{eqnarray*} |
\begin{eqnarray*} |
73 |
The switch $\epsilon_{nh}$ allows to activate the non hydrostatic |
The switch $\epsilon_{nh}$ allows to activate the non hydrostatic |
74 |
mode ($\epsilon_{nh}=1$) for the ocean model. Otherwise, |
mode ($\epsilon_{nh}=1$) for the ocean model. Otherwise, |
75 |
in the hydrostatic limit $\epsilon_{nh} = 0$ |
in the hydrostatic limit $\epsilon_{nh} = 0$ |
76 |
and equation \ref{eq-r-split-rdot} vanishes. |
and equation \ref{eq-tCsC-Vmom} vanishes. |
77 |
|
|
78 |
The equation for $\eta$ is obtained by integrating the |
The equation for $\eta$ is obtained by integrating the |
79 |
continuity equation over the entire depth of the fluid, |
continuity equation over the entire depth of the fluid, |
84 |
\left. \dot{r} \right|_{r=r_{surf}} + \epsilon_{fw} (P-E) = |
\left. \dot{r} \right|_{r=r_{surf}} + \epsilon_{fw} (P-E) = |
85 |
- {\bf \nabla} \cdot \int_{R_{min}}^{R_o} \vec{\bf v} dr |
- {\bf \nabla} \cdot \int_{R_{min}}^{R_o} \vec{\bf v} dr |
86 |
+ \epsilon_{fw} (P-E) |
+ \epsilon_{fw} (P-E) |
87 |
\label{eq-cont-2D} |
\label{eq-tCsC-eta} |
88 |
\end{eqnarray} |
\end{eqnarray} |
89 |
|
|
90 |
Where $\epsilon_{fs}$,$\epsilon_{fw}$ are two flags to |
Where $\epsilon_{fs}$,$\epsilon_{fw}$ are two flags to |
95 |
or not ($\epsilon_{fw} = 0$). |
or not ($\epsilon_{fw} = 0$). |
96 |
|
|
97 |
The hydrostatic potential is found by |
The hydrostatic potential is found by |
98 |
integrating \ref{eq-r-split-hyd} with the boundary condition that |
integrating \ref{eq-tCsC-hyd} with the boundary condition that |
99 |
$\phi'_{hyd}(r=R_o) = 0$: |
$\phi'_{hyd}(r=R_o) = 0$: |
100 |
\begin{eqnarray*} |
\begin{eqnarray*} |
101 |
& & |
& & |
109 |
|
|
110 |
\subsection{General method} |
\subsection{General method} |
111 |
|
|
112 |
|
An overview of the general method is presented hereafter, |
113 |
|
with explicit references to the Fortran code. This part |
114 |
|
often refers to the discretized equations of the model |
115 |
|
that are detailed in the following sections. |
116 |
|
|
117 |
The general algorithm consist in a "predictor step" that computes |
The general algorithm consist in a "predictor step" that computes |
118 |
the forward tendencies ("G" terms") and all |
the forward tendencies ("G" terms") and all |
119 |
the "first guess" values star notation): |
the "first guess" values (star notation): |
120 |
$\vec{\bf v}^*, \theta^*, S^*$ (and $\dot{r}^*$ |
$\theta^*, S^*, \vec{\bf v}^*$ (and $\dot{r}^*$ |
121 |
in non-hydrostatic mode). This is done in the routine {\it DYNAMICS}. |
in non-hydrostatic mode). This is done in the two routines |
122 |
|
{\it THERMODYNAMICS} and {\it DYNAMICS}. |
123 |
|
|
124 |
Then the implicit terms that appear here on the left hand side (LHS), |
Then the implicit terms that appear on the left hand side (LHS) |
125 |
|
of equations \ref{eq-tDsC-theta} - \ref{eq-tDsC-cont}, |
126 |
are solved as follows: |
are solved as follows: |
127 |
Since implicit vertical diffusion and viscosity terms |
Since implicit vertical diffusion and viscosity terms |
128 |
are independent from the barotropic flow adjustment, |
are independent from the barotropic flow adjustment, |
129 |
they are computed first, solving a 3 diagonal Nr x Nr linear system, |
they are computed first, solving a 3 diagonal Nr x Nr linear system, |
130 |
and incorporated at the end of the {\it DYNAMICS} routines. |
and incorporated at the end of the {\it THERMODYNAMICS} and |
131 |
|
{\it DYNAMICS} routines. |
132 |
Then the surface pressure and non hydrostatic pressure |
Then the surface pressure and non hydrostatic pressure |
133 |
are evaluated ({\it SOLVE\_FOR\_PRESSURE}); |
are evaluated ({\it SOLVE\_FOR\_PRESSURE}); |
134 |
|
|
150 |
the computer truncation error, and also because some filters |
the computer truncation error, and also because some filters |
151 |
might alter the divergence part of the flow field, |
might alter the divergence part of the flow field, |
152 |
a final evaluation of the surface r anomaly $\eta^{n+1}$ |
a final evaluation of the surface r anomaly $\eta^{n+1}$ |
153 |
is performed, according to \ref{eq-rtd-eta} ({\it CALC\_EXACT\_ETA}). |
is performed, according to \ref{eq-tDsC-eta} ({\it CALC\_EXACT\_ETA}). |
154 |
This ensures a perfect volume conservation. |
This ensures a perfect volume conservation. |
155 |
Note that there is no need for an equivalent Non-hydrostatic |
Note that there is no need for an equivalent Non-hydrostatic |
156 |
"exact conservation" step, since W is already computed after |
"exact conservation" step, since W is already computed after |
157 |
the filters applied. |
the filters applied. |
158 |
|
|
|
optionnal forcing terms (package):\\ |
|
159 |
Regarding optional forcing terms (usually part of a "package"), |
Regarding optional forcing terms (usually part of a "package"), |
160 |
that a account for a specific source or sink term (e.g.: condensation |
that account for a specific source or sink term (e.g.: condensation |
161 |
as a sink of water vapor Q), they are generally incorporated |
as a sink of water vapor Q), they are generally incorporated |
162 |
in the main algorithm as follows; |
in the main algorithm as follows; |
163 |
At the the beginning of the time step, |
At the the beginning of the time step, |
164 |
the additionnal tendencies are computed |
the additional tendencies are computed |
165 |
as function of the present state (time step $n$) and external forcing ; |
as function of the present state (time step $n$) and external forcing ; |
166 |
Then within the main part of model, |
Then within the main part of model, |
167 |
only those new tendencies are added to the model variables. |
only those new tendencies are added to the model variables. |
168 |
|
|
169 |
[more details needed]\\ |
[more details needed]\\ |
170 |
|
|
171 |
The atmospheric physics follows this general scheme. |
The atmospheric physics follows this general scheme. |
172 |
|
|
173 |
|
[more about C\_grid, A\_grid conversion \& drag term]\\ |
174 |
|
|
175 |
\subsection{Standard synchronous time stepping} |
\subsection{Standard synchronous time stepping} |
176 |
|
|
177 |
In the standard formulation, the surface pressure is |
In the standard formulation, the surface pressure is |
181 |
\begin{eqnarray} |
\begin{eqnarray} |
182 |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
\left[ 1 - \partial_r \kappa_v^\theta \partial_r \right] |
183 |
\theta^{n+1} & = & \theta^* |
\theta^{n+1} & = & \theta^* |
184 |
|
\label{eq-tDsC-theta} |
185 |
\\ |
\\ |
186 |
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
\left[ 1 - \partial_r \kappa_v^S \partial_r \right] |
187 |
S^{n+1} & = & S^* |
S^{n+1} & = & S^* |
188 |
|
\label{eq-tDsC-salt} |
189 |
\\ |
\\ |
190 |
%{b'}^{n} & = & b'(\theta^{n},S^{n},r) |
%{b'}^{n} & = & b'(\theta^{n},S^{n},r) |
191 |
%\partial_r {\phi'_{hyd}}^{n} & = & {-b'}^{n} |
%\partial_r {\phi'_{hyd}}^{n} & = & {-b'}^{n} |
192 |
%\\ |
%\\ |
193 |
{\phi'_{hyd}}^{n} & = & \int_{r'}^{R_o} b'(\theta^{n},S^{n},r) dr |
{\phi'_{hyd}}^{n} & = & \int_{r'}^{R_o} b'(\theta^{n},S^{n},r) dr |
194 |
\label{eq-rtd-hyd} |
\label{eq-tDsC-hyd} |
195 |
\\ |
\\ |
196 |
\vec{\bf v} ^{n+1} |
\vec{\bf v} ^{n+1} |
197 |
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
199 |
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
200 |
& = & |
& = & |
201 |
\vec{\bf v}^* |
\vec{\bf v}^* |
202 |
\label{eq-rtd-hmom} |
\label{eq-tDsC-Hmom} |
203 |
\\ |
\\ |
204 |
\epsilon_{fs} {\eta}^{n+1} + \Delta t |
\epsilon_{fs} {\eta}^{n+1} + \Delta t |
205 |
{\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^{n+1} dr |
{\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^{n+1} dr |
208 |
\nonumber |
\nonumber |
209 |
\\ |
\\ |
210 |
% = \epsilon_{fs} {\eta}^{n} & + & \epsilon_{fw} \Delta_t (P-E)^{n} |
% = \epsilon_{fs} {\eta}^{n} & + & \epsilon_{fw} \Delta_t (P-E)^{n} |
211 |
\label{eq-rtd-eta} |
\label{eq-tDsC-eta} |
212 |
\\ |
\\ |
213 |
\epsilon_{nh} \left( \dot{r} ^{n+1} |
\epsilon_{nh} \left( \dot{r} ^{n+1} |
214 |
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
215 |
\right) |
\right) |
216 |
& = & \epsilon_{nh} \dot{r}^* |
& = & \epsilon_{nh} \dot{r}^* |
217 |
\label{eq-rtd-rdot} |
\label{eq-tDsC-Vmom} |
218 |
\\ |
\\ |
219 |
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
220 |
& = & 0 |
& = & 0 |
221 |
\label{eq-rtd-cont} |
\label{eq-tDsC-cont} |
222 |
\end{eqnarray} |
\end{eqnarray} |
223 |
where |
where |
224 |
\begin{eqnarray} |
\begin{eqnarray} |
242 |
|
|
243 |
To ensure a second order time discretization for both |
To ensure a second order time discretization for both |
244 |
momentum and tracer, |
momentum and tracer, |
245 |
The "G" terms are "extrapolated" forward in time |
The "{\it G}" terms are "extrapolated" forward in time |
246 |
(Adams Bashforth time stepping) |
(Adams Bashforth time stepping) |
247 |
from the values computed at time step $n$ and $n-1$ |
from the values computed at time step $n$ and $n-1$ |
248 |
to the time $n+1/2$: |
to the time $n+1/2$: |
300 |
%\\ |
%\\ |
301 |
%\partial_r {\phi'_{hyd}}^{n+1/2} & = & {-b'}^{n+1/2} |
%\partial_r {\phi'_{hyd}}^{n+1/2} & = & {-b'}^{n+1/2} |
302 |
{\phi'_{hyd}}^{n+1/2} & = & \int_{r'}^{R_o} b'(\theta^{n+1/2},S^{n+1/2},r) dr |
{\phi'_{hyd}}^{n+1/2} & = & \int_{r'}^{R_o} b'(\theta^{n+1/2},S^{n+1/2},r) dr |
303 |
%\label{eq-rtd-hyd} |
%\label{eq-tDsC-hyd} |
304 |
\\ |
\\ |
305 |
\vec{\bf v} ^{n+1} |
\vec{\bf v} ^{n+1} |
306 |
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
+ \Delta t {\bf \nabla}_h b_s {\eta}^{n+1} |
308 |
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
- \partial_r A_v \partial_r \vec{\bf v}^{n+1} |
309 |
& = & |
& = & |
310 |
\vec{\bf v}^* |
\vec{\bf v}^* |
311 |
%\label{eq-rtd-hmom} |
%\label{eq-tDsC-Hmom} |
312 |
\\ |
\\ |
313 |
\epsilon_{fs} {\eta}^{n+1} + \Delta t |
\epsilon_{fs} {\eta}^{n+1} + \Delta t |
314 |
{\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^{n+1} dr |
{\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^{n+1} dr |
319 |
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
+ \Delta t \partial_r {\phi'_{nh}} ^{n+1} |
320 |
\right) |
\right) |
321 |
& = & \epsilon_{nh} \dot{r}^* |
& = & \epsilon_{nh} \dot{r}^* |
322 |
%\label{eq-rtd-rdot} |
%\label{eq-tDsC-Vmom} |
323 |
\\ |
\\ |
324 |
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
{\bf \nabla}_h \cdot \vec{\bf v}^{n+1} + \partial_r \dot{r}^{n+1} |
325 |
& = & 0 |
& = & 0 |
326 |
%\label{eq-rtd-cont} |
%\label{eq-tDsC-cont} |
327 |
\end{eqnarray*} |
\end{eqnarray*} |
328 |
with |
with |
329 |
\begin{eqnarray*} |
\begin{eqnarray*} |
339 |
|
|
340 |
\subsection{Surface pressure} |
\subsection{Surface pressure} |
341 |
|
|
342 |
Substituting \ref{eq-rtd-hmom} into \ref{eq-rtd-cont}, assuming |
Substituting \ref{eq-tDsC-Hmom} into \ref{eq-tDsC-cont}, assuming |
343 |
$\epsilon_{nh} = 0$ yields a Helmholtz equation for ${\eta}^{n+1}$: |
$\epsilon_{nh} = 0$ yields a Helmholtz equation for ${\eta}^{n+1}$: |
344 |
\begin{eqnarray} |
\begin{eqnarray} |
345 |
\epsilon_{fs} {\eta}^{n+1} - |
\epsilon_{fs} {\eta}^{n+1} - |
346 |
{\bf \nabla}_h \cdot \Delta t^2 (R_o-R_{min}) |
{\bf \nabla}_h \cdot \Delta t^2 (R_o-R_{min}) |
347 |
{\bf \nabla}_h b_s {\eta}^{n+1} |
{\bf \nabla}_h b_s {\eta}^{n+1} |
348 |
= {\eta}^* |
= {\eta}^* |
349 |
\label{solve_2d} |
\label{eq-solve2D} |
350 |
\end{eqnarray} |
\end{eqnarray} |
351 |
where |
where |
352 |
\begin{eqnarray} |
\begin{eqnarray} |
353 |
{\eta}^* = \epsilon_{fs} \: {\eta}^{n} - |
{\eta}^* = \epsilon_{fs} \: {\eta}^{n} - |
354 |
\Delta t {\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^* dr |
\Delta t {\bf \nabla}_h \cdot \int_{R_{min}}^{R_o} \vec{\bf v}^* dr |
355 |
\: + \: \epsilon_{fw} \Delta_t (P-E)^{n} |
\: + \: \epsilon_{fw} \Delta_t (P-E)^{n} |
356 |
\label{solve_2d_rhs} |
\label{eq-solve2D_rhs} |
357 |
\end{eqnarray} |
\end{eqnarray} |
358 |
|
|
359 |
Once ${\eta}^{n+1}$ has been found substituting into \ref{eq-rtd-hmom} |
Once ${\eta}^{n+1}$ has been found substituting into \ref{eq-tDsC-Hmom} |
360 |
would yield $\vec{\bf v}^{n+1}$ if the model is hydrostatic |
would yield $\vec{\bf v}^{n+1}$ if the model is hydrostatic |
361 |
($\epsilon_{nh}=0$): |
($\epsilon_{nh}=0$): |
362 |
$$ |
$$ |
367 |
This is known as the correction step. However, when the model is |
This is known as the correction step. However, when the model is |
368 |
non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an |
non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an |
369 |
additional equation for $\phi'_{nh}$. This is obtained by |
additional equation for $\phi'_{nh}$. This is obtained by |
370 |
substituting \ref{eq-rtd-hmom} and \ref{eq-rtd-rdot} into |
substituting \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-Vmom} into |
371 |
\ref{eq-rtd-cont}: |
\ref{eq-tDsC-cont}: |
372 |
\begin{equation} |
\begin{equation} |
373 |
\left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1} |
\left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1} |
374 |
= \frac{1}{\Delta t} \left( |
= \frac{1}{\Delta t} \left( |
398 |
Regarding the implementation, all those computation are done |
Regarding the implementation, all those computation are done |
399 |
within the routine {\it SOLVE\_FOR\_PRESSURE} and its dependent |
within the routine {\it SOLVE\_FOR\_PRESSURE} and its dependent |
400 |
{\it CALL}s. |
{\it CALL}s. |
401 |
The standard method to solve the 2D elliptic problem (\ref{solve_2d}) |
The standard method to solve the 2D elliptic problem (\ref{eq-solve2D}) |
402 |
uses the conjugate gradient method (routine {\it CG2D}); The |
uses the conjugate gradient method (routine {\it CG2D}); The |
403 |
the solver matrix and conjugate gradient operator are only function |
the solver matrix and conjugate gradient operator are only function |
404 |
of the discretized domain and are therefore evaluated separately, |
of the discretized domain and are therefore evaluated separately, |
431 |
{\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from |
{\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from |
432 |
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. |
433 |
|
|
434 |
Equations \ref{eq-rtd-hmom} and \ref{eq-rtd-eta} are modified as follows: |
Equations \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-eta} are modified as follows: |
435 |
$$ |
$$ |
436 |
\frac{ \vec{\bf v}^{n+1} }{ \Delta t } |
\frac{ \vec{\bf v}^{n+1} }{ \Delta t } |
437 |
+ {\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} ] |