# Changeset 11543

Ignore:
Timestamp:
2019-09-13T15:57:52+02:00 (13 months ago)
Message:

Implementation of convention for labelling references + files renaming
Now each reference is supposed to have the information of the chapter in its name
to identify quickly which file contains the reference (\label{$prefix:$chap_...)

Rename the appendices from 'annex_' to 'apdx_' to conform with the prefix used in labels (apdx:...)
Suppress the letter numbering

Location:
NEMO/trunk/doc/latex
Files:
19 edited
7 moved

Unmodified
Removed
• ## NEMO/trunk/doc/latex/NEMO/main/appendices.tex

 r11330 \subfile{../subfiles/annex_A}             %% Generalised vertical coordinate \subfile{../subfiles/annex_B}             %% Diffusive operator \subfile{../subfiles/annex_C}             %% Discrete invariants of the eqs. \subfile{../subfiles/annex_iso}            %% Isoneutral diffusion using triads \subfile{../subfiles/annex_DOMAINcfg}     %% Brief notes on DOMAINcfg \subfile{../subfiles/apdx_s_coord}      %% Generalised vertical coordinate \subfile{../subfiles/apdx_diff_opers}   %% Diffusive operators \subfile{../subfiles/apdx_invariants}   %% Discrete invariants of the eqs. \subfile{../subfiles/apdx_triads}       %% Isoneutral diffusion using triads \subfile{../subfiles/apdx_DOMAINcfg}    %% Brief notes on DOMAINcfg %% Not included %\subfile{../subfiles/chap_DIU} %\subfile{../subfiles/chap_conservation} %\subfile{../subfiles/annex_E}            %% Notes on some on going staff %\subfile{../subfiles/apdx_algos}   %% Notes on some on going staff
• ## NEMO/trunk/doc/latex/NEMO/main/chapters.tex

 r11522 \subfile{../subfiles/chap_STO}            %% Stochastic param. \subfile{../subfiles/chap_misc}           %% Miscellaneous topics \subfile{../subfiles/chap_CONFIG}         %% Predefined configurations \subfile{../subfiles/chap_cfgs}           %% Predefined configurations %% Not included
• ## NEMO/trunk/doc/latex/NEMO/main/introduction.tex

 r11522 \begin{description} \item [\nameref{chap:PE}] presents the equations and their assumptions, the vertical coordinates used, \item [\nameref{chap:MB}] presents the equations and their assumptions, the vertical coordinates used, and the subgrid scale physics. The equations are written in a curvilinear coordinate system, with a choice of vertical coordinates Dimensional units in the meter, kilogram, second (MKS) international system are used throughout. The following chapters deal with the discrete equations. \item [\nameref{chap:STP}] presents the model time stepping environment. \item [\nameref{chap:TD}] presents the model time stepping environment. it is a three level scheme in which the tendency terms of the equations are evaluated either centered in time, or forward, or backward depending of the nature of the term. \item [\nameref{chap:ASM}] describes how increments produced by data \textbf{A}s\textbf{S}i\textbf{M}ilation may be applied to the model equations. \item [\nameref{chap:STO}] \item [\nameref{chap:MISC}] (including solvers) \item [\nameref{chap:CFG}] provides finally a brief introduction to \item [\nameref{chap:CFGS}] provides finally a brief introduction to the pre-defined model configurations (water column model \texttt{C1D}, ORCA and GYRE families of configurations). \begin{description} \item [\nameref{apdx:s_coord}] \item [\nameref{apdx:diff_oper}] \item [\nameref{apdx:invariants}] \item [\nameref{apdx:triads}] \item [\nameref{apdx:DOMAINcfg}] \item [\nameref{apdx:coding}] \item [\nameref{apdx:SCOORD}] \item [\nameref{apdx:DIFFOPERS}] \item [\nameref{apdx:INVARIANTS}] \item [\nameref{apdx:TRIADS}] \item [\nameref{apdx:DOMCFG}] \item [\nameref{apdx:CODING}] \end{description}
• ## NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex

 r11529 % ================================================================ \chapter{A brief guide to the DOMAINcfg tool} \label{apdx:DOMAINcfg} \label{apdx:DOMCFG} \chaptertoc The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and $gdepw_0$ for $t$- and $w$-points, respectively. See \autoref{sec:DOMCFG_sco} for the S-coordinate options.  As indicated on \autoref{fig:index_vert} \jp{jpk} is the number of S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \jp{jpk} is the number of $w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \jp{jpk}-1 $t$-points inside the ocean, the additional $t$-point at $jk = jpk$ is below the sea floor and is not The depth field $h$ is not necessary the ocean depth, since a mixed step-like and bottom-following representation of the topography can be used (\autoref{fig:z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}). (\autoref{fig:DOM_z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:DOM_z_zps_s_sps}). The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. $z = s_{min} + C (s) (H - s_{min}) % \label{eq:SH94_1} % \label{eq:DOMCFG_SH94_1}$ + b       \frac{\tanh \lt[ \theta \lt(s + \frac{1}{2} \rt) \rt] -   \tanh \lt( \frac{\theta}{2} \rt)} {                                                  2 \tanh \lt( \frac{\theta}{2} \rt)} \label{eq:SH94_2} \label{eq:DOMCFG_SH94_2} \] \includegraphics[width=\textwidth]{Fig_sco_function} \caption{ \protect\label{fig:sco_function} \protect\label{fig:DOMCFG_sco_function} Examples of the stretching function applied to a seamount; from left to right: surface, surface and bottom, and bottom intensified resolutions bottom control parameters such that $0 \leqslant \theta \leqslant 20$, and $0 \leqslant b \leqslant 1$. $b$ has been designed to allow surface and/or bottom increase of the vertical resolution (\autoref{fig:sco_function}). (\autoref{fig:DOMCFG_sco_function}). Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in z = - \gamma h \quad \text{with} \quad 0 \leq \gamma \leq 1 % \label{eq:z} % \label{eq:DOMCFG_z} For clarity every third coordinate surface is shown. } \label{fig:fig_compare_coordinates_surface} \label{fig:DOMCFG_fig_compare_coordinates_surface} \end{figure} % >>>>>>>>>>>>>>>>>>>>>>>>>>>>
• ## NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex

 r11529 % ================================================================ \chapter{Note on some algorithms} \label{apdx:E} \label{apdx:ALGOS} \chaptertoc \newpage This appendix some on going consideration on algorithms used or planned to be used in \NEMO. This appendix some on going consideration on algorithms used or planned to be used in \NEMO. % ------------------------------------------------------------------------------------------------------------- %        UBS scheme %        UBS scheme % ------------------------------------------------------------------------------------------------------------- \section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} a constant i-grid spacing ($\Delta i=1$). Alternative choice: introduce the scale factors: Alternative choice: introduce the scale factors: $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta_{i+1/2}[\tau] \right]$. It is not a \emph{positive} scheme meaning false extrema are permitted but the amplitude of such are significantly reduced over the centred second order method. Nevertheless it is not recommended to apply it to a passive tracer that requires positivity. Nevertheless it is not recommended to apply it to a passive tracer that requires positivity. The intrinsic diffusion of UBS makes its use risky in the vertical direction where \np{ln\_traadv\_ubs}\forcode{ = .true.}. For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds to For stability reasons, in \autoref{eq:TRA_adv_ubs}, the first term which corresponds to a second order centred scheme is evaluated using the \textit{now} velocity (centred in time) while the second term which is the diffusive part of the scheme, is evaluated using the \textit{before} velocity This is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the Quick advection scheme. UBS and QUICK schemes only differ by one coefficient. Substituting 1/6 with 1/8 in (\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}. Substituting 1/6 with 1/8 in (\autoref{eq:TRA_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}. This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded. Nevertheless it is quite easy to make the substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme. Computer time can be saved by using a time-splitting technique on vertical advection. This possibility have been implemented and validated in ORCA05-L301. It is not currently offered in the current reference version. It is not currently offered in the current reference version. NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme. The $3^{rd}$ case has dispersion properties similar to an eight-order accurate conventional scheme. NB 3: It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: NB 3: It is straight forward to rewrite \autoref{eq:TRA_adv_ubs} as follows: \label{eq:tra_adv_ubs2} \right. or equivalently or equivalently \label{eq:tra_adv_ubs2} \end{split} \autoref{eq:tra_adv_ubs2} has several advantages. \autoref{eq:TRA_adv_ubs2} has several advantages. First it clearly evidences that the UBS scheme is based on the fourth order scheme to which is added an upstream biased diffusive term. Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step, not only the $2^{th}$ order part as stated above using \autoref{eq:tra_adv_ubs}. not only the $2^{th}$ order part as stated above using \autoref{eq:TRA_adv_ubs}. Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient which is simply proportional to the velocity. \end{split} with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, \ie\ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ it comes: % ------------------------------------------------------------------------------------------------------------- %        Leap-Frog energetic %        Leap-Frog energetic % ------------------------------------------------------------------------------------------------------------- \section{Leapfrog energetic} \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t} =         \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} \] \] Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$ as it can be found sometimes in literature. \] is satisfied in discrete form. Indeed, Indeed, $\begin{split}$ NB here pb of boundary condition when applying the adjoint! In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition (equivalently of the boundary value of the integration by part). In time this boundary condition is not physical and \textbf{add something here!!!} % ================================================================ % Iso-neutral diffusion : % Iso-neutral diffusion : % ================================================================ % ================================================================ % Griffies' iso-neutral diffusion operator : % Griffies' iso-neutral diffusion operator : % ================================================================ \subsection{Griffies iso-neutral diffusion operator} but is formulated within the \NEMO\ framework (\ie\ using scale factors rather than grid-size and having a position of $T$-points that is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, is not necessary in the middle of vertical velocity points, see \autoref{fig:DOM_zgr_e3}). In the formulation \autoref{eq:TRA_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, the off-diagonal terms of the small angle diffusion tensor contain several double spatial averages of a gradient, for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$. %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The four iso-neutral fluxes associated with the triads are defined at $T$-point. The four iso-neutral fluxes associated with the triads are defined at $T$-point. They take the following expression: \begin{flalign*} The resulting iso-neutral fluxes at $u$- and $w$-points are then given by the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}): the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:TRIADS_ISO_triad}): \begin{flalign} \label{eq:iso_flux} + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]   \right\} where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. This expression of the iso-neutral diffusion has been chosen in order to satisfy the following six properties: % ================================================================ % Skew flux formulation for Eddy Induced Velocity : % Skew flux formulation for Eddy Induced Velocity : % ================================================================ \subsection{Eddy induced velocity and skew flux formulation} the formulation of which depends on the slopes of iso-neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, \ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. The eddy induced velocity is given by: \ie\ \autoref{eq:LDF_slp_geo} is used in $z$-coordinate, and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $z^*$ or $s$-coordinates. The eddy induced velocity is given by: \label{eq:eiv_v} (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme. This is particularly useful for passive tracers where \emph{positivity} of the advection scheme is of paramount importance. % give here the expression using the triads. It is different from the one given in \autoref{eq:ldfeiv} \emph{positivity} of the advection scheme is of paramount importance. % give here the expression using the triads. It is different from the one given in \autoref{eq:LDF_eiv} % see just below a copy of this equation: % \label{eq:ldfeiv} \right) Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to $\mathbb{R}$ for the discret form to be exact. $\mathbb{R}$ for the discret form to be exact. Such a choice of discretisation is consistent with the iso-neutral operator as $\$\newpage      %force an empty line % ================================================================ % Discrete Invariants of the iso-neutral diffrusion % Discrete Invariants of the iso-neutral diffrusion % ================================================================ \subsection{Discrete invariants of the iso-neutral diffrusion} \label{subsec:Gf_operator} Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. This part will be moved in an Appendix. \int_D  D_l^T \; T \;dv   \leq 0 \] The discrete form of its left hand side is obtained using \autoref{eq:iso_flux} The discrete form of its left hand side is obtained using \autoref{eq:TRIADS_iso_flux} \begin{align*} \right\} \quad   \leq 0 \end{align*} \end{align*} The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities. % &\equiv  \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\} \end{align*} \end{align*} This means that the iso-neutral operator is self-adjoint. There is no need to develop a specific to obtain it. \label{subsec:eiv_skew} Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane. Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane. This have to be moved in an Appendix. &{\ \ \;_i^k  \mathbb{R}_{+1/2}^{+1/2}}   &\delta_{i+1/2}[T^{k\ \ \ \:}]  &\delta_{k+1/2}[T_{i}] &\Bigr\}  \\ \end{matrix} \end{matrix} \end{align*} The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs, they cancel out. they cancel out. Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$. The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the same but both of opposite signs and
• ## NEMO/trunk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex

 r11529 % Chapter Appendix B : Diffusive Operators % ================================================================ \chapter{Appendix B : Diffusive Operators} \label{apdx:B} \chapter{Diffusive Operators} \label{apdx:DIFFOPERS} \chaptertoc % ================================================================ \section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators} \label{sec:B_1} \label{sec:DIFFOPERS_1} \subsubsection*{In z-coordinates} In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator is given by: \begin{align} \label{apdx:B1} \label{eq:DIFFOPERS_1} &D^T = \frac{1}{e_1 \, e_2}      \left[ \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. \subsubsection*{In generalized vertical coordinates} In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{apdx:A_s_slope} and In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{eq:SCOORD_s_slope} and the vertical/horizontal ratio of diffusion coefficient by $\epsilon = A^{vT} / A^{lT}$. The diffusion operator is given by: \label{apdx:B2} \label{eq:DIFFOPERS_2} D^T = \left. \nabla \right|_s \cdot \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\ \begin{array}{*{20}l} D^T= \frac{1}{e_1\,e_2\,e_3 } & \left\{ \quad \quad \frac{\partial }{\partial i}  \left. \left[  e_2\,e_3 \, A^{lT} \left( \  \frac{1}{e_1}\; \left. \frac{\partial T}{\partial i} \right|_s \left( \  \frac{1}{e_1}\; \left. \frac{\partial T}{\partial i} \right|_s -\frac{\sigma_1 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right]  \right|_s  \right. \\ &  \quad \  +   \            \left.   \frac{\partial }{\partial j}  \left. \left[  e_1\,e_3 \, A^{lT} \left( \ \frac{1}{e_2 }\; \left. \frac{\partial T}{\partial j} \right|_s \left( \ \frac{1}{e_2 }\; \left. \frac{\partial T}{\partial j} \right|_s -\frac{\sigma_2 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right]  \right|_s  \right. \\ &  \quad \  +   \           \left.  e_1\,e_2\, \frac{\partial }{\partial s}  \left[ A^{lT} \; \left( -\frac{\sigma_1 }{e_1 } \; \left. \frac{\partial T}{\partial i} \right|_s -\frac{\sigma_2 }{e_2 } \; \left. \frac{\partial T}{\partial j} \right|_s &  \quad \  +   \           \left.  e_1\,e_2\, \frac{\partial }{\partial s}  \left[ A^{lT} \; \left( -\frac{\sigma_1 }{e_1 } \; \left. \frac{\partial T}{\partial i} \right|_s -\frac{\sigma_2 }{e_2 } \; \left. \frac{\partial T}{\partial j} \right|_s +\left( \varepsilon +\sigma_1^2+\sigma_2 ^2 \right) \; \frac{1}{e_3 } \; \frac{\partial T}{\partial s} \right) \; \right] \;  \right\} . \end{array} \end{align*} \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption. \autoref{eq:DIFFOPERS_2} is obtained from \autoref{eq:DIFFOPERS_1} without any additional assumption. Indeed, for the special case $k=z$ and thus $e_3 =1$, we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} and use \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}. Since no cross horizontal derivative $\partial _i \partial _j$ appears in \autoref{apdx:B1}, we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:SCOORD} and use \autoref{eq:SCOORD_s_slope} and \autoref{eq:SCOORD_s_chain_rule}. Since no cross horizontal derivative $\partial _i \partial _j$ appears in \autoref{eq:DIFFOPERS_1}, the ($i$,$z$) and ($j$,$z$) planes are independent. The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) transformation without % ================================================================ \section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators} \label{sec:B_2} \label{sec:DIFFOPERS_2} \subsubsection*{In z-coordinates} \label{apdx:B3} \label{eq:DIFFOPERS_3} \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)} \left[ {{ In practice, $\epsilon$ is small and isopycnal slopes are generally less than $10^{-2}$ in the ocean, so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{cox_OM87}. Keeping leading order terms\footnote{Apart from the (1,0) so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{cox_OM87}. Keeping leading order terms\footnote{Apart from the (1,0) and (0,1) elements which are set to zero. See \citet{griffies_bk04}, section 14.1.4.1 for a discussion of this point.}: \begin{subequations} \label{apdx:B4} \label{eq:DIFFOPERS_4} \label{apdx:B4a} \label{eq:DIFFOPERS_4a} {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re = \left[ {{ and the iso/dianeutral diffusive operator in $z$-coordinates is then \label{apdx:B4b} \label{eq:DIFFOPERS_4b} D^T = \left. \nabla \right|_z \cdot \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T  \right]. \\ \end{subequations} Physically, the full tensor \autoref{apdx:B3} represents strong isoneutral diffusion on a plane parallel to Physically, the full tensor \autoref{eq:DIFFOPERS_3} represents strong isoneutral diffusion on a plane parallel to the isoneutral surface and weak dianeutral diffusion perpendicular to this plane. However, the approximate weak-slope' tensor \autoref{apdx:B4a} represents strong diffusion along the isoneutral surface, the approximate weak-slope' tensor \autoref{eq:DIFFOPERS_4a} represents strong diffusion along the isoneutral surface, with weak \emph{vertical} diffusion -- the principal axes of the tensor are no longer orthogonal. This simplification also decouples the ($i$,$z$) and ($j$,$z$) planes of the tensor. The weak-slope operator therefore takes the same form, \autoref{apdx:B4}, as \autoref{apdx:B2}, The weak-slope operator therefore takes the same form, \autoref{eq:DIFFOPERS_4}, as \autoref{eq:DIFFOPERS_2}, the diffusion operator for geopotential diffusion written in non-orthogonal $i,j,s$-coordinates. Written out explicitly, \begin{multline} \label{apdx:B_ldfiso} \label{eq:DIFFOPERS_ldfiso} D^T=\frac{1}{e_1 e_2 }\left\{ {\;\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]} \end{multline} The isopycnal diffusion operator \autoref{apdx:B4}, \autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its square. As \autoref{apdx:B4} is the divergence of a flux, the demonstration of the first property is trivial, providing that the flux normal to the boundary is zero The isopycnal diffusion operator \autoref{eq:DIFFOPERS_4}, \autoref{eq:DIFFOPERS_ldfiso} conserves tracer quantity and dissipates its square. As \autoref{eq:DIFFOPERS_4} is the divergence of a flux, the demonstration of the first property is trivial, providing that the flux normal to the boundary is zero (as it is when $A_h$ is zero at the boundary). Let us demonstrate the second one: $j}-a_2 \frac{\partial T}{\partial k}} \right)^2} +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right] \\ & \geq 0 . & \geq 0 . \end{array} } \subsubsection*{In generalized vertical coordinates} Because the weak-slope operator \autoref{apdx:B4}, \autoref{apdx:B_ldfiso} is decoupled in the (i,z) and (j,z) planes, Because the weak-slope operator \autoref{eq:DIFFOPERS_4}, \autoref{eq:DIFFOPERS_ldfiso} is decoupled in the (i,z) and (j,z) planes, it may be transformed into generalized s-coordinates in the same way as \autoref{sec:B_1} was transformed into \autoref{sec:B_2}. \autoref{sec:DIFFOPERS_1} was transformed into \autoref{sec:DIFFOPERS_2}. The resulting operator then takes the simple form \label{apdx:B_ldfiso_s} \label{eq:DIFFOPERS_ldfiso_s} D^T = \left. \nabla \right|_s \cdot \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\$ To prove \autoref{apdx:B_ldfiso_s} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious. An easier way is first to note (by reversing the derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that To prove \autoref{eq:DIFFOPERS_ldfiso_s} by direct re-expression of \autoref{eq:DIFFOPERS_ldfiso} is straightforward, but laborious. An easier way is first to note (by reversing the derivation of \autoref{sec:DIFFOPERS_2} from \autoref{sec:DIFFOPERS_1} ) that the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as \label{apdx:B5} \label{eq:DIFFOPERS_5} D^T = \left. \nabla \right|_\rho \cdot \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T  \right] \\ Then direct transformation from $i,j,\rho$-coordinates to $i,j,s$-coordinates gives \autoref{apdx:B_ldfiso_s} immediately. \autoref{eq:DIFFOPERS_ldfiso_s} immediately. Note that the weak-slope approximation is only made in transforming from The further transformation into $i,j,s$-coordinates is exact, whatever the steepness of the $s$-surfaces, in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates in \autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. \autoref{sec:DIFFOPERS_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. % ================================================================ \section{Lateral/Vertical momentum diffusive operators} \label{sec:B_3} \label{sec:DIFFOPERS_3} The second order momentum diffusion operator (Laplacian) in $z$-coordinates is found by applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian of a vector, applying \autoref{eq:MB_lap_vector}, the expression for the Laplacian of a vector, to the horizontal velocity vector: \begin{align*} }} \right) \end{align*} Using \autoref{eq:PE_div}, the definition of the horizontal divergence, Using \autoref{eq:MB_div}, the definition of the horizontal divergence, the third component of the second vector is obviously zero and thus : $\Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \textbf{k} \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right) . \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \textbf{k} \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right) .$ Note that this operator ensures a full separation between the vorticity and horizontal divergence fields (see \autoref{apdx:C}). the vorticity and horizontal divergence fields (see \autoref{apdx:INVARIANTS}). It is only equal to a Laplacian applied to each component in Cartesian coordinates, not on the sphere. the $z$-coordinate therefore takes the following form: \label{apdx:B_Lap_U} \label{eq:DIFFOPERS_Lap_U} { \textbf{D}}^{\textbf{U}} = \end{align*} Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to Note Bene: introducing a rotation in \autoref{eq:DIFFOPERS_Lap_U} does not lead to a useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate. Similarly, we did not found an expression of practical use for the geopotential horizontal/vertical Laplacian operator in the $s$-coordinate. Generally, \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, Generally, \autoref{eq:DIFFOPERS_Lap_U} is used in both $z$- and $s$-coordinate systems, that is a Laplacian diffusion is applied on momentum along the coordinate directions.
• ## NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex

 r11529 % ================================================================ \chapter{Discrete Invariants of the Equations} \label{apdx:C} \label{apdx:INVARIANTS} \chaptertoc % ================================================================ \section{Introduction / Notations} \label{sec:C.0} \label{sec:INVARIANTS_0} Notation used in this appendix in the demonstations: that is in a more compact form : \begin{flalign} \label{eq:Q2_flux} \label{eq:INVARIANTS_Q2_flux} \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) =&                   \int_D { \frac{Q}{e_3}  \partial_t \left( e_3 \, Q \right) dv } that is in a more compact form: \begin{flalign} \label{eq:Q2_vect} \label{eq:INVARIANTS_Q2_vect} \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) =& \int_D {         Q   \,\partial_t Q  \;dv } % ================================================================ \section{Continuous conservation} \label{sec:C.1} \label{sec:INVARIANTS_1} The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate) The total energy (\ie\ kinetic plus potential energies) is conserved: \begin{flalign} \label{eq:Tot_Energy} \label{eq:INVARIANTS_Tot_Energy} \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 +  \rho \, g \, z \right) \;dv \right)  = & 0 \end{flalign} The transformation for the advection term depends on whether the vector invariant form or the flux form is used for the momentum equation. Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in \autoref{eq:Tot_Energy} for the former form and using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in \autoref{eq:Tot_Energy} for the latter form leads to: % \label{eq:E_tot} Using \autoref{eq:INVARIANTS_Q2_vect} and introducing \autoref{eq:SCOORD_dyn_vect} in \autoref{eq:INVARIANTS_Tot_Energy} for the former form and using \autoref{eq:INVARIANTS_Q2_flux} and introducing \autoref{eq:SCOORD_dyn_flux} in \autoref{eq:INVARIANTS_Tot_Energy} for the latter form leads to: % \label{eq:INVARIANTS_E_tot} advection term (vector invariant form): $% \label{eq:E_tot_vect_vor_1} % \label{eq:INVARIANTS_E_tot_vect_vor_1} \int\limits_D \zeta \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\$ % $% \label{eq:E_tot_vect_adv_1} % \label{eq:INVARIANTS_E_tot_vect_adv_1} \int\limits_D \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right) dv + \int\limits_D \textbf{U}_h \cdot \nabla_z \textbf{U}_h \;dv advection term (flux form): \[ % \label{eq:E_tot_flux_metric} % \label{eq:INVARIANTS_E_tot_flux_metric} \int\limits_D \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1 \right)\; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0$ $% \label{eq:E_tot_flux_adv} % \label{eq:INVARIANTS_E_tot_flux_adv} \int\limits_D \textbf{U}_h \cdot \left( {{ \begin{array} {*{20}c} coriolis term \[ % \label{eq:E_tot_cor} % \label{eq:INVARIANTS_E_tot_cor} \int\limits_D f \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0$ pressure gradient: $% \label{eq:E_tot_pg_1} % \label{eq:INVARIANTS_E_tot_pg_1} - \int\limits_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv Vector invariant form: % \label{eq:E_tot_vect} \[ % \label{eq:E_tot_vect_vor_2} % \label{eq:INVARIANTS_E_tot_vect} \[ % \label{eq:INVARIANTS_E_tot_vect_vor_2} \int\limits_D \textbf{U}_h \cdot \text{VOR} \;dv = 0$ $% \label{eq:E_tot_vect_adv_2} % \label{eq:INVARIANTS_E_tot_vect_adv_2} \int\limits_D \textbf{U}_h \cdot \text{KEG} \;dv + \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv$ $% \label{eq:E_tot_pg_2} % \label{eq:INVARIANTS_E_tot_pg_2} - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv Flux form: \begin{subequations} \label{eq:E_tot_flux} \label{eq:INVARIANTS_E_tot_flux} \[ % \label{eq:E_tot_flux_metric_2} % \label{eq:INVARIANTS_E_tot_flux_metric_2} \int\limits_D \textbf{U}_h \cdot \text {COR} \; dv = 0$ $% \label{eq:E_tot_flux_adv_2} % \label{eq:INVARIANTS_E_tot_flux_adv_2} \int\limits_D \textbf{U}_h \cdot \text{ADV} \;dv + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0$ \label{eq:E_tot_pg_3} \label{eq:INVARIANTS_E_tot_pg_3} - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv \end{subequations} \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: \autoref{eq:INVARIANTS_E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. Indeed the left hand side of \autoref{eq:INVARIANTS_E_tot_pg_3} can be transformed as follows: \begin{flalign*} \partial_t  \left( \int\limits_D { \rho \, g \, z  \;dv} \right) \end{flalign*} where the last equality is obtained by noting that the brackets is exactly the expression of $w$, the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{eq:SCOORD_w_s}). The left hand side of \autoref{eq:INVARIANTS_E_tot_pg_3} can be transformed as follows: \begin{flalign*} - \int\limits_D  \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv % ================================================================ \section{Discrete total energy conservation: vector invariant form} \label{sec:C.2} \label{sec:INVARIANTS_2} % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsection{Total energy conservation} \label{subsec:C_KE+PE_vect} The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: \label{subsec:INVARIANTS_KE+PE_vect} The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by: \begin{flalign*} \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 which in vector invariant forms, it leads to: \label{eq:KE+PE_vect_discrete} \label{eq:INVARIANTS_KE+PE_vect_discrete} \begin{split} \sum\limits_{i,j,k} \biggl\{   u\,                        \partial_t u         \;b_u Substituting the discrete expression of the time derivative of the velocity either in vector invariant, leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}. leads to the discrete equivalent of the four equations \autoref{eq:INVARIANTS_E_tot_flux}. % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsection{Vorticity term (coriolis + vorticity part of the advection)} \label{subsec:C_vor} \label{subsec:INVARIANTS_vor} Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), % ------------------------------------------------------------------------------------------------------------- \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} \label{subsec:C_vorENE} \label{subsec:INVARIANTS_vorENE} For the ENE scheme, the two components of the vorticity term are given by: % ------------------------------------------------------------------------------------------------------------- \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} \label{subsec:C_vorEEN_vect} \label{subsec:INVARIANTS_vorEEN_vect} With the EEN scheme, the vorticity terms are represented as: \tag{\ref{eq:dynvor_een}} \label{eq:INVARIANTS_dynvor_een} \left\{ { \begin{aligned} and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: \tag{\ref{eq:Q_triads}} \label{eq:INVARIANTS_Q_triads} _i^j \mathbb{Q}^{i_p}_{j_p} = \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) % ------------------------------------------------------------------------------------------------------------- \subsubsection{Gradient of kinetic energy / Vertical advection} \label{subsec:C_zad} \label{subsec:INVARIANTS_zad} The 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~: % \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD), while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:} while the second term corresponds exactly to \autoref{eq:INVARIANTS_KE+PE_vect_discrete}, therefore:} \equiv&                   \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\ which is (over-)satified by defining the vertical scale factor as follows: \begin{flalign*} % \label{eq:e3u-e3v} % \label{eq:INVARIANTS_e3u-e3v} e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2}    \\ e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2} % ------------------------------------------------------------------------------------------------------------- \subsection{Pressure gradient term} \label{subsec:C.2.6} \label{subsec:INVARIANTS_2.6} \gmcomment{ \allowdisplaybreaks \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, the $\delta$ operator, \autoref{eq:DYN_wzv}, the continuity equation, \autoref{eq:DYN_hpg_sco}, the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w}$, which comes from the definition of $z_t$, it becomes: } % \end{flalign*} The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}. The first term is exactly the first term of the right-hand-side of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}. It remains to demonstrate that the last term, which is obviously a discrete analogue of $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \autoref{eq:KE+PE_vect_discrete}. the last term of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}. In other words, the following property must be satisfied: \begin{flalign*} % ================================================================ \section{Discrete total energy conservation: flux form} \label{sec:C.3} \label{sec:INVARIANTS_3} % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsection{Total energy conservation} \label{subsec:C_KE+PE_flux} The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: \label{subsec:INVARIANTS_KE+PE_flux} The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by: \begin{flalign*} \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  \\ % ------------------------------------------------------------------------------------------------------------- \subsection{Coriolis and advection terms: flux form} \label{subsec:C.3.2} \label{subsec:INVARIANTS_3.2} % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsubsection{Coriolis plus metric'' term} \label{subsec:C.3.3} \label{subsec:INVARIANTS_3.3} In flux from the vorticity term reduces to a Coriolis term in which Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form. It therefore conserves the total KE. The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:C_vor}). The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:INVARIANTS_vor}). % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsubsection{Flux form advection} \label{subsec:C.3.4} \label{subsec:INVARIANTS_3.4} The flux form operator of the momentum advection is evaluated using \label{eq:C_ADV_KE_flux} \label{eq:INVARIANTS_ADV_KE_flux} -  \int_D \textbf{U}_h \cdot     \left(                 {{ \begin{array} {*{20}c} \] which is the discrete form of $\frac{1}{2} \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv$. \autoref{eq:C_ADV_KE_flux} is thus satisfied. \autoref{eq:INVARIANTS_ADV_KE_flux} is thus satisfied. When the UBS scheme is used to evaluate the flux form momentum advection, % ================================================================ \section{Discrete enstrophy conservation} \label{sec:C.4} \label{sec:INVARIANTS_4} % ------------------------------------------------------------------------------------------------------------- % ------------------------------------------------------------------------------------------------------------- \subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} \label{subsec:C_vorENS} \label{subsec:INVARIANTS_vorENS} In the ENS scheme, the vorticity term is descretized as follows: \tag{\ref{eq:dynvor_ens}} \label{eq:INVARIANTS_dynvor_ens} \left\{ \begin{aligned} it can be shown that: \label{eq:C_1.1} \label{eq:INVARIANTS_1.1} \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 where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. Indeed, using \autoref{eq:dynvor_ens}, the discrete form of the right hand side of \autoref{eq:C_1.1} can be transformed as follow: Indeed, using \autoref{eq:DYN_vor_ens}, the discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} can be transformed as follow: \begin{flalign*} &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times % ------------------------------------------------------------------------------------------------------------- \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} \label{subsec:C_vorEEN} \label{subsec:INVARIANTS_vorEEN} With the EEN scheme, the vorticity terms are represented as: \tag{\ref{eq:dynvor_een}} \label{eq:INVARIANTS_dynvor_een} \left\{ { \begin{aligned} and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: \tag{\ref{eq:Q_triads}} \tag{\ref{eq:INVARIANTS_Q_triads}} _i^j \mathbb{Q}^{i_p}_{j_p} = \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) Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2}$, similar manipulation can be done for the 3 others. The discrete form of the right hand side of \autoref{eq:C_1.1} applied to The discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} applied to this triad only can be transformed as follow: % ================================================================ \section{Conservation properties on tracers} \label{sec:C.5} \label{sec:INVARIANTS_5} All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by % ------------------------------------------------------------------------------------------------------------- \subsection{Advection term} \label{subsec:C.5.1} \label{subsec:INVARIANTS_5.1} conservation of a tracer, $T$: % ================================================================ \section{Conservation properties on lateral momentum physics} \label{sec:dynldf_properties} \label{sec:INVARIANTS_dynldf_properties} The discrete formulation of the horizontal diffusion of momentum ensures % ------------------------------------------------------------------------------------------------------------- \subsection{Conservation of potential vorticity} \label{subsec:C.6.1} \label{subsec:INVARIANTS_6.1} The lateral momentum diffusion term conserves the potential vorticity: % ------------------------------------------------------------------------------------------------------------- \subsection{Dissipation of horizontal kinetic energy} \label{subsec:C.6.2} \label{subsec:INVARIANTS_6.2} The lateral momentum diffusion term dissipates the horizontal kinetic energy: % ------------------------------------------------------------------------------------------------------------- \subsection{Dissipation of enstrophy} \label{subsec:C.6.3} \label{subsec:INVARIANTS_6.3} The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform: % ------------------------------------------------------------------------------------------------------------- \subsection{Conservation of horizontal divergence} \label{subsec:C.6.4} \label{subsec:INVARIANTS_6.4} When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, % ------------------------------------------------------------------------------------------------------------- \subsection{Dissipation of horizontal divergence variance} \label{subsec:C.6.5} \label{subsec:INVARIANTS_6.5} \begin{flalign*} % ================================================================ \section{Conservation properties on vertical momentum physics} \label{sec:C.7} \label{sec:INVARIANTS_7} As for the lateral momentum physics, % ================================================================ \section{Conservation properties on tracer physics} \label{sec:C.8} \label{sec:INVARIANTS_8} The numerical schemes used for tracer subgridscale physics are written such that % ------------------------------------------------------------------------------------------------------------- \subsection{Conservation of tracers} \label{subsec:C.8.1} \label{subsec:INVARIANTS_8.1} constraint of conservation of tracers: % ------------------------------------------------------------------------------------------------------------- \subsection{Dissipation of tracer variance} \label{subsec:C.8.2} \label{subsec:INVARIANTS_8.2} constraint on the dissipation of tracer variance:
• ## NEMO/trunk/doc/latex/NEMO/subfiles/apdx_s_coord.tex

 r11529 % ================================================================ \chapter{Curvilinear $s-$Coordinate Equations} \label{apdx:A} \label{apdx:SCOORD} \chaptertoc % ================================================================ \section{Chain rule for $s-$coordinates} \label{sec:A_chain} \label{sec:SCOORD_chain} In order to establish the set of Primitive Equation in curvilinear $s$-coordinates (\ie\ an orthogonal curvilinear coordinate in the horizontal and an Arbitrary Lagrangian Eulerian (ALE) coordinate in the vertical), we start from the set of equations established in \autoref{subsec:PE_zco_Eq} for we start from the set of equations established in \autoref{subsec:MB_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce an arbitrary vertical coordinate $a = a(i,j,z,t)$. the horizontal slope of $s-$surfaces by: \label{apdx:A_s_slope} \label{eq:SCOORD_s_slope} \sigma_1 =\frac{1}{e_1 } \; \left. {\frac{\partial z}{\partial i}} \right|_s \quad \text{and} \quad The model fields (e.g. pressure $p$) can be viewed as functions of $(i,j,z,t)$ (e.g. $p(i,j,z,t)$) or as functions of $(i,j,s,t)$ (e.g. $p(i,j,s,t)$). The symbol $\bullet$ will be used to represent any one of these fields.  Any infinitesimal'' change in $\bullet$ can be written in two forms: \label{apdx:A_s_infin_changes} functions of $(i,j,s,t)$ (e.g. $p(i,j,s,t)$). The symbol $\bullet$ will be used to represent any one of these fields.  Any infinitesimal'' change in $\bullet$ can be written in two forms: \label{eq:SCOORD_s_infin_changes} \begin{aligned} & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,s,t} + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,s,t} + \delta s \left. \frac{ \partial \bullet }{\partial s} \right|_{i,j,t} & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,s,t} + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,s,t} + \delta s \left. \frac{ \partial \bullet }{\partial s} \right|_{i,j,t} + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,s} , \\ & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,z,t} + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,z,t} + \delta z \left. \frac{ \partial \bullet }{\partial z} \right|_{i,j,t} & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,z,t} + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,z,t} + \delta z \left. \frac{ \partial \bullet }{\partial z} \right|_{i,j,t} + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,z} . \end{aligned} Using the first form and considering a change $\delta i$ with $j, z$ and $t$ held constant, shows that \label{apdx:A_s_chain_rule} \label{eq:SCOORD_s_chain_rule} \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,z,t}  = \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,s,t} + \left. {\frac{\partial s       }{\partial i}} \right|_{j,z,t} \; \left. {\frac{\partial \bullet }{\partial s}} \right|_{i,j,t} . The term $\left. \partial s / \partial i \right|_{j,z,t}$ can be related to the slope of constant $s$ surfaces, (\autoref{apdx:A_s_slope}), by applying the second of (\autoref{apdx:A_s_infin_changes}) with $\bullet$ set to + \left. {\frac{\partial s       }{\partial i}} \right|_{j,z,t} \; \left. {\frac{\partial \bullet }{\partial s}} \right|_{i,j,t} . The term $\left. \partial s / \partial i \right|_{j,z,t}$ can be related to the slope of constant $s$ surfaces, (\autoref{eq:SCOORD_s_slope}), by applying the second of (\autoref{eq:SCOORD_s_infin_changes}) with $\bullet$ set to $s$ and $j, t$ held constant \label{apdx:a_delta_s} \delta s|_{j,t} = \delta i \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} \label{eq:SCOORD_delta_s} \delta s|_{j,t} = \delta i \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} + \delta z \left. \frac{ \partial s }{\partial z} \right|_{i,j,t} . Choosing to look at a direction in the $(i,z)$ plane in which $\delta s = 0$ and using (\autoref{apdx:A_s_slope}) we obtain \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} = (\autoref{eq:SCOORD_s_slope}) we obtain \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} = -  \left. \frac{ \partial z }{\partial i} \right|_{j,s,t} \; \left. \frac{ \partial s }{\partial z} \right|_{i,j,t} = - \frac{e_1 }{e_3 }\sigma_1  . \label{apdx:a_ds_di_z} Another identity, similar in form to (\autoref{apdx:a_ds_di_z}), can be derived by choosing $\bullet$ to be $s$ and using the second form of (\autoref{apdx:A_s_infin_changes}) to consider \label{eq:SCOORD_ds_di_z} Another identity, similar in form to (\autoref{eq:SCOORD_ds_di_z}), can be derived by choosing $\bullet$ to be $s$ and using the second form of (\autoref{eq:SCOORD_s_infin_changes}) to consider changes in which $i , j$ and $s$ are constant. This shows that \label{apdx:A_w_in_s} w_s = \left. \frac{ \partial z }{\partial t} \right|_{i,j,s} = \label{eq:SCOORD_w_in_s} w_s = \left. \frac{ \partial z }{\partial t} \right|_{i,j,s} = - \left. \frac{ \partial z }{\partial s} \right|_{i,j,t} \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} = - e_3 \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} . In what follows, for brevity, indication of the constancy of the $i, j$ and $t$ indices is usually omitted. Using the arguments outlined above one can show that the chain rules needed to establish \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} = - e_3 \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} . In what follows, for brevity, indication of the constancy of the $i, j$ and $t$ indices is usually omitted. Using the arguments outlined above one can show that the chain rules needed to establish the model equations in the curvilinear $s-$coordinate system are: \label{apdx:A_s_chain_rule} \label{eq:SCOORD_s_chain_rule} \begin{aligned} &\left. {\frac{\partial \bullet }{\partial t}} \right|_z  = \left. {\frac{\partial \bullet }{\partial t}} \right|_s \left. {\frac{\partial \bullet }{\partial t}} \right|_s + \frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial t} , \\ &\left. {\frac{\partial \bullet }{\partial i}} \right|_z  = \left. {\frac{\partial \bullet }{\partial i}} \right|_s +\frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial i}= \left. {\frac{\partial \bullet }{\partial i}} \right|_s \left. {\frac{\partial \bullet }{\partial i}} \right|_s -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} , \\ &\left. {\frac{\partial \bullet }{\partial j}} \right|_z  = \left. {\frac{\partial \bullet }{\partial j}} \right|_s \left. {\frac{\partial \bullet }{\partial j}} \right|_s + \frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial j}= \left. {\frac{\partial \bullet }{\partial j}} \right|_s \left. {\frac{\partial \bullet }{\partial j}} \right|_s - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} , \\ &\;\frac{\partial \bullet }{\partial z}  \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s} . % ================================================================ \section{Continuity equation in $s-$coordinates} \label{sec:A_continuity} Using (\autoref{apdx:A_s_chain_rule}) and \label{sec:SCOORD_continuity} Using (\autoref{eq:SCOORD_s_chain_rule}) and the fact that the horizontal scale factors $e_1$ and $e_2$ do not depend on the vertical coordinate, the divergence of the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows in order to \end{subequations} Here, $w$ is the vertical velocity relative to the $z-$coordinate system. Using the first form of (\autoref{apdx:A_s_infin_changes}) and the definitions (\autoref{apdx:A_s_slope}) and (\autoref{apdx:A_w_in_s}) for $\sigma_1$, $\sigma_2$ and  $w_s$, Here, $w$ is the vertical velocity relative to the $z-$coordinate system. Using the first form of (\autoref{eq:SCOORD_s_infin_changes}) and the definitions (\autoref{eq:SCOORD_s_slope}) and (\autoref{eq:SCOORD_w_in_s}) for $\sigma_1$, $\sigma_2$ and  $w_s$, one can show that the vertical velocity, $w_p$ of a point moving with the horizontal velocity of the fluid along an $s$ surface is given by \label{apdx:A_w_p} moving with the horizontal velocity of the fluid along an $s$ surface is given by \label{eq:SCOORD_w_p} \begin{split} w_p  = & \left. \frac{ \partial z }{\partial t} \right|_s + \frac{u}{e_1} \left. \frac{ \partial z }{\partial i} \right|_s + \frac{u}{e_1} \left. \frac{ \partial z }{\partial i} \right|_s + \frac{v}{e_2} \left. \frac{ \partial z }{\partial j} \right|_s \\ = & w_s + u \sigma_1 + v \sigma_2 . \end{split} \end{split} The vertical velocity across this surface is denoted by \label{apdx:A_w_s} \omega  = w - w_p = w - ( w_s + \sigma_1 \,u + \sigma_2 \,v )  . Hence \frac{1}{e_3 } \frac{\partial}{\partial s}   \left[  w -  u\;\sigma_1  - v\;\sigma_2  \right] = \frac{1}{e_3 } \frac{\partial}{\partial s} \left[  \omega + w_s \right] = \frac{1}{e_3 } \left[ \frac{\partial \omega}{\partial s} + \left. \frac{ \partial }{\partial t} \right|_s \frac{\partial z}{\partial s} \right] = \frac{1}{e_3 } \frac{\partial \omega}{\partial s} + \frac{1}{e_3 } \left. \frac{ \partial e_3}{\partial t} . \right|_s Using (\autoref{apdx:A_w_s}) in our expression for $\nabla \cdot {\mathrm {\mathbf U}}$ we obtain \label{eq:SCOORD_w_s} \omega  = w - w_p = w - ( w_s + \sigma_1 \,u + \sigma_2 \,v )  . Hence \frac{1}{e_3 } \frac{\partial}{\partial s}   \left[  w -  u\;\sigma_1  - v\;\sigma_2  \right] = \frac{1}{e_3 } \frac{\partial}{\partial s} \left[  \omega + w_s \right] = \frac{1}{e_3 } \left[ \frac{\partial \omega}{\partial s} + \left. \frac{ \partial }{\partial t} \right|_s \frac{\partial z}{\partial s} \right] = \frac{1}{e_3 } \frac{\partial \omega}{\partial s} + \frac{1}{e_3 } \left. \frac{ \partial e_3}{\partial t} . \right|_s Using (\autoref{eq:SCOORD_w_s}) in our expression for $\nabla \cdot {\mathrm {\mathbf U}}$ we obtain our final expression for the divergence of the velocity in the curvilinear $s-$coordinate system: As a result, the continuity equation \autoref{eq:PE_continuity} in the $s-$coordinates is: \label{apdx:A_sco_Continuity} As a result, the continuity equation \autoref{eq:MB_PE_continuity} in the $s-$coordinates is: \label{eq:SCOORD_sco_Continuity} \frac{1}{e_3 } \frac{\partial e_3}{\partial t} + \frac{1}{e_1 \,e_2 \,e_3 }\left[ % ================================================================ \section{Momentum equation in $s-$coordinate} \label{sec:A_momentum} \label{sec:SCOORD_momentum} Here we only consider the first component of the momentum equation, $\bullet$ \textbf{Total derivative in vector invariant form} Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum equation in the vector invariant form. Let us consider \autoref{eq:MB_dyn_vect}, the first component of the momentum equation in the vector invariant form. Its total $z-$coordinate time derivative, $\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain +  w \;\frac{\partial u}{\partial z}      \\ % \intertext{introducing the chain rule (\autoref{apdx:A_s_chain_rule}) } \intertext{introducing the chain rule (\autoref{eq:SCOORD_s_chain_rule}) } % &= \left. {\frac{\partial u }{\partial t}} \right|_z \; \frac{\partial u}{\partial s} .  \\ % \intertext{Introducing $\omega$, the dia-s-surface velocity given by (\autoref{apdx:A_w_s}) } \intertext{Introducing $\omega$, the dia-s-surface velocity given by (\autoref{eq:SCOORD_w_s}) } % &= \left. {\frac{\partial u }{\partial t}} \right|_z \end{subequations} % Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) to $u$ and using (\autoref{apdx:A_w_in_s}) provides the expression of the last term of the right hand side, Applying the time derivative chain rule (first equation of (\autoref{eq:SCOORD_s_chain_rule})) to $u$ and using (\autoref{eq:SCOORD_w_in_s}) provides the expression of the last term of the right hand side, { \ie\ the total s-coordinate time derivative : \begin{align} \label{apdx:A_sco_Dt_vect} \label{eq:SCOORD_sco_Dt_vect} \left. \frac{D u}{D t} \right|_s = \left. {\frac{\partial u }{\partial t}} \right|_s - \left. \zeta \right|_s \;v + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} . + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} . \end{align} Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in Let us start from the total time derivative in the curvilinear s-coordinate system we have just establish. Following the procedure used to establish (\autoref{eq:PE_flux_form}), it can be transformed into : Following the procedure used to establish (\autoref{eq:MB_flux_form}), it can be transformed into : % \begin{subequations} \begin{align*} \end{align*} % Introducing the vertical scale factor inside the horizontal derivative of the first two terms Introducing the vertical scale factor inside the horizontal derivative of the first two terms (\ie\ the horizontal divergence), it becomes : \begin{align*} \begin{array}{*{20}l} % \begin{align*} {\begin{array}{*{20}l} % {\begin{array}{*{20}l} \left. \frac{D u}{D t} \right|_s % {\begin{array}{*{20}l} \left. \frac{D u}{D t} \right|_s &= \left. {\frac{\partial u }{\partial t}} \right|_s &+ \frac{1}{e_1\,e_2\,e_3} \left( \frac{\partial( e_2 e_3 \,u^2 )}{\partial i} % \intertext {Introducing a more compact form for the divergence of the momentum fluxes, and using (\autoref{apdx:A_sco_Continuity}), the s-coordinate continuity equation, and using (\autoref{eq:SCOORD_sco_Continuity}), the s-coordinate continuity equation, it becomes : } % } \end{align*} which leads to the s-coordinate flux formulation of the total s-coordinate time derivative, which leads to the s-coordinate flux formulation of the total s-coordinate time derivative, \ie\ the total s-coordinate time derivative in flux form: \begin{flalign} \label{apdx:A_sco_Dt_flux} \label{eq:SCOORD_sco_Dt_flux} \left. \frac{D u}{D t} \right|_s = \frac{1}{e_3} \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s + \left. \nabla \cdot \left( {{\mathrm {\mathbf U}}\,u} \right) \right|_s It has the same form as in the z-coordinate but for the vertical scale factor that has appeared inside the time derivative which comes from the modification of (\autoref{apdx:A_sco_Continuity}), comes from the modification of (\autoref{eq:SCOORD_sco_Continuity}), the continuity equation. Applying similar manipulation to the second component and replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{apdx:A_s_slope}, it becomes: \label{apdx:A_grad_p_1} replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{eq:SCOORD_s_slope}, it becomes: \label{eq:SCOORD_grad_p_1} \begin{split} -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z An additional term appears in (\autoref{apdx:A_grad_p_1}) which accounts for An additional term appears in (\autoref{eq:SCOORD_grad_p_1}) which accounts for the tilt of $s-$surfaces with respect to geopotential $z-$surfaces. Therefore, $p$ and $p_h'$ are linked through: \label{apdx:A_pressure} \label{eq:SCOORD_pressure} p = \rho_o \; p_h' + \rho_o \, g \, ( \eta - z ) \] Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and Substituing \autoref{eq:SCOORD_pressure} in \autoref{eq:SCOORD_grad_p_1} and using the definition of the density anomaly it becomes an expression in two parts: \label{apdx:A_grad_p_2} \label{eq:SCOORD_grad_p_2} \begin{split} -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z This formulation of the pressure gradient is characterised by the appearance of a term depending on the sea surface height only (last term on the right hand side of expression \autoref{apdx:A_grad_p_2}). (last term on the right hand side of expression \autoref{eq:SCOORD_grad_p_2}). This term will be loosely termed \textit{surface pressure gradient} whereas the first term will be termed the \textit{hydrostatic pressure gradient} by analogy to The coriolis and forcing terms as well as the the vertical physics remain unchanged as they involve neither time nor space derivatives. The form of the lateral physics is discussed in \autoref{apdx:B}. The form of the lateral physics is discussed in \autoref{apdx:DIFFOPERS}. $\bullet$ \textbf{Full momentum equation} the one in a curvilinear $z-$coordinate, except for the pressure gradient term: \begin{subequations} \label{apdx:A_dyn_vect} \label{eq:SCOORD_dyn_vect} \begin{multline} \label{apdx:A_PE_dyn_vect_u} \label{eq:SCOORD_PE_dyn_vect_u} \frac{\partial u}{\partial t}= +   \left( {\zeta +f} \right)\,v \end{multline} \begin{multline} \label{apdx:A_dyn_vect_v} \label{eq:SCOORD_dyn_vect_v} \frac{\partial v}{\partial t}= -   \left( {\zeta +f} \right)\,u the formulation of both the time derivative and the pressure gradient term: \begin{subequations} \label{apdx:A_dyn_flux} \label{eq:SCOORD_dyn_flux} \begin{multline} \label{apdx:A_PE_dyn_flux_u} \label{eq:SCOORD_PE_dyn_flux_u} \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t} = - \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,u}   \right) \end{multline} \begin{multline} \label{apdx:A_dyn_flux_v} \label{eq:SCOORD_dyn_flux_v} \frac{1}{e_3}\frac{\partial \left(  e_3\,v  \right) }{\partial t}= -  \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,v}   \right) -   \frac{1}{e_2 } \left(    \frac{\partial p_h'}{\partial j} + g\; d  \; \frac{\partial z}{\partial j}    \right) -   \frac{g}{e_2 } \frac{\partial \eta}{\partial j} +  D_v^{\vect{U}}  +   F_v^{\vect{U}} . +  D_v^{\vect{U}}  +   F_v^{\vect{U}} . \end{multline} \end{subequations} hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$: \label{apdx:A_dyn_zph} \label{eq:SCOORD_dyn_zph} \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 . in particular the pressure gradient. By contrast, $\omega$ is not $w$, the third component of the velocity, but the dia-surface velocity component, \ie\ the volume flux across the moving $s$-surfaces per unit horizontal area. \ie\ the volume flux across the moving $s$-surfaces per unit horizontal area. % ================================================================ \section{Tracer equation} \label{sec:A_tracer} \label{sec:SCOORD_tracer} The tracer equation is obtained using the same calculation as for the continuity equation and then \begin{multline} \label{apdx:A_tracer} \label{eq:SCOORD_tracer} \frac{1}{e_3} \frac{\partial \left(  e_3 T  \right)}{\partial t} = -\frac{1}{e_1 \,e_2 \,e_3} \end{multline} The expression for the advection term is a straight consequence of (\autoref{apdx:A_sco_Continuity}), the expression of the 3D divergence in the $s-$coordinates established above. The expression for the advection term is a straight consequence of (\autoref{eq:SCOORD_sco_Continuity}), the expression of the 3D divergence in the $s-$coordinates established above. \biblio

• ## NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex

 r11537 \begin{table} \scriptsize \begin{tabularx}{\textwidth}{|X|c|c|c|} \begin{tabular}{|l|c|c|} \hline tag ids affected by automatic definition of some of their attributes & name attribute                                                       & attribute value                      \\ attribute value                                                      \\ \hline \hline field\_definition                                                    & freq\_op                                                             & \np{rn\_rdt}                         \\ \np{rn\_rdt}                                                         \\ \hline SBC                                                                  & freq\_op                                                             & \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ \np{rn\_rdt} $\times$ \np{nn\_fsbc}                                  \\ \hline ptrc\_T                                                              & freq\_op                                                             & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ \hline diad\_T                                                              & freq\_op                                                             & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ \hline EqT, EqU, EqW                                                        & jbegin, ni,                                                          & according to the grid                \\ & according to the grid                                                \\ & name\_suffix                                                         & \\ \\ \hline TAO, RAMA and PIRATA moorings                                        & zoom\_ibegin, zoom\_jbegin,                                          & according to the grid                \\ & according to the grid                                                \\ & name\_suffix                                                         & \\ \hline \end{tabularx} \\ \hline \end{tabular} \end{table} \subsection{XML reference tables} \label{subsec:IOM_xmlref} \label{subsec:DIA_IOM_xmlref} \begin{enumerate} 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. section \autoref{subsec:DIA_IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the mono-processor case (\ie\ global domain of {\small\ttfamily 182x149x31}). An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with table \autoref{tab:DIA_NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with a 4x2 mpi partitioning. Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of \end{tabular} \caption{ \protect\label{tab:NC4} \protect\label{tab:DIA_NC4} Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression } \section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})] {FLO: On-Line Floats trajectories (\protect\key{floats})} \label{sec:FLO} \label{sec:DIA_FLO} %--------------------------------------------namflo------------------------------------------------------- \mathcal{V} &=  \mathcal{A}  \;\bar{\eta} \end{split} \label{eq:MV_nBq} \label{eq:DIA_MV_nBq} \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} \label{eq:Co_nBq} \label{eq:DIA_Co_nBq} \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} \label{eq:Mass_nBq} \label{eq:DIA_Mass_nBq} where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to Bringing \autoref{eq:DIA_Mass_nBq} and the time derivative of \autoref{eq:DIA_MV_nBq} together leads to the evolution equation of the mean sea level \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} \label{eq:ssh_nBq} \label{eq:DIA_ssh_nBq} The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. The first term in equation \autoref{eq:DIA_ssh_nBq} alters sea level by adding or subtracting mass from the ocean. The second term arises from temporal changes in the global mean density; \ie\ from steric effects. In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by the gravity (\ie\ in the hydrostatic balance of the primitive Equations). In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: In particular, the mass conservation equation, \autoref{eq:DIA_Co_nBq}, degenerates into the incompressibility equation: $\frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} % \label{eq:Co_Bq} % \label{eq:DIA_Co_Bq}$ $\partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} % \label{eq:V_Bq} % \label{eq:DIA_V_Bq}$ \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} \label{eq:M_Bq} \label{eq:DIA_M_Bq} Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) in \autoref{eq:M_Bq} leads to a very simple form for the steric height: in \autoref{eq:DIA_M_Bq} leads to a very simple form for the steric height: \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} \label{eq:steric_Bq} \label{eq:DIA_steric_Bq} (wetting and drying of grid point is not allowed). Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered. In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{=.true.}, it is given by $\eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} }{ \sum_{i,\,j,\,k} e_{1t} e_{2t} e_{3t} } % \label{eq:discrete_steric_Bq_nfs} % \label{eq:DIA_discrete_steric_Bq_nfs}$ \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 } { \sum_{i,\,j,\,k}       e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}       e_{1t}e_{2t} \eta } % \label{eq:discrete_steric_Bq_fs} % \label{eq:DIA_discrete_steric_Bq_fs} \] $\eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv % \label{eq:thermosteric_Bq} % \label{eq:DIA_thermosteric_Bq}$ \includegraphics[width=\textwidth]{Fig_mask_subasins} \caption{ \protect\label{fig:mask_subasins} \protect\label{fig:DIA_mask_subasins} Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute the heat and salt transports as well as the meridional stream-function: Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}). %------------------------------------------namptr----------------------------------------- $C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} % \label{eq:CFL} % \label{eq:DIA_CFL}$
• ## NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex

 r11537 {\em Compatibility changes Major simplification has moved many of the options to external domain configuration tools. (see \autoref{apdx:DOMAINcfg}) (see \autoref{apdx:DOMCFG}) }                                                                                            \\ {\em 3.x} & {\em Rachid Benshila, Gurvan Madec \& S\'{e}bastien Masson} & \newpage Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretisation \autoref{chap:STP}, Having defined the continuous equations in \autoref{chap:MB} and chosen a time discretisation \autoref{chap:TD}, we need to choose a grid for spatial discretisation and related numerical algorithms. In the present chapter, we provide a general description of the staggered grid used in \NEMO, \includegraphics[width=\textwidth]{Fig_cell} \caption{ \protect\label{fig:cell} \protect\label{fig:DOM_cell} Arrangement of variables. $t$ indicates scalar points where temperature, salinity, density, pressure and The arrangement of variables is the same in all directions. It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:cell}). the centre of each face of the cells (\autoref{fig:DOM_cell}). This is the generalisation to three dimensions of the well-known C'' grid in Arakawa's classification \citep{mesinger.arakawa_bk76}. The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:DOM_cell}. In all the following, subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where the scale factors are defined. Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}. Each scale factor is defined as the local analytical value provided by \autoref{eq:MB_scale_factors}. As a result, the mesh on which partial derivatives $\pd[]{\lambda}$, $\pd[]{\varphi}$ and $\pd[]{z}$ are evaluated is a uniform mesh with a grid size of unity. centred finite difference approximation, not from their analytical expression. This preserves the symmetry of the discrete set of equations and therefore satisfies many of the continuous properties (see \autoref{apdx:C}). the continuous properties (see \autoref{apdx:INVARIANTS}). A similar, related remark can be made about the domain size: when needed, an area, volume, or the total ocean depth must be evaluated as the product or sum of the relevant scale factors \end{tabular} \caption{ \protect\label{tab:cell} \protect\label{tab:DOM_cell} Location of grid-points as a function of integer or integer and a half value of the column, line or level. This indexing is only used for the writing of the semi -discrete equations. secondly, analytical transformations encourage good practice by the definition of smoothly varying grids (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{treguier.dukowicz.ea_JGR96}. An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. An example of the effect of such a choice is shown in \autoref{fig:DOM_zgr_e3}. %>>>>>>>>>>>>>>>>>>>>>>>>>>>> \begin{figure}[!t] \includegraphics[width=\textwidth]{Fig_zgr_e3} \caption{ \protect\label{fig:zgr_e3} \protect\label{fig:DOM_zgr_e3} Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, and (b) analytically derived grid-point position and scale factors. the midpoint between them are: \begin{alignat*}{2} % \label{eq:di_mi} % \label{eq:DOM_di_mi} \delta_i [q]      &= &       &q (i + 1/2) - q (i - 1/2) \\ \overline q^{\, i} &= &\big\{ &q (i + 1/2) + q (i - 1/2) \big\} / 2 Similar operators are defined with respect to $i + 1/2$, $j$, $j + 1/2$, $k$, and $k + 1/2$. Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at a $t$-point has Following \autoref{eq:MB_grad} and \autoref{eq:MB_lap}, the gradient of a variable $q$ defined at a $t$-point has its three components defined at $u$-, $v$- and $w$-points while its Laplacian is defined at the $t$-point. These operators have the following discrete forms in the curvilinear $s$-coordinates system: \end{multline*} Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector $\vect A = (a_1,a_2,a_3)$ defined at Following \autoref{eq:MB_curl} and \autoref{eq:MB_div}, a vector $\vect A = (a_1,a_2,a_3)$ defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, and its divergence defined at $t$-points: In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and $(\overline{\cdots}^{\, i})^* = \overline{\cdots}^{\, i + 1/2}$, respectively. These two properties will be used extensively in the \autoref{apdx:C} to These two properties will be used extensively in the \autoref{apdx:INVARIANTS} to demonstrate integral conservative properties of the discrete formulation chosen. \includegraphics[width=\textwidth]{Fig_index_hor} \caption{ \protect\label{fig:index_hor} \protect\label{fig:DOM_index_hor} Horizontal integer indexing used in the \fortran code. The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices \label{subsec:DOM_Num_Index_hor} The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}. The indexing in the horizontal plane has been chosen as shown in \autoref{fig:DOM_index_hor}. For an increasing $i$ index ($j$ index), the $t$-point and the eastward $u$-point (northward $v$-point) have the same index (see the dashed area in \autoref{fig:index_hor}). (see the dashed area in \autoref{fig:DOM_index_hor}). A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices. given in \autoref{subsec:DOM_cell}. The sea surface corresponds to the $w$-level $k = 1$, which is the same index as the $t$-level just below (\autoref{fig:index_vert}). (\autoref{fig:DOM_index_vert}). The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while the last $t$-level is always outside the ocean domain (\autoref{fig:index_vert}). the last $t$-level is always outside the ocean domain (\autoref{fig:DOM_index_vert}). Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index (\ie\ $t$-points and their nearest $w$-point neighbour in negative index direction), in contrast to the indexing on the horizontal plane where the $t$-point has the same index as the nearest velocity points in the positive direction of the respective horizontal axis index (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). (compare the dashed area in \autoref{fig:DOM_index_hor} and \autoref{fig:DOM_index_vert}). Since the scale factors are chosen to be strictly positive, a \textit{minus sign} is included in the \fortran implementations of \includegraphics[width=\textwidth]{Fig_index_vert} \caption{ \protect\label{fig:index_vert} \protect\label{fig:DOM_index_vert} Vertical integer indexing used in the \fortran code. Note that the $k$-axis is oriented downward. the model domain itself can be altered by runtime selections. The code previously used to perform vertical discretisation has been incorporated into an external tool (\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. (\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMCFG}. The next subsections summarise the parameter and fields related to the configuration of the whole model domain. The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, evaluated at the values as specified in \autoref{tab:cell} for the respective grid-point position. evaluated at the values as specified in \autoref{tab:DOM_cell} for the respective grid-point position. The calculation of the values of the horizontal scale factor arrays in general additionally involves partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, \includegraphics[width=\textwidth]{Fig_z_zps_s_sps} \caption{ \protect\label{fig:z_zps_s_sps} \protect\label{fig:DOM_z_zps_s_sps} The ocean bottom as seen by the model: (a) $z$-coordinate with full step, By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{=.false.} in \nam{dom}): the coordinate follow the time-variation of the free surface so that the transformation is time dependent: $z(i,j,k,t)$ (\eg\ \autoref{fig:z_zps_s_sps}f). $z(i,j,k,t)$ (\eg\ \autoref{fig:DOM_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{=.true.} in \nam{dom}), the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface \medskip The decision on these choices must be made when the \np{cn\_domcfg} file is constructed. Three main choices are offered (\autoref{fig:z_zps_s_sps}a-c): Three main choices are offered (\autoref{fig:DOM_z_zps_s_sps}a-c): \begin{itemize} Additionally, hybrid combinations of the three main coordinates are available: $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). $s-z$ or $s-zps$ coordinate (\autoref{fig:DOM_z_zps_s_sps}d and \autoref{fig:DOM_z_zps_s_sps}e). A further choice related to vertical coordinate concerns \section[Initial state (\textit{istate.F90} and \textit{dtatsd.F90})] {Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} \label{sec:DTA_tsd} \label{sec:DOM_DTA_tsd} %-----------------------------------------namtsd------------------------------------------- \nlst{namtsd} Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}. The default version sets horizontally uniform T and profiles as used in the GYRE configuration (see \autoref{sec:CFG_gyre}). (see \autoref{sec:CFGS_gyre}). \end{description}

• ## NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex

 r11537 \newpage The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:PE_zdf} and The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:MB_zdf} and their discrete formulation in \autoref{sec:TRA_ldf} and \autoref{sec:DYN_ldf}). In this section we further discuss each lateral physics option. Note that this chapter describes the standard implementation of iso-neutral tracer mixing. Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{=.true.}, is described in \autoref{apdx:triad} is described in \autoref{apdx:TRIADS} %-----------------------------------namtra_ldf - namdyn_ldf-------------------------------------------- the cell of the quantity to be diffused. For a tracer, this leads to the following four slopes: $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:tra_ldf_iso}), $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:TRA_ldf_iso}), while for momentum the slopes are  $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for $u$ and $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$. In $s$-coordinates, geopotential mixing (\ie\ horizontal mixing) $r_1$ and $r_2$ are the slopes between the geopotential and computational surfaces. Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} when Their discrete formulation is found by locally solving \autoref{eq:TRA_ldf_iso} when the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform, \ie\ a linear function of $z_T$, the depth of a $T$-point. \label{eq:ldfslp_geo} \label{eq:LDF_slp_geo} \begin{aligned} r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} Their discrete formulation is found using the fact that the diffusive fluxes of locally referenced potential density (\ie\ $in situ$ density) vanish. So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in So, substituting $T$ by $\rho$ in \autoref{eq:TRA_ldf_iso} and setting the diffusive fluxes in the three directions to zero leads to the following definition for the neutral slopes: \label{eq:ldfslp_iso} \label{eq:LDF_slp_iso} \begin{split} r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} %gm% rewrite this as the explanation is not very clear !!! %In practice, \autoref{eq:ldfslp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:ldfslp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth. %By definition, neutral surfaces are tangent to the local $in situ$ density \citep{mcdougall_JPO87}, therefore in \autoref{eq:ldfslp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters). %In the $z$-coordinate, the derivative of the  \autoref{eq:ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation. As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:ldfslp_iso} has to %In practice, \autoref{eq:LDF_slp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:LDF_slp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth. %By definition, neutral surfaces are tangent to the local $in situ$ density \citep{mcdougall_JPO87}, therefore in \autoref{eq:LDF_slp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters). %In the $z$-coordinate, the derivative of the  \autoref{eq:LDF_slp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation. As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:LDF_slp_iso} has to be evaluated at the same local pressure (which, in decibars, is approximated by the depth in meters in the model). Therefore \autoref{eq:ldfslp_iso} cannot be used as such, Therefore \autoref{eq:LDF_slp_iso} cannot be used as such, but further transformation is needed depending on the vertical coordinate used: \item[$z$-coordinate with full step: ] in \autoref{eq:ldfslp_iso} the densities appearing in the $i$ and $j$ derivatives  are taken at the same depth, in \autoref{eq:LDF_slp_iso} the densities appearing in the $i$ and $j$ derivatives  are taken at the same depth, thus the $in situ$ density can be used. This is not the case for the vertical derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if the Griffies scheme is used (\np{ln\_traldf\_triad}\forcode{=.true.}; see \autoref{apdx:triad}). see \autoref{apdx:TRIADS}). In other words, iso-neutral mixing will only be accurately represented with a linear equation of state (\np{ln\_seos}\forcode{=.true.}). In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso} In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:LDF_slp_iso} will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. \[ % \label{eq:ldfslp_iso2} % \label{eq:LDF_slp_iso2} \begin{split} r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac To overcome this problem, several techniques have been proposed in which the numerical schemes of the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{=.true.}; see \autoref{apdx:triad}. Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:TRIADS}. Here, another strategy is presented \citep{lazar_phd97}: a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of \includegraphics[width=\textwidth]{Fig_eiv_slp} \caption{ \protect\label{fig:eiv_slp} \protect\label{fig:LDF_eiv_slp} Vertical profile of the slope used for lateral mixing in the mixed layer: \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, The iso-neutral diffusion operator on momentum is the same as the one used on tracers but applied to each component of the velocity separately (see \autoref{eq:dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). (see \autoref{eq:DYN_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). The slopes between the surface along which the diffusion operator acts and the surface of computation ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the $u$-component, and $T$-, $f$- and \textit{vw}- points for the $v$-component. They are computed from the slopes used for tracer diffusion, \ie\ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}: \ie\ \autoref{eq:LDF_slp_geo} and \autoref{eq:LDF_slp_iso}: \[ % \label{eq:ldfslp_dyn} % \label{eq:LDF_slp_dyn} \begin{aligned} &r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ \label{eq:constantah} \label{eq:LDF_constantah} A_o^l = \left\{ \begin{aligned} In the vertically varying case, a hyperbolic variation of the lateral mixing coefficient is introduced in which the surface value is given by \autoref{eq:constantah}, the bottom value is 1/4 of the surface value, the surface value is given by \autoref{eq:LDF_constantah}, the bottom value is 1/4 of the surface value, and the transition takes place around z=500~m with a width of 200~m. This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users. the type of operator used: \label{eq:title} \label{eq:LDF_title} A_l = \left\{ \begin{aligned} model configurations presenting large changes in grid spacing such as global ocean models. Indeed, in such a case, a constant mixing coefficient can lead to a blow up of the model due to large coefficient compare to the smallest grid size (see \autoref{sec:STP_forward_imp}), large coefficient compare to the smallest grid size (see \autoref{sec:TD_forward_imp}), especially when using a bilaplacian operator. \label{eq:flowah} \label{eq:LDF_flowah} A_l = \left\{ \begin{aligned} \label{eq:smag1} \label{eq:LDF_smag1} \begin{split} T_{smag}^{-1} & = \sqrt{\left( \partial_x u - \partial_y v\right)^2 + \left( \partial_y u + \partial_x v\right)^2  } \\ \label{eq:smag2} \label{eq:LDF_smag2} A_{smag} = \left\{ \begin{aligned} For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec:STP_forward_imp}) so that: \label{eq:smag3} For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec:TD_forward_imp}) so that: \label{eq:LDF_smag3} \begin{aligned} & C_{min} \frac{1}{2}   \lvert U \rvert  e    < A_{smag} < C_{max} \frac{e^2}{   8\rdt}                 & \text{for laplacian operator } \\ (1) the momentum diffusion operator acting along model level surfaces is written in terms of curl and divergent components of the horizontal current (see \autoref{subsec:PE_ldf}). divergent components of the horizontal current (see \autoref{subsec:MB_ldf}). Although the eddy coefficient could be set to different values in these two terms, this option is not currently available. (2) with an horizontally varying viscosity, the quadratic integral constraints on enstrophy and on the square of the horizontal divergence for operators acting along model-surfaces are no longer satisfied (\autoref{sec:dynldf_properties}). (\autoref{sec:INVARIANTS_dynldf_properties}). % ================================================================ the formulation of which depends on the slopes of iso-neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, \ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinates, and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. \ie\ \autoref{eq:LDF_slp_geo} is used in $z$-coordinates, and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $s$-coordinates. If isopycnal mixing is used in the standard way, \ie\ \np{ln\_traldf\_triad}\forcode{=.false.}, the eddy induced velocity is given by: \label{eq:ldfeiv} \label{eq:LDF_eiv} \begin{split} u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ \colorbox{yellow}{CASE \np{nn\_aei\_ijk\_t} = 21 to be added} In case of setting \np{ln\_traldf\_triad}\forcode{=.true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:triad}. In case of setting \np{ln\_traldf\_triad}\forcode{ = .true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. % ================================================================
• ## NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex

 r11435 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in \autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. \autoref{fig:OBS_avgrec} and~\autoref{fig:OBS_avgrad}. %>>>>>>>>>>>>>>>>>>>>>>>>>>>> \includegraphics[width=\textwidth]{Fig_OBS_avg_rec} \caption{ \protect\label{fig:obsavgrec} \protect\label{fig:OBS_avgrec} Weights associated with each model grid box (blue lines and numbers) for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg x 1\deg. \includegraphics[width=\textwidth]{Fig_OBS_avg_rad} \caption{ \protect\label{fig:obsavgrad} \protect\label{fig:OBS_avgrad} Weights associated with each model grid box (blue lines and numbers) for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg. ({\phi_{}}_{\mathrm D}  \;  - \; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ \end{array} % \label{eq:cross} % \label{eq:OBS_cross} \end{align*} point in the opposite direction to the unit normal $\widehat{\mathbf k}$ \includegraphics[width=\textwidth]{Fig_ASM_obsdist_local} \caption{ \protect\label{fig:obslocal} \protect\label{fig:OBS_local} Example of the distribution of observations with the geographical distribution of observational data. } This is the simplest option in which the observations are distributed according to the domain of the grid-point parallelization. \autoref{fig:obslocal} shows an example of the distribution of the {\em in situ} data on processors with \autoref{fig:OBS_local} shows an example of the distribution of the {\em in situ} data on processors with a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. The grid-point domain decomposition is clearly visible on the plot. \includegraphics[width=\textwidth]{Fig_ASM_obsdist_global} \caption{ \protect\label{fig:obsglobal} \protect\label{fig:OBS_global} Example of the distribution of observations with the round-robin distribution of observational data. } use message passing in order to retrieve the stencil for interpolation. The simplest distribution of the observations is to distribute them using a round-robin scheme. \autoref{fig:obsglobal} shows the distribution of the {\em in situ} data on processors for \autoref{fig:OBS_global} shows the distribution of the {\em in situ} data on processors for the round-robin distribution of observations with a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:obslocal}. a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:OBS_local}. The observations are now clearly randomly distributed on the globe. In order to be able to perform horizontal interpolation in this case, \end{minted} \autoref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. \autoref{fig:OBS_dataplotmain} shows the main window which is launched when dataplot starts. This is split into three parts. At the top there is a menu bar which contains a variety of drop down menus. \includegraphics[width=\textwidth]{Fig_OBS_dataplot_main} \caption{ \protect\label{fig:obsdataplotmain} \protect\label{fig:OBS_dataplotmain} Main window of dataplot. } If a profile point is clicked with the mouse button a plot of the observation and background values as a function of depth (\autoref{fig:obsdataplotprofile}). a function of depth (\autoref{fig:OBS_dataplotprofile}). %>>>>>>>>>>>>>>>>>>>>>>>>>>>> \includegraphics[width=\textwidth]{Fig_OBS_dataplot_prof} \caption{ \protect\label{fig:obsdataplotprofile} \protect\label{fig:OBS_dataplotprofile} Profile plot from dataplot produced by right clicking on a point in the main window. }
• ## NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex

 r11537 Next, the scheme