New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 11435 for NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex – NEMO

Ignore:
Timestamp:
2019-08-14T14:45:08+02:00 (5 years ago)
Author:
nicolasmartin
Message:

Various corrections on chapters

Cleaning the indexes by fixing/removing wrong entries (or appending a ? to unknown items) and
improve the classification with new index definitions for CPP keys and namelist blocks:

  • from \key{...} cmd, key_ prefix no longer precedes the index entry
  • namelist block declaration moves from \ngn{nam...} to \nam{...} (i.e. \ngn{namtra\_ldf} -> \nam{tra\_ldf}) The expected prefix nam is added to the printed word but not the index entry.

Now we have indexes with a better sorting instead of all CPP keys under 'K' and namelists blocks under 'N'.

Fix missing space issues with alias commands by adding a trailing backslash (\NEMO\, \ie\, \eg\, ...).
There is no perfect solution for this, and I prefer not using a particular package to solve it.

Review the initial LaTeX code snippet for the historic changes in chapters

Finally, for readability and future diff visualisations, please avoid writing paragraphs with continuous lines.
Break the lines around 80 to 100 characters long

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex

    r10442 r11435  
    88\label{apdx:C} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212%%%  Appendix put in gmcomment as it has not been updated for \zstar and s coordinate 
     
    3939$dv=e_1\,e_2\,e_3 \,di\,dj\,dk$  is the volume element, with only $e_3$ that depends on time. 
    4040$D$ and $S$ are the ocean domain volume and surface, respectively. 
    41 No wetting/drying is allow (\ie $\frac{\partial S}{\partial t} = 0$). 
     41No wetting/drying is allow (\ie\ $\frac{\partial S}{\partial t} = 0$). 
    4242Let $k_s$ and $k_b$ be the ocean surface and bottom, resp. 
    43 (\ie $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 
     43(\ie\ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 
    4444\begin{flalign*} 
    4545  z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k} 
     
    9999\label{sec:C.1} 
    100100 
    101 The discretization of pimitive equation in $s$-coordinate (\ie time and space varying vertical coordinate) 
    102 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy.  
     101The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate) 
     102must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 
    103103 
    104104Let us first establish those constraint in the continuous world. 
    105 The total energy (\ie kinetic plus potential energies) is conserved: 
     105The total energy (\ie\ kinetic plus potential energies) is conserved: 
    106106\begin{flalign} 
    107107  \label{eq:Tot_Energy} 
     
    109109\end{flalign} 
    110110under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations), 
    111 mass conservation, and closed domain.  
     111mass conservation, and closed domain. 
    112112 
    113113This equation can be transformed to obtain several sub-equalities. 
     
    211211\end{subequations} 
    212212 
    213 \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE.  
     213\autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 
    214214Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 
    215215\begin{flalign*} 
     
    224224  &=+  \int\limits_D g\, \rho \; w \; dv   &&&\\ 
    225225\end{flalign*} 
    226 where the last equality is obtained by noting that the brackets is exactly the expression of $w$,  
    227 the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}).  
    228   
     226where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 
     227the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 
     228 
    229229The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 
    230230\begin{flalign*} 
     
    367367% ------------------------------------------------------------------------------------------------------------- 
    368368\subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    369 \label{subsec:C_vorENE}  
     369\label{subsec:C_vorENE} 
    370370 
    371371For the ENE scheme, the two components of the vorticity term are given by: 
     
    399399        - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2}         \biggr\}  \quad  \equiv 0 
    400400    \end{array} 
    401   }       
     401  } 
    402402\end{flalign*} 
    403403In other words, the domain averaged kinetic energy does not change due to the vorticity term. 
     
    407407% ------------------------------------------------------------------------------------------------------------- 
    408408\subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    409 \label{subsec:C_vorEEN_vect}  
    410  
    411 With the EEN scheme, the vorticity terms are represented as:  
     409\label{subsec:C_vorEEN_vect} 
     410 
     411With the EEN scheme, the vorticity terms are represented as: 
    412412\begin{equation} 
    413413  \tag{\ref{eq:dynvor_een}} 
     
    420420      \end{aligned} 
    421421    } \right. 
    422 \end{equation}  
     422\end{equation} 
    423423where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    424 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
     424and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
    425425\begin{equation} 
    426426  \tag{\ref{eq:Q_triads}} 
     
    479479% ------------------------------------------------------------------------------------------------------------- 
    480480\subsubsection{Gradient of kinetic energy / Vertical advection} 
    481 \label{subsec:C_zad}  
     481\label{subsec:C_zad} 
    482482 
    483483The change of Kinetic Energy (KE) due to the vertical advection is exactly balanced by the change of KE due to the horizontal gradient of KE~: 
     
    487487  +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } 
    488488\] 
    489 Indeed, using successively \autoref{eq:DOM_di_adj} (\ie the skew symmetry property of the $\delta$ operator) 
     489Indeed, using successively \autoref{eq:DOM_di_adj} (\ie\ the skew symmetry property of the $\delta$ operator) 
    490490and the continuity equation, then \autoref{eq:DOM_di_adj} again, 
    491491then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 
    492 (\ie the symmetry property of the $\overline {\,\cdot \,}$ operator) 
     492(\ie\ the symmetry property of the $\overline {\,\cdot \,}$ operator) 
    493493applied in the horizontal and vertical directions, it becomes: 
    494494\begin{flalign*} 
     
    566566      } } \right) 
    567567\] 
    568 a formulation that requires an additional horizontal mean in contrast with the one used in NEMO. 
     568a formulation that requires an additional horizontal mean in contrast with the one used in \NEMO. 
    569569Nine velocity points have to be used instead of 3. 
    570570This is the reason why it has not been chosen. 
     
    595595  A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. 
    596596  In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences 
    597   (property \autoref{eq:DOM_curl_grad}).  
     597  (property \autoref{eq:DOM_curl_grad}). 
    598598} 
    599599 
    600600When the equation of state is linear 
    601 (\ie when an advection-diffusion equation for density can be derived from those of temperature and salinity) 
     601(\ie\ when an advection-diffusion equation for density can be derived from those of temperature and salinity) 
    602602the change of KE due to the work of pressure forces is balanced by 
    603 the change of potential energy due to buoyancy forces:  
     603the change of potential energy due to buoyancy forces: 
    604604\[ 
    605605  - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 
     
    621621  % 
    622622  \allowdisplaybreaks 
    623   \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie the skew symmetry property of 
     623  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of 
    624624    the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, 
    625625    the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, 
     
    771771% ------------------------------------------------------------------------------------------------------------- 
    772772\subsubsection{Coriolis plus ``metric'' term} 
    773 \label{subsec:C.3.3}  
     773\label{subsec:C.3.3} 
    774774 
    775775In flux from the vorticity term reduces to a Coriolis term in which 
     
    792792% ------------------------------------------------------------------------------------------------------------- 
    793793\subsubsection{Flux form advection} 
    794 \label{subsec:C.3.4}  
     794\label{subsec:C.3.4} 
    795795 
    796796The flux form operator of the momentum advection is evaluated using 
     
    811811 
    812812Let us first consider the first term of the scalar product 
    813 (\ie just the the terms associated with the i-component of the advection): 
     813(\ie\ just the the terms associated with the i-component of the advection): 
    814814\begin{flalign*} 
    815815  &  - \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv   \\ 
     
    867867When the UBS scheme is used to evaluate the flux form momentum advection, 
    868868the discrete operator does not contribute to the global budget of linear momentum (flux form). 
    869 The horizontal kinetic energy is not conserved, but forced to decay (\ie the scheme is diffusive).  
     869The horizontal kinetic energy is not conserved, but forced to decay (\ie\ the scheme is diffusive). 
    870870 
    871871% ================================================================ 
     
    879879% ------------------------------------------------------------------------------------------------------------- 
    880880\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    881 \label{subsec:C_vorENS}  
     881\label{subsec:C_vorENS} 
    882882 
    883883In the ENS scheme, the vorticity term is descretized as follows: 
     
    890890    \end{aligned} 
    891891  \right. 
    892 \end{equation}  
     892\end{equation} 
    893893 
    894894The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$, 
    895 the potential enstrophy for a horizontally non-divergent flow (\ie when $\chi$=$0$). 
     895the potential enstrophy for a horizontally non-divergent flow (\ie\ when $\chi$=$0$). 
    896896Indeed, using the symmetry or skew symmetry properties of the operators 
    897897( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}), 
     
    942942  } 
    943943\end{flalign*} 
    944 The later equality is obtain only when the flow is horizontally non-divergent, \ie $\chi$=$0$.  
     944The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$. 
    945945 
    946946% ------------------------------------------------------------------------------------------------------------- 
     
    948948% ------------------------------------------------------------------------------------------------------------- 
    949949\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    950 \label{subsec:C_vorEEN}  
    951  
    952 With the EEN scheme, the vorticity terms are represented as:  
     950\label{subsec:C_vorEEN} 
     951 
     952With the EEN scheme, the vorticity terms are represented as: 
    953953\begin{equation} 
    954954  \tag{\ref{eq:dynvor_een}} 
     
    961961      \end{aligned} 
    962962    } \right. 
    963 \end{equation}  
    964 where the indices $i_p$ and $k_p$ take the following values:  
     963\end{equation} 
     964where the indices $i_p$ and $k_p$ take the following values: 
    965965$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    966 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
     966and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
    967967\begin{equation} 
    968968  \tag{\ref{eq:Q_triads}} 
     
    971971\end{equation} 
    972972 
    973 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie $\chi=0$).  
     973This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie\ $\chi=0$). 
    974974 
    975975Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, 
     
    10231023\label{sec:C.5} 
    10241024 
    1025 All the numerical schemes used in NEMO are written such that the tracer content is conserved by 
     1025All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by 
    10261026the internal dynamics and physics (equations in flux form). 
    10271027For advection, 
    1028 only the CEN2 scheme (\ie $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 
     1028only the CEN2 scheme (\ie\ $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 
    10291029Nevertheless the other schemes ensure that the global variance decreases 
    1030 (\ie they are at least slightly diffusive). 
     1030(\ie\ they are at least slightly diffusive). 
    10311031For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator. 
    10321032There is generally no strict conservation of mass, 
    10331033as the equation of state is non linear with respect to $T$ and $S$. 
    1034 In practice, the mass is conserved to a very high accuracy.  
     1034In practice, the mass is conserved to a very high accuracy. 
    10351035% ------------------------------------------------------------------------------------------------------------- 
    10361036%       Advection Term 
     
    10561056Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point 
    10571057(whatever the interpolation is), 
    1058 the conservation of the tracer content due to the advection tendency is obtained as follows:  
     1058the conservation of the tracer content due to the advection tendency is obtained as follows: 
    10591059\begin{flalign*} 
    10601060  &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv    &&&\\ 
     
    10721072 
    10731073The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme, 
    1074 \ie when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$.  
     1074\ie\ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 
    10751075It can be demonstarted as follows: 
    10761076\begin{flalign*} 
     
    11081108the conservation of potential vorticity and the horizontal divergence, 
    11091109and the dissipation of the square of these quantities 
    1110 (\ie enstrophy and the variance of the horizontal divergence) as well as 
     1110(\ie\ enstrophy and the variance of the horizontal divergence) as well as 
    11111111the dissipation of the horizontal kinetic energy. 
    11121112In particular, when the eddy coefficients are horizontally uniform, 
    11131113it ensures a complete separation of vorticity and horizontal divergence fields, 
    11141114so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence 
    1115 (variance of the horizontal divergence) and \textit{vice versa}.  
     1115(variance of the horizontal divergence) and \textit{vice versa}. 
    11161116 
    11171117These properties of the horizontal diffusion operator are a direct consequence of 
    11181118properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 
    11191119When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, 
    1120 the term associated with the horizontal gradient of the divergence is locally zero.  
     1120the term associated with the horizontal gradient of the divergence is locally zero. 
    11211121 
    11221122% ------------------------------------------------------------------------------------------------------------- 
     
    12371237 
    12381238When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, 
    1239 the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}.  
     1239the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 
    12401240The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform. 
    12411241\begin{flalign*} 
     
    13961396    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0    &&& 
    13971397\end{flalign*} 
    1398 and the square of the horizontal divergence decreases (\ie the horizontal divergence is dissipated) if 
     1398and the square of the horizontal divergence decreases (\ie\ the horizontal divergence is dissipated) if 
    13991399the vertical diffusion coefficient is uniform over the whole domain: 
    14001400 
     
    14631463the heat and salt contents are conserved (equations in flux form). 
    14641464Since a flux form is used to compute the temperature and salinity, 
    1465 the quadratic form of these quantities (\ie their variance) globally tends to diminish. 
    1466 As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear.  
     1465the quadratic form of these quantities (\ie\ their variance) globally tends to diminish. 
     1466As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 
    14671467 
    14681468% ------------------------------------------------------------------------------------------------------------- 
     
    14971497\end{flalign*} 
    14981498 
    1499 In fact, this property simply results from the flux form of the operator.  
     1499In fact, this property simply results from the flux form of the operator. 
    15001500 
    15011501% ------------------------------------------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.