[10414] | 1 | \documentclass[../main/NEMO_manual]{subfiles} |
---|
| 2 | |
---|
[6997] | 3 | \begin{document} |
---|
[707] | 4 | % ================================================================ |
---|
[6140] | 5 | % Chapter ——— Ocean Dynamics (DYN) |
---|
[707] | 6 | % ================================================================ |
---|
| 7 | \chapter{Ocean Dynamics (DYN)} |
---|
[9407] | 8 | \label{chap:DYN} |
---|
[10414] | 9 | |
---|
[11435] | 10 | \chaptertoc |
---|
[707] | 11 | |
---|
[10354] | 12 | Using the representation described in \autoref{chap:DOM}, |
---|
| 13 | several semi-discrete space forms of the dynamical equations are available depending on |
---|
| 14 | the vertical coordinate used and on the conservation properties of the vorticity term. |
---|
| 15 | In all the equations presented here, the masking has been omitted for simplicity. |
---|
| 16 | One must be aware that all the quantities are masked fields and |
---|
| 17 | that each time an average or difference operator is used, the resulting field is multiplied by a mask. |
---|
[707] | 18 | |
---|
| 19 | The prognostic ocean dynamics equation can be summarized as follows: |
---|
[10406] | 20 | \[ |
---|
[10414] | 21 | \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} } |
---|
| 22 | {\text{COR} + \text{ADV} } |
---|
| 23 | + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} |
---|
[10406] | 24 | \] |
---|
[10354] | 25 | NXT stands for next, referring to the time-stepping. |
---|
| 26 | The first group of terms on the rhs of this equation corresponds to the Coriolis and advection terms that |
---|
| 27 | are decomposed into either a vorticity part (VOR), a kinetic energy part (KEG) and |
---|
| 28 | a vertical advection part (ZAD) in the vector invariant formulation, |
---|
| 29 | or a Coriolis and advection part (COR+ADV) in the flux formulation. |
---|
| 30 | The terms following these are the pressure gradient contributions |
---|
| 31 | (HPG, Hydrostatic Pressure Gradient, and SPG, Surface Pressure Gradient); |
---|
| 32 | and contributions from lateral diffusion (LDF) and vertical diffusion (ZDF), |
---|
| 33 | which are added to the rhs in the \mdl{dynldf} and \mdl{dynzdf} modules. |
---|
| 34 | The vertical diffusion term includes the surface and bottom stresses. |
---|
| 35 | The external forcings and parameterisations require complex inputs |
---|
| 36 | (surface wind stress calculation using bulk formulae, estimation of mixing coefficients) |
---|
| 37 | that are carried out in modules SBC, LDF and ZDF and are described in |
---|
[11435] | 38 | \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. |
---|
[707] | 39 | |
---|
[10354] | 40 | In the present chapter we also describe the diagnostic equations used to compute the horizontal divergence, |
---|
| 41 | curl of the velocities (\emph{divcur} module) and the vertical velocity (\emph{wzvmod} module). |
---|
[707] | 42 | |
---|
[11435] | 43 | The different options available to the user are managed by namelist variables. |
---|
| 44 | For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, |
---|
[10354] | 45 | where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. |
---|
[11435] | 46 | %If a CPP key is used for this term its name is \key{ttt}. |
---|
[10354] | 47 | The corresponding code can be found in the \textit{dynttt\_xxx} module in the DYN directory, |
---|
| 48 | and it is usually computed in the \textit{dyn\_ttt\_xxx} subroutine. |
---|
[707] | 49 | |
---|
[10354] | 50 | The user has the option of extracting and outputting each tendency term from the 3D momentum equations |
---|
[11435] | 51 | (\texttt{trddyn?} defined), as described in \autoref{chap:MISC}. |
---|
| 52 | Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \texttt{trdvor?} is defined) |
---|
[10354] | 53 | can be derived from the 3D terms. |
---|
[817] | 54 | %%% |
---|
[11435] | 55 | \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does |
---|
[996] | 56 | MISC correspond to "extracting tendency terms" or "vorticity balance"?} |
---|
[707] | 57 | |
---|
| 58 | % ================================================================ |
---|
[2282] | 59 | % Sea Surface Height evolution & Diagnostics variables |
---|
| 60 | % ================================================================ |
---|
| 61 | \section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)} |
---|
[9407] | 62 | \label{sec:DYN_divcur_wzv} |
---|
[2282] | 63 | |
---|
| 64 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 65 | % Horizontal divergence and relative vorticity |
---|
| 66 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 67 | \subsection[Horizontal divergence and relative vorticity (\textit{divcur.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{divcur})} |
---|
[9407] | 68 | \label{subsec:DYN_divcur} |
---|
[2282] | 69 | |
---|
[11435] | 70 | The vorticity is defined at an $f$-point (\ie\ corner point) as follows: |
---|
[10414] | 71 | \begin{equation} |
---|
[11543] | 72 | \label{eq:DYN_divcur_cur} |
---|
[10414] | 73 | \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] |
---|
| 74 | -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) |
---|
[11435] | 75 | \end{equation} |
---|
[2282] | 76 | |
---|
[10354] | 77 | The horizontal divergence is defined at a $T$-point. |
---|
| 78 | It is given by: |
---|
[10414] | 79 | \[ |
---|
[11543] | 80 | % \label{eq:DYN_divcur_div} |
---|
[10414] | 81 | \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } |
---|
| 82 | \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right] |
---|
| 83 | +\delta_j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right) |
---|
| 84 | \] |
---|
[2282] | 85 | |
---|
[10354] | 86 | Note that although the vorticity has the same discrete expression in $z$- and $s$-coordinates, |
---|
| 87 | its physical meaning is not identical. |
---|
| 88 | $\zeta$ is a pseudo vorticity along $s$-surfaces |
---|
| 89 | (only pseudo because $(u,v)$ are still defined along geopotential surfaces, |
---|
| 90 | but are not necessarily defined at the same depth). |
---|
[2282] | 91 | |
---|
[10354] | 92 | The vorticity and divergence at the \textit{before} step are used in the computation of |
---|
| 93 | the horizontal diffusion of momentum. |
---|
| 94 | Note that because they have been calculated prior to the Asselin filtering of the \textit{before} velocities, |
---|
| 95 | the \textit{before} vorticity and divergence arrays must be included in the restart file to |
---|
| 96 | ensure perfect restartability. |
---|
| 97 | The vorticity and divergence at the \textit{now} time step are used for the computation of |
---|
[11435] | 98 | the nonlinear advection and of the vertical velocity respectively. |
---|
[2282] | 99 | |
---|
| 100 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 101 | % Sea Surface Height evolution |
---|
| 102 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 103 | \subsection[Horizontal divergence and relative vorticity (\textit{sshwzv.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} |
---|
[9407] | 104 | \label{subsec:DYN_sshwzv} |
---|
[2282] | 105 | |
---|
[10354] | 106 | The sea surface height is given by: |
---|
[10414] | 107 | \begin{equation} |
---|
[11543] | 108 | \label{eq:DYN_spg_ssh} |
---|
[10414] | 109 | \begin{aligned} |
---|
| 110 | \frac{\partial \eta }{\partial t} |
---|
| 111 | &\equiv \frac{1}{e_{1t} e_{2t} }\sum\limits_k { \left\{ \delta_i \left[ {e_{2u}\,e_{3u}\;u} \right] |
---|
| 112 | +\delta_j \left[ {e_{1v}\,e_{3v}\;v} \right] \right\} } |
---|
| 113 | - \frac{\textit{emp}}{\rho_w } \\ |
---|
| 114 | &\equiv \sum\limits_k {\chi \ e_{3t}} - \frac{\textit{emp}}{\rho_w } |
---|
| 115 | \end{aligned} |
---|
[2282] | 116 | \end{equation} |
---|
[11435] | 117 | where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), |
---|
[10354] | 118 | expressed in Kg/m$^2$/s (which is equal to mm/s), |
---|
[10406] | 119 | and $\rho_w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation). |
---|
[10354] | 120 | If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then |
---|
[11435] | 121 | \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. |
---|
[10354] | 122 | The sea-surface height is evaluated using exactly the same time stepping scheme as |
---|
[11543] | 123 | the tracer equation \autoref{eq:TRA_nxt}: |
---|
[10354] | 124 | a leapfrog scheme in combination with an Asselin time filter, |
---|
[11543] | 125 | \ie\ the velocity appearing in \autoref{eq:DYN_spg_ssh} is centred in time (\textit{now} velocity). |
---|
[10354] | 126 | This is of paramount importance. |
---|
| 127 | Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to |
---|
| 128 | the sea surface height equation otherwise tracer content will not be conserved |
---|
[11123] | 129 | \citep{griffies.pacanowski.ea_MWR01, leclair.madec_OM09}. |
---|
[2282] | 130 | |
---|
[10354] | 131 | The vertical velocity is computed by an upward integration of the horizontal divergence starting at the bottom, |
---|
| 132 | taking into account the change of the thickness of the levels: |
---|
[10414] | 133 | \begin{equation} |
---|
[11543] | 134 | \label{eq:DYN_wzv} |
---|
[10414] | 135 | \left\{ |
---|
| 136 | \begin{aligned} |
---|
| 137 | &\left. w \right|_{k_b-1/2} \quad= 0 \qquad \text{where } k_b \text{ is the level just above the sea floor } \\ |
---|
| 138 | &\left. w \right|_{k+1/2} = \left. w \right|_{k-1/2} + \left. e_{3t} \right|_{k}\; \left. \chi \right|_k |
---|
| 139 | - \frac{1} {2 \rdt} \left( \left. e_{3t}^{t+1}\right|_{k} - \left. e_{3t}^{t-1}\right|_{k}\right) |
---|
| 140 | \end{aligned} |
---|
| 141 | \right. |
---|
[2282] | 142 | \end{equation} |
---|
| 143 | |
---|
[11435] | 144 | In the case of a non-linear free surface (\texttt{vvl?}), the top vertical velocity is $-\textit{emp}/\rho_w$, |
---|
[10354] | 145 | as changes in the divergence of the barotropic transport are absorbed into the change of the level thicknesses, |
---|
| 146 | re-orientated downward. |
---|
[2285] | 147 | \gmcomment{not sure of this... to be modified with the change in emp setting} |
---|
[11543] | 148 | In the case of a linear free surface, the time derivative in \autoref{eq:DYN_wzv} disappears. |
---|
[10354] | 149 | The upper boundary condition applies at a fixed level $z=0$. |
---|
| 150 | The top vertical velocity is thus equal to the divergence of the barotropic transport |
---|
[11543] | 151 | (\ie\ the first term in the right-hand-side of \autoref{eq:DYN_spg_ssh}). |
---|
[2282] | 152 | |
---|
[10354] | 153 | Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates, |
---|
| 154 | its physical meaning is not the same: |
---|
| 155 | in the second case, $w$ is the velocity normal to the $s$-surfaces. |
---|
[11552] | 156 | Note also that the $k$-axis is re-orientated downwards in the \fortran\ code compared to |
---|
[11543] | 157 | the indexing used in the semi-discrete equations such as \autoref{eq:DYN_wzv} |
---|
[11435] | 158 | (see \autoref{subsec:DOM_Num_Index_vertical}). |
---|
[2282] | 159 | |
---|
| 160 | |
---|
| 161 | % ================================================================ |
---|
[707] | 162 | % Coriolis and Advection terms: vector invariant form |
---|
| 163 | % ================================================================ |
---|
[9393] | 164 | \section{Coriolis and advection: vector invariant form} |
---|
[9407] | 165 | \label{sec:DYN_adv_cor_vect} |
---|
[707] | 166 | %-----------------------------------------nam_dynadv---------------------------------------------------- |
---|
[10146] | 167 | |
---|
[11558] | 168 | \begin{listing} |
---|
| 169 | \nlst{namdyn_adv} |
---|
[11567] | 170 | \caption{\forcode{&namdyn_adv}} |
---|
[11558] | 171 | \label{lst:namdyn_adv} |
---|
| 172 | \end{listing} |
---|
[707] | 173 | %------------------------------------------------------------------------------------------------------------- |
---|
| 174 | |
---|
[10354] | 175 | The vector invariant form of the momentum equations is the one most often used in |
---|
[11435] | 176 | applications of the \NEMO\ ocean model. |
---|
[10354] | 177 | The flux form option (see next section) has been present since version $2$. |
---|
[11435] | 178 | Options are defined through the \nam{dyn\_adv} namelist variables Coriolis and |
---|
[10354] | 179 | momentum advection terms are evaluated using a leapfrog scheme, |
---|
[11435] | 180 | \ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity). |
---|
[10354] | 181 | At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied following |
---|
| 182 | \autoref{chap:LBC}. |
---|
[707] | 183 | |
---|
| 184 | % ------------------------------------------------------------------------------------------------------------- |
---|
[11435] | 185 | % Vorticity term |
---|
[707] | 186 | % ------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 187 | \subsection[Vorticity term (\textit{dynvor.F90})]{Vorticity term (\protect\mdl{dynvor})} |
---|
[9407] | 188 | \label{subsec:DYN_vor} |
---|
[707] | 189 | %------------------------------------------nam_dynvor---------------------------------------------------- |
---|
[10146] | 190 | |
---|
[11558] | 191 | \begin{listing} |
---|
| 192 | \nlst{namdyn_vor} |
---|
[11567] | 193 | \caption{\forcode{&namdyn_vor}} |
---|
[11558] | 194 | \label{lst:namdyn_vor} |
---|
| 195 | \end{listing} |
---|
[707] | 196 | %------------------------------------------------------------------------------------------------------------- |
---|
| 197 | |
---|
[11435] | 198 | Options are defined through the \nam{dyn\_vor} namelist variables. |
---|
[11537] | 199 | Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{=.true.}) are available: |
---|
[10354] | 200 | conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); |
---|
| 201 | conserving horizontal kinetic energy (ENE scheme); |
---|
| 202 | conserving potential enstrophy for the relative vorticity term and |
---|
| 203 | horizontal kinetic energy for the planetary vorticity term (MIX scheme); |
---|
| 204 | or conserving both the potential enstrophy of horizontally non-divergent flow and horizontal kinetic energy |
---|
[11543] | 205 | (EEN scheme) (see \autoref{subsec:INVARIANTS_vorEEN}). |
---|
[10354] | 206 | In the case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the consistency of |
---|
[11537] | 207 | vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{=.true.}). |
---|
[10354] | 208 | The vorticity terms are all computed in dedicated routines that can be found in the \mdl{dynvor} module. |
---|
[707] | 209 | |
---|
| 210 | %------------------------------------------------------------- |
---|
| 211 | % enstrophy conserving scheme |
---|
| 212 | %------------------------------------------------------------- |
---|
[11565] | 213 | \subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens})]{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens})} |
---|
[9407] | 214 | \label{subsec:DYN_vor_ens} |
---|
[707] | 215 | |
---|
[10354] | 216 | In the enstrophy conserving case (ENS scheme), |
---|
| 217 | the discrete formulation of the vorticity term provides a global conservation of the enstrophy |
---|
[11435] | 218 | ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie\ $\chi$=$0$), |
---|
[10354] | 219 | but does not conserve the total kinetic energy. |
---|
| 220 | It is given by: |
---|
[10414] | 221 | \begin{equation} |
---|
[11543] | 222 | \label{eq:DYN_vor_ens} |
---|
[10414] | 223 | \left\{ |
---|
| 224 | \begin{aligned} |
---|
| 225 | {+\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i} |
---|
| 226 | & {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i, j+1/2} \\ |
---|
| 227 | {- \frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j} |
---|
| 228 | & {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2, j} |
---|
| 229 | \end{aligned} |
---|
| 230 | \right. |
---|
[11435] | 231 | \end{equation} |
---|
[707] | 232 | |
---|
| 233 | %------------------------------------------------------------- |
---|
| 234 | % energy conserving scheme |
---|
| 235 | %------------------------------------------------------------- |
---|
[11565] | 236 | \subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene})]{Energy conserving scheme (\protect\np{ln\_dynvor\_ene})} |
---|
[9407] | 237 | \label{subsec:DYN_vor_ene} |
---|
[707] | 238 | |
---|
[10354] | 239 | The kinetic energy conserving scheme (ENE scheme) conserves the global kinetic energy but not the global enstrophy. |
---|
| 240 | It is given by: |
---|
[10414] | 241 | \begin{equation} |
---|
[11543] | 242 | \label{eq:DYN_vor_ene} |
---|
[10414] | 243 | \left\{ |
---|
| 244 | \begin{aligned} |
---|
| 245 | {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) |
---|
| 246 | \; \overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ |
---|
| 247 | {- \frac{1}{e_{2v}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) |
---|
| 248 | \; \overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } |
---|
| 249 | \end{aligned} |
---|
| 250 | \right. |
---|
[11435] | 251 | \end{equation} |
---|
[707] | 252 | |
---|
| 253 | %------------------------------------------------------------- |
---|
| 254 | % mix energy/enstrophy conserving scheme |
---|
| 255 | %------------------------------------------------------------- |
---|
[11565] | 256 | \subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix})]{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix})} |
---|
[9407] | 257 | \label{subsec:DYN_vor_mix} |
---|
[707] | 258 | |
---|
[10354] | 259 | For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the two previous schemes is used. |
---|
[11543] | 260 | It consists of the ENS scheme (\autoref{eq:DYN_vor_ens}) for the relative vorticity term, |
---|
| 261 | and of the ENE scheme (\autoref{eq:DYN_vor_ene}) applied to the planetary vorticity term. |
---|
[10414] | 262 | \[ |
---|
[11543] | 263 | % \label{eq:DYN_vor_mix} |
---|
[10414] | 264 | \left\{ { |
---|
| 265 | \begin{aligned} |
---|
| 266 | {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} |
---|
| 267 | \; {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} } |
---|
| 268 | \; {\overline {\left( {\frac{f}{e_{3f} }} \right) |
---|
| 269 | \;\overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ |
---|
| 270 | {-\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j |
---|
| 271 | \; {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} } |
---|
| 272 | \; {\overline {\left( {\frac{f}{e_{3f} }} \right) |
---|
| 273 | \;\overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill |
---|
| 274 | \end{aligned} |
---|
| 275 | } \right. |
---|
| 276 | \] |
---|
[707] | 277 | |
---|
| 278 | %------------------------------------------------------------- |
---|
| 279 | % energy and enstrophy conserving scheme |
---|
| 280 | %------------------------------------------------------------- |
---|
[11565] | 281 | \subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een})]{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een})} |
---|
[9407] | 282 | \label{subsec:DYN_vor_een} |
---|
[707] | 283 | |
---|
[10354] | 284 | In both the ENS and ENE schemes, |
---|
| 285 | it is apparent that the combination of $i$ and $j$ averages of the velocity allows for |
---|
| 286 | the presence of grid point oscillation structures that will be invisible to the operator. |
---|
| 287 | These structures are \textit{computational modes} that will be at least partly damped by |
---|
[11435] | 288 | the momentum diffusion operator (\ie\ the subgrid-scale advection), but not by the resolved advection term. |
---|
[10354] | 289 | The ENS and ENE schemes therefore do not contribute to dump any grid point noise in the horizontal velocity field. |
---|
| 290 | Such noise would result in more noise in the vertical velocity field, an undesirable feature. |
---|
| 291 | This is a well-known characteristic of $C$-grid discretization where |
---|
| 292 | $u$ and $v$ are located at different grid points, |
---|
| 293 | a price worth paying to avoid a double averaging in the pressure gradient term as in the $B$-grid. |
---|
[11435] | 294 | \gmcomment{ To circumvent this, Adcroft (ADD REF HERE) |
---|
[2282] | 295 | Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....} |
---|
| 296 | |
---|
[11123] | 297 | A very nice solution to the problem of double averaging was proposed by \citet{arakawa.hsu_MWR90}. |
---|
[10354] | 298 | The idea is to get rid of the double averaging by considering triad combinations of vorticity. |
---|
[2282] | 299 | It is noteworthy that this solution is conceptually quite similar to the one proposed by |
---|
[11543] | 300 | \citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:INVARIANTS}). |
---|
[2282] | 301 | |
---|
[11435] | 302 | The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified |
---|
| 303 | for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme. |
---|
| 304 | First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: |
---|
[10414] | 305 | \[ |
---|
[11543] | 306 | % \label{eq:DYN_pot_vor} |
---|
[10414] | 307 | q = \frac{\zeta +f} {e_{3f} } |
---|
| 308 | \] |
---|
[11543] | 309 | where the relative vorticity is defined by (\autoref{eq:DYN_divcur_cur}), |
---|
[11435] | 310 | the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: |
---|
[10414] | 311 | \begin{equation} |
---|
[11543] | 312 | \label{eq:DYN_een_e3f} |
---|
[10414] | 313 | e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} |
---|
[707] | 314 | \end{equation} |
---|
| 315 | |
---|
| 316 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[10414] | 317 | \begin{figure}[!ht] |
---|
[11558] | 318 | \centering |
---|
[11561] | 319 | \includegraphics[width=0.66\textwidth]{Fig_DYN_een_triad} |
---|
[11558] | 320 | \caption[Triads used in the energy and enstrophy conserving scheme (EEN)]{ |
---|
| 321 | Triads used in the energy and enstrophy conserving scheme (EEN) for |
---|
| 322 | $u$-component (upper panel) and $v$-component (lower panel).} |
---|
| 323 | \label{fig:DYN_een_triad} |
---|
[10414] | 324 | \end{figure} |
---|
| 325 | % >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[707] | 326 | |
---|
[11543] | 327 | A key point in \autoref{eq:DYN_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. |
---|
[10354] | 328 | It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks |
---|
[11537] | 329 | (\np{nn\_een\_e3f}\forcode{=1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{=.true.}). |
---|
[10354] | 330 | The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and |
---|
| 331 | extends by continuity the value of $e_{3f}$ into the land areas. |
---|
| 332 | This case introduces a sub-grid-scale topography at f-points |
---|
| 333 | (with a systematic reduction of $e_{3f}$ when a model level intercept the bathymetry) |
---|
| 334 | that tends to reinforce the topostrophy of the flow |
---|
[11435] | 335 | (\ie\ the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}. |
---|
[707] | 336 | |
---|
[10354] | 337 | Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as |
---|
| 338 | the following triad combinations of the neighbouring potential vorticities defined at f-points |
---|
[11435] | 339 | (\autoref{fig:DYN_een_triad}): |
---|
[10414] | 340 | \begin{equation} |
---|
[11543] | 341 | \label{eq:DYN_Q_triads} |
---|
[10414] | 342 | _i^j \mathbb{Q}^{i_p}_{j_p} |
---|
| 343 | = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) |
---|
[2282] | 344 | \end{equation} |
---|
[11435] | 345 | where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. |
---|
[2282] | 346 | |
---|
[11435] | 347 | Finally, the vorticity terms are represented as: |
---|
[10414] | 348 | \begin{equation} |
---|
[11543] | 349 | \label{eq:DYN_vor_een} |
---|
[10414] | 350 | \left\{ { |
---|
| 351 | \begin{aligned} |
---|
| 352 | +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} |
---|
| 353 | {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v}\,e_{3v} \;v \right)^{i+1/2-i_p}_{j+j_p} \\ |
---|
| 354 | - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} |
---|
| 355 | {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u}\,e_{3u} \;u \right)^{i+i_p}_{j+1/2-j_p} \\ |
---|
| 356 | \end{aligned} |
---|
| 357 | } \right. |
---|
[11435] | 358 | \end{equation} |
---|
[707] | 359 | |
---|
[10354] | 360 | This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. |
---|
| 361 | It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow |
---|
[11543] | 362 | (\ie\ $\chi$=$0$) (see \autoref{subsec:INVARIANTS_vorEEN}). |
---|
[10354] | 363 | Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of |
---|
[11123] | 364 | the noise in the vertical velocity field \citep{le-sommer.penduff.ea_OM09}. |
---|
[2282] | 365 | Furthermore, used in combination with a partial steps representation of bottom topography, |
---|
[10354] | 366 | it improves the interaction between current and topography, |
---|
[11435] | 367 | leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. |
---|
[2282] | 368 | |
---|
[707] | 369 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 370 | % Kinetic Energy Gradient term |
---|
| 371 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 372 | \subsection[Kinetic energy gradient term (\textit{dynkeg.F90})]{Kinetic energy gradient term (\protect\mdl{dynkeg})} |
---|
[9407] | 373 | \label{subsec:DYN_keg} |
---|
[707] | 374 | |
---|
[11543] | 375 | As demonstrated in \autoref{apdx:INVARIANTS}, |
---|
[10354] | 376 | there is a single discrete formulation of the kinetic energy gradient term that, |
---|
| 377 | together with the formulation chosen for the vertical advection (see below), |
---|
| 378 | conserves the total kinetic energy: |
---|
[10414] | 379 | \[ |
---|
[11543] | 380 | % \label{eq:DYN_keg} |
---|
[10414] | 381 | \left\{ |
---|
| 382 | \begin{aligned} |
---|
| 383 | -\frac{1}{2 \; e_{1u} } & \ \delta_{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] \\ |
---|
| 384 | -\frac{1}{2 \; e_{2v} } & \ \delta_{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] |
---|
| 385 | \end{aligned} |
---|
| 386 | \right. |
---|
| 387 | \] |
---|
[707] | 388 | |
---|
| 389 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 390 | % Vertical advection term |
---|
| 391 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 392 | \subsection[Vertical advection term (\textit{dynzad.F90})]{Vertical advection term (\protect\mdl{dynzad})} |
---|
[9407] | 393 | \label{subsec:DYN_zad} |
---|
[707] | 394 | |
---|
[10354] | 395 | The discrete formulation of the vertical advection, t |
---|
| 396 | ogether with the formulation chosen for the gradient of kinetic energy (KE) term, |
---|
| 397 | conserves the total kinetic energy. |
---|
| 398 | Indeed, the change of KE due to the vertical advection is exactly balanced by |
---|
[11543] | 399 | the change of KE due to the gradient of KE (see \autoref{apdx:INVARIANTS}). |
---|
[10414] | 400 | \[ |
---|
[11543] | 401 | % \label{eq:DYN_zad} |
---|
[10414] | 402 | \left\{ |
---|
| 403 | \begin{aligned} |
---|
| 404 | -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2} \;\delta_{k+1/2} \left[ u \right]\ }^{\,k} \\ |
---|
| 405 | -\frac{1} {e_{1v}\,e_{2v}\,e_{3v}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,j+1/2} \;\delta_{k+1/2} \left[ u \right]\ }^{\,k} |
---|
| 406 | \end{aligned} |
---|
| 407 | \right. |
---|
| 408 | \] |
---|
[11537] | 409 | When \np{ln\_dynzad\_zts}\forcode{=.true.}, |
---|
[10354] | 410 | a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. |
---|
[11435] | 411 | This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. |
---|
[10354] | 412 | Note that in this case, |
---|
| 413 | a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, |
---|
[9407] | 414 | an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). |
---|
[707] | 415 | |
---|
[6289] | 416 | |
---|
[707] | 417 | % ================================================================ |
---|
| 418 | % Coriolis and Advection : flux form |
---|
| 419 | % ================================================================ |
---|
[9393] | 420 | \section{Coriolis and advection: flux form} |
---|
[9407] | 421 | \label{sec:DYN_adv_cor_flux} |
---|
[707] | 422 | %------------------------------------------nam_dynadv---------------------------------------------------- |
---|
[10146] | 423 | |
---|
[707] | 424 | %------------------------------------------------------------------------------------------------------------- |
---|
| 425 | |
---|
[11435] | 426 | Options are defined through the \nam{dyn\_adv} namelist variables. |
---|
[10354] | 427 | In the flux form (as in the vector invariant form), |
---|
| 428 | the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, |
---|
[11435] | 429 | \ie\ the velocity appearing in their expressions is centred in time (\textit{now} velocity). |
---|
[10354] | 430 | At the lateral boundaries either free slip, |
---|
| 431 | no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}. |
---|
[707] | 432 | |
---|
| 433 | |
---|
| 434 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 435 | % Coriolis plus curvature metric terms |
---|
| 436 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 437 | \subsection[Coriolis plus curvature metric terms (\textit{dynvor.F90})]{Coriolis plus curvature metric terms (\protect\mdl{dynvor})} |
---|
[9407] | 438 | \label{subsec:DYN_cor_flux} |
---|
[707] | 439 | |
---|
[10354] | 440 | In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the "metric" term. |
---|
| 441 | This altered Coriolis parameter is thus discretised at $f$-points. |
---|
[11435] | 442 | It is given by: |
---|
[10414] | 443 | \begin{multline*} |
---|
[11543] | 444 | % \label{eq:DYN_cor_metric} |
---|
[10414] | 445 | f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ |
---|
| 446 | \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] |
---|
| 447 | - \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right] } \ \right) |
---|
[11435] | 448 | \end{multline*} |
---|
[707] | 449 | |
---|
[11543] | 450 | Any of the (\autoref{eq:DYN_vor_ens}), (\autoref{eq:DYN_vor_ene}) and (\autoref{eq:DYN_vor_een}) schemes can be used to |
---|
[10354] | 451 | compute the product of the Coriolis parameter and the vorticity. |
---|
[11543] | 452 | However, the energy-conserving scheme (\autoref{eq:DYN_vor_een}) has exclusively been used to date. |
---|
[11435] | 453 | This term is evaluated using a leapfrog scheme, \ie\ the velocity is centred in time (\textit{now} velocity). |
---|
[707] | 454 | |
---|
| 455 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 456 | % Flux form Advection term |
---|
| 457 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11543] | 458 | \subsection[Flux form advection term (\textit{dynadv.F90})]{Flux form advection term (\protect\mdl{dynadv})} |
---|
[9407] | 459 | \label{subsec:DYN_adv_flux} |
---|
[707] | 460 | |
---|
[10354] | 461 | The discrete expression of the advection term is given by: |
---|
[10414] | 462 | \[ |
---|
[11543] | 463 | % \label{eq:DYN_adv} |
---|
[10414] | 464 | \left\{ |
---|
| 465 | \begin{aligned} |
---|
| 466 | \frac{1}{e_{1u}\,e_{2u}\,e_{3u}} |
---|
| 467 | \left( \delta_{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\;u }^{i } \ u_t \right] |
---|
| 468 | + \delta_{j } \left[ \overline{e_{1u}\,e_{3u}\;v }^{i+1/2} \ u_f \right] \right. \ \; \\ |
---|
| 469 | \left. + \delta_{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{i+1/2} \ u_{uw} \right] \right) \\ |
---|
| 470 | \\ |
---|
| 471 | \frac{1}{e_{1v}\,e_{2v}\,e_{3v}} |
---|
| 472 | \left( \delta_{i } \left[ \overline{e_{2u}\,e_{3u }\;u }^{j+1/2} \ v_f \right] |
---|
| 473 | + \delta_{j+1/2} \left[ \overline{e_{1u}\,e_{3u }\;v }^{i } \ v_t \right] \right. \ \, \, \\ |
---|
| 474 | \left. + \delta_{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{j+1/2} \ v_{vw} \right] \right) \\ |
---|
| 475 | \end{aligned} |
---|
| 476 | \right. |
---|
| 477 | \] |
---|
[707] | 478 | |
---|
[10354] | 479 | Two advection schemes are available: |
---|
| 480 | a $2^{nd}$ order centered finite difference scheme, CEN2, |
---|
| 481 | or a $3^{rd}$ order upstream biased scheme, UBS. |
---|
[11123] | 482 | The latter is described in \citet{shchepetkin.mcwilliams_OM05}. |
---|
[11435] | 483 | The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. |
---|
[10354] | 484 | In flux form, the schemes differ by the choice of a space and time interpolation to define the value of |
---|
[11435] | 485 | $u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-, |
---|
| 486 | and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. |
---|
[707] | 487 | |
---|
| 488 | %------------------------------------------------------------- |
---|
| 489 | % 2nd order centred scheme |
---|
| 490 | %------------------------------------------------------------- |
---|
[11565] | 491 | \subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2})]{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2})} |
---|
[9407] | 492 | \label{subsec:DYN_adv_cen2} |
---|
[707] | 493 | |
---|
[10354] | 494 | In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points: |
---|
[10414] | 495 | \begin{equation} |
---|
[11543] | 496 | \label{eq:DYN_adv_cen2} |
---|
[10414] | 497 | \left\{ |
---|
| 498 | \begin{aligned} |
---|
| 499 | u_T^{cen2} &=\overline u^{i } \quad & u_F^{cen2} &=\overline u^{j+1/2} \quad & u_{uw}^{cen2} &=\overline u^{k+1/2} \\ |
---|
| 500 | v_F^{cen2} &=\overline v ^{i+1/2} \quad & v_F^{cen2} &=\overline v^j \quad & v_{vw}^{cen2} &=\overline v ^{k+1/2} \\ |
---|
| 501 | \end{aligned} |
---|
| 502 | \right. |
---|
[11435] | 503 | \end{equation} |
---|
[707] | 504 | |
---|
[11435] | 505 | The scheme is non diffusive (\ie\ conserves the kinetic energy) but dispersive (\ie\ it may create false extrema). |
---|
[10354] | 506 | It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to |
---|
| 507 | produce a sensible solution. |
---|
| 508 | The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, |
---|
| 509 | so $u$ and $v$ are the \emph{now} velocities. |
---|
[707] | 510 | |
---|
| 511 | %------------------------------------------------------------- |
---|
| 512 | % UBS scheme |
---|
| 513 | %------------------------------------------------------------- |
---|
[11565] | 514 | \subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs})]{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs})} |
---|
[9407] | 515 | \label{subsec:DYN_adv_ubs} |
---|
[707] | 516 | |
---|
[10354] | 517 | The UBS advection scheme is an upstream biased third order scheme based on |
---|
| 518 | an upstream-biased parabolic interpolation. |
---|
| 519 | For example, the evaluation of $u_T^{ubs} $ is done as follows: |
---|
[10414] | 520 | \begin{equation} |
---|
[11543] | 521 | \label{eq:DYN_adv_ubs} |
---|
[10414] | 522 | u_T^{ubs} =\overline u ^i-\;\frac{1}{6} |
---|
| 523 | \begin{cases} |
---|
| 524 | u"_{i-1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i \geqslant 0$ } \\ |
---|
| 525 | u"_{i+1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i < 0$ } |
---|
| 526 | \end{cases} |
---|
[707] | 527 | \end{equation} |
---|
[10406] | 528 | where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$. |
---|
[11435] | 529 | This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error |
---|
[11123] | 530 | \citep{shchepetkin.mcwilliams_OM05}. |
---|
| 531 | The overall performance of the advection scheme is similar to that reported in \citet{farrow.stevens_JPO95}. |
---|
[10354] | 532 | It is a relatively good compromise between accuracy and smoothness. |
---|
| 533 | It is not a \emph{positive} scheme, meaning that false extrema are permitted. |
---|
| 534 | But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. |
---|
[11435] | 535 | As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum |
---|
[11537] | 536 | (\ie\ \np{ln\_dynldf\_lap}\forcode{=}\np{ln\_dynldf\_bilap}\forcode{=.false.}), |
---|
[10354] | 537 | and it is recommended to do so. |
---|
[707] | 538 | |
---|
[10354] | 539 | The UBS scheme is not used in all directions. |
---|
[11435] | 540 | In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie\ $u_{uw}^{ubs}$ and |
---|
[11543] | 541 | $u_{vw}^{ubs}$ in \autoref{eq:DYN_adv_cen2} are used. |
---|
[11435] | 542 | UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm pursue the |
---|
[817] | 543 | sentence:Since vertical mixing of momentum is a source term of the TKE equation... } |
---|
[707] | 544 | |
---|
[11543] | 545 | For stability reasons, the first term in (\autoref{eq:DYN_adv_ubs}), |
---|
[10354] | 546 | which corresponds to a second order centred scheme, is evaluated using the \textit{now} velocity (centred in time), |
---|
| 547 | while the second term, which is the diffusion part of the scheme, |
---|
| 548 | is evaluated using the \textit{before} velocity (forward in time). |
---|
[11123] | 549 | This is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the Quick advection scheme. |
---|
[707] | 550 | |
---|
[10354] | 551 | Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) schemes only differ by |
---|
| 552 | one coefficient. |
---|
[11543] | 553 | Replacing $1/6$ by $1/8$ in (\autoref{eq:DYN_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}. |
---|
[10354] | 554 | This option is not available through a namelist parameter, since the $1/6$ coefficient is hard coded. |
---|
| 555 | Nevertheless it is quite easy to make the substitution in the \mdl{dynadv\_ubs} module and obtain a QUICK scheme. |
---|
[707] | 556 | |
---|
[10354] | 557 | Note also that in the current version of \mdl{dynadv\_ubs}, |
---|
| 558 | there is also the possibility of using a $4^{th}$ order evaluation of the advective velocity as in ROMS. |
---|
| 559 | This is an error and should be suppressed soon. |
---|
[817] | 560 | %%% |
---|
| 561 | \gmcomment{action : this have to be done} |
---|
| 562 | %%% |
---|
[707] | 563 | |
---|
| 564 | % ================================================================ |
---|
| 565 | % Hydrostatic pressure gradient term |
---|
| 566 | % ================================================================ |
---|
[11543] | 567 | \section[Hydrostatic pressure gradient (\textit{dynhpg.F90})]{Hydrostatic pressure gradient (\protect\mdl{dynhpg})} |
---|
[9407] | 568 | \label{sec:DYN_hpg} |
---|
[707] | 569 | %------------------------------------------nam_dynhpg--------------------------------------------------- |
---|
[10146] | 570 | |
---|
[11558] | 571 | \begin{listing} |
---|
| 572 | \nlst{namdyn_hpg} |
---|
[11567] | 573 | \caption{\forcode{&namdyn_hpg}} |
---|
[11558] | 574 | \label{lst:namdyn_hpg} |
---|
| 575 | \end{listing} |
---|
[707] | 576 | %------------------------------------------------------------------------------------------------------------- |
---|
| 577 | |
---|
[11435] | 578 | Options are defined through the \nam{dyn\_hpg} namelist variables. |
---|
[10354] | 579 | The key distinction between the different algorithms used for |
---|
| 580 | the hydrostatic pressure gradient is the vertical coordinate used, |
---|
[11435] | 581 | since HPG is a \emph{horizontal} pressure gradient, \ie\ computed along geopotential surfaces. |
---|
[10354] | 582 | As a result, any tilt of the surface of the computational levels will require a specific treatment to |
---|
[817] | 583 | compute the hydrostatic pressure gradient. |
---|
[707] | 584 | |
---|
[10354] | 585 | The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme, |
---|
[11435] | 586 | \ie\ the density appearing in its expression is centred in time (\emph{now} $\rho$), |
---|
[10354] | 587 | or a semi-implcit scheme. |
---|
| 588 | At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied. |
---|
[707] | 589 | |
---|
| 590 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 591 | % z-coordinate with full step |
---|
| 592 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 593 | \subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco})]{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco})} |
---|
[9407] | 594 | \label{subsec:DYN_hpg_zco} |
---|
[707] | 595 | |
---|
[10354] | 596 | The hydrostatic pressure can be obtained by integrating the hydrostatic equation vertically from the surface. |
---|
| 597 | However, the pressure is large at great depth while its horizontal gradient is several orders of magnitude smaller. |
---|
| 598 | This may lead to large truncation errors in the pressure gradient terms. |
---|
| 599 | Thus, the two horizontal components of the hydrostatic pressure gradient are computed directly as follows: |
---|
[707] | 600 | |
---|
| 601 | for $k=km$ (surface layer, $jk=1$ in the code) |
---|
[10414] | 602 | \begin{equation} |
---|
[11543] | 603 | \label{eq:DYN_hpg_zco_surf} |
---|
[10414] | 604 | \left\{ |
---|
| 605 | \begin{aligned} |
---|
| 606 | \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k=km} |
---|
| 607 | &= \frac{1}{2} g \ \left. \delta_{i+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ |
---|
| 608 | \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k=km} |
---|
| 609 | &= \frac{1}{2} g \ \left. \delta_{j+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ |
---|
| 610 | \end{aligned} |
---|
| 611 | \right. |
---|
[11435] | 612 | \end{equation} |
---|
[707] | 613 | |
---|
| 614 | for $1<k<km$ (interior layer) |
---|
[10414] | 615 | \begin{equation} |
---|
[11543] | 616 | \label{eq:DYN_hpg_zco} |
---|
[10414] | 617 | \left\{ |
---|
| 618 | \begin{aligned} |
---|
| 619 | \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k} |
---|
| 620 | &= \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k-1} |
---|
| 621 | + \frac{1}{2}\;g\; \left. \delta_{i+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ |
---|
| 622 | \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k} |
---|
| 623 | &= \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k-1} |
---|
| 624 | + \frac{1}{2}\;g\; \left. \delta_{j+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ |
---|
| 625 | \end{aligned} |
---|
| 626 | \right. |
---|
[11435] | 627 | \end{equation} |
---|
[707] | 628 | |
---|
[11543] | 629 | Note that the $1/2$ factor in (\autoref{eq:DYN_hpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as |
---|
[10354] | 630 | the vertical derivative of the scale factor at the surface level ($z=0$). |
---|
[11435] | 631 | Note also that in case of variable volume level (\texttt{vvl?} defined), |
---|
[11543] | 632 | the surface pressure gradient is included in \autoref{eq:DYN_hpg_zco_surf} and |
---|
| 633 | \autoref{eq:DYN_hpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. |
---|
[707] | 634 | |
---|
| 635 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 636 | % z-coordinate with partial step |
---|
| 637 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 638 | \subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps})]{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps})} |
---|
[9407] | 639 | \label{subsec:DYN_hpg_zps} |
---|
[707] | 640 | |
---|
[10354] | 641 | With partial bottom cells, tracers in horizontally adjacent cells generally live at different depths. |
---|
| 642 | Before taking horizontal gradients between these tracer points, |
---|
| 643 | a linear interpolation is used to approximate the deeper tracer as if |
---|
[11435] | 644 | it actually lived at the depth of the shallower tracer point. |
---|
[707] | 645 | |
---|
[10354] | 646 | Apart from this modification, |
---|
| 647 | the horizontal hydrostatic pressure gradient evaluated in the $z$-coordinate with partial step is exactly as in |
---|
| 648 | the pure $z$-coordinate case. |
---|
| 649 | As explained in detail in section \autoref{sec:TRA_zpshde}, |
---|
| 650 | the nonlinearity of pressure effects in the equation of state is such that |
---|
| 651 | it is better to interpolate temperature and salinity vertically before computing the density. |
---|
| 652 | Horizontal gradients of temperature and salinity are needed for the TRA modules, |
---|
| 653 | which is the reason why the horizontal gradients of density at the deepest model level are computed in |
---|
| 654 | module \mdl{zpsdhe} located in the TRA directory and described in \autoref{sec:TRA_zpshde}. |
---|
[707] | 655 | |
---|
| 656 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 657 | % s- and s-z-coordinates |
---|
| 658 | %-------------------------------------------------------------------------------------------------------------- |
---|
[9393] | 659 | \subsection{$S$- and $Z$-$S$-coordinates} |
---|
[9407] | 660 | \label{subsec:DYN_hpg_sco} |
---|
[707] | 661 | |
---|
[10354] | 662 | Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers |
---|
[11435] | 663 | (\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}). |
---|
[10354] | 664 | A number of different pressure gradient options are coded but the ROMS-like, |
---|
| 665 | density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. |
---|
[707] | 666 | |
---|
[11537] | 667 | $\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{=.true.}) |
---|
[10414] | 668 | \begin{equation} |
---|
[11543] | 669 | \label{eq:DYN_hpg_sco} |
---|
[10414] | 670 | \left\{ |
---|
| 671 | \begin{aligned} |
---|
| 672 | - \frac{1} {\rho_o \, e_{1u}} \; \delta_{i+1/2} \left[ p^h \right] |
---|
| 673 | + \frac{g\; \overline {\rho}^{i+1/2}} {\rho_o \, e_{1u}} \; \delta_{i+1/2} \left[ z_t \right] \\ |
---|
| 674 | - \frac{1} {\rho_o \, e_{2v}} \; \delta_{j+1/2} \left[ p^h \right] |
---|
| 675 | + \frac{g\; \overline {\rho}^{j+1/2}} {\rho_o \, e_{2v}} \; \delta_{j+1/2} \left[ z_t \right] \\ |
---|
| 676 | \end{aligned} |
---|
| 677 | \right. |
---|
[11435] | 678 | \end{equation} |
---|
[707] | 679 | |
---|
[10354] | 680 | Where the first term is the pressure gradient along coordinates, |
---|
[11543] | 681 | computed as in \autoref{eq:DYN_hpg_zco_surf} - \autoref{eq:DYN_hpg_zco}, |
---|
[11435] | 682 | and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point |
---|
[5120] | 683 | ($e_{3w}$). |
---|
[11435] | 684 | |
---|
[11537] | 685 | $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{=.true.}). |
---|
| 686 | This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{=.true.}). |
---|
[707] | 687 | |
---|
[11537] | 688 | $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{=.true.}) |
---|
[707] | 689 | |
---|
[11435] | 690 | $\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} |
---|
[11537] | 691 | (\np{ln\_dynhpg\_djc}\forcode{=.true.}) (currently disabled; under development) |
---|
[707] | 692 | |
---|
[11543] | 693 | Note that expression \autoref{eq:DYN_hpg_sco} is commonly used when the variable volume formulation is activated |
---|
[11435] | 694 | (\texttt{vvl?}) because in that case, even with a flat bottom, |
---|
[11123] | 695 | the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}. |
---|
[11537] | 696 | The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{=.true.}) is available as |
---|
| 697 | an improved option to \np{ln\_dynhpg\_sco}\forcode{=.true.} when \texttt{vvl?} is active. |
---|
[10354] | 698 | The pressure Jacobian scheme uses a constrained cubic spline to |
---|
| 699 | reconstruct the density profile across the water column. |
---|
| 700 | This method maintains the monotonicity between the density nodes. |
---|
| 701 | The pressure can be calculated by analytical integration of the density profile and |
---|
| 702 | a pressure Jacobian method is used to solve the horizontal pressure gradient. |
---|
| 703 | This method can provide a more accurate calculation of the horizontal pressure gradient than the standard scheme. |
---|
[707] | 704 | |
---|
[6320] | 705 | \subsection{Ice shelf cavity} |
---|
[9407] | 706 | \label{subsec:DYN_hpg_isf} |
---|
[11543] | 707 | |
---|
[6320] | 708 | Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and |
---|
[11537] | 709 | the pressure gradient due to the ocean load (\np{ln\_dynhpg\_isf}\forcode{=.true.}).\\ |
---|
[6320] | 710 | |
---|
[10468] | 711 | The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. |
---|
[10354] | 712 | The top pressure is computed integrating from surface to the base of the ice shelf a reference density profile |
---|
[10442] | 713 | (prescribed as density of a water at 34.4 PSU and -1.9\deg{C}) and |
---|
[10354] | 714 | corresponds to the water replaced by the ice shelf. |
---|
| 715 | This top pressure is constant over time. |
---|
[11123] | 716 | A detailed description of this method is described in \citet{losch_JGR08}.\\ |
---|
[6320] | 717 | |
---|
[11543] | 718 | The pressure gradient due to ocean load is computed using the expression \autoref{eq:DYN_hpg_sco} described in |
---|
[11435] | 719 | \autoref{subsec:DYN_hpg_sco}. |
---|
[6320] | 720 | |
---|
[707] | 721 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 722 | % Time-scheme |
---|
| 723 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 724 | \subsection[Time-scheme (\forcode{ln_dynhpg_imp})]{Time-scheme (\protect\np{ln\_dynhpg\_imp})} |
---|
[9407] | 725 | \label{subsec:DYN_hpg_imp} |
---|
[707] | 726 | |
---|
[10354] | 727 | The default time differencing scheme used for the horizontal pressure gradient is a leapfrog scheme and |
---|
| 728 | therefore the density used in all discrete expressions given above is the \textit{now} density, |
---|
| 729 | computed from the \textit{now} temperature and salinity. |
---|
| 730 | In some specific cases |
---|
| 731 | (usually high resolution simulations over an ocean domain which includes weakly stratified regions) |
---|
| 732 | the physical phenomenon that controls the time-step is internal gravity waves (IGWs). |
---|
| 733 | A semi-implicit scheme for doubling the stability limit associated with IGWs can be used |
---|
[11123] | 734 | \citep{brown.campana_MWR78, maltrud.smith.ea_JGR98}. |
---|
[10354] | 735 | It involves the evaluation of the hydrostatic pressure gradient as |
---|
| 736 | an average over the three time levels $t-\rdt$, $t$, and $t+\rdt$ |
---|
[11435] | 737 | (\ie\ \textit{before}, \textit{now} and \textit{after} time-steps), |
---|
| 738 | rather than at the central time level $t$ only, as in the standard leapfrog scheme. |
---|
[707] | 739 | |
---|
[11537] | 740 | $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{=.true.}): |
---|
[707] | 741 | |
---|
[10414] | 742 | \begin{equation} |
---|
[11543] | 743 | \label{eq:DYN_hpg_lf} |
---|
[10414] | 744 | \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; |
---|
| 745 | -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right] |
---|
[707] | 746 | \end{equation} |
---|
| 747 | |
---|
[11537] | 748 | $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{=.true.}): |
---|
[10414] | 749 | \begin{equation} |
---|
[11543] | 750 | \label{eq:DYN_hpg_imp} |
---|
[10414] | 751 | \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; |
---|
| 752 | -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt} \right] |
---|
[707] | 753 | \end{equation} |
---|
| 754 | |
---|
[11543] | 755 | The semi-implicit time scheme \autoref{eq:DYN_hpg_imp} is made possible without |
---|
[10354] | 756 | significant additional computation since the density can be updated to time level $t+\rdt$ before |
---|
| 757 | computing the horizontal hydrostatic pressure gradient. |
---|
| 758 | It can be easily shown that the stability limit associated with the hydrostatic pressure gradient doubles using |
---|
[11543] | 759 | \autoref{eq:DYN_hpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:DYN_hpg_lf}. |
---|
| 760 | Note that \autoref{eq:DYN_hpg_imp} is equivalent to applying a time filter to the pressure gradient to |
---|
[10354] | 761 | eliminate high frequency IGWs. |
---|
[11543] | 762 | Obviously, when using \autoref{eq:DYN_hpg_imp}, |
---|
[10354] | 763 | the doubling of the time-step is achievable only if no other factors control the time-step, |
---|
| 764 | such as the stability limits associated with advection or diffusion. |
---|
[707] | 765 | |
---|
[11537] | 766 | In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{=.true.}. |
---|
[10354] | 767 | In this case, we choose to apply the time filter to temperature and salinity used in the equation of state, |
---|
| 768 | instead of applying it to the hydrostatic pressure or to the density, |
---|
| 769 | so that no additional storage array has to be defined. |
---|
| 770 | The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows: |
---|
[10414] | 771 | \[ |
---|
[11543] | 772 | % \label{eq:DYN_rho_flt} |
---|
[10414] | 773 | \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) |
---|
| 774 | \quad \text{with} \quad |
---|
| 775 | \widetilde{X} = 1 / 4 \left( X^{t+\rdt} +2 \,X^t + X^{t-\rdt} \right) |
---|
| 776 | \] |
---|
[707] | 777 | |
---|
[10354] | 778 | Note that in the semi-implicit case, it is necessary to save the filtered density, |
---|
| 779 | an extra three-dimensional field, in the restart file to restart the model with exact reproducibility. |
---|
| 780 | This option is controlled by \np{nn\_dynhpg\_rst}, a namelist parameter. |
---|
[707] | 781 | |
---|
| 782 | % ================================================================ |
---|
| 783 | % Surface Pressure Gradient |
---|
| 784 | % ================================================================ |
---|
[11543] | 785 | \section[Surface pressure gradient (\textit{dynspg.F90})]{Surface pressure gradient (\protect\mdl{dynspg})} |
---|
[9407] | 786 | \label{sec:DYN_spg} |
---|
[707] | 787 | %-----------------------------------------nam_dynspg---------------------------------------------------- |
---|
[10146] | 788 | |
---|
[11558] | 789 | \begin{listing} |
---|
| 790 | \nlst{namdyn_spg} |
---|
[11567] | 791 | \caption{\forcode{&namdyn_spg}} |
---|
[11558] | 792 | \label{lst:namdyn_spg} |
---|
| 793 | \end{listing} |
---|
[707] | 794 | %------------------------------------------------------------------------------------------------------------ |
---|
| 795 | |
---|
[11435] | 796 | Options are defined through the \nam{dyn\_spg} namelist variables. |
---|
[11543] | 797 | The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}). |
---|
[10354] | 798 | The main distinction is between the fixed volume case (linear free surface) and |
---|
[11435] | 799 | the variable volume case (nonlinear free surface, \texttt{vvl?} is defined). |
---|
[11543] | 800 | In the linear free surface case (\autoref{subsec:MB_free_surface}) |
---|
[10354] | 801 | the vertical scale factors $e_{3}$ are fixed in time, |
---|
[11543] | 802 | while they are time-dependent in the nonlinear case (\autoref{subsec:MB_free_surface}). |
---|
[11435] | 803 | With both linear and nonlinear free surface, external gravity waves are allowed in the equations, |
---|
[10354] | 804 | which imposes a very small time step when an explicit time stepping is used. |
---|
[11435] | 805 | Two methods are proposed to allow a longer time step for the three-dimensional equations: |
---|
[11543] | 806 | the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:MB_flt?}), |
---|
[10354] | 807 | and the split-explicit free surface described below. |
---|
[11435] | 808 | The extra term introduced in the filtered method is calculated implicitly, |
---|
[6289] | 809 | so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. |
---|
[2282] | 810 | |
---|
| 811 | |
---|
[10354] | 812 | The form of the surface pressure gradient term depends on how the user wants to |
---|
[11543] | 813 | handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:MB_hor_pg}). |
---|
[2282] | 814 | Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx): |
---|
[10354] | 815 | an explicit formulation which requires a small time step; |
---|
| 816 | a filtered free surface formulation which allows a larger time step by |
---|
[11435] | 817 | adding a filtering term into the momentum equation; |
---|
[2282] | 818 | and a split-explicit free surface formulation, described below, which also allows a larger time step. |
---|
| 819 | |
---|
[10354] | 820 | The extra term introduced in the filtered method is calculated implicitly, so that a solver is used to compute it. |
---|
| 821 | As a consequence the update of the $next$ velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. |
---|
[2282] | 822 | |
---|
| 823 | |
---|
[707] | 824 | %-------------------------------------------------------------------------------------------------------------- |
---|
[2282] | 825 | % Explicit free surface formulation |
---|
[707] | 826 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 827 | \subsection[Explicit free surface (\forcode{ln_dynspg_exp})]{Explicit free surface (\protect\np{ln\_dynspg\_exp})} |
---|
[9407] | 828 | \label{subsec:DYN_spg_exp} |
---|
[707] | 829 | |
---|
[11435] | 830 | In the explicit free surface formulation (\np{ln\_dynspg\_exp} set to true), |
---|
[10354] | 831 | the model time step is chosen to be small enough to resolve the external gravity waves |
---|
| 832 | (typically a few tens of seconds). |
---|
[11435] | 833 | The surface pressure gradient, evaluated using a leap-frog scheme (\ie\ centered in time), |
---|
[2282] | 834 | is thus simply given by : |
---|
[10414] | 835 | \begin{equation} |
---|
[11543] | 836 | \label{eq:DYN_spg_exp} |
---|
[10414] | 837 | \left\{ |
---|
| 838 | \begin{aligned} |
---|
| 839 | - \frac{1}{e_{1u}\,\rho_o} \; \delta_{i+1/2} \left[ \,\rho \,\eta\, \right] \\ |
---|
| 840 | - \frac{1}{e_{2v}\,\rho_o} \; \delta_{j+1/2} \left[ \,\rho \,\eta\, \right] |
---|
| 841 | \end{aligned} |
---|
| 842 | \right. |
---|
[11435] | 843 | \end{equation} |
---|
[707] | 844 | |
---|
[11435] | 845 | Note that in the non-linear free surface case (\ie\ \texttt{vvl?} defined), |
---|
[10354] | 846 | the surface pressure gradient is already included in the momentum tendency through |
---|
| 847 | the level thickness variation allowed in the computation of the hydrostatic pressure gradient. |
---|
| 848 | Thus, nothing is done in the \mdl{dynspg\_exp} module. |
---|
[707] | 849 | |
---|
[2282] | 850 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 851 | % Split-explict free surface formulation |
---|
| 852 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 853 | \subsection[Split-explicit free surface (\forcode{ln_dynspg_ts})]{Split-explicit free surface (\protect\np{ln\_dynspg\_ts})} |
---|
[9407] | 854 | \label{subsec:DYN_spg_ts} |
---|
[4560] | 855 | %------------------------------------------namsplit----------------------------------------------------------- |
---|
[10146] | 856 | % |
---|
| 857 | %\nlst{namsplit} |
---|
[4560] | 858 | %------------------------------------------------------------------------------------------------------------- |
---|
[707] | 859 | |
---|
[11435] | 860 | The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true), |
---|
[11123] | 861 | also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}. |
---|
[10354] | 862 | The general idea is to solve the free surface equation and the associated barotropic velocity equations with |
---|
| 863 | a smaller time step than $\rdt$, the time step used for the three dimensional prognostic variables |
---|
[11543] | 864 | (\autoref{fig:DYN_spg_ts}). |
---|
[10354] | 865 | The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) is provided through |
---|
| 866 | the \np{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$. |
---|
[11537] | 867 | This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{=.true.}) considering that |
---|
[10354] | 868 | the stability of the barotropic system is essentially controled by external waves propagation. |
---|
[6289] | 869 | Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. |
---|
[9393] | 870 | Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. |
---|
[817] | 871 | |
---|
[4560] | 872 | %%% |
---|
| 873 | The barotropic mode solves the following equations: |
---|
[10414] | 874 | % \begin{subequations} |
---|
[11543] | 875 | % \label{eq:DYN_BT} |
---|
[10414] | 876 | \begin{equation} |
---|
[11543] | 877 | \label{eq:DYN_BT_dyn} |
---|
[11151] | 878 | \frac{\partial {\mathrm \overline{{\mathbf U}}_h} }{\partial t}= |
---|
| 879 | -f\;{\mathrm {\mathbf k}}\times {\mathrm \overline{{\mathbf U}}_h} |
---|
| 880 | -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \mathrm {\overline{{\mathbf U}}_h} + \mathrm {\overline{\mathbf G}} |
---|
[10414] | 881 | \end{equation} |
---|
| 882 | \[ |
---|
[11543] | 883 | % \label{eq:DYN_BT_ssh} |
---|
[11151] | 884 | \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\mathrm{\mathbf \overline{U}}}_h \,} \right]+P-E |
---|
[10414] | 885 | \] |
---|
| 886 | % \end{subequations} |
---|
[11151] | 887 | where $\mathrm {\overline{\mathbf G}}$ is a forcing term held constant, containing coupling term between modes, |
---|
[10354] | 888 | surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. |
---|
[11543] | 889 | The third term on the right hand side of \autoref{eq:DYN_BT_dyn} represents the bottom stress |
---|
| 890 | (see section \autoref{sec:ZDF_drg}), explicitly accounted for at each barotropic iteration. |
---|
[10354] | 891 | Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm |
---|
[11123] | 892 | detailed in \citet{shchepetkin.mcwilliams_OM05}. |
---|
[11435] | 893 | AB3-AM4 coefficients used in \NEMO\ follow the second-order accurate, |
---|
[11123] | 894 | "multi-purpose" stability compromise as defined in \citet{shchepetkin.mcwilliams_ibk09} |
---|
[11435] | 895 | (see their figure 12, lower left). |
---|
[4560] | 896 | |
---|
[707] | 897 | %> > > > > > > > > > > > > > > > > > > > > > > > > > > > |
---|
[10414] | 898 | \begin{figure}[!t] |
---|
[11558] | 899 | \centering |
---|
[11561] | 900 | \includegraphics[width=0.66\textwidth]{Fig_DYN_dynspg_ts} |
---|
[11558] | 901 | \caption[Split-explicit time stepping scheme for the external and internal modes]{ |
---|
| 902 | Schematic of the split-explicit time stepping scheme for the external and internal modes. |
---|
| 903 | Time increases to the right. |
---|
| 904 | In this particular exemple, |
---|
| 905 | a boxcar averaging window over \np{nn\_baro} barotropic time steps is used |
---|
| 906 | (\np{nn\_bt\_flt}\forcode{=1}) and \np{nn\_baro}\forcode{=5}. |
---|
| 907 | Internal mode time steps (which are also the model time steps) are denoted by |
---|
| 908 | $t-\rdt$, $t$ and $t+\rdt$. |
---|
| 909 | Variables with $k$ superscript refer to instantaneous barotropic variables, |
---|
| 910 | $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary |
---|
| 911 | (red vertical bars) and secondary weights (blue vertical bars). |
---|
| 912 | The former are used to obtain time filtered quantities at $t+\rdt$ while |
---|
| 913 | the latter are used to obtain time averaged transports to advect tracers. |
---|
| 914 | a) Forward time integration: |
---|
| 915 | \protect\np{ln\_bt\_fw}\forcode{=.true.}, \protect\np{ln\_bt\_av}\forcode{=.true.}. |
---|
| 916 | b) Centred time integration: |
---|
| 917 | \protect\np{ln\_bt\_fw}\forcode{=.false.}, \protect\np{ln\_bt\_av}\forcode{=.true.}. |
---|
| 918 | c) Forward time integration with no time filtering (POM-like scheme): |
---|
| 919 | \protect\np{ln\_bt\_fw}\forcode{=.true.}, \protect\np{ln\_bt\_av}\forcode{=.false.}.} |
---|
| 920 | \label{fig:DYN_spg_ts} |
---|
[10414] | 921 | \end{figure} |
---|
[707] | 922 | %> > > > > > > > > > > > > > > > > > > > > > > > > > > > |
---|
| 923 | |
---|
[11537] | 924 | In the default case (\np{ln\_bt\_fw}\forcode{=.true.}), |
---|
[10354] | 925 | the external mode is integrated between \textit{now} and \textit{after} baroclinic time-steps |
---|
[11543] | 926 | (\autoref{fig:DYN_spg_ts}a). |
---|
[10354] | 927 | To avoid aliasing of fast barotropic motions into three dimensional equations, |
---|
[11537] | 928 | time filtering is eventually applied on barotropic quantities (\np{ln\_bt\_av}\forcode{=.true.}). |
---|
[10354] | 929 | In that case, the integration is extended slightly beyond \textit{after} time step to |
---|
| 930 | provide time filtered quantities. |
---|
| 931 | These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. |
---|
[11435] | 932 | Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, |
---|
[10354] | 933 | asselin filtering is not applied to barotropic quantities.\\ |
---|
| 934 | Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step |
---|
[11537] | 935 | (\np{ln\_bt\_fw}\forcode{=.false.}). |
---|
[10354] | 936 | Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), |
---|
| 937 | the baroclinic to barotropic forcing term given at \textit{now} time step become centred in |
---|
| 938 | the middle of the integration window. |
---|
| 939 | It can easily be shown that this property removes part of splitting errors between modes, |
---|
| 940 | which increases the overall numerical robustness. |
---|
[4560] | 941 | %references to Patrick Marsaleix' work here. Also work done by SHOM group. |
---|
[707] | 942 | |
---|
[4560] | 943 | %%% |
---|
| 944 | |
---|
[10354] | 945 | As far as tracer conservation is concerned, |
---|
| 946 | barotropic velocities used to advect tracers must also be updated at \textit{now} time step. |
---|
| 947 | This implies to change the traditional order of computations in \NEMO: |
---|
| 948 | most of momentum trends (including the barotropic mode calculation) updated first, tracers' after. |
---|
| 949 | This \textit{de facto} makes semi-implicit hydrostatic pressure gradient |
---|
| 950 | (see section \autoref{subsec:DYN_hpg_imp}) |
---|
| 951 | and time splitting not compatible. |
---|
| 952 | Advective barotropic velocities are obtained by using a secondary set of filtering weights, |
---|
[11123] | 953 | uniquely defined from the filter coefficients used for the time averaging (\citet{shchepetkin.mcwilliams_OM05}). |
---|
[10354] | 954 | Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to |
---|
| 955 | obtain exact conservation. |
---|
[4560] | 956 | |
---|
| 957 | %%% |
---|
| 958 | |
---|
[10354] | 959 | One can eventually choose to feedback instantaneous values by not using any time filter |
---|
[11537] | 960 | (\np{ln\_bt\_av}\forcode{=.false.}). |
---|
[10354] | 961 | In that case, external mode equations are continuous in time, |
---|
[11435] | 962 | \ie\ they are not re-initialized when starting a new sub-stepping sequence. |
---|
[10354] | 963 | This is the method used so far in the POM model, the stability being maintained by |
---|
| 964 | refreshing at (almost) each barotropic time step advection and horizontal diffusion terms. |
---|
[11435] | 965 | Since the latter terms have not been added in \NEMO\ for computational efficiency, |
---|
[10354] | 966 | removing time filtering is not recommended except for debugging purposes. |
---|
| 967 | This may be used for instance to appreciate the damping effect of the standard formulation on |
---|
| 968 | external gravity waves in idealized or weakly non-linear cases. |
---|
| 969 | Although the damping is lower than for the filtered free surface, |
---|
[11123] | 970 | it is still significant as shown by \citet{levier.treguier.ea_rpt07} in the case of an analytical barotropic Kelvin wave. |
---|
[4560] | 971 | |
---|
[2282] | 972 | %>>>>>=============== |
---|
[11435] | 973 | \gmcomment{ %%% copy from griffies Book |
---|
[707] | 974 | |
---|
[2282] | 975 | \textbf{title: Time stepping the barotropic system } |
---|
[707] | 976 | |
---|
[10354] | 977 | Assume knowledge of the full velocity and tracer fields at baroclinic time $\tau$. |
---|
| 978 | Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using |
---|
| 979 | the small barotropic time step $\rdt$. |
---|
[11435] | 980 | We have |
---|
[707] | 981 | |
---|
[10414] | 982 | \[ |
---|
| 983 | % \label{eq:DYN_spg_ts_eta} |
---|
| 984 | \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) |
---|
| 985 | = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] |
---|
| 986 | \] |
---|
| 987 | \begin{multline*} |
---|
| 988 | % \label{eq:DYN_spg_ts_u} |
---|
| 989 | \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ |
---|
| 990 | = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) |
---|
| 991 | - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] |
---|
| 992 | \end{multline*} |
---|
[2282] | 993 | \ |
---|
[707] | 994 | |
---|
[10354] | 995 | In these equations, araised (b) denotes values of surface height and vertically integrated velocity updated with |
---|
| 996 | the barotropic time steps. |
---|
| 997 | The $\tau$ time label on $\eta^{(b)}$ and $U^{(b)}$ denotes the baroclinic time at which |
---|
| 998 | the vertically integrated forcing $\textbf{M}(\tau)$ |
---|
| 999 | (note that this forcing includes the surface freshwater forcing), |
---|
| 1000 | the tracer fields, the freshwater flux $\text{EMP}_w(\tau)$, |
---|
| 1001 | and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over |
---|
| 1002 | a single cycle. |
---|
[11435] | 1003 | This is also the time that sets the barotropic time steps via |
---|
[10414] | 1004 | \[ |
---|
| 1005 | % \label{eq:DYN_spg_ts_t} |
---|
| 1006 | t_n=\tau+n\rdt |
---|
| 1007 | \] |
---|
[10354] | 1008 | with $n$ an integer. |
---|
[11435] | 1009 | The density scaled surface pressure is evaluated via |
---|
[10414] | 1010 | \[ |
---|
| 1011 | % \label{eq:DYN_spg_ts_ps} |
---|
| 1012 | p_s^{(b)}(\tau,t_{n}) = |
---|
| 1013 | \begin{cases} |
---|
| 1014 | g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ |
---|
| 1015 | g \;\eta_s^{(b)}(\tau,t_{n}) & \text{linear case} |
---|
| 1016 | \end{cases} |
---|
| 1017 | \] |
---|
[11435] | 1018 | To get started, we assume the following initial conditions |
---|
[10414] | 1019 | \[ |
---|
| 1020 | % \label{eq:DYN_spg_ts_eta} |
---|
| 1021 | \begin{split} |
---|
| 1022 | \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} \\ |
---|
| 1023 | \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} |
---|
| 1024 | \end{split} |
---|
| 1025 | \] |
---|
[11435] | 1026 | with |
---|
[10414] | 1027 | \[ |
---|
| 1028 | % \label{eq:DYN_spg_ts_etaF} |
---|
| 1029 | \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) |
---|
| 1030 | \] |
---|
[10354] | 1031 | the time averaged surface height taken from the previous barotropic cycle. |
---|
[11435] | 1032 | Likewise, |
---|
[10414] | 1033 | \[ |
---|
| 1034 | % \label{eq:DYN_spg_ts_u} |
---|
| 1035 | \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ \\ |
---|
| 1036 | \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} |
---|
| 1037 | \] |
---|
[11435] | 1038 | with |
---|
[10414] | 1039 | \[ |
---|
| 1040 | % \label{eq:DYN_spg_ts_u} |
---|
| 1041 | \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) |
---|
| 1042 | \] |
---|
[10354] | 1043 | the time averaged vertically integrated transport. |
---|
[11435] | 1044 | Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. |
---|
[707] | 1045 | |
---|
[10354] | 1046 | Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , |
---|
| 1047 | the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at |
---|
[11435] | 1048 | baroclinic time $\tau + \rdt \tau$ |
---|
[10414] | 1049 | \[ |
---|
| 1050 | % \label{eq:DYN_spg_ts_u} |
---|
| 1051 | \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) |
---|
| 1052 | \] |
---|
[10354] | 1053 | The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using |
---|
[11435] | 1054 | the following form |
---|
[2282] | 1055 | |
---|
[10414] | 1056 | \begin{equation} |
---|
| 1057 | \label{eq:DYN_spg_ts_ssh} |
---|
[11435] | 1058 | \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] |
---|
[2282] | 1059 | \end{equation} |
---|
| 1060 | |
---|
[10354] | 1061 | The use of this "big-leap-frog" scheme for the surface height ensures compatibility between |
---|
| 1062 | the mass/volume budgets and the tracer budgets. |
---|
[11435] | 1063 | More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). |
---|
| 1064 | |
---|
[10354] | 1065 | In general, some form of time filter is needed to maintain integrity of the surface height field due to |
---|
| 1066 | the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. |
---|
| 1067 | We have tried various forms of such filtering, |
---|
[11123] | 1068 | with the following method discussed in \cite{griffies.pacanowski.ea_MWR01} chosen due to |
---|
[10354] | 1069 | its stability and reasonably good maintenance of tracer conservation properties (see ??). |
---|
[2282] | 1070 | |
---|
[10414] | 1071 | \begin{equation} |
---|
| 1072 | \label{eq:DYN_spg_ts_sshf} |
---|
| 1073 | \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} |
---|
[2282] | 1074 | \end{equation} |
---|
[11435] | 1075 | Another approach tried was |
---|
[2282] | 1076 | |
---|
[10414] | 1077 | \[ |
---|
| 1078 | % \label{eq:DYN_spg_ts_sshf2} |
---|
| 1079 | \eta^{F}(\tau-\Delta) = \eta(\tau) |
---|
| 1080 | + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) |
---|
| 1081 | + \overline{\eta^{(b)}}(\tau-\rdt) -2 \;\eta(\tau) \right] |
---|
| 1082 | \] |
---|
[2282] | 1083 | |
---|
[10354] | 1084 | which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. |
---|
| 1085 | This isolation allows for an easy check that tracer conservation is exact when |
---|
| 1086 | eliminating tracer and surface height time filtering (see ?? for more complete discussion). |
---|
| 1087 | However, in the general case with a non-zero $\alpha$, |
---|
[11435] | 1088 | the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. |
---|
[2282] | 1089 | |
---|
| 1090 | } %%end gm comment (copy of griffies book) |
---|
| 1091 | |
---|
| 1092 | %>>>>>=============== |
---|
| 1093 | |
---|
| 1094 | |
---|
[707] | 1095 | %-------------------------------------------------------------------------------------------------------------- |
---|
[2282] | 1096 | % Filtered free surface formulation |
---|
[707] | 1097 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11571] | 1098 | \subsection{Filtered free surface (\forcode{dynspg_flt?})} |
---|
[9407] | 1099 | \label{subsec:DYN_spg_fltp} |
---|
[707] | 1100 | |
---|
[11435] | 1101 | The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. |
---|
[11543] | 1102 | The extra term introduced in the equations (see \autoref{subsec:MB_free_surface}) is solved implicitly. |
---|
[9407] | 1103 | The elliptic solvers available in the code are documented in \autoref{chap:MISC}. |
---|
[707] | 1104 | |
---|
[2282] | 1105 | %% gm %%======>>>> given here the discrete eqs provided to the solver |
---|
[11435] | 1106 | \gmcomment{ %%% copy from chap-model basics |
---|
[10414] | 1107 | \[ |
---|
[11543] | 1108 | % \label{eq:DYN_spg_flt} |
---|
[11151] | 1109 | \frac{\partial {\mathrm {\mathbf U}}_h }{\partial t}= {\mathrm {\mathbf M}} |
---|
[10414] | 1110 | - g \nabla \left( \tilde{\rho} \ \eta \right) |
---|
| 1111 | - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right) |
---|
| 1112 | \] |
---|
| 1113 | where $T_c$, is a parameter with dimensions of time which characterizes the force, |
---|
| 1114 | $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, |
---|
[11151] | 1115 | and $\mathrm {\mathbf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, |
---|
[11543] | 1116 | non-linear and viscous terms in \autoref{eq:MB_dyn}. |
---|
[2541] | 1117 | } %end gmcomment |
---|
[707] | 1118 | |
---|
[11435] | 1119 | Note that in the linear free surface formulation (\texttt{vvl?} not defined), |
---|
[10354] | 1120 | the ocean depth is time-independent and so is the matrix to be inverted. |
---|
[11435] | 1121 | It is computed once and for all and applies to all ocean time steps. |
---|
[707] | 1122 | |
---|
| 1123 | % ================================================================ |
---|
| 1124 | % Lateral diffusion term |
---|
| 1125 | % ================================================================ |
---|
[11543] | 1126 | \section[Lateral diffusion term and operators (\textit{dynldf.F90})]{Lateral diffusion term and operators (\protect\mdl{dynldf})} |
---|
[9407] | 1127 | \label{sec:DYN_ldf} |
---|
[707] | 1128 | %------------------------------------------nam_dynldf---------------------------------------------------- |
---|
[10146] | 1129 | |
---|
[11558] | 1130 | \begin{listing} |
---|
| 1131 | \nlst{namdyn_ldf} |
---|
[11567] | 1132 | \caption{\forcode{&namdyn_ldf}} |
---|
[11558] | 1133 | \label{lst:namdyn_ldf} |
---|
| 1134 | \end{listing} |
---|
[707] | 1135 | %------------------------------------------------------------------------------------------------------------- |
---|
| 1136 | |
---|
[11435] | 1137 | Options are defined through the \nam{dyn\_ldf} namelist variables. |
---|
[10354] | 1138 | The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. |
---|
| 1139 | The coefficients may be constant or spatially variable; |
---|
| 1140 | the description of the coefficients is found in the chapter on lateral physics (\autoref{chap:LDF}). |
---|
| 1141 | The lateral diffusion of momentum is evaluated using a forward scheme, |
---|
[11435] | 1142 | \ie\ the velocity appearing in its expression is the \textit{before} velocity in time, |
---|
[10354] | 1143 | except for the pure vertical component that appears when a tensor of rotation is used. |
---|
[11543] | 1144 | This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:TD}). |
---|
[817] | 1145 | |
---|
[10354] | 1146 | At the lateral boundaries either free slip, |
---|
| 1147 | no slip or partial slip boundary conditions are applied according to the user's choice (see \autoref{chap:LBC}). |
---|
[707] | 1148 | |
---|
[6289] | 1149 | \gmcomment{ |
---|
[10354] | 1150 | Hyperviscous operators are frequently used in the simulation of turbulent flows to |
---|
| 1151 | control the dissipation of unresolved small scale features. |
---|
| 1152 | Their primary role is to provide strong dissipation at the smallest scale supported by |
---|
| 1153 | the grid while minimizing the impact on the larger scale features. |
---|
| 1154 | Hyperviscous operators are thus designed to be more scale selective than the traditional, |
---|
| 1155 | physically motivated Laplace operator. |
---|
| 1156 | In finite difference methods, |
---|
| 1157 | the biharmonic operator is frequently the method of choice to achieve this scale selective dissipation since |
---|
[11435] | 1158 | its damping time (\ie\ its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ |
---|
[10354] | 1159 | (so that short waves damped more rapidelly than long ones), |
---|
| 1160 | whereas the Laplace operator damping time scales only like $\lambda^{-2}$. |
---|
[6289] | 1161 | } |
---|
| 1162 | |
---|
[707] | 1163 | % ================================================================ |
---|
[11565] | 1164 | \subsection[Iso-level laplacian (\forcode{ln_dynldf_lap})]{Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap})} |
---|
[9407] | 1165 | \label{subsec:DYN_ldf_lap} |
---|
[707] | 1166 | |
---|
[11435] | 1167 | For lateral iso-level diffusion, the discrete operator is: |
---|
[10414] | 1168 | \begin{equation} |
---|
[11543] | 1169 | \label{eq:DYN_ldf_lap} |
---|
[10414] | 1170 | \left\{ |
---|
| 1171 | \begin{aligned} |
---|
[11151] | 1172 | D_u^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm} |
---|
[11435] | 1173 | \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ |
---|
[10414] | 1174 | {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\ |
---|
[11151] | 1175 | D_v^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm} |
---|
[11435] | 1176 | \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ |
---|
[10414] | 1177 | {A_f^{lm} \;e_{3f} \zeta } \right] |
---|
| 1178 | \end{aligned} |
---|
| 1179 | \right. |
---|
[11435] | 1180 | \end{equation} |
---|
[707] | 1181 | |
---|
[11543] | 1182 | As explained in \autoref{subsec:MB_ldf}, |
---|
[10354] | 1183 | this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and |
---|
[11435] | 1184 | ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. |
---|
[707] | 1185 | |
---|
| 1186 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 1187 | % Rotated laplacian operator |
---|
| 1188 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 1189 | \subsection[Rotated laplacian (\forcode{ln_dynldf_iso})]{Rotated laplacian operator (\protect\np{ln\_dynldf\_iso})} |
---|
[9407] | 1190 | \label{subsec:DYN_ldf_iso} |
---|
[707] | 1191 | |
---|
[10354] | 1192 | A rotation of the lateral momentum diffusion operator is needed in several cases: |
---|
[11537] | 1193 | for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{=.true.}) and |
---|
| 1194 | for either iso-neutral (\np{ln\_dynldf\_iso}\forcode{=.true.}) or |
---|
| 1195 | geopotential (\np{ln\_dynldf\_hor}\forcode{=.true.}) diffusion in the $s$-coordinate. |
---|
[10354] | 1196 | In the partial step case, coordinates are horizontal except at the deepest level and |
---|
[11537] | 1197 | no rotation is performed when \np{ln\_dynldf\_hor}\forcode{=.true.}. |
---|
[10354] | 1198 | The diffusion operator is defined simply as the divergence of down gradient momentum fluxes on |
---|
| 1199 | each momentum component. |
---|
| 1200 | It must be emphasized that this formulation ignores constraints on the stress tensor such as symmetry. |
---|
| 1201 | The resulting discrete representation is: |
---|
[10414] | 1202 | \begin{equation} |
---|
[11543] | 1203 | \label{eq:DYN_ldf_iso} |
---|
[10414] | 1204 | \begin{split} |
---|
| 1205 | D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ |
---|
| 1206 | & \left\{\quad {\delta_{i+1/2} \left[ {A_T^{lm} \left( |
---|
| 1207 | {\frac{e_{2t} \; e_{3t} }{e_{1t} } \,\delta_{i}[u] |
---|
| 1208 | -e_{2t} \; r_{1t} \,\overline{\overline {\delta_{k+1/2}[u]}}^{\,i,\,k}} |
---|
| 1209 | \right)} \right]} \right. \\ |
---|
| 1210 | & \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f} |
---|
| 1211 | }\,\delta_{j+1/2} [u] - e_{1f}\, r_{2f} |
---|
| 1212 | \,\overline{\overline {\delta_{k+1/2} [u]}} ^{\,j+1/2,\,k}} |
---|
| 1213 | \right)} \right] \\ |
---|
| 1214 | &\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline |
---|
| 1215 | {\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} } |
---|
| 1216 | \right.} \right. \\ |
---|
| 1217 | & \ \qquad \qquad \qquad \quad\ |
---|
| 1218 | - e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2} \\ |
---|
| 1219 | & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ |
---|
| 1220 | +\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2} |
---|
| 1221 | \right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\} \\ \\ |
---|
| 1222 | D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} } \\ |
---|
| 1223 | & \left\{\quad {\delta_{i+1/2} \left[ {A_f^{lm} \left( |
---|
| 1224 | {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta_{i+1/2}[v] |
---|
| 1225 | -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} |
---|
| 1226 | \right)} \right]} \right. \\ |
---|
[11435] | 1227 | & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} |
---|
[10414] | 1228 | }\,\delta_{j} [v] - e_{1t}\, r_{2t} |
---|
| 1229 | \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}} |
---|
| 1230 | \right)} \right] \\ |
---|
[11435] | 1231 | & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline |
---|
[10414] | 1232 | {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\ |
---|
| 1233 | & \ \qquad \qquad \qquad \quad\ |
---|
| 1234 | - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\ |
---|
[11435] | 1235 | & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ |
---|
[10414] | 1236 | +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} |
---|
[11435] | 1237 | \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} |
---|
[10414] | 1238 | \end{split} |
---|
[707] | 1239 | \end{equation} |
---|
[10354] | 1240 | where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and |
---|
[11435] | 1241 | the surface of computation ($z$- or $s$-surfaces). |
---|
[10354] | 1242 | The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}). |
---|
[707] | 1243 | |
---|
| 1244 | %-------------------------------------------------------------------------------------------------------------- |
---|
| 1245 | % Iso-level bilaplacian operator |
---|
| 1246 | %-------------------------------------------------------------------------------------------------------------- |
---|
[11565] | 1247 | \subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap})]{Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap})} |
---|
[9407] | 1248 | \label{subsec:DYN_ldf_bilap} |
---|
[707] | 1249 | |
---|
[11543] | 1250 | The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq:DYN_ldf_lap} twice. |
---|
[10354] | 1251 | It requires an additional assumption on boundary conditions: |
---|
| 1252 | the first derivative term normal to the coast depends on the free or no-slip lateral boundary conditions chosen, |
---|
| 1253 | while the third derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). |
---|
[817] | 1254 | %%% |
---|
| 1255 | \gmcomment{add a remark on the the change in the position of the coefficient} |
---|
| 1256 | %%% |
---|
[707] | 1257 | |
---|
| 1258 | % ================================================================ |
---|
| 1259 | % Vertical diffusion term |
---|
| 1260 | % ================================================================ |
---|
[11543] | 1261 | \section[Vertical diffusion term (\textit{dynzdf.F90})]{Vertical diffusion term (\protect\mdl{dynzdf})} |
---|
[9407] | 1262 | \label{sec:DYN_zdf} |
---|
[707] | 1263 | %----------------------------------------------namzdf------------------------------------------------------ |
---|
[10146] | 1264 | |
---|
[707] | 1265 | %------------------------------------------------------------------------------------------------------------- |
---|
| 1266 | |
---|
[11435] | 1267 | Options are defined through the \nam{zdf} namelist variables. |
---|
[10354] | 1268 | The large vertical diffusion coefficient found in the surface mixed layer together with high vertical resolution implies that in the case of explicit time stepping there would be too restrictive a constraint on the time step. |
---|
| 1269 | Two time stepping schemes can be used for the vertical diffusion term: |
---|
| 1270 | $(a)$ a forward time differencing scheme |
---|
[11537] | 1271 | (\np{ln\_zdfexp}\forcode{=.true.}) using a time splitting technique (\np{nn\_zdfexp} $>$ 1) or |
---|
| 1272 | $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{=.false.}) |
---|
[11543] | 1273 | (see \autoref{chap:TD}). |
---|
[11435] | 1274 | Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. |
---|
[707] | 1275 | |
---|
[10354] | 1276 | The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. |
---|
[11543] | 1277 | The vertical diffusion operators given by \autoref{eq:MB_zdf} take the following semi-discrete space form: |
---|
[10414] | 1278 | \[ |
---|
[11543] | 1279 | % \label{eq:DYN_zdf} |
---|
[10414] | 1280 | \left\{ |
---|
| 1281 | \begin{aligned} |
---|
| 1282 | D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta_k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } |
---|
| 1283 | \ \delta_{k+1/2} [\,u\,] \right] \\ |
---|
| 1284 | \\ |
---|
| 1285 | D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta_k \left[ \frac{A_{vw}^{vm} }{e_{3vw} } |
---|
| 1286 | \ \delta_{k+1/2} [\,v\,] \right] |
---|
| 1287 | \end{aligned} |
---|
| 1288 | \right. |
---|
| 1289 | \] |
---|
[10354] | 1290 | where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and diffusivity coefficients. |
---|
| 1291 | The way these coefficients are evaluated depends on the vertical physics used (see \autoref{chap:ZDF}). |
---|
[707] | 1292 | |
---|
[10354] | 1293 | The surface boundary condition on momentum is the stress exerted by the wind. |
---|
| 1294 | At the surface, the momentum fluxes are prescribed as the boundary condition on |
---|
| 1295 | the vertical turbulent momentum fluxes, |
---|
[10414] | 1296 | \begin{equation} |
---|
[11543] | 1297 | \label{eq:DYN_zdf_sbc} |
---|
[10414] | 1298 | \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} |
---|
| 1299 | = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v } |
---|
[707] | 1300 | \end{equation} |
---|
[10406] | 1301 | where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in |
---|
[10354] | 1302 | the (\textbf{i},\textbf{j}) coordinate system. |
---|
[11435] | 1303 | The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in |
---|
[10354] | 1304 | the vertical over the mixed layer depth. |
---|
| 1305 | If the vertical mixing coefficient is small (when no mixed layer scheme is used) |
---|
| 1306 | the surface stress enters only the top model level, as a body force. |
---|
| 1307 | The surface wind stress is calculated in the surface module routines (SBC, see \autoref{chap:SBC}). |
---|
[707] | 1308 | |
---|
[10354] | 1309 | The turbulent flux of momentum at the bottom of the ocean is specified through a bottom friction parameterisation |
---|
[11543] | 1310 | (see \autoref{sec:ZDF_drg}) |
---|
[707] | 1311 | |
---|
| 1312 | % ================================================================ |
---|
| 1313 | % External Forcing |
---|
| 1314 | % ================================================================ |
---|
[9393] | 1315 | \section{External forcings} |
---|
[9407] | 1316 | \label{sec:DYN_forcing} |
---|
[707] | 1317 | |
---|
[10354] | 1318 | Besides the surface and bottom stresses (see the above section) |
---|
| 1319 | which are introduced as boundary conditions on the vertical mixing, |
---|
[11435] | 1320 | three other forcings may enter the dynamical equations by affecting the surface pressure gradient. |
---|
[707] | 1321 | |
---|
[11537] | 1322 | (1) When \np{ln\_apr\_dyn}\forcode{=.true.} (see \autoref{sec:SBC_apr}), |
---|
[10354] | 1323 | the atmospheric pressure is taken into account when computing the surface pressure gradient. |
---|
[707] | 1324 | |
---|
[11537] | 1325 | (2) When \np{ln\_tide\_pot}\forcode{=.true.} and \np{ln\_tide}\forcode{=.true.} (see \autoref{sec:SBC_tide}), |
---|
[6289] | 1326 | the tidal potential is taken into account when computing the surface pressure gradient. |
---|
[2285] | 1327 | |
---|
[11537] | 1328 | (3) When \np{nn\_ice\_embd}\forcode{=2} and LIM or CICE is used |
---|
[11435] | 1329 | (\ie\ when the sea-ice is embedded in the ocean), |
---|
[6289] | 1330 | the snow-ice mass is taken into account when computing the surface pressure gradient. |
---|
| 1331 | |
---|
| 1332 | |
---|
| 1333 | \gmcomment{ missing : the lateral boundary condition !!! another external forcing |
---|
| 1334 | } |
---|
| 1335 | |
---|
[707] | 1336 | % ================================================================ |
---|
[11435] | 1337 | % Wetting and drying |
---|
[10499] | 1338 | % ================================================================ |
---|
| 1339 | \section{Wetting and drying } |
---|
| 1340 | \label{sec:DYN_wetdry} |
---|
[11543] | 1341 | |
---|
[10499] | 1342 | There are two main options for wetting and drying code (wd): |
---|
| 1343 | (a) an iterative limiter (il) and (b) a directional limiter (dl). |
---|
[11123] | 1344 | The directional limiter is based on the scheme developed by \cite{warner.defne.ea_CG13} for RO |
---|
[10499] | 1345 | MS |
---|
[11123] | 1346 | which was in turn based on ideas developed for POM by \cite{oey_OM06}. The iterative |
---|
[10499] | 1347 | limiter is a new scheme. The iterative limiter is activated by setting $\mathrm{ln\_wd\_il} = \mathrm{.true.}$ |
---|
| 1348 | and $\mathrm{ln\_wd\_dl} = \mathrm{.false.}$. The directional limiter is activated |
---|
| 1349 | by setting $\mathrm{ln\_wd\_dl} = \mathrm{.true.}$ and $\mathrm{ln\_wd\_il} = \mathrm{.false.}$. |
---|
| 1350 | |
---|
[11558] | 1351 | \begin{listing} |
---|
| 1352 | \nlst{namwad} |
---|
[11567] | 1353 | \caption{\forcode{&namwad}} |
---|
[11558] | 1354 | \label{lst:namwad} |
---|
| 1355 | \end{listing} |
---|
[10499] | 1356 | |
---|
| 1357 | The following terminology is used. The depth of the topography (positive downwards) |
---|
[11435] | 1358 | at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the \NEMO\ code. |
---|
[10499] | 1359 | The height of the free surface (positive upwards) is denoted by $ \mathrm{ssh}$. Given the sign |
---|
| 1360 | conventions used, the water depth, $h$, is the height of the free surface plus the depth of the |
---|
| 1361 | topography (i.e. $\mathrm{ssh} + \mathrm{ht\_wd}$). |
---|
| 1362 | |
---|
| 1363 | Both wd schemes take all points in the domain below a land elevation of $\mathrm{rn\_wdld}$ to be |
---|
| 1364 | covered by water. They require the topography specified with a model |
---|
| 1365 | configuration to have negative depths at points where the land is higher than the |
---|
[11435] | 1366 | topography's reference sea-level. The vertical grid in \NEMO\ is normally computed relative to an |
---|
[10499] | 1367 | initial state with zero sea surface height elevation. |
---|
| 1368 | The user can choose to compute the vertical grid and heights in the model relative to |
---|
| 1369 | a non-zero reference height for the free surface. This choice affects the calculation of the metrics and depths |
---|
| 1370 | (i.e. the $\mathrm{e3t\_0, ht\_0}$ etc. arrays). |
---|
| 1371 | |
---|
| 1372 | Points where the water depth is less than $\mathrm{rn\_wdmin1}$ are interpreted as ``dry''. |
---|
| 1373 | $\mathrm{rn\_wdmin1}$ is usually chosen to be of order $0.05$m but extreme topographies |
---|
| 1374 | with very steep slopes require larger values for normal choices of time-step. Surface fluxes |
---|
| 1375 | are also switched off for dry cells to prevent freezing, boiling etc. of very thin water layers. |
---|
| 1376 | The fluxes are tappered down using a $\mathrm{tanh}$ weighting function |
---|
| 1377 | to no flux as the dry limit $\mathrm{rn\_wdmin1}$ is approached. Even wet cells can be very shallow. |
---|
| 1378 | The depth at which to start tapering is controlled by the user by setting $\mathrm{rn\_wd\_sbcdep}$. |
---|
| 1379 | The fraction $(<1)$ of sufrace fluxes to use at this depth is set by $\mathrm{rn\_wd\_sbcfra}$. |
---|
| 1380 | |
---|
| 1381 | Both versions of the code have been tested in six test cases provided in the WAD\_TEST\_CASES configuration |
---|
| 1382 | and in ``realistic'' configurations covering parts of the north-west European shelf. |
---|
| 1383 | All these configurations have used pure sigma coordinates. It is expected that |
---|
| 1384 | the wetting and drying code will work in domains with more general s-coordinates provided |
---|
[11435] | 1385 | the coordinates are pure sigma in the region where wetting and drying actually occurs. |
---|
[10499] | 1386 | |
---|
| 1387 | The next sub-section descrbies the directional limiter and the following sub-section the iterative limiter. |
---|
| 1388 | The final sub-section covers some additional considerations that are relevant to both schemes. |
---|
| 1389 | |
---|
| 1390 | |
---|
| 1391 | %----------------------------------------------------------------------------------------- |
---|
| 1392 | % Iterative limiters |
---|
| 1393 | %----------------------------------------------------------------------------------------- |
---|
[11543] | 1394 | \subsection[Directional limiter (\textit{wet\_dry.F90})]{Directional limiter (\mdl{wet\_dry})} |
---|
[10499] | 1395 | \label{subsec:DYN_wd_directional_limiter} |
---|
[11543] | 1396 | |
---|
[10499] | 1397 | The principal idea of the directional limiter is that |
---|
[11435] | 1398 | water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn\_wdmin1}). |
---|
[10499] | 1399 | |
---|
| 1400 | All the changes associated with this option are made to the barotropic solver for the non-linear |
---|
| 1401 | free surface code within dynspg\_ts. |
---|
| 1402 | On each barotropic sub-step the scheme determines the direction of the flow across each face of all the tracer cells |
---|
| 1403 | and sets the flux across the face to zero when the flux is from a dry tracer cell. This prevents cells |
---|
| 1404 | whose depth is rn\_wdmin1 or less from drying out further. The scheme does not force $h$ (the water depth) at tracer cells |
---|
| 1405 | to be at least the minimum depth and hence is able to conserve mass / volume. |
---|
| 1406 | |
---|
| 1407 | The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj). |
---|
[11537] | 1408 | If the user sets \np{ln\_wd\_dl\_ramp}\forcode{=.false.} then zuwdmask is 1 when the |
---|
[11435] | 1409 | flux is from a cell with water depth greater than \np{rn\_wdmin1} and 0 otherwise. If the user sets |
---|
[11537] | 1410 | \np{ln\_wd\_dl\_ramp}\forcode{=.true.} the flux across the face is ramped down as the water depth decreases |
---|
[11435] | 1411 | from 2 * \np{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. |
---|
[10499] | 1412 | |
---|
| 1413 | At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen |
---|
| 1414 | also to multiply the corresponding velocity on the ``now'' step at that face by zuwdmask. We could have |
---|
| 1415 | chosen not to do that and to allow fairly large velocities to occur in these ``dry'' cells. |
---|
| 1416 | The rationale for setting the velocity to zero is that it is the momentum equations that are being solved |
---|
| 1417 | and the total momentum of the upstream cell (treating it as a finite volume) should be considered |
---|
| 1418 | to be its depth times its velocity. This depth is considered to be zero at ``dry'' $u$-points consistent with its |
---|
| 1419 | treatment in the calculation of the flux of mass across the cell face. |
---|
| 1420 | |
---|
| 1421 | |
---|
[11123] | 1422 | \cite{warner.defne.ea_CG13} state that in their scheme the velocity masks at the cell faces for the baroclinic |
---|
[10499] | 1423 | timesteps are set to 0 or 1 depending on whether the average of the masks over the barotropic sub-steps is respectively less than |
---|
| 1424 | or greater than 0.5. That scheme does not conserve tracers in integrations started from constant tracer |
---|
| 1425 | fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because |
---|
| 1426 | the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts |
---|
[11537] | 1427 | to equal their mean value during the barotropic steps. If the user sets \np{ln\_wd\_dl\_bc}\forcode{=.true.}, the |
---|
[11435] | 1428 | baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. |
---|
[10499] | 1429 | |
---|
| 1430 | %----------------------------------------------------------------------------------------- |
---|
| 1431 | % Iterative limiters |
---|
| 1432 | %----------------------------------------------------------------------------------------- |
---|
| 1433 | |
---|
[11543] | 1434 | \subsection[Iterative limiter (\textit{wet\_dry.F90})]{Iterative limiter (\mdl{wet\_dry})} |
---|
[10499] | 1435 | \label{subsec:DYN_wd_iterative_limiter} |
---|
| 1436 | |
---|
[11543] | 1437 | \subsubsection[Iterative flux limiter (\textit{wet\_dry.F90})]{Iterative flux limiter (\mdl{wet\_dry})} |
---|
| 1438 | \label{subsec:DYN_wd_il_spg_limiter} |
---|
[10499] | 1439 | |
---|
| 1440 | The iterative limiter modifies the fluxes across the faces of cells that are either already ``dry'' |
---|
| 1441 | or may become dry within the next time-step using an iterative method. |
---|
| 1442 | |
---|
| 1443 | The flux limiter for the barotropic flow (devised by Hedong Liu) can be understood as follows: |
---|
| 1444 | |
---|
| 1445 | The continuity equation for the total water depth in a column |
---|
[11543] | 1446 | \begin{equation} |
---|
| 1447 | \label{eq:DYN_wd_continuity} |
---|
| 1448 | \frac{\partial h}{\partial t} + \mathbf{\nabla.}(h\mathbf{u}) = 0 . |
---|
[10499] | 1449 | \end{equation} |
---|
| 1450 | can be written in discrete form as |
---|
| 1451 | |
---|
[11543] | 1452 | \begin{align} |
---|
| 1453 | \label{eq:DYN_wd_continuity_2} |
---|
| 1454 | \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) |
---|
| 1455 | &= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j} + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\ |
---|
| 1456 | &= \mathrm{zzflx}_{i,j} . |
---|
[10499] | 1457 | \end{align} |
---|
| 1458 | |
---|
| 1459 | In the above $h$ is the depth of the water in the column at point $(i,j)$, |
---|
| 1460 | $\mathrm{flxu}_{i+1,j}$ is the flux out of the ``eastern'' face of the cell and |
---|
| 1461 | $\mathrm{flxv}_{i,j+1}$ the flux out of the ``northern'' face of the cell; $t_{n+1}$ is |
---|
| 1462 | the new timestep, $t_e$ is the old timestep (either $t_b$ or $t_n$) and $ \Delta t = |
---|
| 1463 | t_{n+1} - t_e$; $e_1 e_2$ is the area of the tracer cells centred at $(i,j)$ and |
---|
| 1464 | $\mathrm{zzflx}$ is the sum of the fluxes through all the faces. |
---|
| 1465 | |
---|
| 1466 | The flux limiter splits the flux $\mathrm{zzflx}$ into fluxes that are out of the cell |
---|
| 1467 | (zzflxp) and fluxes that are into the cell (zzflxn). Clearly |
---|
| 1468 | |
---|
[11543] | 1469 | \begin{equation} |
---|
| 1470 | \label{eq:DYN_wd_zzflx_p_n_1} |
---|
| 1471 | \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . |
---|
[10499] | 1472 | \end{equation} |
---|
| 1473 | |
---|
| 1474 | The flux limiter iteratively adjusts the fluxes $\mathrm{flxu}$ and $\mathrm{flxv}$ until |
---|
| 1475 | none of the cells will ``dry out''. To be precise the fluxes are limited until none of the |
---|
| 1476 | cells has water depth less than $\mathrm{rn\_wdmin1}$ on step $n+1$. |
---|
| 1477 | |
---|
| 1478 | Let the fluxes on the $m$th iteration step be denoted by $\mathrm{flxu}^{(m)}$ and |
---|
| 1479 | $\mathrm{flxv}^{(m)}$. Then the adjustment is achieved by seeking a set of coefficients, |
---|
| 1480 | $\mathrm{zcoef}_{i,j}^{(m)}$ such that: |
---|
| 1481 | |
---|
[11543] | 1482 | \begin{equation} |
---|
| 1483 | \label{eq:DYN_wd_continuity_coef} |
---|
| 1484 | \begin{split} |
---|
| 1485 | \mathrm{zzflxp}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxp}^{(0)}_{i,j} \\ |
---|
| 1486 | \mathrm{zzflxn}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxn}^{(0)}_{i,j} |
---|
| 1487 | \end{split} |
---|
[10499] | 1488 | \end{equation} |
---|
| 1489 | |
---|
| 1490 | where the coefficients are $1.0$ generally but can vary between $0.0$ and $1.0$ around |
---|
| 1491 | cells that would otherwise dry. |
---|
| 1492 | |
---|
| 1493 | The iteration is initialised by setting |
---|
| 1494 | |
---|
[11543] | 1495 | \begin{equation} |
---|
| 1496 | \label{eq:DYN_wd_zzflx_initial} |
---|
| 1497 | \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . |
---|
[10499] | 1498 | \end{equation} |
---|
| 1499 | |
---|
| 1500 | The fluxes out of cell $(i,j)$ are updated at the $m+1$th iteration if the depth of the |
---|
| 1501 | cell on timestep $t_e$, namely $h_{i,j}(t_e)$, is less than the total flux out of the cell |
---|
[11543] | 1502 | times the timestep divided by the cell area. Using (\autoref{eq:DYN_wd_continuity_2}) this |
---|
[10499] | 1503 | condition is |
---|
| 1504 | |
---|
[11543] | 1505 | \begin{equation} |
---|
| 1506 | \label{eq:DYN_wd_continuity_if} |
---|
| 1507 | h_{i,j}(t_e) - \mathrm{rn\_wdmin1} < \frac{\Delta t}{e_1 e_2} ( \mathrm{zzflxp}^{(m)}_{i,j} + \mathrm{zzflxn}^{(m)}_{i,j} ) . |
---|
[10499] | 1508 | \end{equation} |
---|
| 1509 | |
---|
[11543] | 1510 | Rearranging (\autoref{eq:DYN_wd_continuity_if}) we can obtain an expression for the maximum |
---|
[10499] | 1511 | outward flux that can be allowed and still maintain the minimum wet depth: |
---|
| 1512 | |
---|
[11543] | 1513 | \begin{equation} |
---|
| 1514 | \label{eq:DYN_wd_max_flux} |
---|
| 1515 | \begin{split} |
---|
| 1516 | \mathrm{zzflxp}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ |
---|
| 1517 | \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] |
---|
| 1518 | \end{split} |
---|
[10499] | 1519 | \end{equation} |
---|
| 1520 | |
---|
[11151] | 1521 | Note a small tolerance ($\mathrm{rn\_wdmin2}$) has been introduced here {\itshape [Q: Why is |
---|
[11543] | 1522 | this necessary/desirable?]}. Substituting from (\autoref{eq:DYN_wd_continuity_coef}) gives an |
---|
[10499] | 1523 | expression for the coefficient needed to multiply the outward flux at this cell in order |
---|
| 1524 | to avoid drying. |
---|
| 1525 | |
---|
[11543] | 1526 | \begin{equation} |
---|
| 1527 | \label{eq:DYN_wd_continuity_nxtcoef} |
---|
| 1528 | \begin{split} |
---|
| 1529 | \mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ |
---|
| 1530 | \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } |
---|
| 1531 | \end{split} |
---|
[10499] | 1532 | \end{equation} |
---|
| 1533 | |
---|
| 1534 | Only the outward flux components are altered but, of course, outward fluxes from one cell |
---|
| 1535 | are inward fluxes to adjacent cells and the balance in these cells may need subsequent |
---|
| 1536 | adjustment; hence the iterative nature of this scheme. Note, for example, that the flux |
---|
| 1537 | across the ``eastern'' face of the $(i,j)$th cell is only updated at the $m+1$th iteration |
---|
| 1538 | if that flux at the $m$th iteration is out of the $(i,j)$th cell. If that is the case then |
---|
| 1539 | the flux across that face is into the $(i+1,j)$ cell and that flux will not be updated by |
---|
| 1540 | the calculation for the $(i+1,j)$th cell. In this sense the updates to the fluxes across |
---|
| 1541 | the faces of the cells do not ``compete'' (they do not over-write each other) and one |
---|
| 1542 | would expect the scheme to converge relatively quickly. The scheme is flux based so |
---|
| 1543 | conserves mass. It also conserves constant tracers for the same reason that the |
---|
| 1544 | directional limiter does. |
---|
| 1545 | |
---|
| 1546 | |
---|
| 1547 | %---------------------------------------------------------------------------------------- |
---|
| 1548 | % Surface pressure gradients |
---|
| 1549 | %---------------------------------------------------------------------------------------- |
---|
[11543] | 1550 | \subsubsection[Modification of surface pressure gradients (\textit{dynhpg.F90})]{Modification of surface pressure gradients (\mdl{dynhpg})} |
---|
| 1551 | \label{subsec:DYN_wd_il_spg} |
---|
[10499] | 1552 | |
---|
| 1553 | At ``dry'' points the water depth is usually close to $\mathrm{rn\_wdmin1}$. If the |
---|
| 1554 | topography is sloping at these points the sea-surface will have a similar slope and there |
---|
| 1555 | will hence be very large horizontal pressure gradients at these points. The WAD modifies |
---|
| 1556 | the magnitude but not the sign of the surface pressure gradients (zhpi and zhpj) at such |
---|
| 1557 | points by mulitplying them by positive factors (zcpx and zcpy respectively) that lie |
---|
| 1558 | between $0$ and $1$. |
---|
| 1559 | |
---|
| 1560 | We describe how the scheme works for the ``eastward'' pressure gradient, zhpi, calculated |
---|
| 1561 | at the $(i,j)$th $u$-point. The scheme uses the ht\_wd depths and surface heights at the |
---|
| 1562 | neighbouring $(i+1,j)$ and $(i,j)$ tracer points. zcpx is calculated using two logicals |
---|
| 1563 | variables, $\mathrm{ll\_tmp1}$ and $\mathrm{ll\_tmp2}$ which are evaluated for each grid |
---|
[11558] | 1564 | column. The three possible combinations are illustrated in \autoref{fig:DYN_WAD_dynhpg}. |
---|
[10499] | 1565 | |
---|
| 1566 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
[11558] | 1567 | \begin{figure}[!ht] |
---|
| 1568 | \centering |
---|
[11561] | 1569 | \includegraphics[width=0.66\textwidth]{Fig_WAD_dynhpg} |
---|
[11558] | 1570 | \caption[Combinations controlling the limiting of the horizontal pressure gradient in |
---|
| 1571 | wetting and drying regimes]{ |
---|
| 1572 | Three possible combinations of the logical variables controlling the |
---|
| 1573 | limiting of the horizontal pressure gradient in wetting and drying regimes} |
---|
[11543] | 1574 | \label{fig:DYN_WAD_dynhpg} |
---|
| 1575 | \end{figure} |
---|
[10499] | 1576 | %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
---|
| 1577 | |
---|
| 1578 | The first logical, $\mathrm{ll\_tmp1}$, is set to true if and only if the water depth at |
---|
| 1579 | both neighbouring points is greater than $\mathrm{rn\_wdmin1} + \mathrm{rn\_wdmin2}$ and |
---|
| 1580 | the minimum height of the sea surface at the two points is greater than the maximum height |
---|
| 1581 | of the topography at the two points: |
---|
| 1582 | |
---|
[11543] | 1583 | \begin{equation} |
---|
| 1584 | \label{eq:DYN_ll_tmp1} |
---|
| 1585 | \begin{split} |
---|
| 1586 | \mathrm{ll\_tmp1} = & \mathrm{MIN(sshn(ji,jj), sshn(ji+1,jj))} > \\ |
---|
[10499] | 1587 | & \quad \mathrm{MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj))\ .and.} \\ |
---|
[11543] | 1588 | & \mathrm{MAX(sshn(ji,jj) + ht\_wd(ji,jj),} \\ |
---|
| 1589 | & \mathrm{\phantom{MAX(}sshn(ji+1,jj) + ht\_wd(ji+1,jj))} >\\ |
---|
| 1590 | & \quad\quad\mathrm{rn\_wdmin1 + rn\_wdmin2 } |
---|
| 1591 | \end{split} |
---|
[10499] | 1592 | \end{equation} |
---|
| 1593 | |
---|
| 1594 | The second logical, $\mathrm{ll\_tmp2}$, is set to true if and only if the maximum height |
---|
| 1595 | of the sea surface at the two points is greater than the maximum height of the topography |
---|
| 1596 | at the two points plus $\mathrm{rn\_wdmin1} + \mathrm{rn\_wdmin2}$ |
---|
| 1597 | |
---|
[11543] | 1598 | \begin{equation} |
---|
| 1599 | \label{eq:DYN_ll_tmp2} |
---|
| 1600 | \begin{split} |
---|
| 1601 | \mathrm{ ll\_tmp2 } = & \mathrm{( ABS( sshn(ji,jj) - sshn(ji+1,jj) ) > 1.E-12 )\ .AND.}\\ |
---|
| 1602 | & \mathrm{( MAX(sshn(ji,jj), sshn(ji+1,jj)) > } \\ |
---|
| 1603 | & \mathrm{\phantom{(} MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj)) + rn\_wdmin1 + rn\_wdmin2}) . |
---|
| 1604 | \end{split} |
---|
[10499] | 1605 | \end{equation} |
---|
| 1606 | |
---|
| 1607 | If $\mathrm{ll\_tmp1}$ is true then the surface pressure gradient, zhpi at the $(i,j)$ |
---|
| 1608 | point is unmodified. If both logicals are false zhpi is set to zero. |
---|
| 1609 | |
---|
| 1610 | If $\mathrm{ll\_tmp1}$ is true and $\mathrm{ll\_tmp2}$ is false then the surface pressure |
---|
| 1611 | gradient is multiplied through by zcpx which is the absolute value of the difference in |
---|
| 1612 | the water depths at the two points divided by the difference in the surface heights at the |
---|
| 1613 | two points. Thus the sign of the sea surface height gradient is retained but the magnitude |
---|
| 1614 | of the pressure force is determined by the difference in water depths rather than the |
---|
| 1615 | difference in surface height between the two points. Note that dividing by the difference |
---|
| 1616 | between the sea surface heights can be problematic if the heights approach parity. An |
---|
| 1617 | additional condition is applied to $\mathrm{ ll\_tmp2 }$ to ensure it is .false. in such |
---|
| 1618 | conditions. |
---|
| 1619 | |
---|
[11543] | 1620 | \subsubsection[Additional considerations (\textit{usrdef\_zgr.F90})]{Additional considerations (\mdl{usrdef\_zgr})} |
---|
| 1621 | \label{subsec:DYN_WAD_additional} |
---|
[10499] | 1622 | |
---|
| 1623 | In the very shallow water where wetting and drying occurs the parametrisation of |
---|
| 1624 | bottom drag is clearly very important. In order to promote stability |
---|
| 1625 | it is sometimes useful to calculate the bottom drag using an implicit time-stepping approach. |
---|
| 1626 | |
---|
| 1627 | Suitable specifcation of the surface heat flux in wetting and drying domains in forced and |
---|
| 1628 | coupled simulations needs further consideration. In order to prevent freezing or boiling |
---|
| 1629 | in uncoupled integrations the net surface heat fluxes need to be appropriately limited. |
---|
| 1630 | |
---|
| 1631 | %---------------------------------------------------------------------------------------- |
---|
| 1632 | % The WAD test cases |
---|
| 1633 | %---------------------------------------------------------------------------------------- |
---|
[11543] | 1634 | \subsection[The WAD test cases (\textit{usrdef\_zgr.F90})]{The WAD test cases (\mdl{usrdef\_zgr})} |
---|
| 1635 | \label{subsec:DYN_WAD_test_cases} |
---|
[10499] | 1636 | |
---|
| 1637 | See the WAD tests MY\_DOC documention for details of the WAD test cases. |
---|
| 1638 | |
---|
| 1639 | |
---|
| 1640 | |
---|
| 1641 | % ================================================================ |
---|
[11435] | 1642 | % Time evolution term |
---|
[707] | 1643 | % ================================================================ |
---|
[11543] | 1644 | \section[Time evolution term (\textit{dynnxt.F90})]{Time evolution term (\protect\mdl{dynnxt})} |
---|
[9407] | 1645 | \label{sec:DYN_nxt} |
---|
[707] | 1646 | |
---|
| 1647 | %----------------------------------------------namdom---------------------------------------------------- |
---|
[10146] | 1648 | |
---|
[707] | 1649 | %------------------------------------------------------------------------------------------------------------- |
---|
| 1650 | |
---|
[11435] | 1651 | Options are defined through the \nam{dom} namelist variables. |
---|
[10354] | 1652 | The general framework for dynamics time stepping is a leap-frog scheme, |
---|
[11543] | 1653 | \ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:TD}). |
---|
[10354] | 1654 | The scheme is applied to the velocity, except when |
---|
| 1655 | using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) |
---|
[11435] | 1656 | in the variable volume case (\texttt{vvl?} defined), |
---|
[11543] | 1657 | where it has to be applied to the thickness weighted velocity (see \autoref{sec:SCOORD_momentum}) |
---|
[707] | 1658 | |
---|
[10354] | 1659 | $\bullet$ vector invariant form or linear free surface |
---|
[11537] | 1660 | (\np{ln\_dynhpg\_vec}\forcode{=.true.} ; \texttt{vvl?} not defined): |
---|
[10414] | 1661 | \[ |
---|
[11543] | 1662 | % \label{eq:DYN_nxt_vec} |
---|
[10414] | 1663 | \left\{ |
---|
| 1664 | \begin{aligned} |
---|
| 1665 | &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt \ \text{RHS}_u^t \\ |
---|
| 1666 | &u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\rdt} -2u^t+u^{t+\rdt}} \right] |
---|
| 1667 | \end{aligned} |
---|
| 1668 | \right. |
---|
| 1669 | \] |
---|
[707] | 1670 | |
---|
[10354] | 1671 | $\bullet$ flux form and nonlinear free surface |
---|
[11537] | 1672 | (\np{ln\_dynhpg\_vec}\forcode{=.false.} ; \texttt{vvl?} defined): |
---|
[10414] | 1673 | \[ |
---|
[11543] | 1674 | % \label{eq:DYN_nxt_flux} |
---|
[10414] | 1675 | \left\{ |
---|
| 1676 | \begin{aligned} |
---|
| 1677 | &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t \\ |
---|
| 1678 | &\left(e_{3u}\,u\right)_f^t \;\quad = \left(e_{3u}\,u\right)^t |
---|
| 1679 | +\gamma \,\left[ {\left(e_{3u}\,u\right)_f^{t-\rdt} -2\left(e_{3u}\,u\right)^t+\left(e_{3u}\,u\right)^{t+\rdt}} \right] |
---|
| 1680 | \end{aligned} |
---|
| 1681 | \right. |
---|
| 1682 | \] |
---|
[10354] | 1683 | where RHS is the right hand side of the momentum equation, |
---|
| 1684 | the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. |
---|
| 1685 | $\gamma$ is initialized as \np{nn\_atfp} (namelist parameter). |
---|
[11537] | 1686 | Its default value is \np{nn\_atfp}\forcode{=10.e-3}. |
---|
[10354] | 1687 | In both cases, the modified Asselin filter is not applied since perfect conservation is not an issue for |
---|
| 1688 | the momentum equations. |
---|
[707] | 1689 | |
---|
[10354] | 1690 | Note that with the filtered free surface, |
---|
| 1691 | the update of the \textit{after} velocities is done in the \mdl{dynsp\_flt} module, |
---|
| 1692 | and only array swapping and Asselin filtering is done in \mdl{dynnxt}. |
---|
[707] | 1693 | |
---|
[1224] | 1694 | % ================================================================ |
---|
[10414] | 1695 | \biblio |
---|
| 1696 | |
---|
[10442] | 1697 | \pindex |
---|
| 1698 | |
---|
[6997] | 1699 | \end{document} |
---|