Changeset 9407
- Timestamp:
- 2018-03-15T17:40:35+01:00 (5 years ago)
- Location:
- branches/2017/dev_merge_2017/DOC
- Files:
-
- 3 added
- 25 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/DOC/HTML_htlatex.sh
r9394 r9407 1 1 #!/bin/bash 2 2 3 latex -shell-escape NEMO_manual 4 makeindex NEMO_manual 5 bibtex NEMO_manual 6 latex -shell-escape NEMO_manual 3 ./inc/clean.sh 4 ./inc/build.sh 7 5 8 6 mkdir -p html_htlatex 9 htlatex NEMO_manual "htlatex,2" "" "-dhtml_htlatex/" "-shell-escape" 7 cd tex_main 8 htlatex NEMO_manual "NEMO_manual,2" "" "-d../html_htlatex/" "-shell-escape" 9 cd - 10 10 11 11 exit 0 -
branches/2017/dev_merge_2017/DOC/HTML_latex2html.sh
r9394 r9407 1 1 #!/bin/bash 2 2 3 ./inc/clean.sh 4 ./inc/build.sh 5 6 cd tex_main 3 7 sed -i -e 's#\\documentclass#%\\documentclass#' -e '/{document}/ s/^/%/' \ 4 texfiles/chapters/*.tex5 sed -i ' 30,${s#\\subfile{#\\include{#g}' \8 ../tex_sub/*.tex 9 sed -i 's#\\subfile{#\\include{#g' \ 6 10 NEMO_manual.tex 7 8 latex -shell-escape NEMO_manual 9 makeindex NEMO_manual 10 bibtex NEMO_manual 11 12 latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir html_LaTeX2HTML \ 13 $* \ 11 latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir ../html_LaTeX2HTML \ 12 $* \ 14 13 NEMO_manual 15 16 14 sed -i -e 's#%\\documentclass#\\documentclass#' -e '/{document}/ s/^%//' \ 17 texfiles/chapters/*.tex18 sed -i ' 30,${s#\\include{#\\subfile{#g}' \15 ../tex_sub/*.tex 16 sed -i 's#\\include{#\\subfile{#g' \ 19 17 NEMO_manual.tex 18 cd - 20 19 21 20 exit 0 -
branches/2017/dev_merge_2017/DOC/inc/build.sh
r9394 r9407 11 11 latex ${latex_opts} ${latex_file} 12 12 13 pdflatex ${latex_opts} ${latex_file}14 15 mv ${latex_file}.pdf ..16 17 13 cd - 18 14 -
branches/2017/dev_merge_2017/DOC/inc/clean.sh
r9394 r9407 1 1 #!/bin/bash 2 2 3 rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib| ist|sty|tex)$" )3 rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib|cfg|ist|sty|tex)$" ) 4 4 #rm -rf _minted-* 5 5 #rm -rf html* -
branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.cfg
r9394 r9407 1 \Preamble{html} 1 \Preamble{xhtml,mathml} 2 3 \Configure{@HEAD}{% 4 \HCode{<script type="text/javascript" 5 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_CHTML"> 6 </script>\Hnewline}} 2 7 3 8 \begin{document} -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex
r9393 r9407 6 6 % ================================================================ 7 7 \chapter{Curvilinear $s-$Coordinate Equations} 8 \label{ Apdx_A}8 \label{apdx:A} 9 9 \minitoc 10 10 … … 16 16 % ================================================================ 17 17 \section{Chain rule for $s-$coordinates} 18 \label{ Apdx_A_continuity}18 \label{sec:A_continuity} 19 19 20 20 In order to establish the set of Primitive Equation in curvilinear $s$-coordinates 21 21 ($i.e.$ an orthogonal curvilinear coordinate in the horizontal and an Arbitrary Lagrangian 22 22 Eulerian (ALE) coordinate in the vertical), we start from the set of equations established 23 in \ S\ref{PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce23 in \autoref{subsec:PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce 24 24 an arbitrary vertical coordinate $a = a(i,j,z,t)$. Let us define a new vertical scale factor by 25 25 $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and the horizontal 26 26 slope of $s-$surfaces by : 27 \begin{equation} \label{ Apdx_A_s_slope}27 \begin{equation} \label{apdx:A_s_slope} 28 28 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 29 29 \quad \text{and} \quad … … 33 33 The chain rule to establish the model equations in the curvilinear $s-$coordinate 34 34 system is: 35 \begin{equation} \label{ Apdx_A_s_chain_rule}35 \begin{equation} \label{apdx:A_s_chain_rule} 36 36 \begin{aligned} 37 37 &\left. {\frac{\partial \bullet }{\partial t}} \right|_z = … … 54 54 In particular applying the time derivative chain rule to $z$ provides the expression 55 55 for $w_s$, the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate: 56 \begin{equation} \label{ Apdx_A_w_in_s}56 \begin{equation} \label{apdx:A_w_in_s} 57 57 w_s = \left. \frac{\partial z }{\partial t} \right|_s 58 58 = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t} … … 65 65 % ================================================================ 66 66 \section{Continuity equation in $s-$coordinates} 67 \label{ Apdx_A_continuity}68 69 Using (\ ref{Apdx_A_s_chain_rule}) and the fact that the horizontal scale factors67 \label{sec:A_continuity} 68 69 Using (\autoref{apdx:A_s_chain_rule}) and the fact that the horizontal scale factors 70 70 $e_1$ and $e_2$ do not depend on the vertical coordinate, the divergence of 71 71 the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows … … 131 131 Introducing the dia-surface velocity component, $\omega $, defined as 132 132 the volume flux across the moving $s$-surfaces per unit horizontal area: 133 \begin{equation} \label{ Apdx_A_w_s}133 \begin{equation} \label{apdx:A_w_s} 134 134 \omega = w - w_s - \sigma _1 \,u - \sigma _2 \,v \\ 135 135 \end{equation} 136 with $w_s$ given by \ eqref{Apdx_A_w_in_s}, we obtain the expression for136 with $w_s$ given by \autoref{apdx:A_w_in_s}, we obtain the expression for 137 137 the divergence of the velocity in the curvilinear $s-$coordinate system: 138 138 \begin{subequations} … … 167 167 \end{subequations} 168 168 169 As a result, the continuity equation \ eqref{Eq_PE_continuity} in the169 As a result, the continuity equation \autoref{eq:PE_continuity} in the 170 170 $s-$coordinates is: 171 \begin{equation} \label{ Apdx_A_sco_Continuity}171 \begin{equation} \label{apdx:A_sco_Continuity} 172 172 \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 173 173 + \frac{1}{e_1 \,e_2 \,e_3 }\left[ … … 184 184 % ================================================================ 185 185 \section{Momentum equation in $s-$coordinate} 186 \label{ Apdx_A_momentum}186 \label{sec:A_momentum} 187 187 188 188 Here we only consider the first component of the momentum equation, … … 193 193 $\bullet$ \textbf{Total derivative in vector invariant form} 194 194 195 Let us consider \ eqref{Eq_PE_dyn_vect}, the first component of the momentum195 Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum 196 196 equation in the vector invariant form. Its total $z-$coordinate time derivative, 197 197 $\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain … … 258 258 \end{subequations} 259 259 % 260 Applying the time derivative chain rule (first equation of (\ ref{Apdx_A_s_chain_rule}))261 to $u$ and using (\ ref{Apdx_A_w_in_s}) provides the expression of the last term260 Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) 261 to $u$ and using (\autoref{apdx:A_w_in_s}) provides the expression of the last term 262 262 of the right hand side, 263 263 \begin{equation*} {\begin{array}{*{20}l} … … 269 269 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 270 270 $i.e.$ the total $s-$coordinate time derivative : 271 \begin{align} \label{ Apdx_A_sco_Dt_vect}271 \begin{align} \label{apdx:A_sco_Dt_vect} 272 272 \left. \frac{D u}{D t} \right|_s 273 273 = \left. {\frac{\partial u }{\partial t}} \right|_s … … 285 285 286 286 Let us start from the total time derivative in the curvilinear $s-$coordinate system 287 we have just establish. Following the procedure used to establish (\ ref{Eq_PE_flux_form}),287 we have just establish. Following the procedure used to establish (\autoref{eq:PE_flux_form}), 288 288 it can be transformed into : 289 289 %\begin{subequations} … … 356 356 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 357 357 $i.e.$ the total $s-$coordinate time derivative in flux form : 358 \begin{flalign}\label{ Apdx_A_sco_Dt_flux}358 \begin{flalign}\label{apdx:A_sco_Dt_flux} 359 359 \left. \frac{D u}{D t} \right|_s = \frac{1}{e_3} \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s 360 360 + \left. \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) \right|_s … … 365 365 It has the same form as in the $z-$coordinate but for the vertical scale factor 366 366 that has appeared inside the time derivative which comes from the modification 367 of (\ ref{Apdx_A_sco_Continuity}), the continuity equation.367 of (\autoref{apdx:A_sco_Continuity}), the continuity equation. 368 368 369 369 $\ $\newline % force a new ligne … … 381 381 \end{equation*} 382 382 Applying similar manipulation to the second component and replacing 383 $\sigma _1$ and $\sigma _2$ by their expression \ eqref{Apdx_A_s_slope}, it comes:384 \begin{equation} \label{ Apdx_A_grad_p}383 $\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes: 384 \begin{equation} \label{apdx:A_grad_p} 385 385 \begin{split} 386 386 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z … … 394 394 \end{equation} 395 395 396 An additional term appears in (\ ref{Apdx_A_grad_p}) which accounts for the396 An additional term appears in (\autoref{apdx:A_grad_p}) which accounts for the 397 397 tilt of $s-$surfaces with respect to geopotential $z-$surfaces. 398 398 … … 408 408 \end{equation*} 409 409 Therefore, $p$ and $p_h'$ are linked through: 410 \begin{equation} \label{ Apdx_A_pressure}410 \begin{equation} \label{apdx:A_pressure} 411 411 p = \rho_o \; p_h' + g \, ( z + \eta ) 412 412 \end{equation} … … 416 416 \end{equation*} 417 417 418 Substituing \ eqref{Apdx_A_pressure} in \eqref{Apdx_A_grad_p} and using the definition of418 Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p} and using the definition of 419 419 the density anomaly it comes the expression in two parts: 420 \begin{equation} \label{ Apdx_A_grad_p}420 \begin{equation} \label{apdx:A_grad_p} 421 421 \begin{split} 422 422 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z … … 430 430 \end{equation} 431 431 This formulation of the pressure gradient is characterised by the appearance of a term depending on the 432 the sea surface height only (last term on the right hand side of expression \ eqref{Apdx_A_grad_p}).432 the sea surface height only (last term on the right hand side of expression \autoref{apdx:A_grad_p}). 433 433 This term will be loosely termed \textit{surface pressure gradient} 434 434 whereas the first term will be termed the … … 445 445 The coriolis and forcing terms as well as the the vertical physics remain unchanged 446 446 as they involve neither time nor space derivatives. The form of the lateral physics is 447 discussed in appendix~\ref{Apdx_B}.447 discussed in \autoref{apdx:B}. 448 448 449 449 … … 455 455 solved by the model has the same mathematical expression as the one in a curvilinear 456 456 $z-$coordinate, except for the pressure gradient term : 457 \begin{subequations} \label{ Apdx_A_dyn_vect}458 \begin{multline} \label{ Apdx_A_PE_dyn_vect_u}457 \begin{subequations} \label{apdx:A_dyn_vect} 458 \begin{multline} \label{apdx:A_PE_dyn_vect_u} 459 459 \frac{\partial u}{\partial t}= 460 460 + \left( {\zeta +f} \right)\,v … … 465 465 + D_u^{\vect{U}} + F_u^{\vect{U}} 466 466 \end{multline} 467 \begin{multline} \label{ Apdx_A_dyn_vect_v}467 \begin{multline} \label{apdx:A_dyn_vect_v} 468 468 \frac{\partial v}{\partial t}= 469 469 - \left( {\zeta +f} \right)\,u … … 477 477 whereas the flux form momentum equation differ from it by the formulation of both 478 478 the time derivative and the pressure gradient term : 479 \begin{subequations} \label{ Apdx_A_dyn_flux}480 \begin{multline} \label{ Apdx_A_PE_dyn_flux_u}479 \begin{subequations} \label{apdx:A_dyn_flux} 480 \begin{multline} \label{apdx:A_PE_dyn_flux_u} 481 481 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t} = 482 482 \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) … … 487 487 + D_u^{\vect{U}} + F_u^{\vect{U}} 488 488 \end{multline} 489 \begin{multline} \label{ Apdx_A_dyn_flux_v}489 \begin{multline} \label{apdx:A_dyn_flux_v} 490 490 \frac{1}{e_3}\frac{\partial \left( e_3\,v \right) }{\partial t}= 491 491 - \nabla \cdot \left( {{\rm {\bf U}}\,v} \right) … … 499 499 Both formulation share the same hydrostatic pressure balance expressed in terms of 500 500 hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$: 501 \begin{equation} \label{ Apdx_A_dyn_zph}501 \begin{equation} \label{apdx:A_dyn_zph} 502 502 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 503 503 \end{equation} … … 516 516 % ================================================================ 517 517 \section{Tracer equation} 518 \label{ Apdx_A_tracer}518 \label{sec:A_tracer} 519 519 520 520 The tracer equation is obtained using the same calculation as for the continuity 521 521 equation and then regrouping the time derivative terms in the left hand side : 522 522 523 \begin{multline} \label{ Apdx_A_tracer}523 \begin{multline} \label{apdx:A_tracer} 524 524 \frac{1}{e_3} \frac{\partial \left( e_3 T \right)}{\partial t} 525 525 = -\frac{1}{e_1 \,e_2 \,e_3} -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Appendix B : Diffusive Operators} 7 \label{ Apdx_B}7 \label{apdx:B} 8 8 \minitoc 9 9 … … 16 16 % ================================================================ 17 17 \section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators} 18 \label{ Apdx_B_1}18 \label{sec:B_1} 19 19 20 20 \subsubsection*{In z-coordinates} 21 21 In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator 22 22 is given by: 23 \begin{eqnarray} \label{ Apdx_B1}23 \begin{eqnarray} \label{apdx:B1} 24 24 &D^T = \frac{1}{e_1 \, e_2} \left[ 25 25 \left. \frac{\partial}{\partial i} \left( \frac{e_2}{e_1}A^{lT} \;\left. \frac{\partial T}{\partial i} \right|_z \right) \right|_z \right. … … 31 31 \subsubsection*{In generalized vertical coordinates} 32 32 In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and 33 $\sigma_2$ by \ eqref{Apdx_A_s_slope} and the vertical/horizontal ratio of diffusion33 $\sigma_2$ by \autoref{apdx:A_s_slope} and the vertical/horizontal ratio of diffusion 34 34 coefficient by $\epsilon = A^{vT} / A^{lT}$. The diffusion operator is given by: 35 35 36 \begin{equation} \label{ Apdx_B2}36 \begin{equation} \label{apdx:B2} 37 37 D^T = \left. \nabla \right|_s \cdot 38 38 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ … … 56 56 \end{subequations} 57 57 58 Equation \ eqref{Apdx_B2} is obtained from \eqref{Apdx_B1} without any58 Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any 59 59 additional assumption. Indeed, for the special case $k=z$ and thus $e_3 =1$, 60 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in Appendix~\ref{Apdx_A}61 and use \ eqref{Apdx_A_s_slope} and \eqref{Apdx_A_s_chain_rule}.60 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} 61 and use \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}. 62 62 Since no cross horizontal derivative $\partial _i \partial _j $ appears in 63 \ eqref{Apdx_B1}, the ($i$,$z$) and ($j$,$z$) planes are independent.63 \autoref{apdx:B1}, the ($i$,$z$) and ($j$,$z$) planes are independent. 64 64 The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) 65 65 transformation without any loss of generality: … … 139 139 % ================================================================ 140 140 \section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators} 141 \label{ Apdx_B_2}141 \label{sec:B_2} 142 142 143 143 \subsubsection*{In z-coordinates} … … 147 147 formulated, takes the following form \citep{Redi_JPO82}: 148 148 149 \begin{equation} \label{ Apdx_B3}149 \begin{equation} \label{apdx:B3} 150 150 \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)} 151 151 \left[ {{\begin{array}{*{20}c} … … 166 166 In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, so 167 167 $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}: 168 \begin{subequations} \label{ Apdx_B4}169 \begin{equation} \label{ Apdx_B4a}168 \begin{subequations} \label{apdx:B4} 169 \begin{equation} \label{apdx:B4a} 170 170 {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re = 171 171 \left[ {{\begin{array}{*{20}c} … … 176 176 \end{equation} 177 177 and the iso/dianeutral diffusive operator in $z$-coordinates is then 178 \begin{equation}\label{ Apdx_B4b}178 \begin{equation}\label{apdx:B4b} 179 179 D^T = \left. \nabla \right|_z \cdot 180 180 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T \right]. \\ … … 183 183 184 184 185 Physically, the full tensor \ eqref{Apdx_B3}185 Physically, the full tensor \autoref{apdx:B3} 186 186 represents strong isoneutral diffusion on a plane parallel to the isoneutral 187 187 surface and weak dianeutral diffusion perpendicular to this plane. 188 However, the approximate `weak-slope' tensor \ eqref{Apdx_B4a} represents strong188 However, the approximate `weak-slope' tensor \autoref{apdx:B4a} represents strong 189 189 diffusion along the isoneutral surface, with weak 190 190 \emph{vertical} diffusion -- the principal axes of the tensor are no 191 191 longer orthogonal. This simplification also decouples 192 192 the ($i$,$z$) and ($j$,$z$) planes of the tensor. The weak-slope operator therefore takes the same 193 form, \ eqref{Apdx_B4}, as \eqref{Apdx_B2}, the diffusion operator for geopotential193 form, \autoref{apdx:B4}, as \autoref{apdx:B2}, the diffusion operator for geopotential 194 194 diffusion written in non-orthogonal $i,j,s$-coordinates. Written out 195 195 explicitly, 196 196 197 \begin{multline} \label{ Apdx_B_ldfiso}197 \begin{multline} \label{apdx:B_ldfiso} 198 198 D^T=\frac{1}{e_1 e_2 }\left\{ 199 199 {\;\frac{\partial }{\partial i}\left[ {A_h \left( {\frac{e_2}{e_1}\frac{\partial T}{\partial i}-a_1 \frac{e_2}{e_3}\frac{\partial T}{\partial k}} \right)} \right]} … … 203 203 204 204 205 The isopycnal diffusion operator \ eqref{Apdx_B4},206 \ eqref{Apdx_B_ldfiso} conserves tracer quantity and dissipates its207 square. The demonstration of the first property is trivial as \ eqref{Apdx_B4} is the divergence205 The isopycnal diffusion operator \autoref{apdx:B4}, 206 \autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its 207 square. The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence 208 208 of fluxes. Let us demonstrate the second one: 209 209 \begin{equation*} … … 233 233 \subsubsection*{In generalized vertical coordinates} 234 234 235 Because the weak-slope operator \ eqref{Apdx_B4}, \eqref{Apdx_B_ldfiso} is decoupled235 Because the weak-slope operator \autoref{apdx:B4}, \autoref{apdx:B_ldfiso} is decoupled 236 236 in the ($i$,$z$) and ($j$,$z$) planes, it may be transformed into 237 generalized $s$-coordinates in the same way as \ eqref{Apdx_B_1} was transformed into238 \ eqref{Apdx_B_2}. The resulting operator then takes the simple form239 240 \begin{equation} \label{ Apdx_B_ldfiso_s}237 generalized $s$-coordinates in the same way as \autoref{sec:B_1} was transformed into 238 \autoref{sec:B_2}. The resulting operator then takes the simple form 239 240 \begin{equation} \label{apdx:B_ldfiso_s} 241 241 D^T = \left. \nabla \right|_s \cdot 242 242 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ … … 258 258 \end{equation*} 259 259 260 To prove \ eqref{Apdx_B5} by direct re-expression of \eqref{Apdx_B_ldfiso} is260 To prove \autoref{apdx:B5} by direct re-expression of \autoref{apdx:B_ldfiso} is 261 261 straightforward, but laborious. An easier way is first to note (by reversing the 262 derivation of \ eqref{Apdx_B_2} from \eqref{Apdx_B_1} ) that the262 derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that the 263 263 weak-slope operator may be \emph{exactly} reexpressed in 264 264 non-orthogonal $i,j,\rho$-coordinates as 265 265 266 \begin{equation} \label{ Apdx_B5}266 \begin{equation} \label{apdx:B5} 267 267 D^T = \left. \nabla \right|_\rho \cdot 268 268 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T \right] \\ … … 274 274 \end{equation} 275 275 Then direct transformation from $i,j,\rho$-coordinates to 276 $i,j,s$-coordinates gives \ eqref{Apdx_B_ldfiso_s} immediately.276 $i,j,s$-coordinates gives \autoref{apdx:B_ldfiso_s} immediately. 277 277 278 278 Note that the weak-slope approximation is only made in … … 282 282 the $s$-surfaces, in the same way as the transformation of 283 283 horizontal/vertical Laplacian diffusion in $z$-coordinates, 284 \ eqref{Apdx_B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces.284 \autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. 285 285 286 286 … … 289 289 % ================================================================ 290 290 \section{Lateral/Vertical momentum diffusive operators} 291 \label{ Apdx_B_3}291 \label{sec:B_3} 292 292 293 293 The second order momentum diffusion operator (Laplacian) in the $z$-coordinate 294 is found by applying \ eqref{Eq_PE_lap_vector}, the expression for the Laplacian294 is found by applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian 295 295 of a vector, to the horizontal velocity vector : 296 296 \begin{align*} … … 329 329 \end{array} }} \right) 330 330 \end{align*} 331 Using \ eqref{Eq_PE_div}, the definition of the horizontal divergence, the third331 Using \autoref{eq:PE_div}, the definition of the horizontal divergence, the third 332 332 componant of the second vector is obviously zero and thus : 333 333 \begin{equation*} … … 336 336 337 337 Note that this operator ensures a full separation between the vorticity and horizontal 338 divergence fields (see Appendix~\ref{Apdx_C}). It is only equal to a Laplacian338 divergence fields (see \autoref{apdx:C}). It is only equal to a Laplacian 339 339 applied to each component in Cartesian coordinates, not on the sphere. 340 340 341 341 The horizontal/vertical second order (Laplacian type) operator used to diffuse 342 342 horizontal momentum in the $z$-coordinate therefore takes the following form : 343 \begin{equation} \label{ Apdx_B_Lap_U}343 \begin{equation} \label{apdx:B_Lap_U} 344 344 {\textbf{D}}^{\textbf{U}} = 345 345 \nabla _h \left( {A^{lm}\;\chi } \right) … … 360 360 \end{align*} 361 361 362 Note Bene: introducing a rotation in \ eqref{Apdx_B_Lap_U} does not lead to a362 Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to a 363 363 useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate. 364 364 Similarly, we did not found an expression of practical use for the geopotential 365 365 horizontal/vertical Laplacian operator in the $s$-coordinate. Generally, 366 \ eqref{Apdx_B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is366 \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is 367 367 a Laplacian diffusion is applied on momentum along the coordinate directions. 368 368 \end{document} -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Discrete Invariants of the Equations} 7 \label{ Apdx_C}7 \label{apdx:C} 8 8 \minitoc 9 9 … … 20 20 % ================================================================ 21 21 \section{Introduction / Notations} 22 \label{ Apdx_C.0}22 \label{sec:C.0} 23 23 24 24 Notation used in this appendix in the demonstations : … … 69 69 \end{flalign*} 70 70 that is in a more compact form : 71 \begin{flalign} \label{ Eq_Q2_flux}71 \begin{flalign} \label{eq:Q2_flux} 72 72 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 73 73 =& \int_D { \frac{Q}{e_3} \partial_t \left( e_3 \, Q \right) dv } … … 83 83 \end{flalign*} 84 84 that is in a more compact form : 85 \begin{flalign} \label{ Eq_Q2_vect}85 \begin{flalign} \label{eq:Q2_vect} 86 86 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 87 87 =& \int_D { Q \,\partial_t Q \;dv } … … 94 94 % ================================================================ 95 95 \section{Continuous conservation} 96 \label{ Apdx_C.1}96 \label{sec:C.1} 97 97 98 98 … … 104 104 Let us first establish those constraint in the continuous world. 105 105 The total energy ($i.e.$ kinetic plus potential energies) is conserved : 106 \begin{flalign} \label{ Eq_Tot_Energy}106 \begin{flalign} \label{eq:Tot_Energy} 107 107 \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 + \rho \, g \, z \right) \;dv \right) = & 0 108 108 \end{flalign} … … 114 114 The transformation for the advection term depends on whether 115 115 the vector invariant form or the flux form is used for the momentum equation. 116 Using \ eqref{Eq_Q2_vect} and introducing \eqref{Apdx_A_dyn_vect} in \eqref{Eq_Tot_Energy}116 Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in \autoref{eq:Tot_Energy} 117 117 for the former form and 118 Using \ eqref{Eq_Q2_flux} and introducing \eqref{Apdx_A_dyn_flux} in \eqref{Eq_Tot_Energy}118 Using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in \autoref{eq:Tot_Energy} 119 119 for the latter form leads to: 120 120 121 \begin{subequations} \label{ E_tot}121 \begin{subequations} \label{eq:E_tot} 122 122 123 123 advection term (vector invariant form): 124 \begin{equation} \label{ E_tot_vect_vor}124 \begin{equation} \label{eq:E_tot_vect_vor} 125 125 \int\limits_D \zeta \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 126 126 \end{equation} 127 127 % 128 \begin{equation} \label{ E_tot_vect_adv}128 \begin{equation} \label{eq:E_tot_vect_adv} 129 129 \int\limits_D \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right) dv 130 130 + \int\limits_D \textbf{U}_h \cdot \nabla_z \textbf{U}_h \;dv … … 133 133 134 134 advection term (flux form): 135 \begin{equation} \label{ E_tot_flux_metric}135 \begin{equation} \label{eq:E_tot_flux_metric} 136 136 \int\limits_D \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1 \right)\; 137 137 \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 138 138 \end{equation} 139 139 140 \begin{equation} \label{ E_tot_flux_adv}140 \begin{equation} \label{eq:E_tot_flux_adv} 141 141 \int\limits_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} 142 142 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ … … 146 146 147 147 coriolis term 148 \begin{equation} \label{ E_tot_cor}148 \begin{equation} \label{eq:E_tot_cor} 149 149 \int\limits_D f \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 150 150 \end{equation} 151 151 152 152 pressure gradient: 153 \begin{equation} \label{ E_tot_pg}153 \begin{equation} \label{eq:E_tot_pg} 154 154 - \int\limits_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 155 155 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv … … 171 171 172 172 Vector invariant form: 173 \begin{subequations} \label{ E_tot_vect}174 \begin{equation} \label{ E_tot_vect_vor}173 \begin{subequations} \label{eq:E_tot_vect} 174 \begin{equation} \label{eq:E_tot_vect_vor} 175 175 \int\limits_D \textbf{U}_h \cdot \text{VOR} \;dv = 0 \\ 176 176 \end{equation} 177 \begin{equation} \label{ E_tot_vect_adv}177 \begin{equation} \label{eq:E_tot_vect_adv} 178 178 \int\limits_D \textbf{U}_h \cdot \text{KEG} \;dv 179 179 + \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv 180 180 - \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv } = 0 \\ 181 181 \end{equation} 182 \begin{equation} \label{ E_tot_pg}182 \begin{equation} \label{eq:E_tot_pg} 183 183 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv 184 184 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv … … 188 188 189 189 Flux form: 190 \begin{subequations} \label{ E_tot_flux}191 \begin{equation} \label{ E_tot_flux_metric}190 \begin{subequations} \label{eq:E_tot_flux} 191 \begin{equation} \label{eq:E_tot_flux_metric} 192 192 \int\limits_D \textbf{U}_h \cdot \text {COR} \; dv = 0 \\ 193 193 \end{equation} 194 \begin{equation} \label{ E_tot_flux_adv}194 \begin{equation} \label{eq:E_tot_flux_adv} 195 195 \int\limits_D \textbf{U}_h \cdot \text{ADV} \;dv 196 196 + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0 \\ 197 197 \end{equation} 198 \begin{equation} \label{ E_tot_pg}198 \begin{equation} \label{eq:E_tot_pg} 199 199 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv 200 200 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv … … 207 207 208 208 209 \ eqref{E_tot_pg} is the balance between the conversion KE to PE and PE to KE.210 Indeed the left hand side of \ eqref{E_tot_pg} can be transformed as follows:209 \autoref{eq:E_tot_pg} is the balance between the conversion KE to PE and PE to KE. 210 Indeed the left hand side of \autoref{eq:E_tot_pg} can be transformed as follows: 211 211 \begin{flalign*} 212 212 \partial_t \left( \int\limits_D { \rho \, g \, z \;dv} \right) … … 221 221 \end{flalign*} 222 222 where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 223 the vertical velocity referenced to the fixe $z$-coordinate system (see \ eqref{Apdx_A_w_s}).223 the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 224 224 225 The left hand side of \ eqref{E_tot_pg} can be transformed as follows:225 The left hand side of \autoref{eq:E_tot_pg} can be transformed as follows: 226 226 \begin{flalign*} 227 227 - \int\limits_D \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv … … 325 325 % ================================================================ 326 326 \section{Discrete total energy conservation: vector invariant form} 327 \label{ Apdx_C.1}327 \label{sec:C.1} 328 328 329 329 % ------------------------------------------------------------------------------------------------------------- … … 331 331 % ------------------------------------------------------------------------------------------------------------- 332 332 \subsection{Total energy conservation} 333 \label{ Apdx_C_KE+PE}334 335 The discrete form of the total energy conservation, \ eqref{Eq_Tot_Energy}, is given by:333 \label{subsec:C_KE+PE} 334 335 The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 336 336 \begin{flalign*} 337 337 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 \\ 338 338 \end{flalign*} 339 339 which in vector invariant forms, it leads to: 340 \begin{equation} \label{ KE+PE_vect_discrete} \begin{split}340 \begin{equation} \label{eq:KE+PE_vect_discrete} \begin{split} 341 341 \sum\limits_{i,j,k} \biggl\{ u\, \partial_t u \;b_u 342 342 + v\, \partial_t v \;b_v \biggr\} … … 348 348 349 349 Substituting the discrete expression of the time derivative of the velocity either in vector invariant, 350 leads to the discrete equivalent of the four equations \ eqref{E_tot_flux}.350 leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}. 351 351 352 352 % ------------------------------------------------------------------------------------------------------------- … … 354 354 % ------------------------------------------------------------------------------------------------------------- 355 355 \subsection{Vorticity term (coriolis + vorticity part of the advection)} 356 \label{ Apdx_C_vor}356 \label{subsec:C_vor} 357 357 358 358 Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), or … … 364 364 % ------------------------------------------------------------------------------------------------------------- 365 365 \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 366 \label{ Apdx_C_vorENE}366 \label{subsec:C_vorENE} 367 367 368 368 For the ENE scheme, the two components of the vorticity term are given by : … … 401 401 % ------------------------------------------------------------------------------------------------------------- 402 402 \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 403 \label{ Apdx_C_vorEEN}403 \label{subsec:C_vorEEN} 404 404 405 405 With the EEN scheme, the vorticity terms are represented as: 406 \begin{equation} \label{ Eq_dynvor_een}406 \begin{equation} \label{eq:dynvor_een} 407 407 \left\{ { \begin{aligned} 408 408 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} … … 415 415 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 416 416 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 417 \begin{equation} \label{ Q_triads}417 \begin{equation} \label{eq:Q_triads} 418 418 _i^j \mathbb{Q}^{i_p}_{j_p} 419 419 = \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) … … 471 471 % ------------------------------------------------------------------------------------------------------------- 472 472 \subsubsection{Gradient of kinetic energy / Vertical advection} 473 \label{ Apdx_C_zad}473 \label{subsec:C_zad} 474 474 475 475 The change of Kinetic Energy (KE) due to the vertical advection is exactly … … 480 480 + \frac{1}{2} \int_D { \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } \\ 481 481 \end{equation*} 482 Indeed, using successively \ eqref{DOM_di_adj} ($i.e.$ the skew symmetry482 Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry 483 483 property of the $\delta$ operator) and the continuity equation, then 484 \ eqref{DOM_di_adj} again, then the commutativity of operators485 $\overline {\,\cdot \,}$ and $\delta$, and finally \ eqref{DOM_mi_adj}484 \autoref{eq:DOM_di_adj} again, then the commutativity of operators 485 $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 486 486 ($i.e.$ the symmetry property of the $\overline {\,\cdot \,}$ operator) 487 487 applied in the horizontal and vertical directions, it becomes: … … 536 536 % 537 537 \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD), 538 while the second term corresponds exactly to \ eqref{KE+PE_vect_discrete}, therefore:}538 while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:} 539 539 \equiv& \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv 540 540 + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t (e_3) \;dv } &&&\\ … … 568 568 \end{flalign*} 569 569 which is (over-)satified by defining the vertical scale factor as follows: 570 \begin{flalign} \label{e 3u-e3v}570 \begin{flalign} \label{eq:e3u-e3v} 571 571 e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2} \\ 572 572 e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2} … … 580 580 % ------------------------------------------------------------------------------------------------------------- 581 581 \subsection{Pressure gradient term} 582 \label{ Apdx_C.1.4}582 \label{subsec:C.1.4} 583 583 584 584 \gmcomment{ 585 585 A pressure gradient has no contribution to the evolution of the vorticity as the 586 586 curl of a gradient is zero. In the $z$-coordinate, this property is satisfied locally 587 on a C-grid with 2nd order finite differences (property \ eqref{Eq_DOM_curl_grad}).587 on a C-grid with 2nd order finite differences (property \autoref{eq:DOM_curl_grad}). 588 588 } 589 589 … … 611 611 % 612 612 \allowdisplaybreaks 613 \intertext{Using successively \eqref{DOM_di_adj}, $i.e.$ the skew symmetry property of614 the $\delta$ operator, \ eqref{Eq_wzv}, the continuity equation, \eqref{Eq_dynhpg_sco},613 \intertext{Using successively \autoref{eq:DOM_di_adj}, $i.e.$ the skew symmetry property of 614 the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{dynhpg_sco}, 615 615 the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, 616 616 which comes from the definition of $z_t$, it becomes: } … … 657 657 % 658 658 \end{flalign*} 659 The first term is exactly the first term of the right-hand-side of \ eqref{KE+PE_vect_discrete}.659 The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}. 660 660 It remains to demonstrate that the last term, which is obviously a discrete analogue of 661 $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \ eqref{KE+PE_vect_discrete}.661 $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \autoref{eq:KE+PE_vect_discrete}. 662 662 In other words, the following property must be satisfied: 663 663 \begin{flalign*} … … 733 733 % ================================================================ 734 734 \section{Discrete total energy conservation: flux form} 735 \label{ Apdx_C.1}735 \label{sec:C.1} 736 736 737 737 % ------------------------------------------------------------------------------------------------------------- … … 739 739 % ------------------------------------------------------------------------------------------------------------- 740 740 \subsection{Total energy conservation} 741 \label{ Apdx_C_KE+PE}742 743 The discrete form of the total energy conservation, \ eqref{Eq_Tot_Energy}, is given by:741 \label{subsec:C_KE+PE} 742 743 The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 744 744 \begin{flalign*} 745 745 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 \\ … … 763 763 % ------------------------------------------------------------------------------------------------------------- 764 764 \subsection{Coriolis and advection terms: flux form} 765 \label{ Apdx_C.1.3}765 \label{subsec:C.1.3} 766 766 767 767 % ------------------------------------------------------------------------------------------------------------- … … 769 769 % ------------------------------------------------------------------------------------------------------------- 770 770 \subsubsection{Coriolis plus ``metric'' term} 771 \label{ Apdx_C.1.3.1}771 \label{subsec:C.1.3.1} 772 772 773 773 In flux from the vorticity term reduces to a Coriolis term in which the Coriolis … … 783 783 Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form. 784 784 It therefore conserves the total KE. The derivation is the same as for the 785 vorticity term in the vector invariant form (\ S\ref{Apdx_C_vor}).785 vorticity term in the vector invariant form (\autoref{subsec:C_vor}). 786 786 787 787 % ------------------------------------------------------------------------------------------------------------- … … 789 789 % ------------------------------------------------------------------------------------------------------------- 790 790 \subsubsection{Flux form advection} 791 \label{ Apdx_C.1.3.2}791 \label{subsec:C.1.3.2} 792 792 793 793 The flux form operator of the momentum advection is evaluated using a … … 797 797 the horizontal kinetic energy, that is : 798 798 799 \begin{equation} \label{ Apdx_C_ADV_KE_flux}799 \begin{equation} \label{eq:C_ADV_KE_flux} 800 800 - \int_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} 801 801 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ … … 856 856 which is the discrete form of 857 857 $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv $. 858 \ eqref{Apdx_C_ADV_KE_flux} is thus satisfied.858 \autoref{eq:C_ADV_KE_flux} is thus satisfied. 859 859 860 860 … … 877 877 % ================================================================ 878 878 \section{Discrete enstrophy conservation} 879 \label{ Apdx_C.1}879 \label{sec:C.1} 880 880 881 881 … … 884 884 % ------------------------------------------------------------------------------------------------------------- 885 885 \subsubsection{Vorticity term with ENS scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 886 \label{ Apdx_C_vorENS}886 \label{subsec:C_vorENS} 887 887 888 888 In the ENS scheme, the vorticity term is descretized as follows: 889 \begin{equation} \label{ Eq_dynvor_ens}889 \begin{equation} \label{eq:dynvor_ens} 890 890 \left\{ \begin{aligned} 891 891 +\frac{1}{e_{1u}} & \overline{q}^{\,i} & {\overline{ \overline{\left( e_{1v}\,e_{3v}\; v \right) } } }^{\,i, j+1/2} \\ … … 896 896 The scheme does not allow but the conservation of the total kinetic energy but the conservation 897 897 of $q^2$, the potential enstrophy for a horizontally non-divergent flow ($i.e.$ when $\chi$=$0$). 898 Indeed, using the symmetry or skew symmetry properties of the operators ( Eqs \eqref{DOM_mi_adj}899 and \ eqref{DOM_di_adj}), it can be shown that:900 \begin{equation} \label{ Apdx_C_1.1}898 Indeed, using the symmetry or skew symmetry properties of the operators ( \autoref{eq:DOM_mi_adj} 899 and \autoref{eq:DOM_di_adj}), it can be shown that: 900 \begin{equation} \label{eq:C_1.1} 901 901 \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 902 902 \end{equation} 903 903 where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. Indeed, using 904 \ eqref{Eq_dynvor_ens}, the discrete form of the right hand side of \eqref{Apdx_C_1.1}904 \autoref{eq:dynvor_ens}, the discrete form of the right hand side of \autoref{eq:C_1.1} 905 905 can be transformed as follow: 906 906 \begin{flalign*} … … 944 944 % ------------------------------------------------------------------------------------------------------------- 945 945 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 946 \label{ Apdx_C_vorEEN}946 \label{subsec:C_vorEEN} 947 947 948 948 With the EEN scheme, the vorticity terms are represented as: 949 \begin{equation} \label{ Eq_dynvor_een}949 \begin{equation} \label{eq:dynvor_een} 950 950 \left\{ { \begin{aligned} 951 951 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} … … 958 958 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 959 959 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 960 \begin{equation} \label{ Q_triads}960 \begin{equation} \label{eq:Q_triads} 961 961 _i^j \mathbb{Q}^{i_p}_{j_p} 962 962 = \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) … … 968 968 Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, 969 969 similar manipulation can be done for the 3 others. The discrete form of the right hand 970 side of \ eqref{Apdx_C_1.1} applied to this triad only can be transformed as follow:970 side of \autoref{eq:C_1.1} applied to this triad only can be transformed as follow: 971 971 972 972 \begin{flalign*} … … 1017 1017 % ================================================================ 1018 1018 \section{Conservation properties on tracers} 1019 \label{ Apdx_C.2}1019 \label{sec:C.2} 1020 1020 1021 1021 … … 1033 1033 % ------------------------------------------------------------------------------------------------------------- 1034 1034 \subsection{Advection term} 1035 \label{ Apdx_C.2.1}1035 \label{subsec:C.2.1} 1036 1036 1037 1037 conservation of a tracer, $T$: … … 1100 1100 % ================================================================ 1101 1101 \section{Conservation properties on lateral momentum physics} 1102 \label{ Apdx_dynldf_properties}1102 \label{sec:dynldf_properties} 1103 1103 1104 1104 … … 1114 1114 1115 1115 These properties of the horizontal diffusion operator are a direct consequence 1116 of properties \ eqref{Eq_DOM_curl_grad} and \eqref{Eq_DOM_div_curl}.1116 of properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 1117 1117 When the vertical curl of the horizontal diffusion of momentum (discrete sense) 1118 1118 is taken, the term associated with the horizontal gradient of the divergence is … … 1123 1123 % ------------------------------------------------------------------------------------------------------------- 1124 1124 \subsection{Conservation of potential vorticity} 1125 \label{ Apdx_C.3.1}1125 \label{subsec:C.3.1} 1126 1126 1127 1127 The lateral momentum diffusion term conserves the potential vorticity : … … 1143 1143 \right\} \\ 1144 1144 % 1145 \intertext{Using \ eqref{DOM_di_adj}, it follows:}1145 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1146 1146 % 1147 1147 \equiv& \sum\limits_{i,j,k} … … 1157 1157 % ------------------------------------------------------------------------------------------------------------- 1158 1158 \subsection{Dissipation of horizontal kinetic energy} 1159 \label{ Apdx_C.3.2}1159 \label{subsec:C.3.2} 1160 1160 1161 1161 The lateral momentum diffusion term dissipates the horizontal kinetic energy: … … 1209 1209 % ------------------------------------------------------------------------------------------------------------- 1210 1210 \subsection{Dissipation of enstrophy} 1211 \label{ Apdx_C.3.3}1211 \label{subsec:C.3.3} 1212 1212 1213 1213 The lateral momentum diffusion term dissipates the enstrophy when the eddy … … 1223 1223 + \delta_{j+1/2} \left[ \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta \right] \right] \right\} &&&\\ 1224 1224 % 1225 \intertext{Using \ eqref{DOM_di_adj}, it follows:}1225 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1226 1226 % 1227 1227 &\quad \equiv - A^{\,lm} \sum\limits_{i,j,k} … … 1234 1234 % ------------------------------------------------------------------------------------------------------------- 1235 1235 \subsection{Conservation of horizontal divergence} 1236 \label{ Apdx_C.3.4}1236 \label{subsec:C.3.4} 1237 1237 1238 1238 When the horizontal divergence of the horizontal diffusion of momentum 1239 1239 (discrete sense) is taken, the term associated with the vertical curl of the 1240 vorticity is zero locally, due to \ eqref{Eq_DOM_div_curl}.1240 vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 1241 1241 The resulting term conserves the $\chi$ and dissipates $\chi^2$ 1242 1242 when the eddy coefficients are horizontally uniform. … … 1251 1251 + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right] \right\} \\ 1252 1252 % 1253 \intertext{Using \ eqref{DOM_di_adj}, it follows:}1253 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1254 1254 % 1255 1255 &\equiv \sum\limits_{i,j,k} … … 1263 1263 % ------------------------------------------------------------------------------------------------------------- 1264 1264 \subsection{Dissipation of horizontal divergence variance} 1265 \label{ Apdx_C.3.5}1265 \label{subsec:C.3.5} 1266 1266 1267 1267 \begin{flalign*} … … 1277 1277 \right\} \; e_{1t}\,e_{2t}\,e_{3t} \\ 1278 1278 % 1279 \intertext{Using \ eqref{DOM_di_adj}, it turns out to be:}1279 \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:} 1280 1280 % 1281 1281 &\equiv - A^{\,lm} \sum\limits_{i,j,k} … … 1289 1289 % ================================================================ 1290 1290 \section{Conservation properties on vertical momentum physics} 1291 \label{ Apdx_C_4}1291 \label{sec:C_4} 1292 1292 1293 1293 As for the lateral momentum physics, the continuous form of the vertical diffusion … … 1461 1461 % ================================================================ 1462 1462 \section{Conservation properties on tracer physics} 1463 \label{ Apdx_C.5}1463 \label{sec:C.5} 1464 1464 1465 1465 The numerical schemes used for tracer subgridscale physics are written such … … 1473 1473 % ------------------------------------------------------------------------------------------------------------- 1474 1474 \subsection{Conservation of tracers} 1475 \label{ Apdx_C.5.1}1475 \label{subsec:C.5.1} 1476 1476 1477 1477 constraint of conservation of tracers: … … 1507 1507 % ------------------------------------------------------------------------------------------------------------- 1508 1508 \subsection{Dissipation of tracer variance} 1509 \label{ Apdx_C.5.2}1509 \label{subsec:C.5.2} 1510 1510 1511 1511 constraint on the dissipation of tracer variance: -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Coding Rules} 7 \label{ Apdx_D}7 \label{apdx:D} 8 8 \minitoc 9 9 … … 47 47 % ================================================================ 48 48 \section{Program structure} 49 \label{ Apdx_D_structure}49 \label{sec:D_structure} 50 50 51 51 Each program begins with a set of headline comments containing : … … 76 76 % ================================================================ 77 77 \section{Coding conventions} 78 \label{ Apdx_D_coding}78 \label{sec:D_coding} 79 79 80 80 - Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent … … 107 107 % ================================================================ 108 108 \section{Naming conventions} 109 \label{ Apdx_D_naming}109 \label{sec:D_naming} 110 110 111 111 The purpose of the naming conventions is to use prefix letters to classify … … 116 116 117 117 %--------------------------------------------------TABLE-------------------------------------------------- 118 \begin{table}[htbp] \label{ Tab_VarName}118 \begin{table}[htbp] \label{tab:VarName} 119 119 \begin{center} 120 120 \begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|} … … 187 187 \hline 188 188 \end{tabular} 189 \label{tab 1}189 \label{tab:tab1} 190 190 \end{center} 191 191 \end{table} … … 201 201 % ================================================================ 202 202 %\section{Program structure} 203 % label{Apdx_D_structure}203 %abel{sec:Apdx_D_structure} 204 204 205 205 %To be done.... -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Note on some algorithms} 7 \label{ Apdx_E}7 \label{apdx:E} 8 8 \minitoc 9 9 … … 20 20 % ------------------------------------------------------------------------------------------------------------- 21 21 \section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 22 \label{ TRA_adv_ubs}22 \label{sec:TRA_adv_ubs} 23 23 24 24 The UBS advection scheme is an upstream biased third order scheme based on … … 26 26 QUICK scheme (Quadratic Upstream Interpolation for Convective 27 27 Kinematics). For example, in the $i$-direction : 28 \begin{equation} \label{ Eq_tra_adv_ubs2}28 \begin{equation} \label{eq:tra_adv_ubs2} 29 29 \tau _u^{ubs} = \left\{ \begin{aligned} 30 30 & \tau _u^{cen4} + \frac{1}{12} \,\tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ … … 33 33 \end{equation} 34 34 or equivalently, the advective flux is 35 \begin{equation} \label{ Eq_tra_adv_ubs2}35 \begin{equation} \label{eq:tra_adv_ubs2} 36 36 U_{i+1/2} \ \tau _u^{ubs} 37 37 =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2} … … 61 61 scheme when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 62 62 63 For stability reasons, in \ eqref{Eq_tra_adv_ubs}, the first term which corresponds63 For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds 64 64 to a second order centred scheme is evaluated using the \textit{now} velocity 65 65 (centred in time) while the second term which is the diffusive part of the scheme, … … 67 67 by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. UBS and QUICK 68 68 schemes only differ by one coefficient. Substituting 1/6 with 1/8 in 69 (\ ref{Eq_tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.69 (\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 70 70 This option is not available through a namelist parameter, since the 1/6 71 71 coefficient is hard coded. Nevertheless it is quite easy to make the … … 87 87 eight-order accurate conventional scheme. 88 88 89 NB 3 : It is straight forward to rewrite \ eqref{Eq_tra_adv_ubs} as follows:90 \begin{equation} \label{ Eq_tra_adv_ubs2}89 NB 3 : It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: 90 \begin{equation} \label{eq:tra_adv_ubs2} 91 91 \tau _u^{ubs} = \left\{ \begin{aligned} 92 92 & \tau _u^{cen4} + \frac{1}{12} \tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ … … 95 95 \end{equation} 96 96 or equivalently 97 \begin{equation} \label{ Eq_tra_adv_ubs2}97 \begin{equation} \label{eq:tra_adv_ubs2} 98 98 \begin{split} 99 99 e_{2u} e_{3u}\,u_{i+1/2} \ \tau _u^{ubs} … … 102 102 \end{split} 103 103 \end{equation} 104 \ eqref{Eq_tra_adv_ubs2} has several advantages. First it clearly evidence that104 \autoref{eq:tra_adv_ubs2} has several advantages. First it clearly evidence that 105 105 the UBS scheme is based on the fourth order scheme to which is added an 106 106 upstream biased diffusive term. Second, this emphasises that the $4^{th}$ order 107 107 part have to be evaluated at \emph{now} time step, not only the $2^{th}$ order 108 part as stated above using \ eqref{Eq_tra_adv_ubs}. Third, the diffusive term is108 part as stated above using \autoref{eq:tra_adv_ubs}. Third, the diffusive term is 109 109 in fact a biharmonic operator with a eddy coefficient with is simply proportional 110 110 to the velocity. 111 111 112 112 laplacian diffusion: 113 \begin{equation} \label{ Eq_tra_ldf_lap}113 \begin{equation} \label{eq:tra_ldf_lap} 114 114 \begin{split} 115 115 D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\; e_{3T} } &\left[ {\quad \delta _i … … 124 124 125 125 bilaplacian: 126 \begin{equation} \label{ Eq_tra_ldf_lap}126 \begin{equation} \label{eq:tra_ldf_lap} 127 127 \begin{split} 128 128 D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ … … 136 136 $i.e.$ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 137 137 it comes : 138 \begin{equation} \label{ Eq_tra_ldf_lap}138 \begin{equation} \label{eq:tra_ldf_lap} 139 139 \begin{split} 140 140 D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ … … 146 146 \end{equation} 147 147 if the velocity is uniform ($i.e.$ $|u|=cst$) then the diffusive flux is 148 \begin{equation} \label{ Eq_tra_ldf_lap}148 \begin{equation} \label{eq:tra_ldf_lap} 149 149 \begin{split} 150 150 F_u^{lT} = - \frac{1}{12} … … 157 157 beurk.... reverte the logic: starting from the diffusive part of the advective flux it comes: 158 158 159 \begin{equation} \label{ Eq_tra_adv_ubs2}159 \begin{equation} \label{eq:tra_adv_ubs2} 160 160 \begin{split} 161 161 F_u^{lT} … … 166 166 167 167 sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$): 168 \begin{equation} \label{ Eq_tra_adv_ubs2}168 \begin{equation} \label{eq:tra_adv_ubs2} 169 169 \begin{split} 170 170 F_u^{lT} … … 175 175 176 176 sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$ 177 \begin{equation} \label{ Eq_tra_adv_ubs2}177 \begin{equation} \label{eq:tra_adv_ubs2} 178 178 \begin{split} 179 179 F_u^{lT} … … 189 189 % ------------------------------------------------------------------------------------------------------------- 190 190 \section{Leapfrog energetic} 191 \label{ LF}191 \label{sec:LF} 192 192 193 193 We adopt the following semi-discrete notation for time derivative. Given the values of a variable $q$ at successive time step, the time derivation and averaging operators at the mid time step are: 194 \begin{subequations} \label{ dt_mt}194 \begin{subequations} \label{eq:dt_mt} 195 195 \begin{align} 196 196 \delta _{t+\rdt/2} [q] &= \ \ \, q^{t+\rdt} - q^{t} \\ … … 202 202 , respectively. 203 203 204 The Leap-frog time stepping given by \ eqref{Eq_DOM_nxt} can be defined as:205 \begin{equation} \label{ LF}204 The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as: 205 \begin{equation} \label{eq:LF} 206 206 \frac{\partial q}{\partial t} 207 207 \equiv \frac{1}{\rdt} \overline{ \delta _{t+\rdt/2}[q]}^{\,t} 208 208 = \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} 209 209 \end{equation} 210 Note that \ eqref{LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$210 Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$ 211 211 as it can be found sometime in literature. 212 212 The leap-Frog time stepping is a second order centered scheme. As such it respects 213 213 the quadratic invariant in integral forms, $i.e.$ the following continuous property, 214 \begin{equation} \label{ Energy}214 \begin{equation} \label{eq:Energy} 215 215 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 216 216 =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt} … … 252 252 scheme, but is formulated within the \NEMO framework ($i.e.$ using scale 253 253 factors rather than grid-size and having a position of $T$-points that is not 254 necessary in the middle of vertical velocity points, see Fig.~\ref{Fig_zgr_e3}).255 256 In the formulation \ eqref{Eq_tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,254 necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 255 256 In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, 257 257 the off-diagonal terms of the small angle diffusion tensor contain several double 258 258 spatial averages of a gradient, for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$. … … 263 263 In other word, the operator applied to a tracer does not warranties the decrease of 264 264 its global average variance. To circumvent this, we have introduced a smoothing of 265 the slopes of the iso-neutral surfaces (see \ S\ref{LDF}). Nevertheless, this technique265 the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). Nevertheless, this technique 266 266 works fine for $T$ and $S$ as they are active tracers ($i.e.$ they enter the computation 267 267 of density), but it does not work for a passive tracer. \citep{Griffies_al_JPO98} introduce … … 270 270 with a derivative in the same direction by considering triads. For example in the 271 271 (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 272 \begin{equation} \label{ Gf_triads}272 \begin{equation} \label{eq:Gf_triads} 273 273 _i^k \mathbb{T}_{i_p}^{k_p} (T) 274 274 = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \left( … … 282 282 $A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point, 283 283 and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad : 284 \begin{equation} \label{ Gf_slopes}284 \begin{equation} \label{eq:Gf_slopes} 285 285 _i^k \mathbb{R}_{i_p}^{k_p} 286 286 =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac … … 288 288 {\left(\alpha / \beta \right)_i^k \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 289 289 \end{equation} 290 Note that in \ eqref{Gf_slopes} we use the ratio $\alpha / \beta$ instead of290 Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of 291 291 multiplying the temperature derivative by $\alpha$ and the salinity derivative 292 292 by $\beta$. This is more efficient as the ratio $\alpha / \beta$ can to be 293 293 evaluated directly. 294 294 295 Note that in \ eqref{Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of295 Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of 296 296 ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$. This choice has been motivated by the decrease 297 297 of tracer variance and the presence of partial cell at the ocean bottom 298 (see Appendix~\ref{Apdx_Gf_operator}).298 (see \autoref{apdx:Gf_operator}). 299 299 300 300 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 301 \begin{figure}[!ht] \label{Fig_ISO_triad} 302 \begin{center} 301 \begin{figure}[!ht] \begin{center} 303 302 \includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 304 \caption{ \protect\label{ Fig_ISO_triad}303 \caption{ \protect\label{fig:ISO_triad} 305 304 Triads used in the Griffies's like iso-neutral diffision scheme for 306 305 $u$-component (upper panel) and $w$-component (lower panel).} … … 311 310 The four iso-neutral fluxes associated with the triads are defined at $T$-point. 312 311 They take the following expression : 313 \begin{flalign} \label{ Gf_fluxes}312 \begin{flalign} \label{eq:Gf_fluxes} 314 313 \begin{split} 315 314 {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) … … 322 321 323 322 The resulting iso-neutral fluxes at $u$- and $w$-points are then given by the 324 sum of the fluxes that cross the $u$- and $w$-face ( Fig.~\ref{Fig_ISO_triad}):325 \begin{flalign} \label{ Eq_iso_flux}323 sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}): 324 \begin{flalign} \label{eq:iso_flux} 326 325 \textbf{F}_{iso}(T) 327 326 &\equiv \sum_{\substack{i_p,\,k_p}} … … 353 352 resulting in a iso-neutral diffusion tendency on temperature given by the divergence 354 353 of the sum of all the four triad fluxes : 355 \begin{equation} \label{ Gf_operator}354 \begin{equation} \label{eq:Gf_operator} 356 355 D_l^T = \frac{1}{b_T} \sum_{\substack{i_p,\,k_p}} \left\{ 357 356 \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] … … 365 364 \item[$\bullet$ horizontal diffusion] The discretization of the diffusion operator 366 365 recovers the traditional five-point Laplacian in the limit of flat iso-neutral direction : 367 \begin{equation} \label{ Gf_property1a}366 \begin{equation} \label{eq:Gf_property1a} 368 367 D_l^T = \frac{1}{b_T} \ \delta_{i} 369 368 \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] … … 388 387 \item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of locally referenced 389 388 potential density is zero, $i.e.$ 390 \begin{align} \label{ Gf_property2}389 \begin{align} \label{eq:Gf_property2} 391 390 \begin{matrix} 392 391 &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)} … … 398 397 \end{matrix} 399 398 \end{align} 400 This result is trivially obtained using the \ eqref{Gf_triads} applied to $T$ and $S$401 and the definition of the triads' slopes \ eqref{Gf_slopes}.399 This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ 400 and the definition of the triads' slopes \autoref{eq:Gf_slopes}. 402 401 403 402 \item[$\bullet$ conservation of tracer] The iso-neutral diffusion term conserve the 404 403 total tracer content, $i.e.$ 405 \begin{equation} \label{ Gf_property1}404 \begin{equation} \label{eq:Gf_property1} 406 405 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 407 406 \end{equation} … … 411 410 \item[$\bullet$ decrease of tracer variance] The iso-neutral diffusion term does 412 411 not increase the total tracer variance, $i.e.$ 413 \begin{equation} \label{ Gf_property1}412 \begin{equation} \label{eq:Gf_property1} 414 413 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 415 414 \end{equation} 416 The property is demonstrated in the Appendix~\ref{Apdx_Gf_operator}. It is a415 The property is demonstrated in the \autoref{apdx:Gf_operator}. It is a 417 416 key property for a diffusion term. It means that the operator is also a dissipation 418 417 term, $i.e.$ it is a sink term for the square of the quantity on which it is applied. … … 422 421 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion operator is self-adjoint, 423 422 $i.e.$ 424 \begin{equation} \label{ Gf_property1}423 \begin{equation} \label{eq:Gf_property1} 425 424 \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 426 425 \end{equation} … … 428 427 operator. We just have to apply the same routine. This properties can be demonstrated 429 428 quite easily in a similar way the "non increase of tracer variance" property has been 430 proved (see Appendix~\ref{Apdx_Gf_operator}).429 proved (see \autoref{apdx:Gf_operator}). 431 430 \end{description} 432 431 … … 442 441 eddy induced velocity, the formulation of which depends on the slopes of iso- 443 442 neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used 444 here are referenced to the geopotential surfaces, $i.e.$ \ eqref{Eq_ldfslp_geo}445 is used in $z$-coordinate, and the sum \ eqref{Eq_ldfslp_geo}446 + \ eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates.443 here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo} 444 is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 445 + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 447 446 448 447 The eddy induced velocity is given by: 449 \begin{equation} \label{ Eq_eiv_v}448 \begin{equation} \label{eq:eiv_v} 450 449 \begin{split} 451 450 u^* & = - \frac{1}{e_2\,e_{3}} \;\partial_k \left( e_2 \, A_e \; r_i \right) … … 467 466 A traditional way to implement this additional advection is to add it to the eulerian 468 467 velocity prior to compute the tracer advection. This allows us to take advantage of 469 all the advection schemes offered for the tracers (see \ S\ref{TRA_adv}) and not just468 all the advection schemes offered for the tracers (see \autoref{sec:TRA_adv}) and not just 470 469 a $2^{nd}$ order advection scheme. This is particularly useful for passive tracers 471 470 where \emph{positivity} of the advection scheme is of paramount importance. 472 % give here the expression using the triads. It is different from the one given in \ eqref{Eq_ldfeiv}471 % give here the expression using the triads. It is different from the one given in \autoref{eq:ldfeiv} 473 472 % see just below a copy of this equation: 474 %\begin{equation} \label{ Eq_ldfeiv}473 %\begin{equation} \label{eq:ldfeiv} 475 474 %\begin{split} 476 475 % u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ … … 479 478 %\end{split} 480 479 %\end{equation} 481 \begin{equation} \label{ Eq_eiv_vd}480 \begin{equation} \label{eq:eiv_vd} 482 481 \textbf{F}_{eiv}^T \equiv \left( \begin{aligned} 483 482 \sum_{\substack{i_p,\,k_p}} & … … 491 490 \end{equation} 492 491 493 \ ref{Griffies_JPO98} introduces another way to implement the eddy induced advection,492 \citep{Griffies_JPO98} introduces another way to implement the eddy induced advection, 494 493 the so-called skew form. It is based on a transformation of the advective fluxes 495 494 using the non-divergent nature of the eddy induced velocity. … … 522 521 and since the eddy induces velocity field is no-divergent, we end up with the skew 523 522 form of the eddy induced advective fluxes: 524 \begin{equation} \label{ Eq_eiv_skew_continuous}523 \begin{equation} \label{eq:eiv_skew_continuous} 525 524 \textbf{F}_{eiv}^T = \begin{pmatrix} 526 525 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ … … 529 528 \end{equation} 530 529 The tendency associated with eddy induced velocity is then simply the divergence 531 of the \ eqref{Eq_eiv_skew_continuous} fluxes. It naturally conserves the tracer530 of the \autoref{eq:eiv_skew_continuous} fluxes. It naturally conserves the tracer 532 531 content, as it is expressed in flux form and, as the advective form, it preserve the 533 tracer variance. Another interesting property of \ eqref{Eq_eiv_skew_continuous}532 tracer variance. Another interesting property of \autoref{eq:eiv_skew_continuous} 534 533 form is that when $A=A_e$, a simplification occurs in the sum of the iso-neutral 535 534 diffusion and eddy induced velocity terms: 536 \begin{flalign} \label{ Eq_eiv_skew+eiv_continuous}535 \begin{flalign} \label{eq:eiv_skew+eiv_continuous} 537 536 \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= 538 537 \begin{pmatrix} … … 554 553 has been used to reduce the computational time \citep{Griffies_JPO98}, but it is 555 554 not of practical use as usually $A \neq A_e$. Nevertheless this property can be used to 556 choose a discret form of \ eqref{Eq_eiv_skew_continuous} which is consistent with the557 iso-neutral operator \ eqref{Gf_operator}. Using the slopes \eqref{Gf_slopes}555 choose a discret form of \autoref{eq:eiv_skew_continuous} which is consistent with the 556 iso-neutral operator \autoref{eq:Gf_operator}. Using the slopes \autoref{eq:Gf_slopes} 558 557 and defining $A_e$ at $T$-point($i.e.$ as $A$, the eddy diffusivity coefficient), 559 558 the resulting discret form is given by: 560 \begin{equation} \label{ Eq_eiv_skew}559 \begin{equation} \label{eq:eiv_skew} 561 560 \textbf{F}_{eiv}^T \equiv \frac{1}{4} \left( \begin{aligned} 562 561 \sum_{\substack{i_p,\,k_p}} & … … 569 568 \end{aligned} \right) 570 569 \end{equation} 571 Note that \ eqref{Eq_eiv_skew} is valid in $z$-coordinate with or without partial cells.570 Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. 572 571 In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces 573 572 must be added to $\mathbb{R}$ for the discret form to be exact. … … 575 574 Such a choice of discretisation is consistent with the iso-neutral operator as it uses the 576 575 same definition for the slopes. It also ensures the conservation of the tracer variance 577 (see Appendix \ ref{Apdx_eiv_skew}), $i.e.$ it does not include a diffusive component576 (see Appendix \autoref{apdx:eiv_skew}), $i.e.$ it does not include a diffusive component 578 577 but is a "pure" advection term. 579 578 … … 586 585 % ================================================================ 587 586 \subsection{Discrete invariants of the iso-neutral diffrusion} 588 \label{ Apdx_Gf_operator}587 \label{subsec:Gf_operator} 589 588 590 589 Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. … … 596 595 \int_D D_l^T \; T \;dv \leq 0 597 596 \end{align*} 598 The discrete form of its left hand side is obtained using \ eqref{Eq_iso_flux}597 The discrete form of its left hand side is obtained using \autoref{eq:iso_flux} 599 598 600 599 \begin{align*} … … 673 672 % 674 673 \allowdisplaybreaks 675 \intertext{Then outing in factor the triad in each of the four terms of the summation and substituting the triads by their expression given in \ eqref{Gf_triads}. It becomes: }674 \intertext{Then outing in factor the triad in each of the four terms of the summation and substituting the triads by their expression given in \autoref{eq:Gf_triads}. It becomes: } 676 675 % 677 676 &\equiv -\sum_{i,k} … … 739 738 % ================================================================ 740 739 \subsection{Discrete invariants of the skew flux formulation} 741 \label{ Apdx_eiv_skew}740 \label{subsec:eiv_skew} 742 741 743 742 … … 750 749 \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv \equiv 0 751 750 \end{align*} 752 The discrete form of its left hand side is obtained using \ eqref{Eq_eiv_skew}751 The discrete form of its left hand side is obtained using \autoref{eq:eiv_skew} 753 752 \begin{align*} 754 753 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}} \Biggl\{ \;\; -
branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex
r9393 r9407 4 4 % Iso-neutral diffusion : 5 5 % ================================================================ 6 \chapter{Iso-neutral diffusion and eddy advection using triads} 7 \label{sec:triad} 6 \chapter[Iso-Neutral Diffusion and Eddy Advection using Triads] 7 {\texorpdfstring{Iso-Neutral Diffusion and\\ Eddy Advection using Triads}{Iso-Neutral Diffusion and Eddy Advection using Triads}} 8 \label{apdx:triad} 8 9 \minitoc 9 10 \pagebreak … … 18 19 of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes. 19 20 If the namelist logical \np{ln\_traldf\_iso} is set true, 20 the filtered version of Cox's original scheme (the Standard scheme) is employed (\ S\ref{LDF_slp}).21 the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}). 21 22 In the present implementation of the Griffies scheme, 22 23 the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 23 24 24 25 Values of iso-neutral diffusivity and GM coefficient are set as 25 described in \ S\ref{LDF_coef}. Note that when GM fluxes are used,26 described in \autoref{sec:LDF_coef}. Note that when GM fluxes are used, 26 27 the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS, 27 28 even though the eddy advection is accomplished by means of the skew fluxes. … … 30 31 The options specific to the Griffies scheme include: 31 32 \begin{description}[font=\normalfont] 32 \item[\np{ln\_triad\_iso}] See \ S\ref{sec:triad:taper}. If this is set false (the default), then33 \item[\np{ln\_triad\_iso}] See \autoref{sec:taper}. If this is set false (the default), then 33 34 `iso-neutral' mixing is accomplished within the surface mixed-layer 34 35 along slopes linearly decreasing with depth from the value immediately below 35 the mixed-layer to zero (flat) at the surface (\ S\ref{sec:triad:lintaper}).36 This is the same treatment as used in the default implementation \ S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.36 the mixed-layer to zero (flat) at the surface (\autoref{sec:lintaper}). 37 This is the same treatment as used in the default implementation \autoref{subsec:LDF_slp_iso}; \autoref{fig:eiv_slp}. 37 38 Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced 38 39 to ensure no vertical buoyancy flux, giving an almost pure 39 40 horizontal diffusive tracer flux within the mixed layer. This is similar to 40 the tapering suggested by \citet{Gerdes1991}. See \ S\ref{sec:triad:Gerdes-taper}41 \item[\np{ln\_botmix\_triad}] See \ S\ref{sec:triad:iso_bdry}.41 the tapering suggested by \citet{Gerdes1991}. See \autoref{subsec:Gerdes-taper} 42 \item[\np{ln\_botmix\_triad}] See \autoref{sec:iso_bdry}. 42 43 If this is set false (the default) then the lateral diffusive fluxes 43 44 associated with triads partly masked by topography are neglected. … … 53 54 54 55 \section{Triad formulation of iso-neutral diffusion} 55 \label{sec: triad:iso}56 \label{sec:iso} 56 57 We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98}, 57 58 but formulated within the \NEMO framework, using scale factors rather than grid-sizes. … … 60 61 The iso-neutral second order tracer diffusive operator for small 61 62 angles between iso-neutral surfaces and geopotentials is given by 62 \ eqref{Eq_PE_iso_tensor}:63 \begin{subequations} \label{eq: triad:PE_iso_tensor}63 \autoref{eq:PE_iso_tensor}: 64 \begin{subequations} \label{eq:PE_iso_tensor} 64 65 \begin{equation} 65 66 D^{lT}=-\Div\vect{f}^{lT}\equiv … … 72 73 \end{equation} 73 74 \begin{equation} 74 \label{eq: triad:PE_iso_tensor:c}75 \label{eq:PE_iso_tensor:c} 75 76 \mbox{with}\quad \;\;\Re = 76 77 \begin{pmatrix} … … 92 93 % {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 93 94 % \end{array} }} \right) 94 Here \ eqref{Eq_PE_iso_slopes}95 Here \autoref{eq:PE_iso_slopes} 95 96 \begin{align*} 96 97 r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i} … … 108 109 space; we write 109 110 \begin{equation} 110 \label{eq: triad:Fijk}111 \label{eq:Fijk} 111 112 \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right). 112 113 \end{equation} … … 117 118 118 119 The off-diagonal terms of the small angle diffusion tensor 119 \ eqref{Eq_PE_iso_tensor}, \eqref{eq:triad:PE_iso_tensor:c} produce skew-fluxes along the120 \autoref{eq:PE_iso_tensor}, \autoref{eq:PE_iso_tensor:c} produce skew-fluxes along the 120 121 $i$- and $j$-directions resulting from the vertical tracer gradient: 121 122 \begin{align} 122 \label{eq: triad:i13c}123 \label{eq:i13c} 123 124 f_{13}=&+\Alt r_1\frac{1}{e_3}\frac{\partial T}{\partial k},\qquad f_{23}=+\Alt r_2\frac{1}{e_3}\frac{\partial T}{\partial k}\\ 124 125 \intertext{and in the k-direction resulting from the lateral tracer gradients} 125 \label{eq: triad:i31c}126 \label{eq:i31c} 126 127 f_{31}+f_{32}=& \Alt r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+\Alt r_2\frac{1}{e_1}\frac{\partial T}{\partial i} 127 128 \end{align} … … 130 131 component of the small angle diffusion tensor is 131 132 \begin{equation} 132 \label{eq: triad:i33c}133 \label{eq:i33c} 133 134 f_{33}=-\Alt(r_1^2 +r_2^2) \frac{1}{e_3}\frac{\partial T}{\partial k}. 134 135 \end{equation} … … 141 142 142 143 There is no natural discretization for the $i$-component of the 143 skew-flux, \ eqref{eq:triad:i13c}, as144 skew-flux, \autoref{eq:i13c}, as 144 145 although it must be evaluated at $u$-points, it involves vertical 145 146 gradients (both for the tracer and the slope $r_1$), defined at 146 $w$-points. Similarly, the vertical skew flux, \ eqref{eq:triad:i31c}, is evaluated at147 $w$-points. Similarly, the vertical skew flux, \autoref{eq:i31c}, is evaluated at 147 148 $w$-points but involves horizontal gradients defined at $u$-points. 148 149 149 150 \subsection{Standard discretization} 150 151 The straightforward approach to discretize the lateral skew flux 151 \ eqref{eq:triad:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995152 into OPA, \ eqref{Eq_tra_ldf_iso}, is to calculate a mean vertical152 \autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 153 into OPA, \autoref{eq:tra_ldf_iso}, is to calculate a mean vertical 153 154 gradient at the $u$-point from the average of the four surrounding 154 155 vertical tracer gradients, and multiply this by a mean slope at the … … 159 160 $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with 160 161 the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer 161 gradient, is then \ eqref{Eq_tra_ldf_iso}162 gradient, is then \autoref{eq:tra_ldf_iso} 162 163 \begin{equation*} 163 164 \left(F_u^{13} \right)_{i+\hhalf}^k = \Alts_{i+\hhalf}^k … … 181 182 operator to a tracer does not guarantee the decrease of its 182 183 global-average variance. To correct this, we introduced a smoothing of 183 the slopes of the iso-neutral surfaces (see \ S\ref{LDF}). This184 the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). This 184 185 technique works for $T$ and $S$ in so far as they are active tracers 185 186 ($i.e.$ they enter the computation of density), but it does not work … … 194 195 \begin{figure}[tb] \begin{center} 195 196 \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes} 196 \caption{ \protect\label{fig: triad:ISO_triad}197 \caption{ \protect\label{fig:ISO_triad} 197 198 (a) Arrangement of triads $S_i$ and tracer gradients to 198 199 give lateral tracer flux from box $i,k$ to $i+1,k$ … … 205 206 slope calculated from the lateral density gradient across the $u$-point 206 207 divided by the vertical density gradient at the same $w$-point as the 207 tracer gradient. See Fig.~\ref{fig:triad:ISO_triad}a, where the thick lines208 tracer gradient. See \autoref{fig:ISO_triad}a, where the thick lines 208 209 denote the tracer gradients, and the thin lines the corresponding 209 210 triads, with slopes $s_1, \dotsc s_4$. The total area-integrated 210 211 skew-flux from tracer cell $i,k$ to $i+1,k$ 211 212 \begin{multline} 212 \label{eq: triad:i13}213 \label{eq:i13} 213 214 \left( F_u^{13} \right)_{i+\frac{1}{2}}^k = \Alts_{i+1}^k a_1 s_1 214 215 \delta _{k+\frac{1}{2}} \left[ T^{i+1} … … 225 226 stencil, and disallows the two-point computational modes. 226 227 227 The vertical skew flux \ eqref{eq:triad:i31c} from tracer cell $i,k$ to $i,k+1$ at the228 $w$-point $i,k+\hhalf$ is constructed similarly ( Fig.~\ref{fig:triad:ISO_triad}b)228 The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at the 229 $w$-point $i,k+\hhalf$ is constructed similarly (\autoref{fig:ISO_triad}b) 229 230 by multiplying lateral tracer gradients from each of the four 230 231 surrounding $u$-points by the appropriate triad slope: 231 232 \begin{multline} 232 \label{eq: triad:i31}233 \label{eq:i31} 233 234 \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} = \Alts_i^{k+1} a_{1}' 234 235 s_{1}' \delta _{i-\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i-\frac{1}{2}}^{k+1} … … 241 242 (appearing in both the vertical and lateral gradient), and the $u$- and 242 243 $w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the 243 triad as follows (see also Fig.~\ref{fig:triad:ISO_triad}):244 \begin{equation} 245 \label{eq: triad:R}244 triad as follows (see also \autoref{fig:ISO_triad}): 245 \begin{equation} 246 \label{eq:R} 246 247 _i^k \mathbb{R}_{i_p}^{k_p} 247 248 =-\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} … … 258 259 \begin{figure}[tb] \begin{center} 259 260 \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 260 \caption{ \protect\label{fig: triad:qcells}261 \caption{ \protect\label{fig:qcells} 261 262 Triad notation for quarter cells. $T$-cells are inside 262 263 boxes, while the $i+\half,k$ $u$-cell is shaded in green and the … … 265 266 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 266 267 267 Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated ( Fig.~\ref{fig:triad:qcells}) with the quarter268 Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:qcells}) with the quarter 268 269 cell that is the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell. 269 Expressing the slopes $s_i$ and $s'_i$ in \ eqref{eq:triad:i13} and \eqref{eq:triad:i31} in this notation,270 Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 270 271 we have $e.g.$ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 271 272 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) … … 276 277 of a unique triad, and we notate these areas, similarly to the triad slopes, 277 278 as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, 278 where $e.g.$ in \ eqref{eq:triad:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,279 and in \ eqref{eq:triad:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$.279 where $e.g.$ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 280 and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 280 281 281 282 \subsection{Full triad fluxes} … … 287 288 form 288 289 \begin{equation} 289 \label{eq: triad:i11}290 \label{eq:i11} 290 291 \left( F_u^{11} \right) _{i+\frac{1}{2}} ^{k} = 291 292 - \left( \Alts_i^{k+1} a_{1} + \Alts_i^{k+1} a_{2} + \Alts_i^k … … 293 294 \frac{\delta _{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}}, 294 295 \end{equation} 295 where the areas $a_i$ are as in \ eqref{eq:triad:i13}. In this case,296 separating the total lateral flux, the sum of \ eqref{eq:triad:i13} and297 \ eqref{eq:triad:i11}, into triad components, a lateral tracer296 where the areas $a_i$ are as in \autoref{eq:i13}. In this case, 297 separating the total lateral flux, the sum of \autoref{eq:i13} and 298 \autoref{eq:i11}, into triad components, a lateral tracer 298 299 flux 299 300 \begin{equation} 300 \label{eq: triad:latflux-triad}301 \label{eq:latflux-triad} 301 302 _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) = - \Alts_i^k{ \:}_i^k{\mathbb{A}_u}_{i_p}^{k_p} 302 303 \left( … … 312 313 density flux associated with each triad separately disappears. 313 314 \begin{equation} 314 \label{eq: triad:latflux-rho}315 \label{eq:latflux-rho} 315 316 {\mathbb{F}_u}_{i_p}^{k_p} (\rho)=-\alpha _i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (S)=0 316 317 \end{equation} … … 319 320 to $i+1,k$ must also vanish since it is a sum of four such triad fluxes. 320 321 321 The squared slope $r_1^2$ in the expression \ eqref{eq:triad:i33c} for the322 The squared slope $r_1^2$ in the expression \autoref{eq:i33c} for the 322 323 $_{33}$ component is also expressed in terms of area-weighted 323 324 squared triad slopes, so the area-integrated vertical flux from tracer 324 325 cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is 325 326 \begin{equation} 326 \label{eq: triad:i33}327 \label{eq:i33} 327 328 \left( F_w^{33} \right) _i^{k+\frac{1}{2}} = 328 329 - \left( \Alts_i^{k+1} a_{1}' s_{1}'^2 … … 332 333 \end{equation} 333 334 where the areas $a'$ and slopes $s'$ are the same as in 334 \ eqref{eq:triad:i31}.335 Then, separating the total vertical flux, the sum of \ eqref{eq:triad:i31} and336 \ eqref{eq:triad:i33}, into triad components, a vertical flux335 \autoref{eq:i31}. 336 Then, separating the total vertical flux, the sum of \autoref{eq:i31} and 337 \autoref{eq:i33}, into triad components, a vertical flux 337 338 \begin{align} 338 \label{eq: triad:vertflux-triad}339 \label{eq:vertflux-triad} 339 340 _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T) 340 341 &= \Alts_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p} … … 345 346 \right) \\ 346 347 &= - \left(\left.{ }_i^k{\mathbb{A}_w}_{i_p}^{k_p}\right/{ }_i^k{\mathbb{A}_u}_{i_p}^{k_p}\right) 347 {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq: triad:vertflux-triad2}348 {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2} 348 349 \end{align} 349 350 may be associated with each triad. Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ … … 355 356 fluxes. 356 357 357 We can explicitly identify ( Fig.~\ref{fig:triad:qcells}) the triads associated with the $s_i$, $a_i$, and $s'_i$, $a'_i$ used in the definition of358 We can explicitly identify (\autoref{fig:qcells}) the triads associated with the $s_i$, $a_i$, and $s'_i$, $a'_i$ used in the definition of 358 359 the $u$-fluxes and $w$-fluxes in 359 \ eqref{eq:triad:i31}, \eqref{eq:triad:i13}, \eqref{eq:triad:i11} \eqref{eq:triad:i33} and360 Fig.~\ref{fig:triad:ISO_triad} to write out the iso-neutral fluxes at $u$- and360 \autoref{eq:i31}, \autoref{eq:i13}, \autoref{eq:i11} \autoref{eq:i33} and 361 \autoref{fig:ISO_triad} to write out the iso-neutral fluxes at $u$- and 361 362 $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces: 362 %( Fig.~\ref{Fig_ISO_triad}):363 \begin{flalign} \label{ Eq_iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv363 %(\autoref{fig:ISO_triad}): 364 \begin{flalign} \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv 364 365 \sum_{\substack{i_p,\,k_p}} 365 366 \begin{pmatrix} … … 371 372 372 373 \subsection{Ensuring the scheme does not increase tracer variance} 373 \label{s ec:triad:variance}374 \label{subsec:variance} 374 375 375 376 We now require that this operator should not increase the … … 397 398 &= -T_{i+i_p-1/2}^k{\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \quad + \quad T_{i+i_p+1/2}^k 398 399 {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\ 399 &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq: triad:dvar_iso_i}400 &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:dvar_iso_i} 400 401 \end{aligned} 401 402 \end{multline} … … 404 405 $i,k+k_p+\half$ (below) of 405 406 \begin{equation} 406 \label{eq: triad:dvar_iso_k}407 \label{eq:dvar_iso_k} 407 408 _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 408 409 \end{equation} 409 410 The total variance tendency driven by the triad is the sum of these 410 411 two. Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and 411 $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \ eqref{eq:triad:latflux-triad} and412 \ eqref{eq:triad:vertflux-triad}, it is412 $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \autoref{eq:latflux-triad} and 413 \autoref{eq:vertflux-triad}, it is 413 414 \begin{multline*} 414 415 -\Alts_i^k\left \{ … … 430 431 to be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by 431 432 \begin{equation} 432 \label{eq: triad:V-A}433 \label{eq:V-A} 433 434 _i^k\mathbb{V}_{i_p}^{k_p} 434 435 ={\;}_i^k{\mathbb{A}_u}_{i_p}^{k_p}\,{e_{1u}}_{\,i + i_p}^{\,k} … … 437 438 the variance tendency reduces to the perfect square 438 439 \begin{equation} 439 \label{eq: triad:perfect-square}440 \label{eq:perfect-square} 440 441 -\Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p} 441 442 \left( … … 445 446 \right)^2\leq 0. 446 447 \end{equation} 447 Thus, the constraint \ eqref{eq:triad:V-A} ensures that the fluxes (\ref{eq:triad:latflux-triad}, \ref{eq:triad:vertflux-triad}) associated448 Thus, the constraint \autoref{eq:V-A} ensures that the fluxes (\autoref{eq:latflux-triad}, \autoref{eq:vertflux-triad}) associated 448 449 with a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase 449 450 the net variance. Since the total fluxes are sums of such fluxes from … … 452 453 increase. 453 454 454 The expression \ eqref{eq:triad:V-A} can be interpreted as a discretization455 The expression \autoref{eq:V-A} can be interpreted as a discretization 455 456 of the global integral 456 457 \begin{equation} 457 \label{eq: triad:cts-var}458 \label{eq:cts-var} 458 459 \frac{\partial}{\partial t}\int\!\half T^2\, dV = 459 460 \int\!\mathbf{F}\cdot\nabla T\, dV, … … 480 481 cells, defined in terms of the distances between $T$, $u$,$f$ and 481 482 $w$-points. This is the natural discretization of 482 \ eqref{eq:triad:cts-var}. The \NEMO model, however, operates with scale483 \autoref{eq:cts-var}. The \NEMO model, however, operates with scale 483 484 factors instead of grid sizes, and scale factors for the quarter 484 485 cells are not defined. Instead, therefore we simply choose 485 486 \begin{equation} 486 \label{eq: triad:V-NEMO}487 \label{eq:V-NEMO} 487 488 _i^k\mathbb{V}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k, 488 489 \end{equation} … … 492 493 $i+1,k$ reduces to the classical form 493 494 \begin{equation} 494 \label{eq: triad:lat-normal}495 \label{eq:lat-normal} 495 496 -\overline\Alts_{\,i+1/2}^k\; 496 497 \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} … … 500 501 In fact if the diffusive coefficient is defined at $u$-points, so that 501 502 we employ $\Alts_{i+i_p}^k$ instead of $\Alts_i^k$ in the definitions of the 502 triad fluxes \ eqref{eq:triad:latflux-triad} and \eqref{eq:triad:vertflux-triad},503 triad fluxes \autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, 503 504 we can replace $\overline{A}_{\,i+1/2}^k$ by $A_{i+1/2}^k$ in the above. 504 505 … … 506 507 The iso-neutral fluxes at $u$- and 507 508 $w$-points are the sums of the triad fluxes that cross the $u$- and 508 $w$-faces \ eqref{Eq_iso_flux}:509 \begin{subequations}\label{eq: triad:alltriadflux}510 \begin{flalign}\label{eq: triad:vect_isoflux}509 $w$-faces \autoref{eq:iso_flux}: 510 \begin{subequations}\label{eq:alltriadflux} 511 \begin{flalign}\label{eq:vect_isoflux} 511 512 \vect{F}_{\mathrm{iso}}(T) &\equiv 512 513 \sum_{\substack{i_p,\,k_p}} … … 517 518 \end{pmatrix}, 518 519 \end{flalign} 519 where \ eqref{eq:triad:latflux-triad}:520 where \autoref{eq:latflux-triad}: 520 521 \begin{align} 521 \label{eq:triad :triadfluxu}522 \label{eq:triadfluxu} 522 523 _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - \Alts_i^k{ 523 524 \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}} … … 534 535 -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \ 535 536 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 536 \right),\label{eq:triad :triadfluxw}537 \right),\label{eq:triadfluxw} 537 538 \end{align} 538 with \ eqref{eq:triad:V-NEMO}539 with \autoref{eq:V-NEMO} 539 540 \begin{equation} 540 \label{eq: triad:V-NEMO2}541 \label{eq:V-NEMO2} 541 542 _i^k{\mathbb{V}}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k. 542 543 \end{equation} 543 544 \end{subequations} 544 545 545 The divergence of the expression \ eqref{Eq_iso_flux} for the fluxes gives the iso-neutral diffusion tendency at546 The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at 546 547 each tracer point: 547 \begin{equation} \label{eq: triad:iso_operator} D_l^T = \frac{1}{b_T}548 \begin{equation} \label{eq:iso_operator} D_l^T = \frac{1}{b_T} 548 549 \sum_{\substack{i_p,\,k_p}} \left\{ \delta_{i} \left[{_{i+1/2-i_p}^k 549 550 {\mathbb{F}_u }_{i_p}^{k_p}} \right] + \delta_{k} \left[ … … 554 555 \begin{description} 555 556 \item[$\bullet$ horizontal diffusion] The discretization of the 556 diffusion operator recovers \ eqref{eq:triad:lat-normal} the traditional five-point Laplacian in557 diffusion operator recovers \autoref{eq:lat-normal} the traditional five-point Laplacian in 557 558 the limit of flat iso-neutral direction : 558 \begin{equation} \label{eq: triad:iso_property0} D_l^T = \frac{1}{b_T} \559 \begin{equation} \label{eq:iso_property0} D_l^T = \frac{1}{b_T} \ 559 560 \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; 560 561 \overline\Alts^{\,i} \; \delta_{i+1/2}[T] \right] \qquad … … 564 565 \item[$\bullet$ implicit treatment in the vertical] Only tracer values 565 566 associated with a single water column appear in the expression 566 \ eqref{eq:triad:i33} for the $_{33}$ fluxes, vertical fluxes driven by567 \autoref{eq:i33} for the $_{33}$ fluxes, vertical fluxes driven by 567 568 vertical gradients. This is of paramount importance since it means 568 569 that a time-implicit algorithm can be used to solve the vertical … … 582 583 \item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of 583 584 locally referenced potential density is zero. See 584 \ eqref{eq:triad:latflux-rho} and \eqref{eq:triad:vertflux-triad2}.585 \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}. 585 586 586 587 \item[$\bullet$ conservation of tracer] The iso-neutral diffusion 587 588 conserves tracer content, $i.e.$ 588 \begin{equation} \label{eq: triad:iso_property1} \sum_{i,j,k} \left\{ D_l^T \589 \begin{equation} \label{eq:iso_property1} \sum_{i,j,k} \left\{ D_l^T \ 589 590 b_T \right\} = 0 590 591 \end{equation} … … 594 595 \item[$\bullet$ no increase of tracer variance] The iso-neutral diffusion 595 596 does not increase the tracer variance, $i.e.$ 596 \begin{equation} \label{eq: triad:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T597 \begin{equation} \label{eq:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T 597 598 \ b_T \right\} \leq 0 598 599 \end{equation} 599 600 The property is demonstrated in 600 \ S\ref{sec:triad:variance} above. It is a key property for a diffusion601 \autoref{subsec:variance} above. It is a key property for a diffusion 601 602 term. It means that it is also a dissipation term, $i.e.$ it 602 603 dissipates the square of the quantity on which it is applied. It … … 607 608 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion 608 609 operator is self-adjoint, $i.e.$ 609 \begin{equation} \label{eq: triad:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T610 \begin{equation} \label{eq:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T 610 611 \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 611 612 \end{equation} … … 614 615 routine. This property can be demonstrated similarly to the proof of 615 616 the `no increase of tracer variance' property. The contribution by a 616 single triad towards the left hand side of \ eqref{eq:triad:iso_property3}, can617 be found by replacing $\delta[T]$ by $\delta[S]$ in \ eqref{eq:triad:dvar_iso_i}618 and \ eqref{eq:triad:dvar_iso_k}. This results in a term similar to619 \ eqref{eq:triad:perfect-square},620 \begin{equation} 621 \label{eq: triad:TScovar}617 single triad towards the left hand side of \autoref{eq:iso_property3}, can 618 be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} 619 and \autoref{eq:dvar_iso_k}. This results in a term similar to 620 \autoref{eq:perfect-square}, 621 \begin{equation} 622 \label{eq:TScovar} 622 623 - \Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p} 623 624 \left( … … 634 635 This is symmetrical in $T $ and $S$, so exactly the same term arises 635 636 from the discretization of this triad's contribution towards the 636 RHS of \ eqref{eq:triad:iso_property3}.637 RHS of \autoref{eq:iso_property3}. 637 638 \end{description} 638 639 639 \subsection{Treatment of the triads at the boundaries}\label{sec: triad:iso_bdry}640 \subsection{Treatment of the triads at the boundaries}\label{sec:iso_bdry} 640 641 The triad slope can only be defined where both the grid boxes centred at 641 642 the end of the arms exist. Triads that would poke up 642 643 through the upper ocean surface into the atmosphere, or down into the 643 ocean floor, must be masked out. See Fig.~\ref{fig:triad:bdry_triads}. Surface layer triads644 ocean floor, must be masked out. See \autoref{fig:bdry_triads}. Surface layer triads 644 645 $\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and 645 646 $\triad{i+1}{1}{R}{-1/2}{-1/2}$ (blue) that require density to be 646 specified above the ocean surface are masked ( Fig.~\ref{fig:triad:bdry_triads}a): this ensures that lateral647 specified above the ocean surface are masked (\autoref{fig:bdry_triads}a): this ensures that lateral 647 648 tracer gradients produce no flux through the ocean surface. However, 648 649 to prevent surface noise, it is customary to retain the $_{11}$ contributions towards … … 650 651 $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$; this drives diapycnal tracer 651 652 fluxes. Similar comments apply to triads that would intersect the 652 ocean floor ( Fig.~\ref{fig:triad:bdry_triads}b). Note that both near bottom653 ocean floor (\autoref{fig:bdry_triads}b). Note that both near bottom 653 654 triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 654 655 $\triad{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the $i,k+1$ … … 665 666 \begin{figure}[h] \begin{center} 666 667 \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 667 \caption{ \protect\label{fig: triad:bdry_triads}668 \caption{ \protect\label{fig:bdry_triads} 668 669 (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer 669 670 points (black dots), and $i+1/2,1$ $u$-point (blue square). Triad … … 678 679 or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point 679 680 is masked. The associated lateral fluxes (grey-black dashed 680 line) are masked if \ np{botmix\_triad}\forcode{ = .false.}, but left681 unmasked, giving bottom mixing, if \ np{botmix\_triad}\forcode{ = .true.}}681 line) are masked if \protect\np{botmix\_triad}\forcode{ = .false.}, but left 682 unmasked, giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}} 682 683 \end{center} \end{figure} 683 684 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 684 685 685 \subsection{ Limiting of the slopes within the interior}\label{sec: triad:limit}686 As discussed in \ S\ref{LDF_slp_iso}, iso-neutral slopes relative to686 \subsection{ Limiting of the slopes within the interior}\label{sec:limit} 687 As discussed in \autoref{subsec:LDF_slp_iso}, iso-neutral slopes relative to 687 688 geopotentials must be bounded everywhere, both for consistency with the small-slope 688 689 approximation and for numerical stability \citep{Cox1987, … … 692 693 It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to 693 694 geopotentials (here the $\sigma_i$ are the slopes of the coordinate surfaces relative to 694 geopotentials) \ eqref{Eq_PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate695 geopotentials) \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate 695 696 surfaces, so we require 696 697 \begin{equation*} … … 700 701 Each individual triad slope 701 702 \begin{equation} 702 \label{eq: triad:Rtilde}703 \label{eq:Rtilde} 703 704 _i^k\tilde{\mathbb{R}}_{i_p}^{k_p} = {}_i^k\mathbb{R}_{i_p}^{k_p} + \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}} 704 705 \end{equation} … … 709 710 is always downwards, and so acts to reduce gravitational potential energy. 710 711 711 \subsection{Tapering within the surface mixed layer}\label{sec:t riad:taper}712 \subsection{Tapering within the surface mixed layer}\label{sec:taper} 712 713 Additional tapering of the iso-neutral fluxes is necessary within the 713 714 surface mixed layer. When the Griffies triads are used, we offer two 714 715 options for this. 715 716 716 \subsubsection{Linear slope tapering within the surface mixed layer}\label{sec: triad:lintaper}717 \subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:lintaper} 717 718 This is the option activated by the default choice 718 719 \np{ln\_triad\_iso}\forcode{ = .false.}. Slopes $\tilde{r}_i$ relative to 719 720 geopotentials are tapered linearly from their value immediately below the mixed layer to zero at the 720 surface, as described in option (c) of Fig.~\ref{Fig_eiv_slp}, to values721 surface, as described in option (c) of \autoref{fig:eiv_slp}, to values 721 722 \begin{subequations} 722 723 \begin{equation} 723 \label{eq: triad:rmtilde}724 \label{eq:rmtilde} 724 725 \rMLt = 725 726 -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for } z>-h, … … 728 729 adjusted to 729 730 \begin{equation} 730 \label{eq: triad:rm}731 \label{eq:rm} 731 732 \rML =\rMLt -\sigma_i \quad \text{ for } z>-h. 732 733 \end{equation} 733 734 \end{subequations} 734 735 Thus the diffusion operator within the mixed layer is given by: 735 \begin{equation} \label{eq: triad:iso_tensor_ML}736 \begin{equation} \label{eq:iso_tensor_ML} 736 737 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 737 738 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} … … 745 746 mixed-layer and in isopycnal layers immediately below, in the 746 747 thermocline. It is consistent with the way the $\tilde{r}_i$ are 747 tapered within the mixed layer (see \ S\ref{sec:triad:taperskew} below)748 tapered within the mixed layer (see \autoref{sec:taperskew} below) 748 749 so as to ensure a uniform GM eddy-induced velocity throughout the 749 750 mixed layer. However, it gives a downwards density flux and so acts so 750 751 as to reduce potential energy in the same way as does the slope 751 limiting discussed above in \ S\ref{sec:triad:limit}.752 limiting discussed above in \autoref{sec:limit}. 752 753 753 As in \ S\ref{sec:triad:limit} above, the tapering754 \ eqref{eq:triad:rmtilde} is applied separately to each triad754 As in \autoref{sec:limit} above, the tapering 755 \autoref{eq:rmtilde} is applied separately to each triad 755 756 $_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the 756 757 $_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted. For clarity, we assume 757 758 $z$-coordinates in the following; the conversion from 758 759 $\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as described 759 above by \ eqref{eq:triad:Rtilde}.760 above by \autoref{eq:Rtilde}. 760 761 \begin{enumerate} 761 762 \item Mixed-layer depth is defined so as to avoid including regions of weak 762 763 vertical stratification in the slope definition. 763 764 At each $i,j$ (simplified to $i$ in 764 Fig.~\ref{fig:triad:MLB_triad}), we define the mixed-layer by setting765 \autoref{fig:MLB_triad}), we define the mixed-layer by setting 765 766 the vertical index of the tracer point immediately below the mixed 766 767 layer, $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) … … 768 769 ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, where $i,k_{10}$ is 769 770 the tracer gridbox within which the depth reaches 10~m. See the left 770 side of Fig.~\ref{fig:triad:MLB_triad}. We use the $k_{10}$-gridbox771 side of \autoref{fig:MLB_triad}. We use the $k_{10}$-gridbox 771 772 instead of the surface gridbox to avoid problems e.g.\ with thin 772 773 daytime mixed-layers. Currently we use the same … … 784 785 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are 785 786 representative of the thermocline. The four basal triads defined in the bottom part 786 of Fig.~\ref{fig:triad:MLB_triad} are then787 of \autoref{fig:MLB_triad} are then 787 788 \begin{align} 788 789 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &= 789 {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq: triad:Rbase}790 {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq:Rbase} 790 791 \\ 791 792 \intertext{with e.g.\ the green triad} … … 797 798 so it is this depth 798 799 \begin{equation} 799 \label{eq: triad:zbase}800 \label{eq:zbase} 800 801 {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2} 801 802 \end{equation} 802 803 (one gridbox deeper than the 803 804 diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper 804 the slopes in \ eqref{eq:triad:rmtilde}.805 the slopes in \autoref{eq:rmtilde}. 805 806 \item Finally, we calculate the adjusted triads 806 807 ${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within the mixed … … 815 816 \intertext{and more generally} 816 817 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &= 817 \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.\label{eq: triad:RML}818 \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.\label{eq:RML} 818 819 \end{align} 819 820 \end{enumerate} … … 822 823 \begin{figure}[h] 823 824 % \fcapside { 824 \caption{\protect\label{fig: triad:MLB_triad} Definition of825 \caption{\protect\label{fig:MLB_triad} Definition of 825 826 mixed-layer depth and calculation of linearly tapered 826 827 triads. The figure shows a water column at a given $i,j$ … … 846 847 847 848 \subsubsection{Additional truncation of skew iso-neutral flux components} 848 \label{s ec:triad:Gerdes-taper}849 \label{subsec:Gerdes-taper} 849 850 The alternative option is activated by setting \np{ln\_triad\_iso} = 850 851 true. This retains the same tapered slope $\rML$ described above for the … … 853 854 replaces the $\rML$ in the skew term by 854 855 \begin{equation} 855 \label{eq: triad:rm*}856 \label{eq:rm*} 856 857 \rML^*=\left.\rMLt^2\right/\tilde{r}_i-\sigma_i, 857 858 \end{equation} 858 859 giving a ML diffusive operator 859 \begin{equation} \label{eq: triad:iso_tensor_ML2}860 \begin{equation} \label{eq:iso_tensor_ML2} 860 861 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 861 862 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} … … 887 888 % Skew flux formulation for Eddy Induced Velocity : 888 889 % ================================================================ 889 \section{Eddy induced advection formulated as a skew flux}\label{sec: triad:skew-flux}890 891 \subsection{Continuous skew flux formulation}\label{sec: triad:continuous-skew-flux}890 \section{Eddy induced advection formulated as a skew flux}\label{sec:skew-flux} 891 892 \subsection{Continuous skew flux formulation}\label{sec:continuous-skew-flux} 892 893 893 894 When Gent and McWilliams's [1990] diffusion is used, … … 895 896 eddy induced velocity, the formulation of which depends on the slopes of iso- 896 897 neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used 897 here are referenced to the geopotential surfaces, $i.e.$ \ eqref{Eq_ldfslp_geo}898 is used in $z$-coordinate, and the sum \ eqref{Eq_ldfslp_geo}899 + \ eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates.898 here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo} 899 is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 900 + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 900 901 901 902 The eddy induced velocity is given by: 902 \begin{subequations} \label{eq: triad:eiv}903 \begin{equation}\label{eq: triad:eiv_v}903 \begin{subequations} \label{eq:eiv} 904 \begin{equation}\label{eq:eiv_v} 904 905 \begin{split} 905 906 u^* & = - \frac{1}{e_{3}}\; \partial_i\psi_1, \\ … … 910 911 \end{equation} 911 912 where the streamfunctions $\psi_i$ are given by 912 \begin{equation} \label{eq: triad:eiv_psi}913 \begin{equation} \label{eq:eiv_psi} 913 914 \begin{split} 914 915 \psi_1 & = A_{e} \; \tilde{r}_1, \\ … … 924 925 default implementation, where \np{ln\_traldf\_triad} is set 925 926 false. This allows us to take advantage of all the advection schemes 926 offered for the tracers (see \ S\ref{TRA_adv}) and not just a $2^{nd}$927 offered for the tracers (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ 927 928 order advection scheme. This is particularly useful for passive 928 929 tracers where \emph{positivity} of the advection scheme is of … … 962 963 and since the eddy induced velocity field is non-divergent, we end up with the skew 963 964 form of the eddy induced advective fluxes per unit area in $ijk$ space: 964 \begin{equation} \label{eq: triad:eiv_skew_ijk}965 \begin{equation} \label{eq:eiv_skew_ijk} 965 966 \textbf{F}_\mathrm{eiv}^T = \begin{pmatrix} 966 967 {+ e_{2} \, \psi_1 \; \partial_k T} \\ … … 969 970 \end{equation} 970 971 The total fluxes per unit physical area are then 971 \begin{equation}\label{eq: triad:eiv_skew_physical}972 \begin{equation}\label{eq:eiv_skew_physical} 972 973 \begin{split} 973 974 f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T \\ … … 977 978 \end{split} 978 979 \end{equation} 979 Note that Eq.~ \eqref{eq:triad:eiv_skew_physical} takes the same form whatever the980 Note that \autoref{eq:eiv_skew_physical} takes the same form whatever the 980 981 vertical coordinate, though of course the slopes 981 $\tilde{r}_i$ which define the $\psi_i$ in \ eqref{eq:triad:eiv_psi} are relative to geopotentials.982 $\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:eiv_psi} are relative to geopotentials. 982 983 The tendency associated with eddy induced velocity is then simply the convergence 983 of the fluxes (\ ref{eq:triad:eiv_skew_ijk}, \ref{eq:triad:eiv_skew_physical}), so984 \begin{equation} \label{eq: triad:skew_eiv_conv}984 of the fluxes (\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so 985 \begin{equation} \label{eq:skew_eiv_conv} 985 986 \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 } \left[ 986 987 \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right) … … 995 996 996 997 \subsection{Discrete skew flux formulation} 997 The skew fluxes in (\ ref{eq:triad:eiv_skew_physical}, \ref{eq:triad:eiv_skew_ijk}), like the off-diagonal terms998 (\ ref{eq:triad:i13c}, \ref{eq:triad:i31c}) of the small angle diffusion tensor, are best999 expressed in terms of the triad slopes, as in Fig.~\ref{fig:triad:ISO_triad}1000 and Eqs~(\ref{eq:triad:i13}, \ref{eq:triad:i31}); but now in terms of the triad slopes998 The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}), like the off-diagonal terms 999 (\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor, are best 1000 expressed in terms of the triad slopes, as in \autoref{fig:ISO_triad} 1001 and (\autoref{eq:i13}, \autoref{eq:i31}); but now in terms of the triad slopes 1001 1002 $\tilde{\mathbb{R}}$ relative to geopotentials instead of the 1002 1003 $\mathbb{R}$ relative to coordinate surfaces. The discrete form of 1003 \ eqref{eq:triad:eiv_skew_ijk} using the slopes \eqref{eq:triad:R} and1004 \autoref{eq:eiv_skew_ijk} using the slopes \autoref{eq:R} and 1004 1005 defining $A_e$ at $T$-points is then given by: 1005 1006 1006 1007 1007 \begin{subequations}\label{eq: triad:allskewflux}1008 \begin{flalign}\label{eq: triad:vect_skew_flux}1008 \begin{subequations}\label{eq:allskewflux} 1009 \begin{flalign}\label{eq:vect_skew_flux} 1009 1010 \vect{F}_{\mathrm{eiv}}(T) &\equiv 1010 1011 \sum_{\substack{i_p,\,k_p}} … … 1016 1017 \end{flalign} 1017 1018 where the skew flux in the $i$-direction associated with a given 1018 triad is (\ ref{eq:triad:latflux-triad}, \ref{eq:triad:triadfluxu}):1019 triad is (\autoref{eq:latflux-triad}, \autoref{eq:triadfluxu}): 1019 1020 \begin{align} 1020 \label{eq: triad:skewfluxu}1021 \label{eq:skewfluxu} 1021 1022 _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \quarter {A_e}_i^k{ 1022 1023 \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} … … 1024 1025 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, 1025 1026 \\ 1026 \intertext{and \ eqref{eq:triad:triadfluxw} in the $k$-direction, changing the sign1027 to be consistent with \ eqref{eq:triad:eiv_skew_ijk}:}1027 \intertext{and \autoref{eq:triadfluxw} in the $k$-direction, changing the sign 1028 to be consistent with \autoref{eq:eiv_skew_ijk}:} 1028 1029 _i^k {\mathbb{S}_w}_{i_p}^{k_p} (T) 1029 1030 &= -\quarter {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}} 1030 {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq: triad:skewfluxw}1031 {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq:skewfluxw} 1031 1032 \end{align} 1032 1033 \end{subequations} … … 1040 1041 include a diffusive component but is a `pure' advection term. This can 1041 1042 be seen 1042 %either from Appendix \ ref{Apdx_eiv_skew} or1043 %either from Appendix \autoref{apdx:eiv_skew} or 1043 1044 by considering the 1044 1045 fluxes associated with a given triad slope 1045 1046 $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. For, following 1046 \ S\ref{sec:triad:variance} and \eqref{eq:triad:dvar_iso_i}, the1047 \autoref{subsec:variance} and \autoref{eq:dvar_iso_i}, the 1047 1048 associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ 1048 1049 drives a net rate of change of variance, summed over the two 1049 1050 $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 1050 1051 \begin{equation} 1051 \label{eq: triad:dvar_eiv_i}1052 \label{eq:dvar_eiv_i} 1052 1053 _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], 1053 1054 \end{equation} … … 1055 1056 $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 1056 1057 \begin{equation} 1057 \label{eq: triad:dvar_eiv_k}1058 \label{eq:dvar_eiv_k} 1058 1059 _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 1059 1060 \end{equation} 1060 Inspection of the definitions (\ ref{eq:triad:skewfluxu}, \ref{eq:triad:skewfluxw})1061 shows that these two variance changes (\ ref{eq:triad:dvar_eiv_i}, \ref{eq:triad:dvar_eiv_k})1061 Inspection of the definitions (\autoref{eq:skewfluxu}, \autoref{eq:skewfluxw}) 1062 shows that these two variance changes (\autoref{eq:dvar_eiv_i}, \autoref{eq:dvar_eiv_k}) 1062 1063 sum to zero. Hence the two fluxes associated with each triad make no 1063 1064 net contribution to the variance budget. … … 1072 1073 For the change in gravitational PE driven by the $k$-flux is 1073 1074 \begin{align} 1074 \label{eq: triad:vert_densityPE}1075 \label{eq:vert_densityPE} 1075 1076 g {e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) 1076 1077 &=g {e_{3w}}_{\,i}^{\,k+k_p}\left[-\alpha _i^k {\:}_i^k … … 1078 1079 {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\ 1079 1080 \intertext{Substituting ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from 1080 \ eqref{eq:triad:skewfluxw}, gives}1081 \autoref{eq:skewfluxw}, gives} 1081 1082 % and separating out 1082 1083 % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$, … … 1090 1091 \end{align} 1091 1092 using the definition of the triad slope $\rtriad{R}$, 1092 \ eqref{eq:triad:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+1093 \autoref{eq:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+ 1093 1094 \beta_i^k\delta_{i+ i_p}[S^k]$ in terms of $-\alpha_i^k \delta_{k+ 1094 1095 k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$. … … 1096 1097 Where the coordinates slope, the $i$-flux gives a PE change 1097 1098 \begin{multline} 1098 \label{eq: triad:lat_densityPE}1099 \label{eq:lat_densityPE} 1099 1100 g \delta_{i+i_p}[z_T^k] 1100 1101 \left[ … … 1106 1107 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1107 1108 \end{multline} 1108 (using \ eqref{eq:triad:skewfluxu}) and so the total PE change1109 \ eqref{eq:triad:vert_densityPE} + \eqref{eq:triad:lat_densityPE} associated with the triad fluxes is1109 (using \autoref{eq:skewfluxu}) and so the total PE change 1110 \autoref{eq:vert_densityPE} + \autoref{eq:lat_densityPE} associated with the triad fluxes is 1110 1111 \begin{multline} 1111 \label{eq:t riad:tot_densityPE}1112 \label{eq:tot_densityPE} 1112 1113 g{e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) + 1113 1114 g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\ … … 1119 1120 \beta_i^k\delta_{k+ k_p}[S^i]<0$, this PE change is negative. 1120 1121 1121 \subsection{Treatment of the triads at the boundaries}\label{sec: triad:skew_bdry}1122 \subsection{Treatment of the triads at the boundaries}\label{sec:skew_bdry} 1122 1123 Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes 1123 1124 are masked at the boundaries in exactly the same way as are the triad 1124 1125 slopes \rtriad{R} used for the iso-neutral diffusive fluxes, as 1125 described in \ S\ref{sec:triad:iso_bdry} and1126 Fig.~\ref{fig:triad:bdry_triads}. Thus surface layer triads1126 described in \autoref{sec:iso_bdry} and 1127 \autoref{fig:bdry_triads}. Thus surface layer triads 1127 1128 $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are 1128 1129 masked, and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ … … 1132 1133 no effect on the eddy-induced skew-fluxes. 1133 1134 1134 \subsection{Limiting of the slopes within the interior}\label{sec: triad:limitskew}1135 \subsection{Limiting of the slopes within the interior}\label{sec:limitskew} 1135 1136 Presently, the iso-neutral slopes $\tilde{r}_i$ relative 1136 1137 to geopotentials are limited to be less than $1/100$, exactly as in 1137 calculating the iso-neutral diffusion, \S \ ref{sec:triad:limit}. Each1138 calculating the iso-neutral diffusion, \S \autoref{sec:limit}. Each 1138 1139 individual triad \rtriadt{R} is so limited. 1139 1140 1140 \subsection{Tapering within the surface mixed layer}\label{sec:t riad:taperskew}1141 \subsection{Tapering within the surface mixed layer}\label{sec:taperskew} 1141 1142 The slopes $\tilde{r}_i$ relative to 1142 1143 geopotentials (and thus the individual triads \rtriadt{R}) are always tapered linearly from their value immediately below the mixed layer to zero at the 1143 surface \ eqref{eq:triad:rmtilde}, as described in \S\ref{sec:triad:lintaper}. This is1144 option (c) of Fig.~\ref{Fig_eiv_slp}. This linear tapering for the1144 surface \autoref{eq:rmtilde}, as described in \autoref{sec:lintaper}. This is 1145 option (c) of \autoref{fig:eiv_slp}. This linear tapering for the 1145 1146 slopes used to calculate the eddy-induced fluxes is 1146 1147 unaffected by the value of \np{ln\_triad\_iso}. … … 1148 1149 The justification for this linear slope tapering is that, for $A_e$ 1149 1150 that is constant or varies only in the horizontal (the most commonly 1150 used options in \NEMO: see \ S\ref{LDF_coef}), it is1151 used options in \NEMO: see \autoref{sec:LDF_coef}), it is 1151 1152 equivalent to a horizontal eiv (eddy-induced velocity) that is uniform 1152 within the mixed layer \ eqref{eq:triad:eiv_v}. This ensures that the1153 within the mixed layer \autoref{eq:eiv_v}. This ensures that the 1153 1154 eiv velocities do not restratify the mixed layer \citep{Treguier1997, 1154 1155 Danabasoglu_al_2008}. Equivantly, in terms … … 1158 1159 horizontal flux convergence is relatively insignificant within the mixed-layer). 1159 1160 1160 \subsection{Streamfunction diagnostics}\label{sec: triad:sfdiag}1161 \subsection{Streamfunction diagnostics}\label{sec:sfdiag} 1161 1162 Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, diagnosed 1162 1163 mean eddy-induced velocities are output. Each time step, … … 1164 1165 $uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ 1165 1166 (integer $i$, integer +1/2 $j$, integer +1/2 $k$) points (see Table 1166 \ ref{Tab_cell}) respectively. We follow \citep{Griffies_Bk04} and1167 \autoref{tab:cell}) respectively. We follow \citep{Griffies_Bk04} and 1167 1168 calculate the streamfunction at a given $uw$-point from the 1168 1169 surrounding four triads according to: 1169 1170 \begin{equation} 1170 \label{eq: triad:sfdiagi}1171 \label{eq:sfdiagi} 1171 1172 {\psi_1}_{i+1/2}^{k+1/2}={\quarter}\sum_{\substack{i_p,\,k_p}} 1172 1173 {A_e}_{i+1/2-i_p}^{k+1/2-k_p}\:\triadd{i+1/2-i_p}{k+1/2-k_p}{R}{i_p}{k_p}. … … 1174 1175 The streamfunction $\psi_1$ is calculated similarly at $vw$ points. 1175 1176 The eddy-induced velocities are then calculated from the 1176 straightforward discretisation of \ eqref{eq:triad:eiv_v}:1177 \begin{equation}\label{eq: triad:eiv_v_discrete}1177 straightforward discretisation of \autoref{eq:eiv_v}: 1178 \begin{equation}\label{eq:eiv_v_discrete} 1178 1179 \begin{split} 1179 1180 {u^*}_{i+1/2}^{k} & = - \frac{1}{{e_{3u}}_{i}^{k}}\left({\psi_1}_{i+1/2}^{k+1/2}-{\psi_1}_{i+1/2}^{k+1/2}\right), \\ -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Apply Assimilation Increments (ASM)} 7 \label{ ASM}7 \label{chap:ASM} 8 8 9 9 Authors: D. Lea, M. Martin, K. Mogensen, A. Weaver, ... % do we keep … … 26 26 27 27 \section{Direct initialization} 28 \label{ ASM_DI}28 \label{sec:ASM_DI} 29 29 30 30 Direct initialization (DI) refers to the instantaneous correction … … 33 33 34 34 \section{Incremental analysis updates} 35 \label{ ASM_IAU}35 \label{sec:ASM_IAU} 36 36 37 37 Rather than updating the model state directly with the analysis increment, … … 83 83 \end{eqnarray} 84 84 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 85 The weights described by \ eqref{eq:F2_i} provide a85 The weights described by \autoref{eq:F2_i} provide a 86 86 smoother transition of the analysis trajectory from one assimilation cycle 87 to the next than that described by \ eqref{eq:F1_i}.87 to the next than that described by \autoref{eq:F1_i}. 88 88 89 89 %========================================================================== 90 90 % Divergence damping description %%% 91 91 \section{Divergence damping initialisation} 92 \label{ ASM_details}92 \label{sec:ASM_details} 93 93 94 94 The velocity increments may be initialized by the iterative application of … … 110 110 +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 111 111 \end{equation} 112 By the application of \ eqref{eq:asm_dmp} and \eqref{eq:asm_dmp} the divergence is filtered112 By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered 113 113 in each iteration, and the vorticity is left unchanged. In the presence of coastal boundaries 114 114 with zero velocity increments perpendicular to the coast the divergence is strongly damped. … … 125 125 126 126 \section{Implementation details} 127 \label{ ASM_details}127 \label{sec:ASM_details} 128 128 129 129 Here we show an example \ngn{namasm} namelist and the header of an example assimilation -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex
r9394 r9407 5 5 % ================================================================ 6 6 \chapter{Configurations} 7 \label{ CFG}7 \label{chap:CFG} 8 8 \minitoc 9 9 … … 15 15 % ================================================================ 16 16 \section{Introduction} 17 \label{ CFG_intro}17 \label{sec:CFG_intro} 18 18 19 19 … … 33 33 % ================================================================ 34 34 \section{C1D: 1D Water column model (\protect\key{c1d}) } 35 \label{ CFG_c1d}35 \label{sec:CFG_c1d} 36 36 37 37 $\ $\newline … … 81 81 % ================================================================ 82 82 \section{ORCA family: global ocean with tripolar grid} 83 \label{ CFG_orca}83 \label{sec:CFG_orca} 84 84 85 85 The ORCA family is a series of global ocean configurations that are run together with … … 95 95 \begin{figure}[!t] \begin{center} 96 96 \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 97 \caption{ \protect\label{ Fig_MISC_ORCA_msh}97 \caption{ \protect\label{fig:MISC_ORCA_msh} 98 98 ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\degN. 99 99 The two "north pole" are the foci of a series of embedded ellipses (blue curves) … … 108 108 % ------------------------------------------------------------------------------------------------------------- 109 109 \subsection{ORCA tripolar grid} 110 \label{ CFG_orca_grid}110 \label{subsec:CFG_orca_grid} 111 111 112 112 The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}. … … 116 116 computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere. 117 117 The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north 118 poles ( Fig.~\ref{Fig_MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in118 poles (\autoref{fig:MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in 119 119 either the mesh lines or the scale factors, or even the scale factor derivatives over the whole 120 120 ocean domain, as the mesh is not a composite mesh. … … 123 123 \includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 124 124 \includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 125 \caption { \protect\label{ Fig_MISC_ORCA_e1e2}125 \caption { \protect\label{fig:MISC_ORCA_e1e2} 126 126 \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and 127 127 \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) … … 141 141 the Gulf Stream) and keeping the smallest scale factor in the northern hemisphere larger 142 142 than the smallest one in the southern hemisphere. 143 The resulting mesh is shown in Fig.~\ref{Fig_MISC_ORCA_msh} and \ref{Fig_MISC_ORCA_e1e2}143 The resulting mesh is shown in \autoref{fig:MISC_ORCA_msh} and \autoref{fig:MISC_ORCA_e1e2} 144 144 for a half a degree grid (ORCA\_R05). 145 145 The smallest ocean scale factor is found in along Antarctica, while the ratio of anisotropy remains close to one except near the Victoria Island … … 150 150 % ------------------------------------------------------------------------------------------------------------- 151 151 \subsection{ORCA pre-defined resolution} 152 \label{ CFG_orca_resolution}152 \label{subsec:CFG_orca_resolution} 153 153 154 154 … … 156 156 horizontal resolution. The value of the resolution is given by the resolution at the Equator 157 157 expressed in degrees. Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 158 which sets the grid size and configuration name parameters. The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file (Tab. \ ref{Tab_ORCA}).158 which sets the grid size and configuration name parameters. The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file (Tab. \autoref{tab:ORCA}). 159 159 160 160 … … 175 175 \hline \hline 176 176 \end{tabular} 177 \caption{ \protect\label{ Tab_ORCA}177 \caption{ \protect\label{tab:ORCA} 178 178 Domain size of ORCA family configurations. 179 179 The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. } … … 196 196 For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, 197 197 otherwise 46 are used. In the other ORCA configurations, 31 levels are used 198 (see Tab.~\ref{Tab_orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and Fig.~\ref{Fig_zgr}).198 (see \autoref{tab:orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}). 199 199 200 200 Only the ORCA\_R2 is provided with all its input files in the \NEMO distribution. … … 204 204 205 205 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) 206 in the upper 150m (see Tab.~\ref{Tab_orca_zgr} and Fig.~\ref{Fig_zgr}).206 in the upper 150m (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 207 207 The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 208 The default forcing uses the boundary forcing from \citet{Large_Yeager_Rep04} (see \ S\ref{SBC_blk_core}),208 The default forcing uses the boundary forcing from \citet{Large_Yeager_Rep04} (see \autoref{subsec:SBC_blk_core}), 209 209 which was developed for the purpose of running global coupled ocean-ice simulations 210 210 without an interactive atmosphere. This \citet{Large_Yeager_Rep04} dataset is available … … 222 222 % ------------------------------------------------------------------------------------------------------------- 223 223 \section{GYRE family: double gyre basin } 224 \label{ CFG_gyre}224 \label{sec:CFG_gyre} 225 225 226 226 The GYRE configuration \citep{Levy_al_OM10} has been built to simulate … … 234 234 The domain geometry is a closed rectangular basin on the $\beta$-plane centred 235 235 at $\sim$ 30\degN and rotated by 45\deg, 3180~km long, 2120~km wide 236 and 4~km deep ( Fig.~\ref{Fig_MISC_strait_hand}).236 and 4~km deep (\autoref{fig:MISC_strait_hand}). 237 237 The domain is bounded by vertical walls and by a flat bottom. The configuration is 238 238 meant to represent an idealized North Atlantic or North Pacific basin. … … 257 257 Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations 258 258 pages on the NEMO web site (Using NEMO\/Configurations) . 259 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) ( Fig.~\ref{Fig_zgr}).259 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}). 260 260 261 261 The GYRE configuration is also used in benchmark test as it is very simple to increase … … 267 267 \begin{figure}[!t] \begin{center} 268 268 \includegraphics[width=1.0\textwidth]{Fig_GYRE} 269 \caption{ \protect\label{ Fig_GYRE}269 \caption{ \protect\label{fig:GYRE} 270 270 Snapshot of relative vorticity at the surface of the model domain 271 271 in GYRE R9, R27 and R54. From \citet{Levy_al_OM10}.} … … 277 277 % ------------------------------------------------------------------------------------------------------------- 278 278 \section{AMM: atlantic margin configuration} 279 \label{ MISC_config_AMM}279 \label{sec:MISC_config_AMM} 280 280 281 281 The AMM, Atlantic Margins Model, is a regional model covering the -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex
r9394 r9407 5 5 % ================================================================ 6 6 \chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 7 \label{ DIA}7 \label{chap:DIA} 8 8 \minitoc 9 9 … … 15 15 % ================================================================ 16 16 \section{Old model output (default)} 17 \label{ DIA_io_old}17 \label{sec:DIA_io_old} 18 18 19 19 The model outputs are of three types: the restart file, the output listing, … … 56 56 % ================================================================ 57 57 \section{Standard model output (IOM)} 58 \label{ DIA_iom}58 \label{sec:DIA_iom} 59 59 60 60 … … 595 595 596 596 \subsection{XML reference tables} 597 \label{ IOM_xmlref}597 \label{subsec:IOM_xmlref} 598 598 599 599 (1) Simple computation: directly define the computation when refering to the variable in the file definition. … … 998 998 \subsection{CF metadata standard compliance} 999 999 1000 Output from the XIOS-1.0 IO server is compliant with \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of the CF metadata standard. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \ ref{IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard.1000 Output from the XIOS-1.0 IO server is compliant with \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of the CF metadata standard. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 1001 1001 1002 1002 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files. … … 1007 1007 % ================================================================ 1008 1008 \section{NetCDF4 support (\protect\key{netcdf4})} 1009 \label{ DIA_iom}1009 \label{sec:DIA_iom} 1010 1010 1011 1011 Since version 3.3, support for NetCDF4 chunking and (loss-less) compression has … … 1070 1070 respectively in the mono-processor case (i.e. global domain of {\small\tt 182x149x31}). 1071 1071 An illustration of the potential space savings that NetCDF4 chunking and compression 1072 provides is given in table \ ref{Tab_NC4} which compares the results of two short1072 provides is given in table \autoref{tab:NC4} which compares the results of two short 1073 1073 runs of the ORCA2\_LIM reference configuration with a 4x2 mpi partitioning. Note 1074 1074 the variation in the compression ratio achieved which reflects chiefly the dry to wet … … 1106 1106 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\%\\ 1107 1107 \end{tabular} 1108 \caption{ \protect\label{ Tab_NC4}1108 \caption{ \protect\label{tab:NC4} 1109 1109 Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 1110 1110 \end{table} … … 1126 1126 % ------------------------------------------------------------------------------------------------------------- 1127 1127 \section{Tracer/Dynamics trends (\protect\ngn{namtrd})} 1128 \label{ DIA_trd}1128 \label{sec:DIA_trd} 1129 1129 1130 1130 %------------------------------------------namtrd---------------------------------------------------- … … 1166 1166 % ------------------------------------------------------------------------------------------------------------- 1167 1167 \section{FLO: On-Line Floats trajectories (\protect\key{floats})} 1168 \label{ FLO}1168 \label{sec:FLO} 1169 1169 %--------------------------------------------namflo------------------------------------------------------- 1170 1170 \forfile{../namelists/namflo} … … 1274 1274 % ------------------------------------------------------------------------------------------------------------- 1275 1275 \section{Harmonic analysis of tidal constituents (\protect\key{diaharm}) } 1276 \label{ DIA_diag_harm}1276 \label{sec:DIA_diag_harm} 1277 1277 1278 1278 %------------------------------------------namdia_harm---------------------------------------------------- … … 1316 1316 % ------------------------------------------------------------------------------------------------------------- 1317 1317 \section{Transports across sections (\protect\key{diadct}) } 1318 \label{ DIA_diag_dct}1318 \label{sec:DIA_diag_dct} 1319 1319 1320 1320 %------------------------------------------namdct---------------------------------------------------- … … 1467 1467 % ================================================================ 1468 1468 \section{Diagnosing the steric effect in sea surface height} 1469 \label{ DIA_steric}1469 \label{sec:DIA_steric} 1470 1470 1471 1471 … … 1500 1500 1501 1501 A non-Boussinesq fluid conserves mass. It satisfies the following relations: 1502 \begin{equation} \label{ Eq_MV_nBq}1502 \begin{equation} \label{eq:MV_nBq} 1503 1503 \begin{split} 1504 1504 \mathcal{M} &= \mathcal{V} \;\bar{\rho} \\ … … 1507 1507 \end{equation} 1508 1508 Temporal changes in total mass is obtained from the density conservation equation : 1509 \begin{equation} \label{ Eq_Co_nBq}1509 \begin{equation} \label{eq:Co_nBq} 1510 1510 \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 1511 1511 \end{equation} … … 1513 1513 exchanges with the other media of the Earth system (atmosphere, sea-ice, land). 1514 1514 Its global averaged leads to the total mass change 1515 \begin{equation} \label{ Eq_Mass_nBq}1515 \begin{equation} \label{eq:Mass_nBq} 1516 1516 \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 1517 1517 \end{equation} 1518 1518 where $\overline{\textit{emp}}=\int_S \textit{emp}\,ds$ is the net mass flux 1519 1519 through the ocean surface. 1520 Bringing \ eqref{Eq_Mass_nBq} and the time derivative of \eqref{Eq_MV_nBq}1520 Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} 1521 1521 together leads to the evolution equation of the mean sea level 1522 \begin{equation} \label{ Eq_ssh_nBq}1522 \begin{equation} \label{eq:ssh_nBq} 1523 1523 \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 1524 1524 - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 1525 1525 \end{equation} 1526 The first term in equation \ eqref{Eq_ssh_nBq} alters sea level by adding or1526 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or 1527 1527 subtracting mass from the ocean. 1528 1528 The second term arises from temporal changes in the global mean … … 1531 1531 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ 1532 1532 appears multiplied by the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations). 1533 In particular, the mass conservation equation, \ eqref{Eq_Co_nBq}, degenerates into1533 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into 1534 1534 the incompressibility equation: 1535 \begin{equation} \label{ Eq_Co_Bq}1535 \begin{equation} \label{eq:Co_Bq} 1536 1536 \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 1537 1537 \end{equation} 1538 1538 and the global average of this equation now gives the temporal change of the total volume, 1539 \begin{equation} \label{ Eq_V_Bq}1539 \begin{equation} \label{eq:V_Bq} 1540 1540 \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 1541 1541 \end{equation} … … 1553 1553 by the Boussinesq model, via the steric contribution to the sea level, $\eta_s$, a spatially 1554 1554 uniform variable, as follows: 1555 \begin{equation} \label{ Eq_M_Bq}1555 \begin{equation} \label{eq:M_Bq} 1556 1556 \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 1557 1557 \end{equation} … … 1559 1559 the ocean surface is converted into a mean change in sea level. Introducing the total density 1560 1560 anomaly, $\mathcal{D}= \int_D d_a \,dv$, where $d_a= (\rho -\rho_o ) / \rho_o$ 1561 is the density anomaly used in \NEMO (cf. \ S\ref{TRA_eos}) in \eqref{Eq_M_Bq}1561 is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) in \autoref{eq:M_Bq} 1562 1562 leads to a very simple form for the steric height: 1563 \begin{equation} \label{ Eq_steric_Bq}1563 \begin{equation} \label{eq:steric_Bq} 1564 1564 \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 1565 1565 \end{equation} … … 1581 1581 (wetting and drying of grid point is not allowed). 1582 1582 1583 Third, the discretisation of \ eqref{Eq_steric_Bq} depends on the type of free surface1583 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface 1584 1584 which is considered. In the non linear free surface case, $i.e.$ \key{vvl} defined, it is 1585 1585 given by 1586 \begin{equation} \label{ Eq_discrete_steric_Bq}1586 \begin{equation} \label{eq:discrete_steric_Bq} 1587 1587 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} } 1588 1588 { \sum_{i,\,j,\,k} e_{1t} e_{2t} e_{3t} } … … 1590 1590 whereas in the linear free surface, the volume above the \textit{z=0} surface must be explicitly taken 1591 1591 into account to better approximate the total ocean mass and thus the steric sea level: 1592 \begin{equation} \label{ Eq_discrete_steric_Bq}1592 \begin{equation} \label{eq:discrete_steric_Bq} 1593 1593 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } 1594 1594 {\sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} e_{1t}e_{2t} \eta } … … 1608 1608 In AR5 outputs, the thermosteric sea level is demanded. It is steric sea level due to 1609 1609 changes in ocean density arising just from changes in temperature. It is given by: 1610 \begin{equation} \label{ Eq_thermosteric_Bq}1610 \begin{equation} \label{eq:thermosteric_Bq} 1611 1611 \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 1612 1612 \end{equation} … … 1622 1622 % ------------------------------------------------------------------------------------------------------------- 1623 1623 \section{Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 1624 \label{ DIA_diag_others}1624 \label{sec:DIA_diag_others} 1625 1625 1626 1626 … … 1658 1658 as well as for the World Ocean. The sub-basin decomposition requires an input file 1659 1659 (\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask 1660 been deduced from the sum of the Indian and Pacific mask ( Fig~\ref{Fig_mask_subasins}).1660 been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 1661 1661 1662 1662 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1663 1663 \begin{figure}[!t] \begin{center} 1664 1664 \includegraphics[width=1.0\textwidth]{Fig_mask_subasins} 1665 \caption{ \protect\label{ Fig_mask_subasins}1665 \caption{ \protect\label{fig:mask_subasins} 1666 1666 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute 1667 1667 the heat and salt transports as well as the meridional stream-function: Atlantic basin (red), … … 1681 1681 A series of diagnostics has been added in the \mdl{diaar5}. 1682 1682 They corresponds to outputs that are required for AR5 simulations (CMIP5) 1683 (see also Section \ref{DIA_steric} for one of them).1683 (see also \autoref{sec:DIA_steric} for one of them). 1684 1684 Activating those outputs requires to define the \key{diaar5} CPP key. 1685 1685 -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex
r9394 r9407 6 6 % ================================================================ 7 7 \chapter{Diurnal SST Models (DIU)} 8 \label{ DIU}8 \label{chap:DIU} 9 9 10 10 \minitoc … … 54 54 %=============================================================== 55 55 \section{Warm layer model} 56 \label{ warm_layer_sec}56 \label{sec:warm_layer_sec} 57 57 %=============================================================== 58 58 … … 62 62 \frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p 63 63 \nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,} 64 \label{e cmwf1} \\65 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{e cmwf2}64 \label{eq:ecmwf1} \\ 65 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2} 66 66 \end{eqnarray} 67 67 where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm 68 68 layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. In 69 equation (\ ref{ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion69 equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion 70 70 coefficient of water, $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat 71 71 capacity at constant pressure of sea water, $\rho_w$ is the … … 81 81 $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is 82 82 the drag coefficient, and $\rho_a$ is the density of air. The symbol $Q$ in equation 83 (\ ref{ecmwf1}) is the instantaneous total thermal energy83 (\autoref{eq:ecmwf1}) is the instantaneous total thermal energy 84 84 flux into 85 85 the diurnal layer, $i.e.$ 86 86 \begin{equation} 87 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{e _flux_eqn}87 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{eq:e_flux_eqn} 88 88 \end{equation} 89 89 where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long 90 90 wave flux, and $Q_{\rm{sol}}$ is the solar flux absorbed 91 91 within the diurnal warm layer. For $Q_{\rm{sol}}$ the 9 term 92 representation of \citet{Gentemann_al_JGR09} is used. In equation \ ref{ecmwf1}92 representation of \citet{Gentemann_al_JGR09} is used. In equation \autoref{eq:ecmwf1} 93 93 the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, where $L_a=0.3$\footnote{This 94 94 is a global average value, more accurately $L_a$ could be computed as … … 103 103 4\zeta^2}{1+3\zeta+0.25\zeta^2} &(\zeta \ge 0) \\ 104 104 (1 - 16\zeta)^{-\frac{1}{2}} & (\zeta < 0) \mbox{,} 105 \end{array} \right. \label{ stab_func_eqn}105 \end{array} \right. \label{eq:stab_func_eqn} 106 106 \end{equation} 107 107 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of 108 (\ ref{stab_func_eqn}), and thus of (\ref{ecmwf1}),109 is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\ ref{ecmwf2})).108 (\autoref{eq:stab_func_eqn}), and thus of (\autoref{eq:ecmwf1}), 109 is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\autoref{eq:ecmwf2})). 110 110 111 The two terms on the right hand side of (\ ref{ecmwf1}) represent different processes.111 The two terms on the right hand side of (\autoref{eq:ecmwf1}) represent different processes. 112 112 The first term is simply the diabatic heating or cooling of the 113 113 diurnal warm … … 121 121 122 122 \section{Cool skin model} 123 \label{ cool_skin_sec}123 \label{sec:cool_skin_sec} 124 124 125 125 %=============================================================== … … 131 131 Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes 132 132 \begin{equation} 133 \label{ sunders_eqn}133 \label{eq:sunders_eqn} 134 134 \Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,} 135 135 \end{equation} … … 138 138 skin layer and is given by 139 139 \begin{equation} 140 \label{ sunders_thick_eqn}140 \label{eq:sunders_thick_eqn} 141 141 \delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,} 142 142 \end{equation} … … 144 144 proportionality which \citet{Saunders_JAS82} suggested varied between 5 and 10. 145 145 146 The value of $\lambda$ used in equation (\ ref{sunders_thick_eqn}) is that of146 The value of $\lambda$ used in equation (\autoref{eq:sunders_thick_eqn}) is that of 147 147 \citet{Artale_al_JGR02}, 148 148 which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other 149 149 parametrisations at both low and high wind speeds. Specifically, 150 150 \begin{equation} 151 \label{ artale_lambda_eqn}151 \label{eq:artale_lambda_eqn} 152 152 \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,} 153 153 \end{equation} … … 155 155 $\gamma$ is a dimensionless function of wind speed $u$: 156 156 \begin{equation} 157 \label{ artale_gamma_eqn}157 \label{eq:artale_gamma_eqn} 158 158 \gamma = \left\{ \begin{matrix} 159 159 0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\ -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Space Domain (DOM)} 7 \label{ DOM}7 \label{chap:DOM} 8 8 \minitoc 9 9 … … 20 20 $\ $\newline % force a new line 21 21 22 Having defined the continuous equations in Chap.~\ref{PE} and chosen a time23 discretization Chap.~\ref{STP}, we need to choose a discretization on a grid,22 Having defined the continuous equations in \autoref{chap:PE} and chosen a time 23 discretization \autoref{chap:STP}, we need to choose a discretization on a grid, 24 24 and numerical algorithms. In the present chapter, we provide a general description 25 25 of the staggered grid used in \NEMO, and other information relevant to the main … … 32 32 % ================================================================ 33 33 \section{Fundamentals of the discretisation} 34 \label{ DOM_basics}34 \label{sec:DOM_basics} 35 35 36 36 % ------------------------------------------------------------------------------------------------------------- … … 38 38 % ------------------------------------------------------------------------------------------------------------- 39 39 \subsection{Arrangement of variables} 40 \label{ DOM_cell}40 \label{subsec:DOM_cell} 41 41 42 42 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 43 43 \begin{figure}[!tb] \begin{center} 44 44 \includegraphics[width=0.90\textwidth]{Fig_cell} 45 \caption{ \protect\label{ Fig_cell}45 \caption{ \protect\label{fig:cell} 46 46 Arrangement of variables. $t$ indicates scalar points where temperature, 47 47 salinity, density, pressure and horizontal divergence are defined. ($u$,$v$,$w$) … … 56 56 space directions. The arrangement of variables is the same in all directions. 57 57 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector 58 points $(u, v, w)$ defined in the centre of each face of the cells ( Fig. \ref{Fig_cell}).58 points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:cell}). 59 59 This is the generalisation to three dimensions of the well-known ``C'' grid in 60 60 Arakawa's classification \citep{Mesinger_Arakawa_Bk76}. The relative and … … 66 66 by the transformation that gives ($\lambda$ ,$\varphi$ ,$z$) as a function of $(i,j,k)$. 67 67 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as 68 indicated on Table \ref{Tab_cell}. In all the following, subscripts $u$, $v$, $w$,68 indicated on \autoref{tab:cell}. In all the following, subscripts $u$, $v$, $w$, 69 69 $f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where the scale 70 70 factors are defined. Each scale factor is defined as the local analytical value 71 provided by \ eqref{Eq_scale_factors}. As a result, the mesh on which partial71 provided by \autoref{eq:scale_factors}. As a result, the mesh on which partial 72 72 derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, and 73 73 $\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity. … … 78 78 from their analytical expression. This preserves the symmetry of the discrete set 79 79 of equations and therefore satisfies many of the continuous properties (see 80 Appendix~\ref{Apdx_C}). A similar, related remark can be made about the domain80 \autoref{apdx:C}). A similar, related remark can be made about the domain 81 81 size: when needed, an area, volume, or the total ocean depth must be evaluated 82 as the sum of the relevant scale factors (see \ eqref{DOM_bar}) in the next section).82 as the sum of the relevant scale factors (see \autoref{eq:DOM_bar}) in the next section). 83 83 84 84 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 95 95 fw & $i+1/2$ & $j+1/2$ & $k+1/2$ \\ \hline 96 96 \end{tabular} 97 \caption{ \protect\label{ Tab_cell}97 \caption{ \protect\label{tab:cell} 98 98 Location of grid-points as a function of integer or integer and a half value of the column, 99 99 line or level. This indexing is only used for the writing of the semi-discrete equation. 100 100 In the code, the indexing uses integer values only and has a reverse direction 101 in the vertical (see \ S\ref{DOM_Num_Index})}101 in the vertical (see \autoref{subsec:DOM_Num_Index})} 102 102 \end{center} 103 103 \end{table} … … 108 108 % ------------------------------------------------------------------------------------------------------------- 109 109 \subsection{Discrete operators} 110 \label{ DOM_operators}110 \label{subsec:DOM_operators} 111 111 112 112 Given the values of a variable $q$ at adjacent points, the differencing and 113 113 averaging operators at the midpoint between them are: 114 \begin{subequations} \label{ Eq_di_mi}114 \begin{subequations} \label{eq:di_mi} 115 115 \begin{align} 116 116 \delta _i [q] &= \ \ q(i+1/2) - q(i-1/2) \\ … … 120 120 121 121 Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and 122 $k+1/2$. Following \ eqref{Eq_PE_grad} and \eqref{Eq_PE_lap}, the gradient of a122 $k+1/2$. Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a 123 123 variable $q$ defined at a $t$-point has its three components defined at $u$-, $v$- 124 124 and $w$-points while its Laplacien is defined at $t$-point. These operators have 125 125 the following discrete forms in the curvilinear $s$-coordinate system: 126 \begin{equation} \label{ Eq_DOM_grad}126 \begin{equation} \label{eq:DOM_grad} 127 127 \nabla q\equiv \frac{1}{e_{1u} } \delta _{i+1/2 } [q] \;\,\mathbf{i} 128 128 + \frac{1}{e_{2v} } \delta _{j+1/2 } [q] \;\,\mathbf{j} 129 129 + \frac{1}{e_{3w}} \delta _{k+1/2} [q] \;\,\mathbf{k} 130 130 \end{equation} 131 \begin{multline} \label{ Eq_DOM_lap}131 \begin{multline} \label{eq:DOM_lap} 132 132 \Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 133 133 \;\left( \delta_i \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right] … … 136 136 \end{multline} 137 137 138 Following \ eqref{Eq_PE_curl} and \eqref{Eq_PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$138 Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 139 139 defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, 140 140 and $f$-points, and its divergence defined at $t$-points: 141 \begin{eqnarray} \label{ Eq_DOM_curl}141 \begin{eqnarray} \label{eq:DOM_curl} 142 142 \nabla \times {\rm{\bf A}}\equiv & 143 143 \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right) &\ \mathbf{i} \\ … … 145 145 +& \frac{1}{e_{1f} \,e_{2f} } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2 \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right) &\ \mathbf{k} 146 146 \end{eqnarray} 147 \begin{eqnarray} \label{ Eq_DOM_div}147 \begin{eqnarray} \label{eq:DOM_div} 148 148 \nabla \cdot \rm{\bf A} \equiv 149 149 \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] … … 153 153 The vertical average over the whole water column denoted by an overbar becomes 154 154 for a quantity $q$ which is a masked field (i.e. equal to zero inside solid area): 155 \begin{equation} \label{ DOM_bar}155 \begin{equation} \label{eq:DOM_bar} 156 156 \bar q = \frac{1}{H} \int_{k^b}^{k^o} {q\;e_{3q} \,dk} 157 157 \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } … … 163 163 164 164 In continuous form, the following properties are satisfied: 165 \begin{equation} \label{ Eq_DOM_curl_grad}165 \begin{equation} \label{eq:DOM_curl_grad} 166 166 \nabla \times \nabla q ={\rm {\bf {0}}} 167 167 \end{equation} 168 \begin{equation} \label{ Eq_DOM_div_curl}168 \begin{equation} \label{eq:DOM_div_curl} 169 169 \nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0 170 170 \end{equation} … … 181 181 operators, $i.e.$ 182 182 \begin{align} 183 \label{ DOM_di_adj}183 \label{eq:DOM_di_adj} 184 184 \sum\limits_i { a_i \;\delta _i \left[ b \right]} 185 185 &\equiv -\sum\limits_i {\delta _{i+1/2} \left[ a \right]\;b_{i+1/2} } \\ 186 \label{ DOM_mi_adj}186 \label{eq:DOM_mi_adj} 187 187 \sum\limits_i { a_i \;\overline b^{\,i}} 188 188 & \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} } … … 192 192 $\delta_i^*=\delta_{i+1/2}$ and 193 193 ${(\overline{\,\cdot \,}^{\,i})}^*= \overline{\,\cdot\,}^{\,i+1/2}$, respectively. 194 These two properties will be used extensively in the Appendix~\ref{Apdx_C} to194 These two properties will be used extensively in the \autoref{apdx:C} to 195 195 demonstrate integral conservative properties of the discrete formulation chosen. 196 196 … … 199 199 % ------------------------------------------------------------------------------------------------------------- 200 200 \subsection{Numerical indexing} 201 \label{ DOM_Num_Index}201 \label{subsec:DOM_Num_Index} 202 202 203 203 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 204 204 \begin{figure}[!tb] \begin{center} 205 205 \includegraphics[width=0.90\textwidth]{Fig_index_hor} 206 \caption{ \protect\label{ Fig_index_hor}206 \caption{ \protect\label{fig:index_hor} 207 207 Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates 208 208 the cell in which variables contained in arrays have the same $i$- and $j$-indices} … … 211 211 212 212 The array representation used in the \textsc{Fortran} code requires an integer 213 indexing while the analytical definition of the mesh (see \ S\ref{DOM_cell}) is213 indexing while the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is 214 214 associated with the use of integer values for $t$-points and both integer and 215 215 integer and a half values for all the other points. Therefore a specific integer … … 222 222 % ----------------------------------- 223 223 \subsubsection{Horizontal indexing} 224 \label{ DOM_Num_Index_hor}225 226 The indexing in the horizontal plane has been chosen as shown in Fig.\ref{Fig_index_hor}.224 \label{subsec:DOM_Num_Index_hor} 225 226 The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}. 227 227 For an increasing $i$ index ($j$ index), the $t$-point and the eastward $u$-point 228 (northward $v$-point) have the same index (see the dashed area in Fig.\ref{Fig_index_hor}).228 (northward $v$-point) have the same index (see the dashed area in \autoref{fig:index_hor}). 229 229 A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices. 230 230 … … 233 233 % ----------------------------------- 234 234 \subsubsection{Vertical indexing} 235 \label{ DOM_Num_Index_vertical}235 \label{subsec:DOM_Num_Index_vertical} 236 236 237 237 In the vertical, the chosen indexing requires special attention since the 238 238 $k$-axis is re-orientated downward in the \textsc{Fortran} code compared 239 to the indexing used in the semi-discrete equations and given in \ S\ref{DOM_cell}.239 to the indexing used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}. 240 240 The sea surface corresponds to the $w$-level $k=1$ which is the same index 241 as $t$-level just below ( Fig.\ref{Fig_index_vert}). The last $w$-level ($k=jpk$)241 as $t$-level just below (\autoref{fig:index_vert}). The last $w$-level ($k=jpk$) 242 242 either corresponds to the ocean floor or is inside the bathymetry while the last 243 $t$-level is always inside the bathymetry ( Fig.\ref{Fig_index_vert}). Note that243 $t$-level is always inside the bathymetry (\autoref{fig:index_vert}). Note that 244 244 for an increasing $k$ index, a $w$-point and the $t$-point just below have the 245 245 same $k$ index, in opposition to what is done in the horizontal plane where 246 246 it is the $t$-point and the nearest velocity points in the direction of the horizontal 247 247 axis that have the same $i$ or $j$ index (compare the dashed area in 248 Fig.\ref{Fig_index_hor} and \ref{Fig_index_vert}). Since the scale factors are248 \autoref{fig:index_hor} and \autoref{fig:index_vert}). Since the scale factors are 249 249 chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran} 250 250 code \emph{before all the vertical derivatives} of the discrete equations given in … … 254 254 \begin{figure}[!pt] \begin{center} 255 255 \includegraphics[width=.90\textwidth]{Fig_index_vert} 256 \caption{ \protect\label{ Fig_index_vert}256 \caption{ \protect\label{fig:index_vert} 257 257 Vertical integer indexing used in the \textsc{Fortran } code. Note that 258 258 the $k$-axis is orientated downward. The dashed area indicates the cell in … … 265 265 % ----------------------------------- 266 266 \subsubsection{Domain size} 267 \label{ DOM_size}267 \label{subsec:DOM_size} 268 268 269 269 The total size of the computational domain is set by the parameters \np{jpiglo}, … … 273 273 %%% 274 274 Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when the code is 275 run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \ S\ref{LBC_mpp}).275 run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \autoref{sec:LBC_mpp}). 276 276 277 277 … … 282 282 % ================================================================ 283 283 \section{Needed fields} 284 \label{ DOM_fields}284 \label{sec:DOM_fields} 285 285 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined 286 286 by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 287 287 The grid-points are located at integer or integer and a half values of as indicated 288 in Table~\ref{Tab_cell}. The associated scale factors are defined using the289 analytical first derivative of the transformation \ eqref{Eq_scale_factors}.288 in \autoref{tab:cell}. The associated scale factors are defined using the 289 analytical first derivative of the transformation \autoref{eq:scale_factors}. 290 290 Necessary fields for configuration definition are: \\ 291 291 Geographic position : … … 316 316 % ------------------------------------------------------------------------------------------------------------- 317 317 %\subsection{List of needed fields to build DOMAIN} 318 %\label{ DOM_fields_list}318 %\label{subsec:DOM_fields_list} 319 319 320 320 … … 323 323 % ================================================================ 324 324 \section{Horizontal grid mesh (\protect\mdl{domhgr})} 325 \label{ DOM_hgr}325 \label{sec:DOM_hgr} 326 326 327 327 % ------------------------------------------------------------------------------------------------------------- … … 329 329 % ------------------------------------------------------------------------------------------------------------- 330 330 \subsection{Coordinates and scale factors} 331 \label{ DOM_hgr_coord_e}331 \label{subsec:DOM_hgr_coord_e} 332 332 333 333 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined 334 334 by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 335 335 The grid-points are located at integer or integer and a half values of as indicated 336 in Table~\ref{Tab_cell}. The associated scale factors are defined using the337 analytical first derivative of the transformation \ eqref{Eq_scale_factors}. These336 in \autoref{tab:cell}. The associated scale factors are defined using the 337 analytical first derivative of the transformation \autoref{eq:scale_factors}. These 338 338 definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, which 339 339 provide the horizontal and vertical meshes, respectively. This section deals with … … 343 343 analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a 344 344 function of $(i,j)$. The horizontal scale factors are calculated using 345 \ eqref{Eq_scale_factors}. For example, when the longitude and latitude are345 \autoref{eq:scale_factors}. For example, when the longitude and latitude are 346 346 function of a single value ($i$ and $j$, respectively) (geographical configuration 347 347 of the mesh), the horizontal mesh definition reduces to define the wanted … … 382 382 allowing the user to set arbitrary jumps in thickness between adjacent layers) 383 383 \citep{Treguier1996}. An example of the effect of such a choice is shown in 384 Fig.~\ref{Fig_zgr_e3}.384 \autoref{fig:zgr_e3}. 385 385 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 386 386 \begin{figure}[!t] \begin{center} 387 387 \includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 388 \caption{ \protect\label{ Fig_zgr_e3}388 \caption{ \protect\label{fig:zgr_e3} 389 389 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 390 390 and (b) analytically derived grid-point position and scale factors. … … 401 401 % ------------------------------------------------------------------------------------------------------------- 402 402 \subsection{Choice of horizontal grid} 403 \label{ DOM_hgr_msh_choice}403 \label{subsec:DOM_hgr_msh_choice} 404 404 405 405 … … 408 408 % ------------------------------------------------------------------------------------------------------------- 409 409 \subsection{Output grid files} 410 \label{ DOM_hgr_files}410 \label{subsec:DOM_hgr_files} 411 411 412 412 All the arrays relating to a particular ocean model configuration (grid-point … … 426 426 % ================================================================ 427 427 \section{Vertical grid (\protect\mdl{domzgr})} 428 \label{ DOM_zgr}428 \label{sec:DOM_zgr} 429 429 %-----------------------------------------nam_zgr & namdom------------------------------------------- 430 430 %\forfile{../namelists/namzgr} … … 444 444 \begin{figure}[!tb] \begin{center} 445 445 \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 446 \caption{ \protect\label{ Fig_z_zps_s_sps}446 \caption{ \protect\label{fig:z_zps_s_sps} 447 447 The ocean bottom as seen by the model: 448 448 (a) $z$-coordinate with full step, … … 451 451 (d) hybrid $s-z$ coordinate, 452 452 (e) hybrid $s-z$ coordinate with partial step, and 453 (f) same as (e) but in the non-linear free surface (\ np{ln\_linssh}\forcode{ = .false.}).453 (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). 454 454 Note that the non-linear free surface can be used with any of the 455 455 5 coordinates (a) to (e).} … … 460 460 must be done once of all at the beginning of an experiment. It is not intended as an 461 461 option which can be enabled or disabled in the middle of an experiment. Three main 462 choices are offered ( Fig.~\ref{Fig_z_zps_s_sps}a to c): $z$-coordinate with full step462 choices are offered (\autoref{fig:z_zps_s_sps}a to c): $z$-coordinate with full step 463 463 bathymetry (\np{ln\_zco}\forcode{ = .true.}), $z$-coordinate with partial step bathymetry 464 464 (\np{ln\_zps}\forcode{ = .true.}), or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). 465 465 Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate 466 ( Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used:466 (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). By default a non-linear free surface is used: 467 467 the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 468 $z(i,j,k,t)$ ( Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}),468 $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), 469 469 the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface 470 470 (in other words, the top of the ocean in not a rigid-lid). … … 513 513 % ------------------------------------------------------------------------------------------------------------- 514 514 \subsection{Meter bathymetry} 515 \label{ DOM_bathy}515 \label{subsec:DOM_bathy} 516 516 517 517 Three options are possible for defining the bathymetry, according to the … … 541 541 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 542 542 so these seas can be removed from the ocean domain. The user has the option 543 to set the bathymetry in closed seas to zero (see \ S\ref{MISC_closea}), but the543 to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), but the 544 544 code has to be adapted to the user's configuration. 545 545 … … 549 549 \subsection[$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and ref. coordinate] 550 550 {$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate} 551 \label{ DOM_zco}551 \label{subsec:DOM_zco} 552 552 553 553 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 554 554 \begin{figure}[!tb] \begin{center} 555 555 \includegraphics[width=0.90\textwidth]{Fig_zgr} 556 \caption{ \protect\label{ Fig_zgr}556 \caption{ \protect\label{fig:zgr} 557 557 Default vertical mesh for ORCA2: 30 ocean levels (L30). Vertical level functions for 558 558 (a) T-point depth and (b) the associated scale factor as computed 559 from \ eqref{DOM_zgr_ana} using \eqref{DOM_zgr_coef} in $z$-coordinate.}559 from \autoref{eq:DOM_zgr_ana} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.} 560 560 \end{center} \end{figure} 561 561 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 563 563 The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$ 564 564 and $gdepw_0$ for $t$- and $w$-points, respectively. As indicated on 565 Fig.\ref{Fig_index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the565 \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the 566 566 ocean surface. There are at most \jp{jpk}-1 $t$-points inside the ocean, the 567 567 additional $t$-point at $jk=jpk$ is below the sea floor and is not used. … … 579 579 near the ocean surface. The following function is proposed as a standard for a 580 580 $z$-coordinate (with either full or partial steps): 581 \begin{equation} \label{ DOM_zgr_ana}581 \begin{equation} \label{eq:DOM_zgr_ana} 582 582 \begin{split} 583 583 z_0 (k) &= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\ … … 588 588 expression allows us to define a nearly uniform vertical location of levels at the 589 589 ocean top and bottom with a smooth hyperbolic tangent transition in between 590 ( Fig.~\ref{Fig_zgr}).590 (\autoref{fig:zgr}). 591 591 592 592 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. 593 593 However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 594 \begin{equation} \label{ DOM_zgr_ana}594 \begin{equation} \label{eq:DOM_zgr_ana} 595 595 \begin{split} 596 596 e_3^T(k) &= z_W (k+1) - z_W (k) \\ … … 605 605 surface (bottom) layers and a depth which varies from 0 at the sea surface to a 606 606 minimum of $-5000~m$. This leads to the following conditions: 607 \begin{equation} \label{ DOM_zgr_coef}607 \begin{equation} \label{eq:DOM_zgr_coef} 608 608 \begin{split} 609 609 e_3 (1+1/2) &=10. \\ … … 616 616 With the choice of the stretching $h_{cr} =3$ and the number of levels 617 617 \jp{jpk}=$31$, the four coefficients $h_{sur}$, $h_{0}$, $h_{1}$, and $h_{th}$ in 618 \ eqref{DOM_zgr_ana} have been determined such that \eqref{DOM_zgr_coef} is618 \autoref{eq:DOM_zgr_ana} have been determined such that \autoref{eq:DOM_zgr_coef} is 619 619 satisfied, through an optimisation procedure using a bisection method. For the first 620 620 standard ORCA2 vertical grid this led to the following values: $h_{sur} =4762.96$, 621 621 $h_0 =255.58, h_1 =245.5813$, and $h_{th} =21.43336$. The resulting depths and 622 scale factors as a function of the model levels are shown in Fig.~\ref{Fig_zgr} and623 given in Table \ref{Tab_orca_zgr}. Those values correspond to the parameters622 scale factors as a function of the model levels are shown in \autoref{fig:zgr} and 623 given in \autoref{tab:orca_zgr}. Those values correspond to the parameters 624 624 \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. 625 625 … … 675 675 31 & \textbf{5250.23}& 5000.00 & \textbf{500.56} & 500.33 \\ \hline 676 676 \end{tabular} \end{center} 677 \caption{ \protect\label{ Tab_orca_zgr}677 \caption{ \protect\label{tab:orca_zgr} 678 678 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed 679 from \ eqref{DOM_zgr_ana} using the coefficients given in \eqref{DOM_zgr_coef}}679 from \autoref{eq:DOM_zgr_ana} using the coefficients given in \autoref{eq:DOM_zgr_coef}} 680 680 \end{table} 681 681 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 685 685 % ------------------------------------------------------------------------------------------------------------- 686 686 \subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})} 687 \label{ DOM_zps}687 \label{subsec:DOM_zps} 688 688 %--------------------------------------------namdom------------------------------------------------------- 689 689 \forfile{../namelists/namdom} … … 717 717 % ------------------------------------------------------------------------------------------------------------- 718 718 \subsection{$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})} 719 \label{ DOM_sco}719 \label{subsec:DOM_sco} 720 720 %------------------------------------------nam_zgr_sco--------------------------------------------------- 721 721 %\forfile{../namelists/namzgr_sco} … … 726 726 function or its derivative, respectively: 727 727 728 \begin{equation} \label{ DOM_sco_ana}728 \begin{equation} \label{eq:DOM_sco_ana} 729 729 \begin{split} 730 730 z(k) &= h(i,j) \; z_0(k) \\ … … 737 737 surface to $1$ at the ocean bottom. The depth field $h$ is not necessary the ocean 738 738 depth, since a mixed step-like and bottom-following representation of the 739 topography can be used ( Fig.~\ref{Fig_z_zps_s_sps}d-e) or an envelop bathymetry can be defined (Fig.~\ref{Fig_z_zps_s_sps}f).739 topography can be used (\autoref{fig:z_zps_s_sps}d-e) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}f). 740 740 The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects 741 741 the sea bed and becomes a pseudo z-coordinate. … … 764 764 \end{equation} 765 765 766 \begin{equation} \label{ DOM_sco_function}766 \begin{equation} \label{eq:DOM_sco_function} 767 767 \begin{split} 768 768 C(s) &= \frac{ \left[ \tanh{ \left( \theta \, (s+b) \right)} … … 784 784 \begin{figure}[!ht] \begin{center} 785 785 \includegraphics[width=1.0\textwidth]{Fig_sco_function} 786 \caption{ \protect\label{ Fig_sco_function}786 \caption{ \protect\label{fig:sco_function} 787 787 Examples of the stretching function applied to a seamount; from left to right: 788 788 surface, surface and bottom, and bottom intensified resolutions} … … 794 794 are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and 795 795 $0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom 796 increase of the vertical resolution ( Fig.~\ref{Fig_sco_function}).796 increase of the vertical resolution (\autoref{fig:sco_function}). 797 797 798 798 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows … … 807 807 The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate: 808 808 809 \begin{equation} \label{ DOM_gamma_deriv}809 \begin{equation} \label{eq:DOM_gamma_deriv} 810 810 \gamma= A\left(\sigma-\frac{1}{2}\left(\sigma^{2}+f\left(\sigma\right)\right)\right)+B\left(\sigma^{3}-f\left(\sigma\right)\right)+f\left(\sigma\right) 811 811 \end{equation} 812 812 813 813 Where: 814 \begin{equation} \label{ DOM_gamma}814 \begin{equation} \label{eq:DOM_gamma} 815 815 f\left(\sigma\right)=\left(\alpha+2\right)\sigma^{\alpha+1}-\left(\alpha+1\right)\sigma^{\alpha+2} \quad \text{ and } \quad \sigma = \frac{k}{n-1} 816 816 \end{equation} … … 821 821 and bottom depths. The bottom cell depth in this example is given as a function of water depth: 822 822 823 \begin{equation} \label{ DOM_zb}823 \begin{equation} \label{eq:DOM_zb} 824 824 Z_b= h a + b 825 825 \end{equation} … … 831 831 \includegraphics[width=1.0\textwidth]{FIG_DOM_compare_coordinates_surface} 832 832 \caption{A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines), a 50 level $Z$-coordinate (contoured surfaces) and the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. For clarity every third coordinate surface is shown.} 833 \label{fig _compare_coordinates_surface}833 \label{fig:fig_compare_coordinates_surface} 834 834 \end{figure} 835 835 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 845 845 % ------------------------------------------------------------------------------------------------------------- 846 846 \subsection{$Z^*$- or $S^*$-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.}) } 847 \label{ DOM_zgr_star}847 \label{subsec:DOM_zgr_star} 848 848 849 849 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site. … … 855 855 % ------------------------------------------------------------------------------------------------------------- 856 856 \subsection{Level bathymetry and mask} 857 \label{ DOM_msk}857 \label{subsec:DOM_msk} 858 858 859 859 Whatever the vertical coordinate used, the model offers the possibility of … … 892 892 893 893 Note that, without ice shelves cavities, masks at $t-$ and $w-$points are identical with 894 the numerical indexing used (\ S~\ref{DOM_Num_Index}). Nevertheless, $wmask$ are required894 the numerical indexing used (\autoref{subsec:DOM_Num_Index}). Nevertheless, $wmask$ are required 895 895 with oceean cavities to deal with the top boundary (ice shelf/ocean interface) 896 896 exactly in the same way as for the bottom boundary. … … 900 900 case of an east-west cyclical boundary condition, \textit{mbathy} has its last 901 901 column equal to the second one and its first column equal to the last but one 902 (and so too the mask arrays) (see \ S~\ref{LBC_jperio}).902 (and so too the mask arrays) (see \autoref{fig:LBC_jperio}). 903 903 904 904 … … 907 907 % ================================================================ 908 908 \section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} 909 \label{ DTA_tsd}909 \label{sec:DTA_tsd} 910 910 %-----------------------------------------namtsd------------------------------------------- 911 911 \forfile{../namelists/namtsd} … … 918 918 \item[\np{ln\_tsd\_init}\forcode{ = .true.}] use a T and S input files that can be given on the model grid itself or 919 919 on their native input data grid. In the latter case, the data will be interpolated on-the-fly both in the 920 horizontal and the vertical to the model grid (see \ S~\ref{SBC_iof}). The information relative to the920 horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}). The information relative to the 921 921 input files are given in the \np{sn\_tem} and \np{sn\_sal} structures. 922 922 The computation is done in the \mdl{dtatsd} module. -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex
r9394 r9407 5 5 % ================================================================ 6 6 \chapter{Ocean Dynamics (DYN)} 7 \label{ DYN}7 \label{chap:DYN} 8 8 \minitoc 9 9 … … 11 11 $\ $\newline %force an empty line 12 12 13 Using the representation described in Chapter \ref{DOM}, several semi-discrete13 Using the representation described in \autoref{chap:DOM}, several semi-discrete 14 14 space forms of the dynamical equations are available depending on the vertical 15 15 coordinate used and on the conservation properties of the vorticity term. In all … … 36 36 inputs (surface wind stress calculation using bulk formulae, estimation of mixing 37 37 coefficients) that are carried out in modules SBC, LDF and ZDF and are described 38 in Chapters \ref{SBC}, \ref{LDF} and \ref{ZDF}, respectively.38 in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 39 39 40 40 In the present chapter we also describe the diagnostic equations used to compute … … 51 51 The user has the option of extracting and outputting each tendency term from the 52 52 3D momentum equations (\key{trddyn} defined), as described in 53 Chap.\ref{MISC}. Furthermore, the tendency terms associated with the 2D53 \autoref{chap:MISC}. Furthermore, the tendency terms associated with the 2D 54 54 barotropic vorticity balance (when \key{trdvor} is defined) can be derived from the 55 55 3D terms. … … 64 64 % ================================================================ 65 65 \section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)} 66 \label{ DYN_divcur_wzv}66 \label{sec:DYN_divcur_wzv} 67 67 68 68 %-------------------------------------------------------------------------------------------------------------- … … 70 70 %-------------------------------------------------------------------------------------------------------------- 71 71 \subsection{Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 72 \label{ DYN_divcur}72 \label{subsec:DYN_divcur} 73 73 74 74 The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows: 75 \begin{equation} \label{ Eq_divcur_cur}75 \begin{equation} \label{eq:divcur_cur} 76 76 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta _{i+1/2} \left[ {e_{2v}\;v} \right] 77 77 -\delta _{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) … … 79 79 80 80 The horizontal divergence is defined at a $T$-point. It is given by: 81 \begin{equation} \label{ Eq_divcur_div}81 \begin{equation} \label{eq:divcur_div} 82 82 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 83 83 \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u} \right] … … 102 102 %-------------------------------------------------------------------------------------------------------------- 103 103 \subsection{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 104 \label{ DYN_sshwzv}104 \label{subsec:DYN_sshwzv} 105 105 106 106 The sea surface height is given by : 107 \begin{equation} \label{ Eq_dynspg_ssh}107 \begin{equation} \label{eq:dynspg_ssh} 108 108 \begin{aligned} 109 109 \frac{\partial \eta }{\partial t} … … 117 117 expressed in Kg/m$^2$/s (which is equal to mm/s), and $\rho _w$=1,035~Kg/m$^3$ 118 118 is the reference density of sea water (Boussinesq approximation). If river runoff is 119 expressed as a surface freshwater flux (see \ S\ref{SBC}) then \textit{emp} can be119 expressed as a surface freshwater flux (see \autoref{chap:SBC}) then \textit{emp} can be 120 120 written as the evaporation minus precipitation, minus the river runoff. 121 121 The sea-surface height is evaluated using exactly the same time stepping scheme 122 as the tracer equation \ eqref{Eq_tra_nxt}:122 as the tracer equation \autoref{eq:tra_nxt}: 123 123 a leapfrog scheme in combination with an Asselin time filter, $i.e.$ the velocity appearing 124 in \ eqref{Eq_dynspg_ssh} is centred in time (\textit{now} velocity).124 in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 125 125 This is of paramount importance. Replacing $T$ by the number $1$ in the tracer equation and summing 126 126 over the water column must lead to the sea surface height equation otherwise tracer content … … 129 129 The vertical velocity is computed by an upward integration of the horizontal 130 130 divergence starting at the bottom, taking into account the change of the thickness of the levels : 131 \begin{equation} \label{ Eq_wzv}131 \begin{equation} \label{eq:wzv} 132 132 \left\{ \begin{aligned} 133 133 &\left. w \right|_{k_b-1/2} \quad= 0 \qquad \text{where } k_b \text{ is the level just above the sea floor } \\ … … 141 141 of the level thicknesses, re-orientated downward. 142 142 \gmcomment{not sure of this... to be modified with the change in emp setting} 143 In the case of a linear free surface, the time derivative in \ eqref{Eq_wzv} disappears.143 In the case of a linear free surface, the time derivative in \autoref{eq:wzv} disappears. 144 144 The upper boundary condition applies at a fixed level $z=0$. The top vertical velocity 145 145 is thus equal to the divergence of the barotropic transport ($i.e.$ the first term in the 146 right-hand-side of \ eqref{Eq_dynspg_ssh}).146 right-hand-side of \autoref{eq:dynspg_ssh}). 147 147 148 148 Note also that whereas the vertical velocity has the same discrete … … 150 150 in the second case, $w$ is the velocity normal to the $s$-surfaces. 151 151 Note also that the $k$-axis is re-orientated downwards in the \textsc{fortran} code compared 152 to the indexing used in the semi-discrete equations such as \ eqref{Eq_wzv}153 (see \S\ref{DOM_Num_Index_vertical}).152 to the indexing used in the semi-discrete equations such as \autoref{eq:wzv} 153 (see \autoref{subsec:DOM_Num_Index_vertical}). 154 154 155 155 … … 158 158 % ================================================================ 159 159 \section{Coriolis and advection: vector invariant form} 160 \label{ DYN_adv_cor_vect}160 \label{sec:DYN_adv_cor_vect} 161 161 %-----------------------------------------nam_dynadv---------------------------------------------------- 162 162 \forfile{../namelists/namdyn_adv} … … 171 171 time (\textit{now} velocity). 172 172 At the lateral boundaries either free slip, no slip or partial slip boundary 173 conditions are applied following Chap.\ref{LBC}.173 conditions are applied following \autoref{chap:LBC}. 174 174 175 175 % ------------------------------------------------------------------------------------------------------------- … … 177 177 % ------------------------------------------------------------------------------------------------------------- 178 178 \subsection{Vorticity term (\protect\mdl{dynvor})} 179 \label{ DYN_vor}179 \label{subsec:DYN_vor} 180 180 %------------------------------------------nam_dynvor---------------------------------------------------- 181 181 \forfile{../namelists/namdyn_vor} … … 188 188 the relative vorticity term and horizontal kinetic energy for the planetary vorticity 189 189 term (MIX scheme) ; or conserving both the potential enstrophy of horizontally non-divergent 190 flow and horizontal kinetic energy (EEN scheme) (see Appendix~\ref{Apdx_C_vorEEN}). In the190 flow and horizontal kinetic energy (EEN scheme) (see \autoref{subsec:C_vorEEN}). In the 191 191 case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the 192 192 consistency of vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}). … … 198 198 %------------------------------------------------------------- 199 199 \subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 200 \label{ DYN_vor_ens}200 \label{subsec:DYN_vor_ens} 201 201 202 202 In the enstrophy conserving case (ENS scheme), the discrete formulation of the … … 204 204 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent 205 205 flow ($i.e.$ $\chi$=$0$), but does not conserve the total kinetic energy. It is given by: 206 \begin{equation} \label{ Eq_dynvor_ens}206 \begin{equation} \label{eq:dynvor_ens} 207 207 \left\{ 208 208 \begin{aligned} … … 219 219 %------------------------------------------------------------- 220 220 \subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 221 \label{ DYN_vor_ene}221 \label{subsec:DYN_vor_ene} 222 222 223 223 The kinetic energy conserving scheme (ENE scheme) conserves the global 224 224 kinetic energy but not the global enstrophy. It is given by: 225 \begin{equation} \label{ Eq_dynvor_ene}225 \begin{equation} \label{eq:dynvor_ene} 226 226 \left\{ \begin{aligned} 227 227 {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) … … 236 236 %------------------------------------------------------------- 237 237 \subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.}) } 238 \label{ DYN_vor_mix}238 \label{subsec:DYN_vor_mix} 239 239 240 240 For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the 241 two previous schemes is used. It consists of the ENS scheme (\ ref{Eq_dynvor_ens})242 for the relative vorticity term, and of the ENE scheme (\ ref{Eq_dynvor_ene}) applied241 two previous schemes is used. It consists of the ENS scheme (\autoref{eq:dynvor_ens}) 242 for the relative vorticity term, and of the ENE scheme (\autoref{eq:dynvor_ene}) applied 243 243 to the planetary vorticity term. 244 \begin{equation} \label{ Eq_dynvor_mix}244 \begin{equation} \label{eq:dynvor_mix} 245 245 \left\{ { \begin{aligned} 246 246 {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} … … 259 259 %------------------------------------------------------------- 260 260 \subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.}) } 261 \label{ DYN_vor_een}261 \label{subsec:DYN_vor_een} 262 262 263 263 In both the ENS and ENE schemes, it is apparent that the combination of $i$ and $j$ … … 277 277 The idea is to get rid of the double averaging by considering triad combinations of vorticity. 278 278 It is noteworthy that this solution is conceptually quite similar to the one proposed by 279 \citep{Griffies_al_JPO98} for the discretization of the iso-neutral diffusion operator (see App.\ref{Apdx_C}).279 \citep{Griffies_al_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}). 280 280 281 281 The \citet{Arakawa_Hsu_MWR90} vorticity advection scheme for a single layer is modified 282 282 for spherical coordinates as described by \citet{Arakawa_Lamb_MWR81} to obtain the EEN scheme. 283 283 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 284 \begin{equation} \label{ Eq_pot_vor}284 \begin{equation} \label{eq:pot_vor} 285 285 q = \frac{\zeta +f} {e_{3f} } 286 286 \end{equation} 287 where the relative vorticity is defined by (\ ref{Eq_divcur_cur}), the Coriolis parameter287 where the relative vorticity is defined by (\autoref{eq:divcur_cur}), the Coriolis parameter 288 288 is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 289 \begin{equation} \label{ Eq_een_e3f}289 \begin{equation} \label{eq:een_e3f} 290 290 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 291 291 \end{equation} … … 294 294 \begin{figure}[!ht] \begin{center} 295 295 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 296 \caption{ \protect\label{ Fig_DYN_een_triad}296 \caption{ \protect\label{fig:DYN_een_triad} 297 297 Triads used in the energy and enstrophy conserving scheme (een) for 298 298 $u$-component (upper panel) and $v$-component (lower panel).} … … 300 300 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 301 301 302 A key point in \ eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.302 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 303 303 It uses the sum of masked t-point vertical scale factor divided either 304 304 by the sum of the four t-point masks (\np{nn\_een\_e3f}\forcode{ = 1}), … … 312 312 Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as 313 313 the following triad combinations of the neighbouring potential vorticities defined at f-points 314 ( Fig.~\ref{Fig_DYN_een_triad}):315 \begin{equation} \label{ Q_triads}314 (\autoref{fig:DYN_een_triad}): 315 \begin{equation} \label{eq:Q_triads} 316 316 _i^j \mathbb{Q}^{i_p}_{j_p} 317 317 = \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) … … 320 320 321 321 Finally, the vorticity terms are represented as: 322 \begin{equation} \label{ Eq_dynvor_een}322 \begin{equation} \label{eq:dynvor_een} 323 323 \left\{ { 324 324 \begin{aligned} … … 333 333 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 334 334 It conserves both total energy and potential enstrophy in the limit of horizontally 335 nondivergent flow ($i.e.$ $\chi$=$0$) (see Appendix~\ref{Apdx_C_vorEEN}).335 nondivergent flow ($i.e.$ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 336 336 Applied to a realistic ocean configuration, it has been shown that it leads to a significant 337 337 reduction of the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}. … … 344 344 %-------------------------------------------------------------------------------------------------------------- 345 345 \subsection{Kinetic energy gradient term (\protect\mdl{dynkeg})} 346 \label{ DYN_keg}347 348 As demonstrated in Appendix~\ref{Apdx_C}, there is a single discrete formulation346 \label{subsec:DYN_keg} 347 348 As demonstrated in \autoref{apdx:C}, there is a single discrete formulation 349 349 of the kinetic energy gradient term that, together with the formulation chosen for 350 350 the vertical advection (see below), conserves the total kinetic energy: 351 \begin{equation} \label{ Eq_dynkeg}351 \begin{equation} \label{eq:dynkeg} 352 352 \left\{ \begin{aligned} 353 353 -\frac{1}{2 \; e_{1u} } & \ \delta _{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] \\ … … 360 360 %-------------------------------------------------------------------------------------------------------------- 361 361 \subsection{Vertical advection term (\protect\mdl{dynzad}) } 362 \label{ DYN_zad}362 \label{subsec:DYN_zad} 363 363 364 364 The discrete formulation of the vertical advection, together with the formulation 365 365 chosen for the gradient of kinetic energy (KE) term, conserves the total kinetic 366 366 energy. Indeed, the change of KE due to the vertical advection is exactly 367 balanced by the change of KE due to the gradient of KE (see Appendix~\ref{Apdx_C}).368 \begin{equation} \label{ Eq_dynzad}367 balanced by the change of KE due to the gradient of KE (see \autoref{apdx:C}). 368 \begin{equation} \label{eq:dynzad} 369 369 \left\{ \begin{aligned} 370 370 -\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} \\ … … 377 377 Note that in this case, a similar split-explicit time stepping should be used on 378 378 vertical advection of tracer to ensure a better stability, 379 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \ S\ref{TRA_adv_tvd}).379 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 380 380 381 381 … … 384 384 % ================================================================ 385 385 \section{Coriolis and advection: flux form} 386 \label{ DYN_adv_cor_flux}386 \label{sec:DYN_adv_cor_flux} 387 387 %------------------------------------------nam_dynadv---------------------------------------------------- 388 388 \forfile{../namelists/namdyn_adv} … … 394 394 appearing in their expressions is centred in time (\textit{now} velocity). At the 395 395 lateral boundaries either free slip, no slip or partial slip boundary conditions 396 are applied following Chap.\ref{LBC}.396 are applied following \autoref{chap:LBC}. 397 397 398 398 … … 401 401 %-------------------------------------------------------------------------------------------------------------- 402 402 \subsection{Coriolis plus curvature metric terms (\protect\mdl{dynvor}) } 403 \label{ DYN_cor_flux}403 \label{subsec:DYN_cor_flux} 404 404 405 405 In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis 406 406 parameter has been modified to account for the "metric" term. This altered 407 407 Coriolis parameter is thus discretised at $f$-points. It is given by: 408 \begin{multline} \label{ Eq_dyncor_metric}408 \begin{multline} \label{eq:dyncor_metric} 409 409 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ 410 410 \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta _{i+1/2} \left[ {e_{2u} } \right] … … 412 412 \end{multline} 413 413 414 Any of the (\ ref{Eq_dynvor_ens}), (\ref{Eq_dynvor_ene}) and (\ref{Eq_dynvor_een})414 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) 415 415 schemes can be used to compute the product of the Coriolis parameter and the 416 vorticity. However, the energy-conserving scheme (\ ref{Eq_dynvor_een}) has416 vorticity. However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has 417 417 exclusively been used to date. This term is evaluated using a leapfrog scheme, 418 418 $i.e.$ the velocity is centred in time (\textit{now} velocity). … … 422 422 %-------------------------------------------------------------------------------------------------------------- 423 423 \subsection{Flux form advection term (\protect\mdl{dynadv}) } 424 \label{ DYN_adv_flux}424 \label{subsec:DYN_adv_flux} 425 425 426 426 The discrete expression of the advection term is given by : 427 \begin{equation} \label{ Eq_dynadv}427 \begin{equation} \label{eq:dynadv} 428 428 \left\{ 429 429 \begin{aligned} … … 454 454 %------------------------------------------------------------- 455 455 \subsubsection{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})} 456 \label{ DYN_adv_cen2}456 \label{subsec:DYN_adv_cen2} 457 457 458 458 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the 459 459 mean of the two neighbouring points : 460 \begin{equation} \label{ Eq_dynadv_cen2}460 \begin{equation} \label{eq:dynadv_cen2} 461 461 \left\{ \begin{aligned} 462 462 u_T^{cen2} &=\overline u^{i } \quad & u_F^{cen2} &=\overline u^{j+1/2} \quad & u_{uw}^{cen2} &=\overline u^{k+1/2} \\ … … 475 475 %------------------------------------------------------------- 476 476 \subsubsection{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})} 477 \label{ DYN_adv_ubs}477 \label{subsec:DYN_adv_ubs} 478 478 479 479 The UBS advection scheme is an upstream biased third order scheme based on 480 480 an upstream-biased parabolic interpolation. For example, the evaluation of 481 481 $u_T^{ubs} $ is done as follows: 482 \begin{equation} \label{ Eq_dynadv_ubs}482 \begin{equation} \label{eq:dynadv_ubs} 483 483 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} \begin{cases} 484 484 u"_{i-1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i \geqslant 0$ } \\ … … 498 498 The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$ 499 499 order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and 500 $u_{vw}^{ubs}$ in \ eqref{Eq_dynadv_cen2} are used. UBS is diffusive and is500 $u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. UBS is diffusive and is 501 501 associated with vertical mixing of momentum. \gmcomment{ gm pursue the 502 502 sentence:Since vertical mixing of momentum is a source term of the TKE equation... } 503 503 504 For stability reasons, the first term in (\ref{Eq_dynadv_ubs}), which corresponds504 For stability reasons, the first term in (\autoref{eq:dynadv_ubs}), which corresponds 505 505 to a second order centred scheme, is evaluated using the \textit{now} velocity 506 506 (centred in time), while the second term, which is the diffusion part of the scheme, … … 510 510 Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) 511 511 schemes only differ by one coefficient. Replacing $1/6$ by $1/8$ in 512 (\ ref{Eq_dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.512 (\autoref{eq:dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 513 513 This option is not available through a namelist parameter, since the $1/6$ coefficient 514 514 is hard coded. Nevertheless it is quite easy to make the substitution in the … … 526 526 % ================================================================ 527 527 \section{Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 528 \label{ DYN_hpg}528 \label{sec:DYN_hpg} 529 529 %------------------------------------------nam_dynhpg--------------------------------------------------- 530 530 \forfile{../namelists/namdyn_hpg} … … 547 547 %-------------------------------------------------------------------------------------------------------------- 548 548 \subsection{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})} 549 \label{ DYN_hpg_zco}549 \label{subsec:DYN_hpg_zco} 550 550 551 551 The hydrostatic pressure can be obtained by integrating the hydrostatic equation … … 556 556 557 557 for $k=km$ (surface layer, $jk=1$ in the code) 558 \begin{equation} \label{ Eq_dynhpg_zco_surf}558 \begin{equation} \label{eq:dynhpg_zco_surf} 559 559 \left\{ \begin{aligned} 560 560 \left. \delta _{i+1/2} \left[ p^h \right] \right|_{k=km} … … 566 566 567 567 for $1<k<km$ (interior layer) 568 \begin{equation} \label{ Eq_dynhpg_zco}568 \begin{equation} \label{eq:dynhpg_zco} 569 569 \left\{ \begin{aligned} 570 570 \left. \delta _{i+1/2} \left[ p^h \right] \right|_{k} … … 577 577 \end{equation} 578 578 579 Note that the $1/2$ factor in (\ ref{Eq_dynhpg_zco_surf}) is adequate because of579 Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of 580 580 the definition of $e_{3w}$ as the vertical derivative of the scale factor at the surface 581 581 level ($z=0$). Note also that in case of variable volume level (\key{vvl} defined), the 582 surface pressure gradient is included in \ eqref{Eq_dynhpg_zco_surf} and \eqref{Eq_dynhpg_zco}582 surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and \autoref{eq:dynhpg_zco} 583 583 through the space and time variations of the vertical scale factor $e_{3w}$. 584 584 … … 587 587 %-------------------------------------------------------------------------------------------------------------- 588 588 \subsection{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})} 589 \label{ DYN_hpg_zps}589 \label{subsec:DYN_hpg_zps} 590 590 591 591 With partial bottom cells, tracers in horizontally adjacent cells generally live at … … 596 596 Apart from this modification, the horizontal hydrostatic pressure gradient evaluated 597 597 in the $z$-coordinate with partial step is exactly as in the pure $z$-coordinate case. 598 As explained in detail in section \ S\ref{TRA_zpshde}, the nonlinearity of pressure598 As explained in detail in section \autoref{sec:TRA_zpshde}, the nonlinearity of pressure 599 599 effects in the equation of state is such that it is better to interpolate temperature and 600 600 salinity vertically before computing the density. Horizontal gradients of temperature 601 601 and salinity are needed for the TRA modules, which is the reason why the horizontal 602 602 gradients of density at the deepest model level are computed in module \mdl{zpsdhe} 603 located in the TRA directory and described in \ S\ref{TRA_zpshde}.603 located in the TRA directory and described in \autoref{sec:TRA_zpshde}. 604 604 605 605 %-------------------------------------------------------------------------------------------------------------- … … 607 607 %-------------------------------------------------------------------------------------------------------------- 608 608 \subsection{$S$- and $Z$-$S$-coordinates} 609 \label{ DYN_hpg_sco}609 \label{subsec:DYN_hpg_sco} 610 610 611 611 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast … … 615 615 616 616 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) 617 \begin{equation} \label{ Eq_dynhpg_sco}617 \begin{equation} \label{eq:dynhpg_sco} 618 618 \left\{ \begin{aligned} 619 619 - \frac{1} {\rho_o \, e_{1u}} \; \delta _{i+1/2} \left[ p^h \right] … … 625 625 626 626 Where the first term is the pressure gradient along coordinates, computed as in 627 \ eqref{Eq_dynhpg_zco_surf} - \eqref{Eq_dynhpg_zco}, and $z_T$ is the depth of627 \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, and $z_T$ is the depth of 628 628 the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 629 629 ($e_{3w}$). … … 637 637 (\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 638 638 639 Note that expression \ eqref{Eq_dynhpg_sco} is commonly used when the variable volume formulation is639 Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is 640 640 activated (\key{vvl}) because in that case, even with a flat bottom, the coordinate surfaces are not 641 641 horizontal but follow the free surface \citep{Levier2007}. The pressure jacobian scheme … … 648 648 649 649 \subsection{Ice shelf cavity} 650 \label{ DYN_hpg_isf}650 \label{subsec:DYN_hpg_isf} 651 651 Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 652 652 the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be … … 658 658 This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\ 659 659 660 $\bullet$ The ocean load is computed using the expression \ eqref{Eq_dynhpg_sco} described in \ref{DYN_hpg_sco}.660 $\bullet$ The ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in \autoref{subsec:DYN_hpg_sco}. 661 661 662 662 %-------------------------------------------------------------------------------------------------------------- … … 664 664 %-------------------------------------------------------------------------------------------------------------- 665 665 \subsection{Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .true./.false.})} 666 \label{ DYN_hpg_imp}666 \label{subsec:DYN_hpg_imp} 667 667 668 668 The default time differencing scheme used for the horizontal pressure gradient is … … 680 680 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 681 681 682 \begin{equation} \label{ Eq_dynhpg_lf}682 \begin{equation} \label{eq:dynhpg_lf} 683 683 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 684 684 -\frac{1}{\rho _o \,e_{1u} }\delta _{i+1/2} \left[ {p_h^t } \right] … … 686 686 687 687 $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 688 \begin{equation} \label{ Eq_dynhpg_imp}688 \begin{equation} \label{eq:dynhpg_imp} 689 689 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 690 690 -\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] 691 691 \end{equation} 692 692 693 The semi-implicit time scheme \ eqref{Eq_dynhpg_imp} is made possible without693 The semi-implicit time scheme \autoref{eq:dynhpg_imp} is made possible without 694 694 significant additional computation since the density can be updated to time level 695 695 $t+\rdt$ before computing the horizontal hydrostatic pressure gradient. It can 696 696 be easily shown that the stability limit associated with the hydrostatic pressure 697 gradient doubles using \ eqref{Eq_dynhpg_imp} compared to that using the698 standard leapfrog scheme \ eqref{Eq_dynhpg_lf}. Note that \eqref{Eq_dynhpg_imp}697 gradient doubles using \autoref{eq:dynhpg_imp} compared to that using the 698 standard leapfrog scheme \autoref{eq:dynhpg_lf}. Note that \autoref{eq:dynhpg_imp} 699 699 is equivalent to applying a time filter to the pressure gradient to eliminate high 700 frequency IGWs. Obviously, when using \ eqref{Eq_dynhpg_imp}, the doubling of700 frequency IGWs. Obviously, when using \autoref{eq:dynhpg_imp}, the doubling of 701 701 the time-step is achievable only if no other factors control the time-step, such as 702 702 the stability limits associated with advection or diffusion. … … 708 708 compute the hydrostatic pressure gradient (whatever the formulation) is evaluated 709 709 as follows: 710 \begin{equation} \label{ Eq_rho_flt}710 \begin{equation} \label{eq:rho_flt} 711 711 \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 712 712 \quad \text{with} \quad … … 722 722 % ================================================================ 723 723 \section{Surface pressure gradient (\protect\mdl{dynspg})} 724 \label{ DYN_spg}724 \label{sec:DYN_spg} 725 725 %-----------------------------------------nam_dynspg---------------------------------------------------- 726 726 \forfile{../namelists/namdyn_spg} … … 730 730 731 731 Options are defined through the \ngn{namdyn\_spg} namelist variables. 732 The surface pressure gradient term is related to the representation of the free surface (\ S\ref{PE_hor_pg}).732 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 733 733 The main distinction is between the fixed volume case (linear free surface) and the variable volume case 734 (nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\ S\ref{PE_free_surface})734 (nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\autoref{subsec:PE_free_surface}) 735 735 the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case 736 (\ S\ref{PE_free_surface}).736 (\autoref{subsec:PE_free_surface}). 737 737 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 738 738 which imposes a very small time step when an explicit time stepping is used. 739 739 Two methods are proposed to allow a longer time step for the three-dimensional equations: 740 the filtered free surface, which is a modification of the continuous equations (see \ eqref{Eq_PE_flt}),740 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}), 741 741 and the split-explicit free surface described below. 742 742 The extra term introduced in the filtered method is calculated implicitly, … … 745 745 746 746 The form of the surface pressure gradient term depends on how the user wants to handle 747 the fast external gravity waves that are a solution of the analytical equation (\ S\ref{PE_hor_pg}).747 the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}). 748 748 Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx): 749 749 an explicit formulation which requires a small time step ; … … 761 761 %-------------------------------------------------------------------------------------------------------------- 762 762 \subsection{Explicit free surface (\protect\key{dynspg\_exp})} 763 \label{ DYN_spg_exp}763 \label{subsec:DYN_spg_exp} 764 764 765 765 In the explicit free surface formulation (\key{dynspg\_exp} defined), the model time step … … 767 767 The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time), 768 768 is thus simply given by : 769 \begin{equation} \label{ Eq_dynspg_exp}769 \begin{equation} \label{eq:dynspg_exp} 770 770 \left\{ \begin{aligned} 771 771 - \frac{1}{e_{1u}\,\rho_o} \; \delta _{i+1/2} \left[ \,\rho \,\eta\, \right] \\ … … 782 782 %-------------------------------------------------------------------------------------------------------------- 783 783 \subsection{Split-explicit free surface (\protect\key{dynspg\_ts})} 784 \label{ DYN_spg_ts}784 \label{subsec:DYN_spg_ts} 785 785 %------------------------------------------namsplit----------------------------------------------------------- 786 786 %\forfile{../namelists/namsplit} … … 792 792 equation and the associated barotropic velocity equations with a smaller time 793 793 step than $\rdt$, the time step used for the three dimensional prognostic 794 variables ( Fig.~\ref{Fig_DYN_dynspg_ts}).794 variables (\autoref{fig:DYN_dynspg_ts}). 795 795 The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) 796 796 is provided through the \np{nn\_baro} namelist parameter as: … … 802 802 %%% 803 803 The barotropic mode solves the following equations: 804 \begin{subequations} \label{ Eq_BT}805 \begin{equation} \label{ Eq_BT_dyn}804 \begin{subequations} \label{eq:BT} 805 \begin{equation} \label{eq:BT_dyn} 806 806 \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 807 807 -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h} … … 809 809 \end{equation} 810 810 811 \begin{equation} \label{ Eq_BT_ssh}811 \begin{equation} \label{eq:BT_ssh} 812 812 \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 813 813 \end{equation} 814 814 \end{subequations} 815 where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. The third term on the right hand side of \ eqref{Eq_BT_dyn} represents the bottom stress (see section \S\ref{ZDF_bfr}), explicitly accounted for at each barotropic iteration. Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm detailed in \citet{Shchepetkin_McWilliams_OM05}. AB3-AM4 coefficients used in \NEMO follow the second-order accurate, "multi-purpose" stability compromise as defined in \citet{Shchepetkin_McWilliams_Bk08} (see their figure 12, lower left).815 where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. The third term on the right hand side of \autoref{eq:BT_dyn} represents the bottom stress (see section \autoref{sec:ZDF_bfr}), explicitly accounted for at each barotropic iteration. Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm detailed in \citet{Shchepetkin_McWilliams_OM05}. AB3-AM4 coefficients used in \NEMO follow the second-order accurate, "multi-purpose" stability compromise as defined in \citet{Shchepetkin_McWilliams_Bk08} (see their figure 12, lower left). 816 816 817 817 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 818 818 \begin{figure}[!t] \begin{center} 819 819 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 820 \caption{ \protect\label{ Fig_DYN_dynspg_ts}820 \caption{ \protect\label{fig:DYN_dynspg_ts} 821 821 Schematic of the split-explicit time stepping scheme for the external 822 822 and internal modes. Time increases to the right. In this particular exemple, … … 827 827 The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged 828 828 transports to advect tracers. 829 a) Forward time integration: \ np{ln\_bt\_fw}\forcode{ = .true.},\np{ln\_bt\_av}\forcode{ = .true.}.830 b) Centred time integration: \ np{ln\_bt\_fw}\forcode{ = .false.},\np{ln\_bt\_av}\forcode{ = .true.}.831 c) Forward time integration with no time filtering (POM-like scheme): \ np{ln\_bt\_fw}\forcode{ = .true.},\np{ln\_bt\_av}\forcode{ = .false.}. }829 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .true.}. 830 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, \protect\np{ln\_bt\_av}\forcode{ = .true.}. 831 c) Forward time integration with no time filtering (POM-like scheme): \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 832 832 \end{center} \end{figure} 833 833 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 834 834 835 835 In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), the external mode is integrated 836 between \textit{now} and \textit{after} baroclinic time-steps ( Fig.~\ref{Fig_DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic836 between \textit{now} and \textit{after} baroclinic time-steps (\autoref{fig:DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic 837 837 quantities (\np{ln\_bt\_av}\forcode{ = .true.}). In that case, the integration is extended slightly beyond \textit{after} time step to provide time filtered quantities. 838 838 These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. … … 850 850 at \textit{now} time step. This implies to change the traditional order of computations in \NEMO: most of momentum 851 851 trends (including the barotropic mode calculation) updated first, tracers' after. This \textit{de facto} makes semi-implicit hydrostatic 852 pressure gradient (see section \ S\ref{DYN_hpg_imp}) and time splitting not compatible.852 pressure gradient (see section \autoref{subsec:DYN_hpg_imp}) and time splitting not compatible. 853 853 Advective barotropic velocities are obtained by using a secondary set of filtering weights, uniquely defined from the filter 854 854 coefficients used for the time averaging (\citet{Shchepetkin_McWilliams_OM05}). Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to obtain exact conservation. … … 872 872 scheme using the small barotropic time step $\rdt$. We have 873 873 874 \begin{equation} \label{ DYN_spg_ts_eta}874 \begin{equation} \label{eq:DYN_spg_ts_eta} 875 875 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 876 876 = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 877 877 \end{equation} 878 \begin{multline} \label{ DYN_spg_ts_u}878 \begin{multline} \label{eq:DYN_spg_ts_u} 879 879 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 880 880 = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) … … 886 886 and $U^{(b)}$ denotes the baroclinic time at which the vertically integrated forcing $\textbf{M}(\tau)$ (note that this forcing includes the surface freshwater forcing), the tracer fields, the freshwater flux $\text{EMP}_w(\tau)$, and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over a single cycle. This is also the time 887 887 that sets the barotropic time steps via 888 \begin{equation} \label{ DYN_spg_ts_t}888 \begin{equation} \label{eq:DYN_spg_ts_t} 889 889 t_n=\tau+n\rdt 890 890 \end{equation} 891 891 with $n$ an integer. The density scaled surface pressure is evaluated via 892 \begin{equation} \label{ DYN_spg_ts_ps}892 \begin{equation} \label{eq:DYN_spg_ts_ps} 893 893 p_s^{(b)}(\tau,t_{n}) = \begin{cases} 894 894 g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ … … 897 897 \end{equation} 898 898 To get started, we assume the following initial conditions 899 \begin{equation} \label{ DYN_spg_ts_eta}899 \begin{equation} \label{eq:DYN_spg_ts_eta} 900 900 \begin{split} 901 901 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} … … 905 905 \end{equation} 906 906 with 907 \begin{equation} \label{ DYN_spg_ts_etaF}907 \begin{equation} \label{eq:DYN_spg_ts_etaF} 908 908 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 909 909 \end{equation} 910 910 the time averaged surface height taken from the previous barotropic cycle. Likewise, 911 \begin{equation} \label{ DYN_spg_ts_u}911 \begin{equation} \label{eq:DYN_spg_ts_u} 912 912 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ 913 913 \\ … … 915 915 \end{equation} 916 916 with 917 \begin{equation} \label{ DYN_spg_ts_u}917 \begin{equation} \label{eq:DYN_spg_ts_u} 918 918 \overline{\textbf{U}^{(b)}(\tau)} 919 919 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) … … 922 922 923 923 Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at baroclinic time $\tau + \rdt \tau$ 924 \begin{equation} \label{ DYN_spg_ts_u}924 \begin{equation} \label{eq:DYN_spg_ts_u} 925 925 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} 926 926 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) … … 928 928 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form 929 929 930 \begin{equation} \label{ DYN_spg_ts_ssh}930 \begin{equation} \label{eq:DYN_spg_ts_ssh} 931 931 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 932 932 \end{equation} … … 935 935 936 936 In general, some form of time filter is needed to maintain integrity of the surface 937 height field due to the leap-frog splitting mode in equation \ ref{DYN_spg_ts_ssh}. We937 height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We 938 938 have tried various forms of such filtering, with the following method discussed in 939 939 \cite{Griffies_al_MWR01} chosen due to its stability and reasonably good maintenance of 940 tracer conservation properties (see Section??)941 942 \begin{equation} \label{ DYN_spg_ts_sshf}940 tracer conservation properties (see ??) 941 942 \begin{equation} \label{eq:DYN_spg_ts_sshf} 943 943 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 944 944 \end{equation} 945 945 Another approach tried was 946 946 947 \begin{equation} \label{ DYN_spg_ts_sshf2}947 \begin{equation} \label{eq:DYN_spg_ts_sshf2} 948 948 \eta^{F}(\tau-\Delta) = \eta(\tau) 949 949 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) … … 953 953 which is useful since it isolates all the time filtering aspects into the term multiplied 954 954 by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when 955 eliminating tracer and surface height time filtering (see Section ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \ref{DYN_spg_ts_sshf} was found to be more conservative, and so is recommended.955 eliminating tracer and surface height time filtering (see ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 956 956 957 957 } %%end gm comment (copy of griffies book) … … 964 964 %-------------------------------------------------------------------------------------------------------------- 965 965 \subsection{Filtered free surface (\protect\key{dynspg\_flt})} 966 \label{ DYN_spg_fltp}966 \label{subsec:DYN_spg_fltp} 967 967 968 968 The filtered formulation follows the \citet{Roullet_Madec_JGR00} implementation. 969 The extra term introduced in the equations (see \ S\ref{PE_free_surface}) is solved implicitly.970 The elliptic solvers available in the code are documented in \ S\ref{MISC}.969 The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 970 The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 971 971 972 972 %% gm %%======>>>> given here the discrete eqs provided to the solver 973 973 \gmcomment{ %%% copy from chap-model basics 974 \begin{equation} \label{ Eq_spg_flt}974 \begin{equation} \label{eq:spg_flt} 975 975 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 976 976 - g \nabla \left( \tilde{\rho} \ \eta \right) … … 980 980 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, and $\rm {\bf M}$ 981 981 represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 982 non-linear and viscous terms in \ eqref{Eq_PE_dyn}.982 non-linear and viscous terms in \autoref{eq:PE_dyn}. 983 983 } %end gmcomment 984 984 … … 990 990 % ================================================================ 991 991 \section{Lateral diffusion term and operators (\protect\mdl{dynldf})} 992 \label{ DYN_ldf}992 \label{sec:DYN_ldf} 993 993 %------------------------------------------nam_dynldf---------------------------------------------------- 994 994 \forfile{../namelists/namdyn_ldf} … … 999 999 (rotated or not) or biharmonic operators. The coefficients may be constant 1000 1000 or spatially variable; the description of the coefficients is found in the chapter 1001 on lateral physics ( Chap.\ref{LDF}). The lateral diffusion of momentum is1001 on lateral physics (\autoref{chap:LDF}). The lateral diffusion of momentum is 1002 1002 evaluated using a forward scheme, $i.e.$ the velocity appearing in its expression 1003 1003 is the \textit{before} velocity in time, except for the pure vertical component 1004 1004 that appears when a tensor of rotation is used. This latter term is solved 1005 implicitly together with the vertical diffusion term (see \ S\ref{STP})1005 implicitly together with the vertical diffusion term (see \autoref{chap:STP}) 1006 1006 1007 1007 At the lateral boundaries either free slip, no slip or partial slip boundary 1008 conditions are applied according to the user's choice (see Chap.\ref{LBC}).1008 conditions are applied according to the user's choice (see \autoref{chap:LBC}). 1009 1009 1010 1010 \gmcomment{ … … 1025 1025 \subsection[Iso-level laplacian (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})] 1026 1026 {Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})} 1027 \label{ DYN_ldf_lap}1027 \label{subsec:DYN_ldf_lap} 1028 1028 1029 1029 For lateral iso-level diffusion, the discrete operator is: 1030 \begin{equation} \label{ Eq_dynldf_lap}1030 \begin{equation} \label{eq:dynldf_lap} 1031 1031 \left\{ \begin{aligned} 1032 1032 D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta _{i+1/2} \left[ {A_T^{lm} … … 1040 1040 \end{equation} 1041 1041 1042 As explained in \ S\ref{PE_ldf}, this formulation (as the gradient of a divergence1042 As explained in \autoref{subsec:PE_ldf}, this formulation (as the gradient of a divergence 1043 1043 and curl of the vorticity) preserves symmetry and ensures a complete 1044 1044 separation between the vorticity and divergence parts of the momentum diffusion. … … 1049 1049 \subsection[Rotated laplacian (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})] 1050 1050 {Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})} 1051 \label{ DYN_ldf_iso}1051 \label{subsec:DYN_ldf_iso} 1052 1052 1053 1053 A rotation of the lateral momentum diffusion operator is needed in several cases: … … 1061 1061 constraints on the stress tensor such as symmetry. The resulting discrete 1062 1062 representation is: 1063 \begin{equation} \label{ Eq_dyn_ldf_iso}1063 \begin{equation} \label{eq:dyn_ldf_iso} 1064 1064 \begin{split} 1065 1065 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ … … 1111 1111 diffusion operator acts and the surface of computation ($z$- or $s$-surfaces). 1112 1112 The way these slopes are evaluated is given in the lateral physics chapter 1113 ( Chap.\ref{LDF}).1113 (\autoref{chap:LDF}). 1114 1114 1115 1115 %-------------------------------------------------------------------------------------------------------------- … … 1118 1118 \subsection[Iso-level bilaplacian (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})] 1119 1119 {Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})} 1120 \label{ DYN_ldf_bilap}1120 \label{subsec:DYN_ldf_bilap} 1121 1121 1122 1122 The lateral fourth order operator formulation on momentum is obtained by 1123 applying \ eqref{Eq_dynldf_lap} twice. It requires an additional assumption on1123 applying \autoref{eq:dynldf_lap} twice. It requires an additional assumption on 1124 1124 boundary conditions: the first derivative term normal to the coast depends on 1125 1125 the free or no-slip lateral boundary conditions chosen, while the third 1126 derivative terms normal to the coast are set to zero (see Chap.\ref{LBC}).1126 derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). 1127 1127 %%% 1128 1128 \gmcomment{add a remark on the the change in the position of the coefficient} … … 1133 1133 % ================================================================ 1134 1134 \section{Vertical diffusion term (\protect\mdl{dynzdf})} 1135 \label{ DYN_zdf}1135 \label{sec:DYN_zdf} 1136 1136 %----------------------------------------------namzdf------------------------------------------------------ 1137 1137 \forfile{../namelists/namzdf} … … 1145 1145 scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique 1146 1146 (\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme 1147 (\np{ln\_zdfexp}\forcode{ = .false.}) (see \ S\ref{STP}). Note that namelist variables1147 (\np{ln\_zdfexp}\forcode{ = .false.}) (see \autoref{chap:STP}). Note that namelist variables 1148 1148 \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 1149 1149 1150 1150 The formulation of the vertical subgrid scale physics is the same whatever 1151 1151 the vertical coordinate is. The vertical diffusion operators given by 1152 \ eqref{Eq_PE_zdf} take the following semi-discrete space form:1153 \begin{equation} \label{ Eq_dynzdf}1152 \autoref{eq:PE_zdf} take the following semi-discrete space form: 1153 \begin{equation} \label{eq:dynzdf} 1154 1154 \left\{ \begin{aligned} 1155 1155 D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta _k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } … … 1162 1162 where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and 1163 1163 diffusivity coefficients. The way these coefficients are evaluated 1164 depends on the vertical physics used (see \ S\ref{ZDF}).1164 depends on the vertical physics used (see \autoref{chap:ZDF}). 1165 1165 1166 1166 The surface boundary condition on momentum is the stress exerted by 1167 1167 the wind. At the surface, the momentum fluxes are prescribed as the boundary 1168 1168 condition on the vertical turbulent momentum fluxes, 1169 \begin{equation} \label{ Eq_dynzdf_sbc}1169 \begin{equation} \label{eq:dynzdf_sbc} 1170 1170 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 1171 1171 = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v } … … 1177 1177 is small (when no mixed layer scheme is used) the surface stress enters only 1178 1178 the top model level, as a body force. The surface wind stress is calculated 1179 in the surface module routines (SBC, see Chap.\ref{SBC})1179 in the surface module routines (SBC, see \autoref{chap:SBC}) 1180 1180 1181 1181 The turbulent flux of momentum at the bottom of the ocean is specified through 1182 a bottom friction parameterisation (see \ S\ref{ZDF_bfr})1182 a bottom friction parameterisation (see \autoref{sec:ZDF_bfr}) 1183 1183 1184 1184 % ================================================================ … … 1186 1186 % ================================================================ 1187 1187 \section{External forcings} 1188 \label{ DYN_forcing}1188 \label{sec:DYN_forcing} 1189 1189 1190 1190 Besides the surface and bottom stresses (see the above section) which are … … 1192 1192 may enter the dynamical equations by affecting the surface pressure gradient. 1193 1193 1194 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \ S\ref{SBC_apr}), the atmospheric pressure is taken1194 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), the atmospheric pressure is taken 1195 1195 into account when computing the surface pressure gradient. 1196 1196 1197 (2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \ S\ref{SBC_tide}),1197 (2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}), 1198 1198 the tidal potential is taken into account when computing the surface pressure gradient. 1199 1199 … … 1209 1209 % ================================================================ 1210 1210 \section{Time evolution term (\protect\mdl{dynnxt})} 1211 \label{ DYN_nxt}1211 \label{sec:DYN_nxt} 1212 1212 1213 1213 %----------------------------------------------namdom---------------------------------------------------- … … 1218 1218 The general framework for dynamics time stepping is a leap-frog scheme, 1219 1219 $i.e.$ a three level centred time scheme associated with an Asselin time filter 1220 (cf. Chap.\ref{STP}). The scheme is applied to the velocity, except when using1221 the flux form of momentum advection (cf. \ S\ref{DYN_adv_cor_flux}) in the variable1220 (cf. \autoref{chap:STP}). The scheme is applied to the velocity, except when using 1221 the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) in the variable 1222 1222 volume case (\key{vvl} defined), where it has to be applied to the thickness 1223 weighted velocity (see \ S\ref{Apdx_A_momentum})1223 weighted velocity (see \autoref{sec:A_momentum}) 1224 1224 1225 1225 $\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 1226 \begin{equation} \label{ Eq_dynnxt_vec}1226 \begin{equation} \label{eq:dynnxt_vec} 1227 1227 \left\{ \begin{aligned} 1228 1228 &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt \ \text{RHS}_u^t \\ … … 1232 1232 1233 1233 $\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 1234 \begin{equation} \label{ Eq_dynnxt_flux}1234 \begin{equation} \label{eq:dynnxt_flux} 1235 1235 \left\{ \begin{aligned} 1236 1236 &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t \\ -
branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex
r9393 r9407 5 5 % ================================================================ 6 6 \chapter{Lateral Boundary Condition (LBC)} 7 \label{ LBC}7 \label{chap:LBC} 8 8 \minitoc 9 9 … … 18 18 % ================================================================ 19 19 \section{Boundary condition at the coast (\protect\np{rn\_shlat})} 20 \label{ LBC_coast}20 \label{sec:LBC_coast} 21 21 %--------------------------------------------nam_lbc------------------------------------------------------- 22 22 \forfile{../namelists/namlbc} 23 23 %-------------------------------------------------------------------------------------------------------------- 24 24 25 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt (no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). They are handled automatically by the mask system (see \ S\ref{DOM_msk}).26 27 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computation is performed over the whole domain, i.e. we do not try to restrict the computation to ocean-only points. This choice has two motivations. Firstly, working on ocean only grid points overloads the code and harms the code readability. Secondly, and more importantly, it drastically reduces the vector portion of the computation, leading to a dramatic increase of CPU time requirement on vector computers. The current section describes how the masking affects the computation of the various terms of the equations with respect to the boundary condition at solid walls. The process of defining which areas are to be masked is described in \ S\ref{DOM_msk}.25 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt (no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 26 27 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computati