Changeset 11512
- Timestamp:
- 2019-09-09T12:05:20+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization
- Files:
-
- 53 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/definitions.tex
r11263 r11512 1 %% Engine ( folder name)1 %% Engine (subfolder name) 2 2 \def \engine{NEMO} 3 3 4 %% Title (variable name already use by 'titling' pkg) 4 %% Title and cover page settings 5 \def \spacetop{ \vspace*{1.85cm} } 5 6 \def \heading{NEMO ocean engine} 7 \def \subheading{} 8 \def \spacedown{ \vspace*{0.75cm } } 9 \def \authorswidth{ 0.3\linewidth} 10 \def \rulelenght{270pt} 11 \def \abstractwidth{0.6\linewidth} 6 12 7 %% Authors (thanks will apply to the second author) 8 \def \firstauthor{Gurvan Madec~} 9 \def \secondauthor{NEMO System Team} 13 %% Color for document (frontpage banner, links and chapter boxes) 14 \def \setcolor{ \definecolor{manualcolor}{cmyk}{1, .60, 0, .40} } 10 15 11 16 %% IPSL publication number -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/foreword.tex
r11263 r11512 1 % ================================================================ 2 % Foreword 3 % ================================================================ 4 \chapter*{Foreword} 1 %% ================================================================ 2 %% Abstract 3 %% ================================================================ 5 4 6 The ocean engine of NEMO (Nucleus for European Modelling of the Ocean) is a primitive equation model adapted to 7 regional and global ocean circulation problems. 8 It is intended to be a flexible tool for studying the ocean and its interactions with the others components of 9 the earth climate system over a wide range of space and time scales. 5 %% Common part between NEMO-SI3-TOP 6 \NEMO\ (``Nucleus for European Modelling of the Ocean'') is a framework of ocean-related engines. 7 It is intended to be a flexible tool for studying the ocean dynamics and thermodynamics (``blue ocean''), 8 as well as its interactions with the components of the Earth climate system over 9 a wide range of space and time scales. 10 Within \NEMO, the ocean engine is interfaced with a sea-ice model (\SIcube\ or 11 \href{http://github.com/CICE-Consortium/CICE}{CICE}), 12 passive tracers and biogeochemical models (\TOP) and, 13 via the \href{http://portal.enes.org/oasis}{OASIS} coupler, 14 with several atmospheric general circulation models. 15 It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software. 10 16 17 %% Specific part 18 The primitive equation model is adapted to regional and global ocean circulation problems down to 19 kilometric scale. 11 20 Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height, 12 21 the \textit{Conservative} Temperature and the \textit{Absolute} Salinity. 13 In the horizontal direction, the model uses a curvilinear orthogonal grid and in the vertical direction, 14 a full or partial step $z$-coordinate, or $s$-coordinate, or a mixture of the two. 22 In the horizontal direction, the model uses a curvilinear orthogonal grid and 23 in the vertical direction, a full or partial step $z$-coordinate, or $s$-coordinate, or 24 a mixture of the two. 15 25 The distribution of variables is a three-dimensional Arakawa C-type grid. 16 Various physical choices are available to describe ocean physics, including TKE, and GLS vertical physics. 17 18 Within NEMO, the ocean is interfaced with a sea-ice model (SI$^3$) 19 %or \href{https://github.com/CICE-Consortium/CICE}{CICE}), 20 passive tracer and biogeochemical models (TOP-PISCES) and, 21 via the \href{https://portal.enes.org/oasis}{OASIS} coupler, with several atmospheric general circulation models. 22 It also support two-way grid embedding via the \href{http://agrif.imag.fr}{AGRIF} software. 26 Various physical choices are available to describe ocean physics, 27 so as various HPC functionalities to improve performances. -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/thanks.tex
r11263 r11512 1 J\'{e}r\^{o}me Chanut, 2 Silvia Mocavero 1 %Romain Bourdall\'{e}-Badie 2 %\orcid{0000-0002-8742-3289} \\ 3 %Mike Bell \\ 4 %J\'{e}r\^{o}me Chanut \\ 5 %Emanuela Clementi 6 %\orcid{0000-0002-5752-1849} \\ 7 %Andrew Coward 8 %\orcid{0000-0002-0456-129X} \\ 9 %Massimiliano Drudi 10 %\orcid{0000-0002-9951-740X} \\ 11 %Christian \'{E}th\'{e} \\ 12 %Doroteaciro Iovino 13 %\orcid{0000-0001-5132-7255} \\ 14 %Dan Lea \\ 15 %Claire L\'{e}vy 16 %\orcid{0000-0003-2518-6692} \\ 17 %Gurvan Madec 18 %\orcid{0000-0002-6447-4198} \\ 19 %Nicolas Martin \\ 20 %S\'{e}bastien Masson 21 %\orcid{0000-0002-1694-8117} \\ 22 %Pierre Mathiot \\ 23 %Silvia Mocavero 24 %\orcid{0000-0002-6309-8282} \\ 25 %Simon M\"{u}ller \\ 26 %George Nurser \\ 27 %Guillaume Samson 28 %\orcid{0000-0001-7481-6369} \\ 29 %Dave Storkey 30 31 \orcid{0000-0002-8742-3289} Romain Bourdall\'{e}-Badie \\ 32 Mike Bell \\ 33 J\'{e}r\^{o}me Chanut \\ 34 \orcid{0000-0002-5752-1849} Emanuela Clementi \\ 35 \orcid{0000-0002-0456-129X} Andrew Coward \\ 36 \orcid{0000-0002-9951-740X} Massimiliano Drudi \\ 37 Christian \'{E}th\'{e} \\ 38 \orcid{0000-0001-5132-7255} Doroteaciro Iovino \\ 39 Dan Lea \\ 40 \orcid{0000-0003-2518-6692} Claire L\'{e}vy \\ 41 \orcid{0000-0002-6447-4198} Gurvan Madec \\ 42 Nicolas Martin \\ 43 \orcid{0000-0002-1694-8117} S\'{e}bastien Masson \\ 44 Pierre Mathiot \\ 45 \orcid{0000-0002-6309-8282} Silvia Mocavero \\ 46 Simon M\"{u}ller \\ 47 George Nurser \\ 48 \orcid{0000-0001-7481-6369} Guillaume Samson \\ 49 Dave Storkey -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_A.tex
r11353 r11512 9 9 \label{apdx:A} 10 10 11 \ minitoc11 \chaptertoc 12 12 13 13 \vfill … … 31 31 32 32 In order to establish the set of Primitive Equation in curvilinear $s$-coordinates 33 (\ie an orthogonal curvilinear coordinate in the horizontal and33 (\ie\ an orthogonal curvilinear coordinate in the horizontal and 34 34 an Arbitrary Lagrangian Eulerian (ALE) coordinate in the vertical), 35 35 we start from the set of equations established in \autoref{subsec:PE_zco_Eq} for … … 329 329 \] 330 330 This leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 331 \ie the total $s-$coordinate time derivative :331 \ie\ the total $s-$coordinate time derivative : 332 332 \begin{align} 333 333 \label{apdx:A_sco_Dt_vect} … … 368 368 % 369 369 Introducing the vertical scale factor inside the horizontal derivative of the first two terms 370 (\ie the horizontal divergence), it becomes :370 (\ie\ the horizontal divergence), it becomes : 371 371 \begin{align*} 372 372 { … … 411 411 \end{align*} 412 412 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 413 \ie the total $s-$coordinate time derivative in flux form:413 \ie\ the total $s-$coordinate time derivative in flux form: 414 414 \begin{flalign} 415 415 \label{apdx:A_sco_Dt_flux} … … 569 569 in particular the pressure gradient. 570 570 By contrast, $\omega$ is not $w$, the third component of the velocity, but the dia-surface velocity component, 571 \ie the volume flux across the moving $s$-surfaces per unit horizontal area.571 \ie\ the volume flux across the moving $s$-surfaces per unit horizontal area. 572 572 573 573 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_B.tex
r11353 r11512 8 8 \label{apdx:B} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \newpage -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_C.tex
r10442 r11512 8 8 \label{apdx:C} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 %%% Appendix put in gmcomment as it has not been updated for \zstar and s coordinate … … 39 39 $dv=e_1\,e_2\,e_3 \,di\,dj\,dk$ is the volume element, with only $e_3$ that depends on time. 40 40 $D$ and $S$ are the ocean domain volume and surface, respectively. 41 No wetting/drying is allow (\ie $\frac{\partial S}{\partial t} = 0$).41 No wetting/drying is allow (\ie\ $\frac{\partial S}{\partial t} = 0$). 42 42 Let $k_s$ and $k_b$ be the ocean surface and bottom, resp. 43 (\ie $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth).43 (\ie\ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 44 44 \begin{flalign*} 45 45 z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s} e_3(\tilde{k}) \;d\tilde{k} … … 99 99 \label{sec:C.1} 100 100 101 The discretization of pimitive equation in $s$-coordinate (\ie time and space varying vertical coordinate)102 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 101 The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate) 102 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 103 103 104 104 Let us first establish those constraint in the continuous world. 105 The total energy (\ie kinetic plus potential energies) is conserved:105 The total energy (\ie\ kinetic plus potential energies) is conserved: 106 106 \begin{flalign} 107 107 \label{eq:Tot_Energy} … … 109 109 \end{flalign} 110 110 under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations), 111 mass conservation, and closed domain. 111 mass conservation, and closed domain. 112 112 113 113 This equation can be transformed to obtain several sub-equalities. … … 211 211 \end{subequations} 212 212 213 \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 213 \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 214 214 Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 215 215 \begin{flalign*} … … 224 224 &=+ \int\limits_D g\, \rho \; w \; dv &&&\\ 225 225 \end{flalign*} 226 where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 227 the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 228 226 where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 227 the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 228 229 229 The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 230 230 \begin{flalign*} … … 367 367 % ------------------------------------------------------------------------------------------------------------- 368 368 \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 369 \label{subsec:C_vorENE} 369 \label{subsec:C_vorENE} 370 370 371 371 For the ENE scheme, the two components of the vorticity term are given by: … … 399 399 - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2} \biggr\} \quad \equiv 0 400 400 \end{array} 401 } 401 } 402 402 \end{flalign*} 403 403 In other words, the domain averaged kinetic energy does not change due to the vorticity term. … … 407 407 % ------------------------------------------------------------------------------------------------------------- 408 408 \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 409 \label{subsec:C_vorEEN_vect} 410 411 With the EEN scheme, the vorticity terms are represented as: 409 \label{subsec:C_vorEEN_vect} 410 411 With the EEN scheme, the vorticity terms are represented as: 412 412 \begin{equation} 413 413 \tag{\ref{eq:dynvor_een}} … … 420 420 \end{aligned} 421 421 } \right. 422 \end{equation} 422 \end{equation} 423 423 where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 424 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 424 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 425 425 \begin{equation} 426 426 \tag{\ref{eq:Q_triads}} … … 479 479 % ------------------------------------------------------------------------------------------------------------- 480 480 \subsubsection{Gradient of kinetic energy / Vertical advection} 481 \label{subsec:C_zad} 481 \label{subsec:C_zad} 482 482 483 483 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~: … … 487 487 + \frac{1}{2} \int_D { \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } 488 488 \] 489 Indeed, using successively \autoref{eq:DOM_di_adj} (\ie the skew symmetry property of the $\delta$ operator)489 Indeed, using successively \autoref{eq:DOM_di_adj} (\ie\ the skew symmetry property of the $\delta$ operator) 490 490 and the continuity equation, then \autoref{eq:DOM_di_adj} again, 491 491 then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 492 (\ie the symmetry property of the $\overline {\,\cdot \,}$ operator)492 (\ie\ the symmetry property of the $\overline {\,\cdot \,}$ operator) 493 493 applied in the horizontal and vertical directions, it becomes: 494 494 \begin{flalign*} … … 566 566 } } \right) 567 567 \] 568 a formulation that requires an additional horizontal mean in contrast with the one used in NEMO.568 a formulation that requires an additional horizontal mean in contrast with the one used in \NEMO. 569 569 Nine velocity points have to be used instead of 3. 570 570 This is the reason why it has not been chosen. … … 595 595 A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. 596 596 In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences 597 (property \autoref{eq:DOM_curl_grad}). 597 (property \autoref{eq:DOM_curl_grad}). 598 598 } 599 599 600 600 When the equation of state is linear 601 (\ie when an advection-diffusion equation for density can be derived from those of temperature and salinity)601 (\ie\ when an advection-diffusion equation for density can be derived from those of temperature and salinity) 602 602 the change of KE due to the work of pressure forces is balanced by 603 the change of potential energy due to buoyancy forces: 603 the change of potential energy due to buoyancy forces: 604 604 \[ 605 605 - \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv … … 621 621 % 622 622 \allowdisplaybreaks 623 \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie the skew symmetry property of623 \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of 624 624 the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, 625 625 the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, … … 771 771 % ------------------------------------------------------------------------------------------------------------- 772 772 \subsubsection{Coriolis plus ``metric'' term} 773 \label{subsec:C.3.3} 773 \label{subsec:C.3.3} 774 774 775 775 In flux from the vorticity term reduces to a Coriolis term in which … … 792 792 % ------------------------------------------------------------------------------------------------------------- 793 793 \subsubsection{Flux form advection} 794 \label{subsec:C.3.4} 794 \label{subsec:C.3.4} 795 795 796 796 The flux form operator of the momentum advection is evaluated using … … 811 811 812 812 Let us first consider the first term of the scalar product 813 (\ie just the the terms associated with the i-component of the advection):813 (\ie\ just the the terms associated with the i-component of the advection): 814 814 \begin{flalign*} 815 815 & - \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv \\ … … 867 867 When the UBS scheme is used to evaluate the flux form momentum advection, 868 868 the discrete operator does not contribute to the global budget of linear momentum (flux form). 869 The horizontal kinetic energy is not conserved, but forced to decay (\ie the scheme is diffusive).869 The horizontal kinetic energy is not conserved, but forced to decay (\ie\ the scheme is diffusive). 870 870 871 871 % ================================================================ … … 879 879 % ------------------------------------------------------------------------------------------------------------- 880 880 \subsubsection{Vorticity term with ENS scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 881 \label{subsec:C_vorENS} 881 \label{subsec:C_vorENS} 882 882 883 883 In the ENS scheme, the vorticity term is descretized as follows: … … 890 890 \end{aligned} 891 891 \right. 892 \end{equation} 892 \end{equation} 893 893 894 894 The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$, 895 the potential enstrophy for a horizontally non-divergent flow (\ie when $\chi$=$0$).895 the potential enstrophy for a horizontally non-divergent flow (\ie\ when $\chi$=$0$). 896 896 Indeed, using the symmetry or skew symmetry properties of the operators 897 897 ( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}), … … 942 942 } 943 943 \end{flalign*} 944 The later equality is obtain only when the flow is horizontally non-divergent, \ie $\chi$=$0$.944 The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$. 945 945 946 946 % ------------------------------------------------------------------------------------------------------------- … … 948 948 % ------------------------------------------------------------------------------------------------------------- 949 949 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 950 \label{subsec:C_vorEEN} 951 952 With the EEN scheme, the vorticity terms are represented as: 950 \label{subsec:C_vorEEN} 951 952 With the EEN scheme, the vorticity terms are represented as: 953 953 \begin{equation} 954 954 \tag{\ref{eq:dynvor_een}} … … 961 961 \end{aligned} 962 962 } \right. 963 \end{equation} 964 where the indices $i_p$ and $k_p$ take the following values: 963 \end{equation} 964 where the indices $i_p$ and $k_p$ take the following values: 965 965 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 966 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 966 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 967 967 \begin{equation} 968 968 \tag{\ref{eq:Q_triads}} … … 971 971 \end{equation} 972 972 973 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie $\chi=0$).973 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie\ $\chi=0$). 974 974 975 975 Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, … … 1023 1023 \label{sec:C.5} 1024 1024 1025 All the numerical schemes used in NEMOare written such that the tracer content is conserved by1025 All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by 1026 1026 the internal dynamics and physics (equations in flux form). 1027 1027 For advection, 1028 only the CEN2 scheme (\ie $2^{nd}$ order finite different scheme) conserves the global variance of tracer.1028 only the CEN2 scheme (\ie\ $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 1029 1029 Nevertheless the other schemes ensure that the global variance decreases 1030 (\ie they are at least slightly diffusive).1030 (\ie\ they are at least slightly diffusive). 1031 1031 For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator. 1032 1032 There is generally no strict conservation of mass, 1033 1033 as the equation of state is non linear with respect to $T$ and $S$. 1034 In practice, the mass is conserved to a very high accuracy. 1034 In practice, the mass is conserved to a very high accuracy. 1035 1035 % ------------------------------------------------------------------------------------------------------------- 1036 1036 % Advection Term … … 1056 1056 Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point 1057 1057 (whatever the interpolation is), 1058 the conservation of the tracer content due to the advection tendency is obtained as follows: 1058 the conservation of the tracer content due to the advection tendency is obtained as follows: 1059 1059 \begin{flalign*} 1060 1060 &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv &&&\\ … … 1072 1072 1073 1073 The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme, 1074 \ie when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$.1074 \ie\ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 1075 1075 It can be demonstarted as follows: 1076 1076 \begin{flalign*} … … 1108 1108 the conservation of potential vorticity and the horizontal divergence, 1109 1109 and the dissipation of the square of these quantities 1110 (\ie enstrophy and the variance of the horizontal divergence) as well as1110 (\ie\ enstrophy and the variance of the horizontal divergence) as well as 1111 1111 the dissipation of the horizontal kinetic energy. 1112 1112 In particular, when the eddy coefficients are horizontally uniform, 1113 1113 it ensures a complete separation of vorticity and horizontal divergence fields, 1114 1114 so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence 1115 (variance of the horizontal divergence) and \textit{vice versa}. 1115 (variance of the horizontal divergence) and \textit{vice versa}. 1116 1116 1117 1117 These properties of the horizontal diffusion operator are a direct consequence of 1118 1118 properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 1119 1119 When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, 1120 the term associated with the horizontal gradient of the divergence is locally zero. 1120 the term associated with the horizontal gradient of the divergence is locally zero. 1121 1121 1122 1122 % ------------------------------------------------------------------------------------------------------------- … … 1237 1237 1238 1238 When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, 1239 the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 1239 the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 1240 1240 The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform. 1241 1241 \begin{flalign*} … … 1396 1396 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&& 1397 1397 \end{flalign*} 1398 and the square of the horizontal divergence decreases (\ie the horizontal divergence is dissipated) if1398 and the square of the horizontal divergence decreases (\ie\ the horizontal divergence is dissipated) if 1399 1399 the vertical diffusion coefficient is uniform over the whole domain: 1400 1400 … … 1463 1463 the heat and salt contents are conserved (equations in flux form). 1464 1464 Since a flux form is used to compute the temperature and salinity, 1465 the quadratic form of these quantities (\ie their variance) globally tends to diminish.1466 As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 1465 the quadratic form of these quantities (\ie\ their variance) globally tends to diminish. 1466 As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 1467 1467 1468 1468 % ------------------------------------------------------------------------------------------------------------- … … 1497 1497 \end{flalign*} 1498 1498 1499 In fact, this property simply results from the flux form of the operator. 1499 In fact, this property simply results from the flux form of the operator. 1500 1500 1501 1501 % ------------------------------------------------------------------------------------------------------------- -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex
r11353 r11512 8 8 \label{apdx:DOMAINcfg} 9 9 10 \ minitoc10 \chaptertoc 11 11 \vfill 12 12 \begin{figure}[b] … … 25 25 26 26 This tool will evolve into an independent utility with its own documentation but its 27 current manifestation is mostly a wrapper for \NEMO \forcode{DOM} modules more aligned to28 those in the previous versions of NEMO. These versions allowed the user to define some27 current manifestation is mostly a wrapper for \NEMO\ \forcode{DOM} modules more aligned to 28 those in the previous versions of \NEMO. These versions allowed the user to define some 29 29 horizontal and vertical grids through additional namelist parameters. Explanations of 30 30 these parameters are retained here for reference pending better documentation for … … 32 32 those read by \forcode{DOMAINcfg} via its own \forcode{namelist_ref} and 33 33 \forcode{namelist_cfg} files. Although, due to their origins, these namelists share names 34 with those used by NEMO, they are not interchangeable and should be considered independent34 with those used by \NEMO, they are not interchangeable and should be considered independent 35 35 of those described elsewhere in this manual. 36 36 … … 43 43 %--------------------------------------------namdom------------------------------------------------------- 44 44 45 \nlst{namdom_domcfg} 45 \nlst{namdom_domcfg} 46 46 %-------------------------------------------------------------------------------------------------------------- 47 47 48 48 The user has three options available in defining a horizontal grid, which involve the 49 namelist variable \np{jphgr\_mesh} of the \n gn{namdom} (\forcode{DOMAINcfg} variant only)49 namelist variable \np{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only) 50 50 namelist. 51 51 … … 54 54 The coordinates and their first derivatives with respect to $i$ and $j$ are provided 55 55 in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module. 56 This is now the only option available within \NEMO itself from v4.0 onwards.57 \item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 58 For other analytical grids, the \ textit{domhgr.f90} module (\forcode{DOMAINcfg} variant) must be59 modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO is60 a better alternative since this is designed to allow simple analytical domains to be 56 This is now the only option available within \NEMO\ itself from v4.0 onwards. 57 \item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 58 For other analytical grids, the \mdl{domhgr} module (\texttt{DOMAINcfg} variant) must be 59 modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO\ is 60 a better alternative since this is designed to allow simple analytical domains to be 61 61 configured and used without the need for external data files. 62 62 \end{description} 63 63 64 There are two simple cases of geographical grids on the sphere. With 65 \np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 66 with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 67 respectively. Such a geographical grid can be very anisotropic at high latitudes 68 because of the convergence of meridians (the zonal scale factors $e_1$ 69 become much smaller than the meridional scale factors $e_2$). The Mercator 70 grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 71 factors in the same way as the zonal ones. In this case, meridional scale factors 72 and latitudes are calculated analytically using the formulae appropriate for 73 a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 74 at the equator (this applies even when the geographical equator is situated outside 75 the model domain). 76 77 In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 78 longitude and latitude of the south-westernmost point (\np{ppglamt0} 79 and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 80 an approximate starting latitude: the real latitude will be recalculated analytically, 81 in order to ensure that the equator corresponds to line passing through $t$- 82 and $u$-points. 83 84 Rectangular grids ignoring the spherical geometry are defined with 85 \np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 86 Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 87 is linear in the $j$-direction). The grid size is uniform in meter in each direction, 88 and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 89 The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 90 with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 91 and the second $t$-point corresponds to coordinate $gphit=0$. The input 92 variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference 93 latitude for computation of the Coriolis parameter. In the case of the beta plane, 94 \np{ppgphi0} corresponds to the center of the domain. Finally, the special case 95 \np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 96 GYRE configuration, representing a classical mid-latitude double gyre system. 97 The rotation allows us to maximize the jet length relative to the gyre areas 98 (and the number of grid points). 64 There are two simple cases of geographical grids on the sphere. With 65 \np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 66 with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 67 respectively. Such a geographical grid can be very anisotropic at high latitudes 68 because of the convergence of meridians (the zonal scale factors $e_1$ 69 become much smaller than the meridional scale factors $e_2$). The Mercator 70 grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 71 factors in the same way as the zonal ones. In this case, meridional scale factors 72 and latitudes are calculated analytically using the formulae appropriate for 73 a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 74 at the equator (this applies even when the geographical equator is situated outside 75 the model domain). 76 77 In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 78 longitude and latitude of the south-westernmost point (\np{ppglamt0} 79 and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 80 an approximate starting latitude: the real latitude will be recalculated analytically, 81 in order to ensure that the equator corresponds to line passing through $t$- 82 and $u$-points. 83 84 Rectangular grids ignoring the spherical geometry are defined with 85 \np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 86 Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 87 is linear in the $j$-direction). The grid size is uniform in meter in each direction, 88 and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 89 The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 90 with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 91 and the second $t$-point corresponds to coordinate $gphit=0$. The input 92 variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference 93 latitude for computation of the Coriolis parameter. In the case of the beta plane, 94 \np{ppgphi0} corresponds to the center of the domain. Finally, the special case 95 \np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 96 GYRE configuration, representing a classical mid-latitude double gyre system. 97 The rotation allows us to maximize the jet length relative to the gyre areas 98 (and the number of grid points). 99 99 100 100 % ------------------------------------------------------------------------------------------------------------- … … 128 128 the vertical scale factors. The user must provide the analytical expression of both $z_0$ 129 129 and its first derivative with respect to $k$. This is done in routine \mdl{domzgr} 130 through statement functions, using parameters provided in the \n gn{namdom} namelist131 (\ forcode{DOMAINcfg} variant).130 through statement functions, using parameters provided in the \nam{dom} namelist 131 (\texttt{DOMAINcfg} variant). 132 132 133 133 It is possible to define a simple regular vertical grid by giving zero stretching … … 156 156 \begin{split} 157 157 z_0 (k) = h_{sur} - h_0 \; k &- \; h_1 \; \log \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\ 158 \; &- \; h2_1 \; \log \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big] 158 \; &- \; h2_1 \; \log \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big] 159 159 \end{split} 160 160 \end{gather} … … 177 177 \end{equation} 178 178 179 This formulation decreases the self-generated circulation into the ice shelf cavity 179 This formulation decreases the self-generated circulation into the ice shelf cavity 180 180 (which can, in extreme case, leads to numerical instability). This is now the recommended formulation for all configurations using v4.0 onwards. The analytical derivation of thicknesses is maintained for backwards compatibility. 181 181 … … 200 200 The resulting depths and scale factors as a function of the model levels are shown in 201 201 \autoref{fig:DOMCFG_zgr} and given in \autoref{tab:DOMCFG_orca_zgr}. 202 Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \n gn{namcfg} namelist.202 Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \nam{cfg} namelist. 203 203 204 204 Rather than entering parameters $h_{sur}$, $h_0$, and $h_1$ directly, it is possible to 205 205 recalculate them. In that case the user sets \np{ppsur}~$=$~\np{ppa0}~$=$~\np{ppa1}~$= 206 999999$., in \n gn{namcfg} namelist, and specifies instead the four following parameters:206 999999$., in \nam{cfg} namelist, and specifies instead the four following parameters: 207 207 \begin{itemize} 208 208 \item … … 309 309 310 310 Three options are possible for defining the bathymetry, according to the namelist variable 311 \np{nn\_bathy} (found in \n gn{namdom} namelist (\forcode{DOMAINCFG} variant) ):311 \np{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ): 312 312 \begin{description} 313 313 \item[\np{nn\_bathy}\forcode{ = 0}]: … … 322 322 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 323 323 each grid point of the model grid. 324 The bathymetry is usually built by interpolating a standard bathymetry product (\eg ETOPO2) onto324 The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto 325 325 the horizontal ocean mesh. 326 326 Defining the bathymetry also defines the coastline: where the bathymetry is zero, … … 352 352 \end{description} 353 353 %%% 354 354 355 355 % ------------------------------------------------------------------------------------------------------------- 356 356 % z-coordinate with constant thickness … … 386 386 thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$. 387 387 388 This has to be kept in mind when specifying values in \n gn{namdom} namelist389 (\ forcode{DOMMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps.388 This has to be kept in mind when specifying values in \nam{dom} namelist 389 (\texttt{DOMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps. 390 390 391 391 For example, with \np{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean … … 405 405 %------------------------------------------nam_zgr_sco--------------------------------------------------- 406 406 % 407 \nlst{namzgr_sco_domcfg} 407 \nlst{namzgr_sco_domcfg} 408 408 %-------------------------------------------------------------------------------------------------------------- 409 Options are defined in \n gn{namzgr\_sco} (\forcode{DOMAINcfg} only).409 Options are defined in \nam{zgr\_sco} (\texttt{DOMAINcfg} only). 410 410 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 411 411 the product of a depth field and either a stretching function or its derivative, respectively: … … 430 430 but care must be taken to ensure that the vertical stretch used is appropriate for the application. 431 431 432 The original default NEMOs-coordinate stretching is available if neither of the other options are specified as true432 The original default \NEMO\ s-coordinate stretching is available if neither of the other options are specified as true 433 433 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). 434 434 This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}: … … 555 555 \label{subsec:DOMCFG_zgr_star} 556 556 557 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.557 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site. 558 558 559 559 \biblio -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_E.tex
r11263 r11512 8 8 \label{apdx:E} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \newpage … … 48 48 $\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]$. 49 49 50 This results in a dissipatively dominant (\ie hyper-diffusive) truncation error50 This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error 51 51 \citep{shchepetkin.mcwilliams_OM05}. 52 52 The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}. … … 135 135 \end{equation} 136 136 with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, 137 \ie $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$137 \ie\ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 138 138 it comes: 139 139 \begin{equation} … … 147 147 \end{split} 148 148 \end{equation} 149 if the velocity is uniform (\ie $|u|=cst$) then the diffusive flux is149 if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is 150 150 \begin{equation} 151 151 \label{eq:tra_ldf_lap} … … 166 166 \end{split} 167 167 \end{equation} 168 if the velocity is uniform (\ie $|u|=cst$) and168 if the velocity is uniform (\ie\ $|u|=cst$) and 169 169 choosing $\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]$ 170 170 … … 218 218 not $2\rdt$ as it can be found sometimes in literature. 219 219 The leap-Frog time stepping is a second order centered scheme. 220 As such it respects the quadratic invariant in integral forms, \ie the following continuous property,220 As such it respects the quadratic invariant in integral forms, \ie\ the following continuous property, 221 221 \[ 222 222 % \label{eq:Energy} … … 256 256 257 257 Let try to define a scheme that get its inspiration from the \citet{griffies.gnanadesikan.ea_JPO98} scheme, 258 but is formulated within the \NEMO framework259 (\ie using scale factors rather than grid-size and having a position of $T$-points that258 but is formulated within the \NEMO\ framework 259 (\ie\ using scale factors rather than grid-size and having a position of $T$-points that 260 260 is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 261 261 … … 271 271 (see \autoref{chap:LDF}). 272 272 Nevertheless, this technique works fine for $T$ and $S$ as they are active tracers 273 (\ie they enter the computation of density), but it does not work for a passive tracer.273 (\ie\ they enter the computation of density), but it does not work for a passive tracer. 274 274 \citep{griffies.gnanadesikan.ea_JPO98} introduce a different way to discretise the off-diagonal terms that 275 275 nicely solve the problem. … … 386 386 \item[$\bullet$ implicit treatment in the vertical] 387 387 In the diagonal term associated with the vertical divergence of the iso-neutral fluxes 388 \ie the term associated with a second order vertical derivative)388 \ie\ the term associated with a second order vertical derivative) 389 389 appears only tracer values associated with a single water column. 390 390 This is of paramount importance since it means that … … 431 431 It is a key property for a diffusion term. 432 432 It means that the operator is also a dissipation term, 433 \ie it is a sink term for the square of the quantity on which it is applied.433 \ie\ it is a sink term for the square of the quantity on which it is applied. 434 434 It therfore ensures that, when the diffusivity coefficient is large enough, 435 435 the field on which it is applied become free of grid-point noise. … … 457 457 the formulation of which depends on the slopes of iso-neutral surfaces. 458 458 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 459 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate,459 \ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 460 460 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 461 461 … … 578 578 Nevertheless this property can be used to choose a discret form of \autoref{eq:eiv_skew_continuous} which 579 579 is consistent with the iso-neutral operator \autoref{eq:Gf_operator}. 580 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie as $A$,580 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$, 581 581 the eddy diffusivity coefficient), the resulting discret form is given by: 582 582 \begin{equation} … … 600 600 it uses the same definition for the slopes. 601 601 It also ensures the conservation of the tracer variance (see Appendix \autoref{apdx:eiv_skew}), 602 \ie it does not include a diffusive component but is a "pure" advection term.602 \ie\ it does not include a diffusive component but is a "pure" advection term. 603 603 604 604 $\ $\newpage %force an empty line … … 840 840 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the $i$ direction. 841 841 Therefore the sum over the domain is zero, 842 \ie the variance of the tracer is preserved by the discretisation of the skew fluxes.842 \ie\ the variance of the tracer is preserved by the discretisation of the skew fluxes. 843 843 844 844 \biblio -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_iso.tex
r11263 r11512 18 18 \label{apdx:triad} 19 19 20 \ minitoc20 \chaptertoc 21 21 22 22 \newpage 23 23 24 \section{Choice of \protect\ngn{namtra\_ldf} namelist parameters} 24 \section[Choice of \texttt{namtra\_ldf} namelist parameters] 25 {Choice of \protect\nam{tra\_ldf} namelist parameters} 25 26 %-----------------------------------------nam_traldf------------------------------------------------------ 26 27 … … 30 31 Two scheme are available to perform the iso-neutral diffusion. 31 32 If the namelist logical \np{ln\_traldf\_triad} is set true, 32 \NEMO updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and33 \NEMO\ updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and 33 34 the eddy-induced advective skew (GM) fluxes. 34 35 If the namelist logical \np{ln\_traldf\_iso} is set true, … … 38 39 39 40 Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 40 Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS,41 Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using XIOS, 41 42 even though the eddy advection is accomplished by means of the skew fluxes. 42 43 … … 72 73 \label{sec:iso} 73 74 74 We have implemented into \NEMO a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98},75 but formulated within the \NEMO framework, using scale factors rather than grid-sizes.75 We have implemented into \NEMO\ a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98}, 76 but formulated within the \NEMO\ framework, using scale factors rather than grid-sizes. 76 77 77 78 \subsection{Iso-neutral diffusion operator} … … 191 192 To correct this, we introduced a smoothing of the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). 192 193 This technique works for $T$ and $S$ in so far as they are active tracers 193 (\ie they enter the computation of density), but it does not work for a passive tracer.194 (\ie\ they enter the computation of density), but it does not work for a passive tracer. 194 195 195 196 \subsection{Expression of the skew-flux in terms of triad slopes} … … 280 281 the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell. 281 282 Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 282 we have \eg \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$.283 we have \eg\ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 283 284 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) to 284 285 calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$, … … 288 289 and we notate these areas, similarly to the triad slopes, 289 290 as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, 290 where \eg in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,291 where \eg\ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 291 292 and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 292 293 … … 477 478 defined in terms of the distances between $T$, $u$,$f$ and $w$-points. 478 479 This is the natural discretization of \autoref{eq:cts-var}. 479 The \NEMO model, however, operates with scale factors instead of grid sizes,480 The \NEMO\ model, however, operates with scale factors instead of grid sizes, 480 481 and scale factors for the quarter cells are not defined. 481 482 Instead, therefore we simply choose … … 600 601 It is a key property for a diffusion term. 601 602 It means that it is also a dissipation term, 602 \ie it dissipates the square of the quantity on which it is applied.603 \ie\ it dissipates the square of the quantity on which it is applied. 603 604 It therefore ensures that, when the diffusivity coefficient is large enough, 604 605 the field on which it is applied becomes free of grid-point noise. … … 649 650 Similar comments apply to triads that would intersect the ocean floor (\autoref{fig:bdry_triads}b). 650 651 Note that both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and \triad{i+1}{k}{R}{-1/2}{1/2} are masked when 651 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked.652 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 652 653 The associated lateral fluxes (grey-black dashed line) are masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, 653 654 but left unmasked, giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 654 655 655 656 The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled 656 (\ key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems.657 (\np{ln\_trabbl}\forcode{ = .true.}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 657 658 For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 658 659 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 672 673 (b) Both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and 673 674 \triad{i+1}{k}{R}{-1/2}{1/2} are masked when either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, 674 \ie the $i,k+1$ $u$-point is masked.675 \ie\ the $i,k+1$ $u$-point is masked. 675 676 The associated lateral fluxes (grey-black dashed line) are masked if 676 \protect\np{ botmix\_triad}\forcode{ = .false.}, but left unmasked,677 giving bottom mixing, if \protect\np{ botmix\_triad}\forcode{ = .true.}677 \protect\np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 678 giving bottom mixing, if \protect\np{ln\_botmix\_triad}\forcode{ = .true.} 678 679 } 679 680 \end{center} … … 687 688 iso-neutral slopes relative to geopotentials must be bounded everywhere, 688 689 both for consistency with the small-slope approximation and for numerical stability \citep{cox_OM87, griffies_bk04}. 689 The bound chosen in \NEMO is applied to each component of the slope separately and690 The bound chosen in \NEMO\ is applied to each component of the slope separately and 690 691 has a value of $1/100$ in the ocean interior. 691 692 %, ramping linearly down above 70~m depth to zero at the surface … … 765 766 where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m. 766 767 See the left side of \autoref{fig:MLB_triad}. 767 We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg with thin daytime mixed-layers.768 We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg\ with thin daytime mixed-layers. 768 769 Currently we use the same $\Delta\rho_c=0.01\;\mathrm{kg\:m^{-3}}$ for ML triad tapering as is used to 769 770 output the diagnosed mixed-layer depth $h_{\mathrm{ML}}=|z_{W}|_{k_{\mathrm{ML}}+1/2}$, … … 781 782 % \label{eq:Rbase} 782 783 \\ 783 \intertext{with \eg the green triad}784 \intertext{with \eg\ the green triad} 784 785 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{1/2}^{-1/2}&= 785 786 {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}. … … 828 829 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$. 829 830 Triads with different $i_p,k_p$, denoted by different colours, 830 (\eg the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.}831 (\eg\ the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 831 832 % } 832 833 \includegraphics[width=\textwidth]{Fig_GRIFF_MLB_triads} … … 889 890 the formulation of which depends on the slopes of iso-neutral surfaces. 890 891 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 891 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate,892 \ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 892 893 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 893 894 … … 918 919 The traditional way to implement this additional advection is to add it to the Eulerian velocity prior to 919 920 computing the tracer advection. 920 This is implemented if \ key{traldf\_eiv} is set in the default implementation,921 This is implemented if \texttt{traldf\_eiv?} is set in the default implementation, 921 922 where \np{ln\_traldf\_triad} is set false. 922 923 This allows us to take advantage of all the advection schemes offered for the tracers … … 926 927 927 928 However, when \np{ln\_traldf\_triad} is set true, 928 \NEMO instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}.929 \NEMO\ instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}. 929 930 It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity. 930 931 For example in the (\textbf{i},\textbf{k}) plane, … … 1034 1035 \subsubsection{No change in tracer variance} 1035 1036 1036 The discretization conserves tracer variance, \ie it does not include a diffusive component but is a `pure' advection term.1037 The discretization conserves tracer variance, \ie\ it does not include a diffusive component but is a `pure' advection term. 1037 1038 This can be seen %either from Appendix \autoref{apdx:eiv_skew} or 1038 1039 by considering the fluxes associated with a given triad slope $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. … … 1116 1117 Thus surface layer triads $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are masked, 1117 1118 and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when 1118 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked.1119 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 1119 1120 The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 1120 1121 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_ASM.tex
r11353 r11512 8 8 \label{chap:ASM} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \vfill … … 15 15 \begin{tabular}{l||l|m{0.65\linewidth}} 16 16 Release & Author & Modifications \\ 17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates} \\17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 18 18 {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version} \\ 19 19 \end{tabular} … … 26 26 These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 27 27 The code can also output model background fields which are used as an input to data assimilation code. 28 This is all controlled by the namelist \ textit{\ngn{nam\_asminc}}.28 This is all controlled by the namelist \nam{\_asminc}. 29 29 There is a brief description of all the namelist options provided. 30 30 To build the ASM code \key{asminc} must be set. … … 101 101 102 102 It is quite challenging for data assimilation systems to provide non-divergent velocity increments. 103 Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}.103 Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO\ ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}. 104 104 105 105 In iteration step $n$ (starting at $n=1$) new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: … … 134 134 \citep{talagrand_JAS72, dobricic.pinardi.ea_OS07}. 135 135 Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. 136 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \ textit{nam\_asminc} namelist136 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \nam{\_asminc} namelist 137 137 a value greater than zero. 138 138 This specifies the number of iterations of the divergence damping. Setting a value of the order of 100 will result in a significant reduction in the vertical velocity induced by the increments. … … 144 144 \label{sec:ASM_details} 145 145 146 Here we show an example \n gn{nam\_asminc} namelist and the header of an example assimilation increments file on146 Here we show an example \nam{\_asminc} namelist and the header of an example assimilation increments file on 147 147 the ORCA2 grid. 148 148 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_CONFIG.tex
r11263 r11512 8 8 \label{chap:CFG} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \newpage … … 18 18 \label{sec:CFG_intro} 19 19 20 The purpose of this part of the manual is to introduce the NEMOreference configurations.20 The purpose of this part of the manual is to introduce the \NEMO\ reference configurations. 21 21 These configurations are offered as means to explore various numerical and physical options, 22 22 thus allowing the user to verify that the code is performing in a manner consistent with that we are running. … … 24 24 The reference configurations also provide a sense for some of the options available in the code, 25 25 though by no means are all options exercised in the reference configurations. 26 Configuration is defined manually through the \ textit{namcfg} namelist variables.26 Configuration is defined manually through the \nam{cfg} namelist variables. 27 27 28 28 %------------------------------------------namcfg---------------------------------------------------- … … 38 38 \label{sec:CFG_c1d} 39 39 40 The 1D model option simulates a stand alone water column within the 3D NEMOsystem.40 The 1D model option simulates a stand alone water column within the 3D \NEMO\ system. 41 41 It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers or a biogeochemical model. 42 42 It is set up by defining the position of the 1D water column in the grid 43 (see \ textit{cfgs/SHARED/namelist\_ref}).43 (see \path{./cfgs/SHARED/namelist\_ref}). 44 44 The 1D model is a very useful tool 45 45 \textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes; … … 54 54 55 55 The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero, 56 and second, the two components of the velocity are moved on a $T$-point. 57 Therefore, defining \key{c1d} changes some things in the code behaviour: 56 and second, the two components of the velocity are moved on a $T$-point. 57 Therefore, defining \key{c1d} changes some things in the code behaviour: 58 58 \begin{description} 59 59 \item[(1)] … … 68 68 \end{description} 69 69 All the relevant \textit{\_c1d} modules can be found in the src/OCE/C1D directory of 70 the NEMOdistribution.70 the \NEMO\ distribution. 71 71 72 72 % to be added: a test case on the yearlong Ocean Weather Station (OWS) Papa dataset of Martin (1985) … … 80 80 The ORCA family is a series of global ocean configurations that are run together with 81 81 the SI3 model (ORCA-ICE) and possibly with PISCES biogeochemical model (ORCA-ICE-PISCES). 82 An appropriate namelist is available in \path{ cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2.82 An appropriate namelist is available in \path{./cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2. 83 83 The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, 84 this file is available in tar file on the NEMOcommunity zenodo platform: \\84 this file is available in tar file on the \NEMO\ community zenodo platform: \\ 85 85 https://doi.org/10.5281/zenodo.2640723 86 86 87 In this namelist\_cfg the name of domain input file is set in \n gn{namcfg} block of namelist.87 In this namelist\_cfg the name of domain input file is set in \nam{cfg} block of namelist. 88 88 89 89 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 118 118 (\autoref{fig:MISC_ORCA_msh}). 119 119 The resulting mesh presents no loss of continuity in either the mesh lines or the scale factors, 120 or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh. 120 or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh. 121 121 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 122 122 \begin{figure}[!tbp] … … 137 137 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 138 138 139 The method is applied to Mercator grid (\ie same zonal and meridional grid spacing) poleward of 20\deg{N},139 The method is applied to Mercator grid (\ie\ same zonal and meridional grid spacing) poleward of 20\deg{N}, 140 140 so that the Equator is a mesh line, which provides a better numerical solution for equatorial dynamics. 141 141 The choice of the series of embedded ellipses (position of the foci and variation of the ellipses) … … 146 146 a half a degree grid (ORCA\_R05). 147 147 The smallest ocean scale factor is found in along Antarctica, 148 while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago. 148 while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago. 149 149 150 150 % ------------------------------------------------------------------------------------------------------------- … … 154 154 \label{subsec:CFG_orca_resolution} 155 155 156 The NEMOsystem is provided with five built-in ORCA configurations which differ in the horizontal resolution.156 The \NEMO\ system is provided with five built-in ORCA configurations which differ in the horizontal resolution. 157 157 The value of the resolution is given by the resolution at the Equator expressed in degrees. 158 158 Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 159 159 which sets the grid size and configuration name parameters. 160 The NEMOSystem Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file161 ( Tab.\autoref{tab:ORCA}).160 The \NEMO\ System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file 161 (\autoref{tab:ORCA}). 162 162 163 163 %--------------------------------------------------TABLE-------------------------------------------------- … … 165 165 \begin{center} 166 166 \begin{tabular}{p{4cm} c c c c} 167 Horizontal Grid & \np{ORCA\_index} & \np{jpiglo} & \np{jpjglo} & \\ 168 \hline 169 \hline 170 \~4\deg & 4 & 92 & 76 & \\ 171 \~2\deg & 2 & 182 & 149 & \\ 172 \~1\deg & 1 & 362 & 292 & \\ 173 \~0.5\deg & 05 & 722 & 511 & \\ 174 \~0.25\deg & 025 & 1442 & 1021 & \\ 175 % \key{orca\_r8} & 8 & 2882 & 2042 & \\ 176 % \key{orca\_r12} & 12 & 4322 & 3062 & \\ 177 \hline 178 \hline 167 Horizontal Grid & \jp{ORCA\_index} & \jp{jpiglo} & \jp{jpjglo} \\ 168 \hline \hline 169 % 4 \deg & 4 & 92 & 76 \\ 170 2 \deg & 2 & 182 & 149 \\ 171 1 \deg & 1 & 362 & 292 \\ 172 0.5 \deg & 05 & 722 & 511 \\ 173 0.25\deg & 025 & 1442 & 1021 \\ 174 \hline \hline 179 175 \end{tabular} 180 176 \caption{ … … 198 194 Note that the tropical mesh refinements in ORCA\_R2 and R1 strongly increases the mesh anisotropy there. 199 195 200 The ORCA\_R05 and higher global configurations do not incorporate any regional refinements. 196 The ORCA\_R05 and higher global configurations do not incorporate any regional refinements. 201 197 202 198 For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used. … … 204 200 (see \autoref{tab:orca_zgr}). %\sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}). 205 201 206 Only the ORCA\_R2 is provided with all its input files in the NEMOdistribution.202 Only the ORCA\_R2 is provided with all its input files in the \NEMO\ distribution. 207 203 %It is very similar to that used as part of the climate model developed at IPSL for the 4th IPCC assessment of 208 204 %climate change (Marti et al., 2009). 209 %It is also the basis for the \NEMO contribution to the Coordinate Ocean-ice Reference Experiments (COREs)210 %documented in \citet{griffies.biastoch.ea_OM09}. 205 %It is also the basis for the \NEMO\ contribution to the Coordinate Ocean-ice Reference Experiments (COREs) 206 %documented in \citet{griffies.biastoch.ea_OM09}. 211 207 212 208 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) in the upper 150m 213 (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 214 The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 215 The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}), 209 (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 210 The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 211 The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}), 216 212 which was developed for the purpose of running global coupled ocean-ice simulations without 217 213 an interactive atmosphere. 218 214 This \citet{large.yeager_rpt04} dataset is available through 219 215 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 220 The "normal year" of \citet{large.yeager_rpt04} has been chosen of the NEMO distribution since release v3.3. 221 222 ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie with AGRIF, \key{agrif} defined). This is available as the AGRIF\_DEMO configuration that can be found in the \path{cfgs/AGRIF_DEMO/} directory. 216 The "normal year" of \citet{large.yeager_rpt04} has been chosen of the \NEMO\ distribution since release v3.3. 217 218 ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie\ with AGRIF, \key{agrif} defined). 219 This is available as the AGRIF\_DEMO configuration that can be found in the \path{./cfgs/AGRIF_DEMO/} directory. 223 220 224 221 A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using 225 sponge layers at open boundaries. 222 sponge layers at open boundaries. 226 223 227 224 % ------------------------------------------------------------------------------------------------------------- … … 236 233 \citet{hazeleger.drijfhout_JPO98, hazeleger.drijfhout_JPO99, hazeleger.drijfhout_JGR00, hazeleger.drijfhout_JPO00}, 237 234 over which an analytical seasonal forcing is applied. 238 This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies 239 and their contribution to the large scale circulation. 235 This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies 236 and their contribution to the large scale circulation. 240 237 241 238 The GYRE configuration run together with the PISCES biogeochemical model (GYRE-PISCES). … … 245 242 The configuration is meant to represent an idealized North Atlantic or North Pacific basin. 246 243 The circulation is forced by analytical profiles of wind and buoyancy fluxes. 247 The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}. 244 The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}. 248 245 The wind stress is zonal and its curl changes sign at 22\deg{N} and 36\deg{N}. 249 246 It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain and … … 257 254 258 255 The GYRE configuration is set like an analytical configuration. 259 Through \np{ln\_read\_cfg}\forcode{ = .false.} in \ textit{namcfg} namelist defined in260 the reference configuration \path{ cfgs/GYRE_PISCES/EXPREF/namelist_cfg}256 Through \np{ln\_read\_cfg}\forcode{ = .false.} in \nam{cfg} namelist defined in 257 the reference configuration \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg} 261 258 analytical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. 262 259 Its horizontal resolution (and thus the size of the domain) is determined by 263 setting \np{nn\_GYRE} in \n gn{namusr\_def}: \\264 265 \ np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2 \\266 267 \ np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2 \\260 setting \np{nn\_GYRE} in \nam{usr\_def}: \\ 261 262 \jp{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2 \\ 263 264 \jp{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2 \\ 268 265 269 266 Obviously, the namelist parameters have to be adjusted to the chosen resolution, 270 see the Configurations pages on the NEMO web site (NEMOConfigurations).267 see the Configurations pages on the \NEMO\ web site (\NEMO\ Configurations). 271 268 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}). 272 269 … … 275 272 For example, keeping a same model size on each processor while increasing the number of processor used is very easy, 276 273 even though the physical integrity of the solution can be compromised. 277 Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \n gn{namusr\_def} in278 namelist \path{ cfgs/GYRE_PISCES/EXPREF/namelist_cfg}.274 Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \nam{usr\_def} in 275 namelist \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}. 279 276 280 277 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 299 296 The AMM, Atlantic Margins Model, is a regional model covering the Northwest European Shelf domain on 300 297 a regular lat-lon grid at approximately 12km horizontal resolution. 301 The appropriate \textit{\&namcfg} namelist is available in \ textit{cfgs/AMM12/EXPREF/namelist\_cfg}.298 The appropriate \textit{\&namcfg} namelist is available in \path{./cfgs/AMM12/EXPREF/namelist\_cfg}. 302 299 It is used to build the correct dimensions of the AMM domain. 303 300 304 This configuration tests several features of NEMOfunctionality specific to the shelf seas.301 This configuration tests several features of \NEMO\ functionality specific to the shelf seas. 305 302 In particular, the AMM uses $s$-coordinates in the vertical rather than $z$-coordinates and 306 303 is forced with tidal lateral boundary conditions using a Flather boundary condition from the BDY module. -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DIA.tex
r11366 r11512 8 8 \label{chap:DIA} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \vfill … … 18 18 {\em } & {\em Dorotea Iovino, Nicolas Martin} & {\em } \\ 19 19 {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em } \\ 20 {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em } \\ 21 {\em } & {\em Christian Ethe, Sebastien Masson } & {\em } \\ 20 {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em } \\ 21 {\em } & {\em Christian Ethe, Sebastien Masson } & {\em } \\ 22 22 \end{tabular} 23 \end{figure} 23 \end{figure} 24 24 25 25 \newpage 26 26 27 27 % ================================================================ 28 % Old Model Output 28 % Old Model Output 29 29 % ================================================================ 30 30 \section{Model output} … … 41 41 42 42 The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 43 The output listing is stored in the $ocean.output$file.44 The information is printed from within the code on the logical unit $numout$.43 The output listing is stored in the \textit{ocean.output} file. 44 The information is printed from within the code on the logical unit \texttt{numout}. 45 45 To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory. 46 46 … … 59 59 \label{sec:DIA_iom} 60 60 61 Since version 3.2, iomput is the NEMOoutput interface of choice.61 Since version 3.2, iomput is the \NEMO\ output interface of choice. 62 62 It has been designed to be simple to use, flexible and efficient. 63 The two main purposes of iomput are: 63 The two main purposes of iomput are: 64 64 65 65 \begin{enumerate} … … 72 72 \end{enumerate} 73 73 74 The first functionality allows the user to specify, without code changes or recompilation, 74 The first functionality allows the user to specify, without code changes or recompilation, 75 75 aspects of the diagnostic output stream, such as: 76 76 … … 94 94 in a very easy way. 95 95 All details of iomput functionalities are listed in the following subsections. 96 Examples of the XML files that control the outputs can be found in: 96 Examples of the XML files that control the outputs can be found in: 97 97 \path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 98 98 \path{cfgs/SHARED/field_def_nemo-oce.xml}, … … 101 101 102 102 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 103 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMOprocesses)103 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes) 104 104 to collect and write the outputs. 105 105 With an appropriate choice of N by the user, the bottleneck associated with the writing of 106 106 the output files can be greatly reduced. 107 107 108 In version 3.6, the iom\_putinterface depends on109 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 110 (use of revision 618 or higher is required).108 In version 3.6, the \rou{iom\_put} interface depends on 109 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 110 %(use of revision 618 or higher is required). 111 111 This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 112 112 create a single output file and therefore to bypass the rebuilding phase. 113 113 Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 114 an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel).114 an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel). 115 115 Note that the files created by iomput through XIOS are incompatible with NetCDF3. 116 116 All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 117 117 118 118 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 119 where N is typically much less than the number of NEMOprocessors, will reduce the number of output files created.120 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMOprocessors.119 where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created. 120 This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors. 121 121 Note that for smaller configurations, the rebuilding phase can be avoided, 122 122 even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. … … 124 124 \subsection{XIOS: Reading and writing restart file} 125 125 126 XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to126 XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 127 127 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. } 128 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO129 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 130 restart, all definitions are done within the NEMO code. For high resolution configuration, however,128 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 129 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 130 restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however, 131 131 there may be a need to add the following line in iodef.xml (xios context): 132 132 … … 135 135 \end{xmllines} 136 136 137 This variable sets timeout for reading. 138 139 If XIOS is to be used to read restart from file generated with an earlier NEMOversion (3.6 for instance),137 This variable sets timeout for reading. 138 139 If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance), 140 140 dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 141 141 142 XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the143 type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each144 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 145 for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.146 Note, however, that \textbf{ NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will147 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only,148 and may be useful when there is a need to change number of processors used to run simulation. 142 XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the 143 type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 144 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 145 for \np{nn\_wxios}\forcode{ = 2} the restart will be written by XIOS into multiple files, one for each XIOS server. 146 Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{ = 2}}. The restart will 147 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 148 and may be useful when there is a need to change number of processors used to run simulation. 149 149 150 150 If an additional variable must be written to a restart file, the following steps are needed: 151 151 \begin{description} 152 \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 153 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 152 \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 153 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 154 154 1D variable, \forcode{grid_scalar} - scalar), 155 \item[step 2:] add variable to the list of fields written by restart. This can be done either in subroutine 156 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 157 as an argument. This convention follows approach for writing restart using iom, where variables are 155 \item[step 2:] add variable to the list of fields written by restart. This can be done either in subroutine 156 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 157 as an argument. This convention follows approach for writing restart using iom, where variables are 158 158 written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 159 159 \end{description} … … 181 181 182 182 In \textit{attached mode} and if the type of file is ''multiple\_file'', 183 then each NEMOprocess will also act as an IO server and produce its own set of output files.183 then each \NEMO\ process will also act as an IO server and produce its own set of output files. 184 184 Superficially, this emulates the standard behaviour in previous versions. 185 185 However, the subdomain written out by each process does not correspond to … … 193 193 write to its own set of output files. 194 194 If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 195 write (in parallel) to a single output file. 195 write (in parallel) to a single output file. 196 196 Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 197 197 The following subsection provides a typical example but the syntax will vary in different MPP environments. … … 200 200 201 201 The number of cores used by the XIOS is specified when launching the model. 202 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 203 cores dedicated to NEMO.202 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 203 cores dedicated to \NEMO. 204 204 Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 205 this is a general recommendation and not specific to NEMO.205 this is a general recommendation and not specific to \NEMO. 206 206 It is difficult to provide precise recommendations because the optimal choice will depend on 207 the particular hardware properties of the target system 207 the particular hardware properties of the target system 208 208 (parallel filesystem performance, available memory, memory bandwidth etc.) 209 209 and the volume and frequency of data to be created. … … 213 213 \subsubsection{Control of XIOS: the context in iodef.xml} 214 214 215 As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 215 As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in 216 the XIOS context in \textit{iodef.xml}. 216 217 See the XML basics section below for more details on XML syntax and rules. 217 218 … … 226 227 \hline 227 228 buffer\_size & 228 buffer size used by XIOS to send data from NEMOto XIOS.229 buffer size used by XIOS to send data from \NEMO\ to XIOS. 229 230 Larger is more efficient. 230 231 Note that needed/used buffer sizes are summarized at the end of the job & … … 232 233 \hline 233 234 buffer\_server\_factor\_size & 234 ratio between NEMOand XIOS buffer size.235 ratio between \NEMO\ and XIOS buffer size. 235 236 Should be 2. & 236 237 2 \\ … … 249 250 \hline 250 251 oasis\_codes\_id & 251 when using oasis, define the identifier of NEMOin the namcouple.252 when using oasis, define the identifier of \NEMO\ in the namcouple. 252 253 Note that the identifier of XIOS is xios.x & 253 254 oceanx \\ … … 260 261 \subsubsection{Installation} 261 262 262 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO.263 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with \NEMO. 263 264 See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 264 NEMOwill need to link to the compiled XIOS library.265 \NEMO\ will need to link to the compiled XIOS library. 265 266 The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 266 267 {Extract and install XIOS} guide provides an example illustration of how this can be achieved. … … 275 276 \begin{enumerate} 276 277 \item[1.] 277 in NEMOcode, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array.278 in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 278 279 \item[2.] 279 280 If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in … … 288 289 <field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid --> 289 290 ... 290 <field id="identifier" long_name="blabla" ... /> 291 <field id="identifier" long_name="blabla" ... /> 291 292 ... 292 </field_definition> 293 </field_definition> 293 294 \end{xmllines} 294 295 … … 313 314 314 315 \begin{xmllines} 315 <file id="file1" .../> 316 <file id="file1" .../> 316 317 ... 317 <field field_ref="identifier" /> 318 <field field_ref="identifier" /> 318 319 ... 319 </file> 320 </file> 320 321 \end{xmllines} 321 322 … … 333 334 See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 334 335 335 \subsubsection{Structure of the XML file used in NEMO}336 \subsubsection{Structure of the XML file used in \NEMO} 336 337 337 338 The XML file used in XIOS is structured by 7 families of tags: … … 382 383 \xmlcode{<context id="xios" ... >} \\ 383 384 \hline 384 context nemo & context containing IO information for NEMO (mother grid when using AGRIF) &385 context nemo & context containing IO information for \NEMO\ (mother grid when using AGRIF) & 385 386 \xmlcode{<context id="nemo" ... >} \\ 386 387 \hline 387 context 1\_nemo & context containing IO information for NEMO child grid 1 (when using AGRIF) &388 context 1\_nemo & context containing IO information for \NEMO\ child grid 1 (when using AGRIF) & 388 389 \xmlcode{<context id="1_nemo" ... >} \\ 389 390 \hline 390 context n\_nemo & context containing IO information for NEMO child grid n (when using AGRIF) &391 context n\_nemo & context containing IO information for \NEMO\ child grid n (when using AGRIF) & 391 392 \xmlcode{<context id="n_nemo" ... >} \\ 392 393 \hline … … 413 414 \end{table} 414 415 415 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts416 \noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts 416 417 (that can be defined in any order): 417 418 … … 447 448 The inclusion of XML files into the main XML file can be done through the attribute src: 448 449 \xmlline|<context src="./nemo_def.xml" />| 449 450 \noindent In NEMO, by default, the field definition is done in 3 separate files (450 451 \noindent In \NEMO, by default, the field definition is done in 3 separate files ( 451 452 \path{cfgs/SHARED/field_def_nemo-oce.xml}, 452 453 \path{cfgs/SHARED/field_def_nemo-pisces.xml} and … … 455 456 are included in the main iodef.xml file through the following commands: 456 457 \begin{xmllines} 457 <context id="nemo" src="./context_nemo.xml"/> 458 <context id="nemo" src="./context_nemo.xml"/> 458 459 \end{xmllines} 459 460 … … 470 471 \begin{xmllines} 471 472 <field_definition operation="average" > 472 <field id="sst" /> <!-- averaged sst --> 473 <field id="sss" operation="instant"/> <!-- instantaneous sss --> 474 </field_definition> 473 <field id="sst" /> <!-- averaged sst --> 474 <field id="sss" operation="instant"/> <!-- instantaneous sss --> 475 </field_definition> 475 476 \end{xmllines} 476 477 … … 489 490 </field_definition> 490 491 <file_definition> 491 <file id="myfile" output_freq="1d" /> 492 <file id="myfile" output_freq="1d" /> 492 493 <field field_ref="sst" /> <!-- default def --> 493 494 <field field_ref="sss" long_name="my description" /> <!-- overwrite --> 494 495 </file> 495 </file_definition> 496 </file_definition> 496 497 \end{xmllines} 497 498 … … 536 537 <field_group group_ref="groupU" /> 537 538 <field field_ref="uocetr_eff" /> <!-- add another field --> 538 </file> 539 </file> 539 540 \end{xmllines} 540 541 … … 548 549 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 549 550 the tag family domain. 550 It must therefore be done in the domain part of the XML file. 551 For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 551 It must therefore be done in the domain part of the XML file. 552 For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 552 553 a 5 by 5 box with the bottom left corner at point (10,10). 553 554 … … 566 567 \end{xmllines} 567 568 568 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 569 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 569 570 The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 570 571 can therefore be outputted without taking care of their (i,j) position in the grid. … … 579 580 \end{xmllines} 580 581 581 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 582 you use the ''multiple\_file'' type for your output files, 583 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 582 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 583 you use the ''multiple\_file'' type for your output files, 584 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 584 585 \href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). 585 586 We are therefore advising to use the ''one\_file'' type in this case. … … 614 615 615 616 \begin{xmllines} 616 <file_group id="1d" output_freq="1d" name="myfile_1d" > 617 <file_group id="1d" output_freq="1d" name="myfile_1d" > 617 618 <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA" --> 618 619 ... … … 669 670 \end{table} 670 671 671 \noindent For example, 672 \noindent For example, 672 673 \xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >| 673 674 … … 681 682 \noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 682 683 683 \subsubsection{Other controls of the XML attributes from NEMO}684 685 The values of some attributes are defined by subroutine calls within NEMO684 \subsubsection{Other controls of the XML attributes from \NEMO} 685 686 The values of some attributes are defined by subroutine calls within \NEMO 686 687 (calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 687 688 Any definition given in the XML file will be overwritten. … … 778 779 \end{xmllines} 779 780 780 Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 781 Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 781 782 real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 782 783 Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. … … 786 787 787 788 \begin{xmllines} 788 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 789 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 789 790 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 790 791 <field field_ref="sst" name="tos" > … … 795 796 <variable id="my_global_attribute" type="string" > blabla_global </variable> 796 797 </file> 797 </file_group> 798 </file_group> 798 799 \end{xmllines} 799 800 … … 810 811 811 812 \begin{xmllines} 812 <file_group id="5d" output_freq="5d" output_level="10" enabled=".true." > <!-- 5d files --> 813 <file_group id="5d" output_freq="5d" output_level="10" enabled=".true." > <!-- 5d files --> 813 814 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 814 815 <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 815 816 </file> 816 </file_group> 817 </file_group> 817 818 \end{xmllines} 818 819 … … 839 840 840 841 \begin{xmllines} 841 <file_group id="1m" output_freq="1m" output_level="10" enabled=".true." > <!-- 1m files --> 842 <file_group id="1m" output_freq="1m" output_level="10" enabled=".true." > <!-- 1m files --> 842 843 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 843 <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 844 <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 844 845 operation="instant" freq_op="1m" > 845 846 sqrt( @ssh2 - @ssh * @ssh ) 846 847 </field> 847 848 </file> 848 </file_group> 849 </file_group> 849 850 \end{xmllines} 850 851 … … 853 854 here we use the default, average. 854 855 So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. 855 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 856 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 856 857 here the temporal average is alreday done by the ``@'' function so we just use instant. 857 858 field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. … … 871 872 872 873 \begin{xmllines} 873 <file_group id="1m" output_freq="1m" output_level="10" enabled=".true." > <!-- 1m files --> 874 <file_group id="1m" output_freq="1m" output_level="10" enabled=".true." > <!-- 1m files --> 874 875 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 875 876 <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > … … 877 878 </field> 878 879 </file> 879 </file_group> 880 </file_group> 880 881 \end{xmllines} 881 882 … … 1331 1332 \subsection{CF metadata standard compliance} 1332 1333 1333 Output from the XIOS IO server is compliant with 1334 Output from the XIOS IO server is compliant with 1334 1335 \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 1335 the CF metadata standard. 1336 the CF metadata standard. 1336 1337 Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 1337 1338 section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 1338 1339 1339 1340 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 1340 the namelist parameter \np{ln\_cfmeta} in the \n gn{namrun} namelist.1341 the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist. 1341 1342 This must be set to true if these metadata are to be included in the output files. 1342 1343 … … 1360 1361 Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 1361 1362 most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 1362 NEMOexecutables linked with NetCDF4 libraries can be made to produce NetCDF3 files by1363 setting the \np{ln\_nc4zip} logical to false in the \ textit{namnc4} namelist:1363 \NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 1364 setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 1364 1365 1365 1366 %------------------------------------------namnc4---------------------------------------------------- … … 1404 1405 1405 1406 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\ttfamily 46x38x1} respectively in 1406 the mono-processor case (\ie global domain of {\small\ttfamily 182x149x31}).1407 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 1407 the mono-processor case (\ie\ global domain of {\small\ttfamily 182x149x31}). 1408 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 1408 1409 table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 1409 1410 a 4x2 mpi partitioning. … … 1453 1454 1454 1455 When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 1455 \ np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in1456 \ np{xmlio\_server.def}.1457 Typically this namelist serves the mean files whilst the \n gn{ namnc4} in the main namelist file continues to1456 \rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in 1457 \textit{xmlio\_server.def}. 1458 Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to 1458 1459 serve the restart files. 1459 1460 This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 1460 1461 the individual files produced by the io\_server processes may be different to those produced by 1461 1462 the invidual processing regions and different chunking choices may be desired. 1462 1463 1463 1464 % ------------------------------------------------------------------------------------------------------------- 1464 1465 % Tracer/Dynamics Trends 1465 1466 % ------------------------------------------------------------------------------------------------------------- 1466 1467 \section[Tracer/Dynamics trends (\texttt{namtrd})] 1467 {Tracer/Dynamics trends (\protect\n gn{namtrd})}1468 {Tracer/Dynamics trends (\protect\nam{trd})} 1468 1469 \label{sec:DIA_trd} 1469 1470 1470 1471 %------------------------------------------namtrd---------------------------------------------------- 1471 1472 1472 \nlst{namtrd} 1473 \nlst{namtrd} 1473 1474 %------------------------------------------------------------------------------------------------------------- 1474 1475 1475 1476 Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 1476 1477 \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 1477 (\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$routines).1478 This capability is controlled by options offered in \n gn{namtrd} namelist.1478 (\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 1479 This capability is controlled by options offered in \nam{trd} namelist. 1479 1480 Note that the output are done with XIOS, and therefore the \key{iomput} is required. 1480 1481 1481 What is done depends on the \n gn{namtrd} logical set to \forcode{.true.}:1482 What is done depends on the \nam{trd} logical set to \forcode{.true.}: 1482 1483 1483 1484 \begin{description} … … 1502 1503 \end{description} 1503 1504 1504 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 1505 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 1505 1506 the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 1506 1507 1507 1508 \textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 1508 1509 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 1509 and none of the options have been tested with variable volume (\ie \np{ln\_linssh}\forcode{ = .true.}).1510 and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{ = .true.}). 1510 1511 1511 1512 % ------------------------------------------------------------------------------------------------------------- … … 1517 1518 %--------------------------------------------namflo------------------------------------------------------- 1518 1519 1519 \nlst{namflo} 1520 \nlst{namflo} 1520 1521 %-------------------------------------------------------------------------------------------------------------- 1521 1522 1522 1523 The on-line computation of floats advected either by the three dimensional velocity field or constraint to 1523 1524 remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 1524 Options are defined by \n gn{namflo} namelist variables.1525 Options are defined by \nam{flo} namelist variables. 1525 1526 The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 1526 1527 or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). … … 1533 1534 (IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude. 1534 1535 1535 In case of Ariane convention, input filename is \ np{init\_float\_ariane}.1536 In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 1536 1537 Its format is: \\ 1537 1538 {\scriptsize \texttt{I J K nisobfl itrash}} … … 1541 1542 - I,J,K : indexes of initial position 1542 1543 1543 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 1544 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 1544 1545 1545 1546 - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention … … 1627 1628 This on-line Harmonic analysis is actived with \key{diaharm}. 1628 1629 1629 Some parameters are available in namelist \n gn{nam\_diaharm}:1630 Some parameters are available in namelist \nam{\_diaharm}: 1630 1631 1631 1632 - \np{nit000\_han} is the first time step used for harmonic analysis … … 1635 1636 - \np{nstep\_han} is the time step frequency for harmonic analysis 1636 1637 1637 - \np{nb\_ana} is the number of harmonics to analyse1638 % - \np{nb\_ana} is the number of harmonics to analyse 1638 1639 1639 1640 - \np{tname} is an array with names of tidal constituents to analyse … … 1678 1679 The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 1679 1680 and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 1680 NEMOto compute on-line transports.1681 \NEMO\ to compute on-line transports. 1681 1682 1682 1683 The on-line transports module creates three output ascii files: … … 1688 1689 - \texttt{salt\_transport} for salt transports (unit: $10^{9}Kg s^{-1}$) \\ 1689 1690 1690 Namelist variables in \n gn{nam_diadct} control how frequently the flows are summed and the time scales over which1691 Namelist variables in \nam{\_diadct} control how frequently the flows are summed and the time scales over which 1691 1692 they are averaged, as well as the level of output for debugging: 1692 1693 \np{nn\_dct} : frequency of instantaneous transports computing … … 1710 1711 - \texttt{long2 lat2}, coordinates of the second extremity of the section; 1711 1712 1712 - \texttt{nclass} the number of bounds of your classes (\eg bounds for 2 classes);1713 - \texttt{nclass} the number of bounds of your classes (\eg\ bounds for 2 classes); 1713 1714 1714 1715 - \texttt{okstrpond} to compute heat and salt transports, \texttt{nostrpond} if no; … … 1743 1744 1744 1745 - \texttt{zsigp} for potential density classes \\ 1745 1746 1746 1747 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 1747 \texttt{section\_ijglobal.diadct} which is read by NEMO. \\1748 \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\ 1748 1749 1749 1750 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with … … 1831 1832 1832 1833 Let denote 1833 $\mathcal{M}$ the total mass of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 1834 $\mathcal{V}$ the total volume of seawater ($\mathcal{V} = \int_D dv$), 1835 $\mathcal{A}$ the total surface of the ocean ($\mathcal{A} = \int_S ds$), 1836 $\bar{\rho}$ the global mean seawater (\textit{in situ}) density 1834 $\mathcal{M}$ the total mass of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 1835 $\mathcal{V}$ the total volume of seawater ($\mathcal{V} = \int_D dv$), 1836 $\mathcal{A}$ the total surface of the ocean ($\mathcal{A} = \int_S ds$), 1837 $\bar{\rho}$ the global mean seawater (\textit{in situ}) density 1837 1838 ($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and 1838 $\bar{\eta}$ the global mean sea level 1839 $\bar{\eta}$ the global mean sea level 1839 1840 ($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$). 1840 1841 … … 1859 1860 where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 1860 1861 the Earth system (atmosphere, sea-ice, land). 1861 Its global averaged leads to the total mass change 1862 Its global averaged leads to the total mass change 1862 1863 1863 1864 \begin{equation} … … 1876 1877 \end{equation} 1877 1878 1878 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 1879 The second term arises from temporal changes in the global mean density; \ie from steric effects.1879 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 1880 The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 1880 1881 1881 1882 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 1882 the gravity (\ie in the hydrostatic balance of the primitive Equations).1883 the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 1883 1884 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 1884 1885 … … 1901 1902 1902 1903 Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 1903 considering the mass budget of the ocean. 1904 considering the mass budget of the ocean. 1904 1905 The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 1905 1906 must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean … … 1917 1918 is converted into a mean change in sea level. 1918 1919 Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 1919 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos})1920 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 1920 1921 in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 1921 1922 … … 1927 1928 The above formulation of the steric height of a Boussinesq ocean requires four remarks. 1928 1929 First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 1929 \ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero.1930 \ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 1930 1931 We do not recommend that. 1931 1932 Indeed, in this case $\rho_o$ depends on the initial state of the ocean. … … 1941 1942 does not change when the sea level is changing as it is the case in all global ocean GCMs 1942 1943 (wetting and drying of grid point is not allowed). 1943 1944 1944 1945 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 1945 In the non linear free surface case, \ie \np{ln\_linssh}\forcode{ = .true.}, it is given by1946 In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{ = .true.}, it is given by 1946 1947 1947 1948 \[ … … 1966 1967 so that there are no associated ocean currents. 1967 1968 Hence, the dynamically relevant sea level is the effective sea level, 1968 \ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}.1969 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between1969 \ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 1970 However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between 1970 1971 ice and ocean. 1971 1972 Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. … … 2021 2022 } 2022 2023 \end{center} 2023 \end{figure} 2024 \end{figure} 2024 2025 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2025 2026 2026 2027 % ----------------------------------------------------------- 2027 % CMIP specific diagnostics 2028 % CMIP specific diagnostics 2028 2029 % ----------------------------------------------------------- 2029 2030 \subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})] … … 2033 2034 In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 2034 2035 (see also \autoref{sec:DIA_steric} for one of them). 2035 The module \mdl{diaar5} is active when one of the following outputs is required : global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 2036 2037 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 2038 (see the \textit{\ngn{namptr} } namelist below) can be computed on-line the poleward heat and salt transports, their advective and diffusive component, and the meriodional stream function . 2036 The module \mdl{diaar5} is active when one of the following outputs is required : 2037 global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), 2038 global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), 2039 sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 2040 2041 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 2042 (see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 2043 their advective and diffusive component, and the meriodional stream function . 2039 2044 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 2040 2045 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. … … 2044 2049 %------------------------------------------namptr----------------------------------------- 2045 2050 2046 \nlst{namptr} 2051 \nlst{namptr} 2047 2052 %----------------------------------------------------------------------------------------- 2048 2053 2049 2054 % ----------------------------------------------------------- 2050 % 25 hour mean and hourly Surface, Mid and Bed 2055 % 25 hour mean and hourly Surface, Mid and Bed 2051 2056 % ----------------------------------------------------------- 2052 2057 \subsection{25 hour mean output for tidal models} … … 2097 2102 Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 2098 2103 2099 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \n gn{namctl} namelist.2104 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 2100 2105 The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 2101 2106 In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of … … 2103 2108 At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along 2104 2109 with the coordinates of each. 2105 The maximum values from the run are also copied to the ocean.output file. 2110 The maximum values from the run are also copied to the ocean.output file. 2106 2111 2107 2112 % ================================================================ -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DIU.tex
r11263 r11512 9 9 \label{chap:DIU} 10 10 11 \ minitoc11 \chaptertoc 12 12 13 13 … … 16 16 17 17 Code to produce an estimate of the diurnal warming and cooling of the sea surface skin 18 temperature (skin SST) is found in the DIU directory. 18 temperature (skin SST) is found in the DIU directory. 19 19 The skin temperature can be split into three parts: 20 20 \begin{itemize} … … 30 30 31 31 Models are provided for both the warm layer, \mdl{diurnal\_bulk}, and the cool skin, \mdl{cool\_skin}. 32 Foundation SST is not considered as it can be obtained either from the main NEMOmodel33 (\ie from the temperature of the top few model levels) or from some other source.32 Foundation SST is not considered as it can be obtained either from the main \NEMO\ model 33 (\ie\ from the temperature of the top few model levels) or from some other source. 34 34 It must be noted that both the cool skin and warm layer models produce estimates of the change in temperature 35 35 ($\Delta T_{\mathrm{cs}}$ and $\Delta T_{\mathrm{wl}}$) and 36 36 both must be added to a foundation SST to obtain the true skin temperature. 37 37 38 Both the cool skin and warm layer models are controlled through the namelist \n gn{namdiu}:38 Both the cool skin and warm layer models are controlled through the namelist \nam{diu}: 39 39 40 40 \nlst{namdiu} … … 44 44 A logical switch for turning on/off both the cool skin and warm layer. 45 45 \item[\np{ln\_diurnal\_only}] 46 A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of NEMO.46 A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO. 47 47 \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 48 48 \end{description} … … 53 53 Initialisation is through the restart file. 54 54 Specifically the code will expect the presence of the 2-D variable ``Dsst'' to initialise the warm layer. 55 The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable. 55 The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable. 56 56 57 57 %=============================================================== … … 102 102 \end{equation} 103 103 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of (\autoref{eq:stab_func_eqn}), 104 and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie $Q\rightarrow0$ in104 and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in 105 105 equation (\autoref{eq:ecmwf2})). 106 106 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DOM.tex
r11353 r11512 8 8 \label{chap:DOM} 9 9 10 \minitoc10 %\chaptertoc 11 11 12 12 % Missing things: 13 13 % - istate: description of the initial state ==> this has to be put elsewhere.. 14 % perhaps in MISC ? By the way the initialisation of T S and dynamics 14 % perhaps in MISC ? By the way the initialisation of T S and dynamics 15 15 % should be put outside of DOM routine (better with TRC staff and off-line 16 16 % tracers) … … 19 19 20 20 \vfill 21 \begin{figure}[b] 22 \subsubsection*{Changes record} 23 \begin{tabular}{m{0.08\linewidth}||m{0.32\linewidth}|m{0.6\linewidth}} 24 Release & Author(s) & Modifications \\ 25 \hline 26 {\em 4.0} & {\em Simon M{\"u}ller \& Andrew Coward} & {\em Compatibility changes for v4.0. Major simplication has moved many of the options to external domain configuration tools. For now this information has been retained in \autoref{apdx:DOMAINcfg} } \\ 27 {\em 3.x} & {\em Sebastien Masson, Gurvan Madec \& Rashid Benshila } & {\em } \\ 28 \end{tabular} 29 \end{figure} 21 22 \begin{table}[b] 23 \footnotesize 24 \caption*{Changes record} 25 \begin{tabularx}{\textwidth}{l||X|X} 26 Release & Author(s) & Modifications \\ 27 \hline 28 {\em 4.0} & {\em Simon M\"{u}ller \& Andrew Coward} & 29 {\em 30 Compatibility changes Major simplification has moved many of the options to external domain configuration tools. 31 (see \autoref{apdx:DOMAINcfg}) 32 } \\ 33 {\em 3.x} & {\em Rachid Benshila, Gurvan Madec \& S\'{e}bastien Masson} & 34 {\em First version} \\ 35 \end{tabularx} 36 \end{table} 30 37 31 38 \newpage 32 39 33 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discreti zation \autoref{chap:STP},34 we need to choose a grid for spatial discreti zation and related numerical algorithms.40 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretisation \autoref{chap:STP}, 41 we need to choose a grid for spatial discretisation and related numerical algorithms. 35 42 In the present chapter, we provide a general description of the staggered grid used in \NEMO, 36 and other relevant information about the DOM (DOMain) source -code modules.43 and other relevant information about the DOM (DOMain) source code modules. 37 44 38 45 % ================================================================ … … 43 50 44 51 % ------------------------------------------------------------------------------------------------------------- 45 % Arrangement of Variables 52 % Arrangement of Variables 46 53 % ------------------------------------------------------------------------------------------------------------- 47 54 \subsection{Arrangement of variables} … … 75 82 the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points. 76 83 77 The ocean mesh (\ie the position of all the scalar and vector points) is defined by the transformation that84 The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by the transformation that 78 85 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 79 86 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. … … 127 134 128 135 Note that the definition of the scale factors 129 (\ie as the analytical first derivative of the transformation that136 (\ie\ as the analytical first derivative of the transformation that 130 137 results in $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) 131 is specific to the \NEMO model \citep{marti.madec.ea_JGR92}.138 is specific to the \NEMO\ model \citep{marti.madec.ea_JGR92}. 132 139 As an example, a scale factor in the $i$ direction is defined locally at a $t$-point, 133 140 whereas many other models on a C grid choose to define such a scale factor as … … 159 166 160 167 % ------------------------------------------------------------------------------------------------------------- 161 % Vector Invariant Formulation 168 % Vector Invariant Formulation 162 169 % ------------------------------------------------------------------------------------------------------------- 163 170 \subsection{Discrete operators} … … 173 180 174 181 Similar operators are defined with respect to $i + 1/2$, $j$, $j + 1/2$, $k$, and $k + 1/2$. 175 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at 176 a $t$-point has its three components defined at $u$-, $v$- and $w$-points while 177 its Laplacian is defined at the $t$-point. 182 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at a $t$-point has 183 its three components defined at $u$-, $v$- and $w$-points while its Laplacian is defined at the $t$-point. 178 184 These operators have the following discrete forms in the curvilinear $s$-coordinates system: 179 185 \[ … … 215 221 216 222 The vertical average over the whole water column is denoted by an overbar and is for 217 a masked field $q$ (\ie a quantity that is equal to zero inside solid areas):223 a masked field $q$ (\ie\ a quantity that is equal to zero inside solid areas): 218 224 \begin{equation} 219 225 \label{eq:DOM_bar} … … 247 253 \end{alignat} 248 254 249 In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 255 In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 250 256 $(\overline{\cdots}^{\, i})^* = \overline{\cdots}^{\, i + 1/2}$, respectively. 251 257 These two properties will be used extensively in the \autoref{apdx:C} to … … 253 259 254 260 % ------------------------------------------------------------------------------------------------------------- 255 % Numerical Indexing 261 % Numerical Indexing 256 262 % ------------------------------------------------------------------------------------------------------------- 257 263 \subsection{Numerical indexing} … … 275 281 integer values for $t$-points only while all the other points involve integer and a half values. 276 282 Therefore, a specific integer indexing has been defined for points other than $t$-points 277 (\ie velocity and vorticity grid-points).283 (\ie\ velocity and vorticity grid-points). 278 284 Furthermore, the direction of the vertical indexing has been reversed and the surface level set at $k = 1$. 279 285 280 286 % ----------------------------------- 281 % Horizontal Indexing 287 % Horizontal Indexing 282 288 % ----------------------------------- 283 289 \subsubsection{Horizontal indexing} … … 288 294 the $t$-point and the eastward $u$-point (northward $v$-point) have the same index 289 295 (see the dashed area in \autoref{fig:index_hor}). 290 A $t$-point and its nearest north east $f$-point have the same $i$-and $j$-indices.296 A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices. 291 297 292 298 % ----------------------------------- 293 % Vertical indexing 299 % Vertical indexing 294 300 % ----------------------------------- 295 301 \subsubsection{Vertical indexing} … … 303 309 The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while 304 310 the last $t$-level is always outside the ocean domain (\autoref{fig:index_vert}). 305 Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index (\ie $t$-points and their 306 nearest $w$-point neighbour in negative index direction), in contrast to the indexing on the horizontal plane where 307 the $t$-point has the same index as the nearest velocity points in the positive direction of the respective horizontal axis index 311 Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index 312 (\ie\ $t$-points and their nearest $w$-point neighbour in negative index direction), 313 in contrast to the indexing on the horizontal plane where the $t$-point has the same index as 314 the nearest velocity points in the positive direction of the respective horizontal axis index 308 315 (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). 309 316 Since the scale factors are chosen to be strictly positive, 310 a \textit{minus sign} is included in the \fortran implementations of \textit{all the vertical derivatives} of 311 the discrete equations given in this manual in order to accommodate the opposing vertical index directions in implementation and documentation. 317 a \textit{minus sign} is included in the \fortran implementations of 318 \textit{all the vertical derivatives} of the discrete equations given in this manual in order to 319 accommodate the opposing vertical index directions in implementation and documentation. 312 320 313 321 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 333 341 \nlst{namcfg} 334 342 335 Two typical methods are available to specify the spatial domain 336 configuration; they can be selected using parameter \np{ln\_read\_cfg} 337 parameter in namelist \ngn{namcfg}. 338 339 If \np{ln\_read\_cfg} is set to \forcode{.true.}, the domain-specific parameters 340 and fields are read from a netCDF input file, whose name (without its .nc 341 suffix) can be specified as the value of the \np{cn\_domcfg} parameter in 342 namelist \ngn{namcfg}. 343 344 If \np{ln\_read\_cfg} is set to \forcode{.false.}, the domain-specific 345 parameters and fields can be provided (\eg analytically computed) by subroutines 346 \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. These subroutines can be supplied in 347 the \path{MY_SRC} directory of the configuration, and default versions that 348 configure the spatial domain for the GYRE reference configuration are present in 349 the \path{src/OCE/USR} directory. 350 351 In version 4.0 there are no longer any options for reading complex bathmetries and 352 performing a vertical discretization at run-time. Whilst it is occasionally convenient 353 to have a common bathymetry file and, for example, to run similar models with and 354 without partial bottom boxes and/or sigma-coordinates, supporting such choices leads to 355 overly complex code. Worse still is the difficulty of ensuring the model configurations 356 intended to be identical are indeed so when the model domain itself can be altered by runtime 357 selections. The code previously used to perform vertical discretization has be incorporated 358 into an external tool (\path{tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 359 360 The next subsections summarise the parameter and fields related to the 361 configuration of the whole model domain. These represent the minimum information 362 that must be provided either via the \np{cn\_domcfg} file or set by code 363 inserted into user-supplied versions of the \mdl{usrdef\_*} subroutines. The 364 requirements are presented in three sections: the domain size 365 (\autoref{subsec:DOM_size}), the horizontal mesh 366 (\autoref{subsec:DOM_hgr}), and the vertical grid 367 (\autoref{subsec:DOM_zgr}). 343 Two typical methods are available to specify the spatial domain configuration; 344 they can be selected using parameter \np{ln\_read\_cfg} parameter in namelist \nam{cfg}. 345 346 If \np{ln\_read\_cfg} is set to \forcode{.true.}, 347 the domain-specific parameters and fields are read from a netCDF input file, 348 whose name (without its .nc suffix) can be specified as the value of the \np{cn\_domcfg} parameter in namelist \nam{cfg}. 349 350 If \np{ln\_read\_cfg} is set to \forcode{.false.}, 351 the domain-specific parameters and fields can be provided (\eg\ analytically computed) by 352 subroutines \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. 353 These subroutines can be supplied in the \path{MY_SRC} directory of the configuration, 354 and default versions that configure the spatial domain for the GYRE reference configuration are present in 355 the \path{./src/OCE/USR} directory. 356 357 In version 4.0 there are no longer any options for reading complex bathymetries and 358 performing a vertical discretisation at run-time. 359 Whilst it is occasionally convenient to have a common bathymetry file and, for example, 360 to run similar models with and without partial bottom boxes and/or sigma-coordinates, 361 supporting such choices leads to overly complex code. 362 Worse still is the difficulty of ensuring the model configurations intended to be identical are indeed so when 363 the model domain itself can be altered by runtime selections. 364 The code previously used to perform vertical discretisation has been incorporated into an external tool 365 (\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 366 367 The next subsections summarise the parameter and fields related to the configuration of the whole model domain. 368 These represent the minimum information that must be provided either via the \np{cn\_domcfg} file or set by code 369 inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines. 370 The requirements are presented in three sections: 371 the domain size (\autoref{subsec:DOM_size}), the horizontal mesh (\autoref{subsec:DOM_hgr}), 372 and the vertical grid (\autoref{subsec:DOM_zgr}). 368 373 369 374 % ----------------------------------- … … 373 378 \label{subsec:DOM_size} 374 379 375 The total size of the computational domain is set by the parameters 376 \np{jpiglo}, \np{jpjglo} and \np{jpkglo} for the $i$, $j$ and $k$ 377 directions, respectively. Note, that the variables \forcode{jpi} and \forcode{jpj} 378 refer to the size of each processor subdomain when the code is run in 379 parallel using domain decomposition (\key{mpp\_mpi} defined, see 380 \autoref{sec:LBC_mpp}). 380 The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and \jp{jpkglo} for 381 the $i$, $j$ and $k$ directions, respectively. 382 Note, that the variables \texttt{jpi} and \texttt{jpj} refer to the size of each processor subdomain when 383 the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, 384 see \autoref{sec:LBC_mpp}). 381 385 382 386 The name of the configuration is set through parameter \np{cn\_cfg}, 383 and the nominal resolution through parameter \np{nn\_cfg} (unless in 384 the input file both of variables \forcode{ORCA} and \forcode{ORCA_index} 385 are present, in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these 386 values accordingly). 387 388 The global lateral boundary condition type is selected from 8 options 389 using parameter \np{jperio}. See \autoref{sec:LBC_jperio} for 390 details on the available options and the corresponding values for 391 \np{jperio}. 392 393 % ================================================================ 394 % Domain: Horizontal Grid (mesh) 387 and the nominal resolution through parameter \np{nn\_cfg} 388 (unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present, 389 in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these values accordingly). 390 391 The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}. 392 See \autoref{sec:LBC_jperio} for details on the available options and the corresponding values for \jp{jperio}. 393 394 % ================================================================ 395 % Domain: Horizontal Grid (mesh) 395 396 % ================================================================ 396 397 \subsection{Horizontal grid mesh (\protect\mdl{domhgr})} … … 402 403 \subsubsection{Required fields} 403 404 \label{sec:DOM_hgr_fields} 404 The explicit specification of a range of mesh-related fields are required for the definition of a configuration. These include: 405 406 \begin{Verbatim}[fontsize=\tiny] 405 406 The explicit specification of a range of mesh-related fields are required for the definition of a configuration. 407 These include: 408 409 \begin{clines} 407 410 int jpiglo, jpjglo, jpkglo /* global domain sizes */ 408 411 int jperio /* lateral global domain b.c. */ … … 411 414 double e1t, e1u, e1v, e1f /* horizontal scale factors */ 412 415 double e2t, e2u, e2v, e2f /* horizontal scale factors */ 413 \end{Verbatim} 414 415 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 Table \autoref{tab: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$, evaluated for the same arguments as $\lambda$ and $\varphi$. 416 \end{clines} 417 418 The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to 419 the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, 420 evaluated at the values as specified in \autoref{tab:cell} for the respective grid-point position. 421 The calculation of the values of the horizontal scale factor arrays in general additionally involves 422 partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, 423 evaluated for the same arguments as $\lambda$ and $\varphi$. 416 424 417 425 \subsubsection{Optional fields} 418 \begin{Verbatim}[fontsize=\tiny] 426 427 \begin{clines} 419 428 /* Optional: */ 420 429 int ORCA, ORCA_index /* configuration name, configuration resolution */ 421 430 double e1e2u, e1e2v /* U and V surfaces (if grid size reduction in some straits) */ 422 431 double ff_f, ff_t /* Coriolis parameter (if not on the sphere) */ 423 \end{Verbatim} 424 425 NEMO can support the local reduction of key strait widths by altering individual values of 426 e2u or e1v at the appropriate locations. This is particularly useful for locations such as 427 Gibraltar or Indonesian Throughflow pinch-points (see \autoref{sec:MISC_strait} for 428 illustrated examples). The key is to reduce the faces of $T$-cell (\ie change the value of 429 the horizontal scale factors at $u$- or $v$-point) but not the volume of the cells. Doing 430 otherwise can lead to numerical instability issues. In normal operation the surface areas 431 are computed from $\texttt{e1u} * \texttt{e2u}$ and $\texttt{e1v} * \texttt{e2v}$ but in 432 cases where a gridsize reduction is required, the unaltered surface areas at $u$ and $v$ 433 grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or pre-computed 434 in \mdl{usrdef\_hgr}. If these arrays are present in the \np{cn\_domcfg} file they are 435 read and the internal computation is suppressed. Versions of \mdl{usrdef\_hgr} which set 436 their own values of \texttt{e1e2u} and \texttt{e1e2v} should set the surface-area 437 computation flag: \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 432 \end{clines} 433 434 \NEMO\ can support the local reduction of key strait widths by 435 altering individual values of e2u or e1v at the appropriate locations. 436 This is particularly useful for locations such as Gibraltar or Indonesian Throughflow pinch-points 437 (see \autoref{sec:MISC_strait} for illustrated examples). 438 The key is to reduce the faces of $T$-cell (\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but 439 not the volume of the cells. 440 Doing otherwise can lead to numerical instability issues. 441 In normal operation the surface areas are computed from $e1u * e2u$ and $e1v * e2v$ but 442 in cases where a gridsize reduction is required, 443 the unaltered surface areas at $u$ and $v$ grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or 444 pre-computed in \mdl{usrdef\_hgr}. 445 If these arrays are present in the \np{cn\_domcfg} file they are read and the internal computation is suppressed. 446 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should set 447 the surface-area computation flag: 448 \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 438 449 439 450 \smallskip 440 Similar logic applies to the other optional fields: \texttt{ff\_f} and \texttt{ff\_t} 441 which can be used to provide the Coriolis parameter at F- and T-points respectively if the 442 mesh is not on a sphere. If present these fields will be read and used and the normal 443 calculation ($2*\Omega*\sin(\varphi)$) suppressed. Versions of \mdl{usrdef\_hgr} which set 444 their own values of \texttt{ff\_f} and \texttt{ff\_t} should set the Coriolis computation 445 flag: \texttt{iff} to a non-zero value to suppress their re-computation. 446 447 Note that longitudes, latitudes, and scale factors at $w$ points are exactly 448 equal to those of $t$ points, thus no specific arrays are defined at $w$ points. 451 Similar logic applies to the other optional fields: 452 \texttt{ff\_f} and \texttt{ff\_t} which can be used to provide the Coriolis parameter at F- and T-points respectively if 453 the mesh is not on a sphere. 454 If present these fields will be read and used and the normal calculation ($2 * \Omega * \sin(\varphi)$) suppressed. 455 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{ff\_f} and \texttt{ff\_t} should set 456 the Coriolis computation flag: 457 \texttt{iff} to a non-zero value to suppress their re-computation. 458 459 Note that longitudes, latitudes, and scale factors at $w$ points are exactly equal to those of $t$ points, 460 thus no specific arrays are defined at $w$ points. 449 461 450 462 … … 459 471 %------------------------------------------------------------------------------------------------------------- 460 472 461 In the vertical, the model mesh is determined by four things: 473 In the vertical, the model mesh is determined by four things: 462 474 \begin{enumerate} 463 \item the bathymetry given in meters; 464 \item the number of levels of the model (\jp{jpk}); 475 \item the bathymetry given in meters; 476 \item the number of levels of the model (\jp{jpk}); 465 477 \item the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 466 \item the masking system, \ie the number of wet model levels at each478 \item the masking system, \ie\ the number of wet model levels at each 467 479 $(i,j)$ location of the horizontal grid. 468 480 \end{enumerate} … … 488 500 489 501 The choice of a vertical coordinate is made when setting up the configuration; 490 it is not intended to be an option which can be changed in the middle of an 491 experiment. The one exception to this statement being the choice of linear or 492 non-linear free surface. In v4.0 the linear free surface option is implemented 493 as a special case of the non-linear free surface. This is computationally 494 wasteful since it uses the structures for time-varying 3D metrics for fields 495 that (in the linear free surface case) are fixed. However, the linear 496 free-surface is rarely used and implementing it this way means a single configuration 497 file can support both options. 498 499 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = 500 .false.} in \ngn{namdom}): the coordinate follow the time-variation of the free 501 surface so that the transformation is time dependent: $z(i,j,k,t)$ 502 (\eg \autoref{fig:z_zps_s_sps}f). When a linear free surface is assumed 503 (\np{ln\_linssh} set to \forcode{ = .true.} in \ngn{namdom}), the vertical 504 coordinates are fixed in time, but the seawater can move up and down across the 505 $z_0$ surface (in other words, the top of the ocean in not a rigid lid). 506 507 Note that settings: \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned 508 in the following sections appear to be namelist options but they are no longer truly 509 namelist options for NEMO. Their value is written to and read from the domain configuration file 510 and they should be treated as fixed parameters for a particular configuration. They are 511 namelist options for the \forcode{DOMAINcfg} tool that can be used to build the 512 configuration file and serve both to provide a record of the choices made whilst building the 513 configuration and to trigger appropriate code blocks within NEMO. 502 it is not intended to be an option which can be changed in the middle of an experiment. 503 The one exception to this statement being the choice of linear or non-linear free surface. 504 In v4.0 the linear free surface option is implemented as a special case of the non-linear free surface. 505 This is computationally wasteful since it uses the structures for time-varying 3D metrics 506 for fields that (in the linear free surface case) are fixed. 507 However, the linear free-surface is rarely used and implementing it this way means 508 a single configuration file can support both options. 509 510 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = .false.} in \nam{dom}): 511 the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 512 $z(i,j,k,t)$ (\eg\ \autoref{fig:z_zps_s_sps}f). 513 When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{ = .true.} in \nam{dom}), 514 the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface 515 (in other words, the top of the ocean in not a rigid lid). 516 517 Note that settings: 518 \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned in the following sections 519 appear to be namelist options but they are no longer truly namelist options for \NEMO. 520 Their value is written to and read from the domain configuration file and 521 they should be treated as fixed parameters for a particular configuration. 522 They are namelist options for the \texttt{DOMAINcfg} tool that can be used to build the configuration file and 523 serve both to provide a record of the choices made whilst building the configuration and 524 to trigger appropriate code blocks within \NEMO. 514 525 These values should not be altered in the \np{cn\_domcfg} file. 515 526 … … 527 538 $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). 528 539 529 A further choice related to vertical coordinate concerns the presence (or not) of ocean530 cavities beneath ice shelves within the model domain. A setting of \np{ln\_isfcav} as 531 \forcode{.true.} indicates that the domain contains ocean cavities, otherwise the top,532 wet layer of the ocean will always be at the ocean surface. This option is currently only 533 available for $z$- or $zps$-coordinates. In the latter case, partial steps are also applied 534 at the ocean/ice shelf interface.535 536 Within the model, the arrays describing the grid point depths and vertical scale factors 537 are three set of three dimensional arrays $(i,j,k)$ defined at \textit{before}, 538 \textit{now} and \textit{after} time step. The time at which they are defined is 539 indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. They are updated at each 540 model time step. The initial fixed reference coordinate system is held in variable names 541 with a $\_0$ suffix. When the linear free surface option is used 542 (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now} and \textit{after} 543 arrays are initially set totheir reference counterpart and remain fixed.540 A further choice related to vertical coordinate concerns 541 the presence (or not) of ocean cavities beneath ice shelves within the model domain. 542 A setting of \np{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities, 543 otherwise the top, wet layer of the ocean will always be at the ocean surface. 544 This option is currently only available for $z$- or $zps$-coordinates. 545 In the latter case, partial steps are also applied at the ocean/ice shelf interface. 546 547 Within the model, the arrays describing the grid point depths and vertical scale factors are three set of 548 three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. 549 The time at which they are defined is indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. 550 They are updated at each model time step. 551 The initial fixed reference coordinate system is held in variable names with a $\_0$ suffix. 552 When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), 553 \textit{before}, \textit{now} and \textit{after} arrays are initially set to 554 their reference counterpart and remain fixed. 544 555 545 556 \subsubsection{Required fields} 546 557 \label{sec:DOM_zgr_fields} 547 The explicit specification of a range of fields related to the vertical grid are required for the definition of a configuration. These include: 548 549 \begin{Verbatim}[fontsize=\tiny] 558 559 The explicit specification of a range of fields related to the vertical grid are required for 560 the definition of a configuration. 561 These include: 562 563 \begin{clines} 550 564 int ln_zco, ln_zps, ln_sco /* flags for z-coord, z-coord with partial steps and s-coord */ 551 565 int ln_isfcav /* flag for ice shelf cavities */ … … 556 570 /* For reference: */ 557 571 float bathy_metry /* bathymetry used in setting top and bottom levels */ 558 \end{Verbatim} 559 560 This set of vertical metrics is sufficient to describe the initial depth and thickness of 561 every gridcell in the model regardless of the choice of vertical coordinate. With constant 562 z-levels, e3 metrics will be uniform across each horizontal level. In the partial step 563 case each e3 at the \np{bottom\_level} (and, possibly, \np{top\_level} if ice cavities are 564 present) may vary from its horizontal neighbours. And, in s-coordinates, variations can 565 occur throughout the water column. With the non-linear free-surface, all the coordinates 566 behave more like the s-coordinate in that variations occurr throughout the water column 567 with displacements related to the sea surface height. These variations are typically much 568 smaller than those arising from bottom fitted coordinates. The values for vertical metrics 569 supplied in the domain configuration file can be considered as those arising from a flat 570 sea surface with zero elevation. 571 572 The \np{bottom\_level} and \np{top\_level} 2D arrays define the \np{bottom\_level} and top 573 wet levels in each grid column. Without ice cavities, \np{top\_level} is essentially a land 574 mask (0 on land; 1 everywhere else). With ice cavities, \np{top\_level} determines the 575 first wet point below the overlying ice shelf. 576 577 578 579 % ------------------------------------------------------------------------------------------------------------- 580 % level bathymetry and mask 572 \end{clines} 573 574 This set of vertical metrics is sufficient to describe the initial depth and thickness of every gridcell in 575 the model regardless of the choice of vertical coordinate. 576 With constant z-levels, e3 metrics will be uniform across each horizontal level. 577 In the partial step case each e3 at the \jp{bottom\_level} 578 (and, possibly, \jp{top\_level} if ice cavities are present) 579 may vary from its horizontal neighbours. 580 And, in s-coordinates, variations can occur throughout the water column. 581 With the non-linear free-surface, all the coordinates behave more like the s-coordinate in 582 that variations occur throughout the water column with displacements related to the sea surface height. 583 These variations are typically much smaller than those arising from bottom fitted coordinates. 584 The values for vertical metrics supplied in the domain configuration file can be considered as 585 those arising from a flat sea surface with zero elevation. 586 587 The \jp{bottom\_level} and \jp{top\_level} 2D arrays define the \jp{bottom\_level} and top wet levels in each grid column. 588 Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else). 589 With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf. 590 591 592 % ------------------------------------------------------------------------------------------------------------- 593 % level bathymetry and mask 581 594 % ------------------------------------------------------------------------------------------------------------- 582 595 \subsubsection{Level bathymetry and mask} … … 584 597 585 598 586 From \ np{top\_level} and \np{bottom\_level} fields, the mask fields are defined as follows:599 From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows: 587 600 \begin{alignat*}{2} 588 601 tmask(i,j,k) &= & & … … 603 616 Note that, without ice shelves cavities, 604 617 masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}). 605 Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 618 Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 606 619 exactly in the same way as for the bottom boundary. 607 620 … … 614 627 615 628 %------------------------------------------------------------------------------------------------- 616 % Closed seas 629 % Closed seas 617 630 %------------------------------------------------------------------------------------------------- 618 \subsection{Closed seas} \label{subsec:DOM_closea} 619 620 When a global ocean is coupled to an atmospheric model it is better to represent all large 621 water bodies (\eg great lakes, Caspian sea...) even if the model resolution does not allow 622 their communication with the rest of the ocean. This is unnecessary when the ocean is 623 forced by fixed atmospheric conditions, so these seas can be removed from the ocean 624 domain. The user has the option to set the bathymetry in closed seas to zero (see 625 \autoref{sec:MISC_closea}) and to optionally decide on the fate of any freshwater 626 imbalance over the area. The options are explained in \autoref{sec:MISC_closea} but it 627 should be noted here that a successful use of these options requires appropriate mask 628 fields to be present in the domain configuration file. Among the possibilities are: 629 630 \begin{Verbatim}[fontsize=\tiny] 631 \subsection{Closed seas} \label{subsec:DOM_closea} 632 633 When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies 634 (\eg\ Great Lakes, Caspian sea \dots) even if the model resolution does not allow their communication with 635 the rest of the ocean. 636 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 637 so these seas can be removed from the ocean domain. 638 The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}) and 639 to optionally decide on the fate of any freshwater imbalance over the area. 640 The options are explained in \autoref{sec:MISC_closea} but it should be noted here that 641 a successful use of these options requires appropriate mask fields to be present in the domain configuration file. 642 Among the possibilities are: 643 644 \begin{clines} 631 645 int closea_mask /* non-zero values in closed sea areas for optional masking */ 632 646 int closea_mask_rnf /* non-zero values in closed sea areas with runoff locations (precip only) */ 633 647 int closea_mask_emp /* non-zero values in closed sea areas with runoff locations (total emp) */ 634 \end{ Verbatim}648 \end{clines} 635 649 636 650 % ------------------------------------------------------------------------------------------------------------- … … 642 656 \nlst{namcfg} 643 657 644 Most of the arrays relating to a particular ocean model configuration dicussed in this 645 chapter (grid-point position, scale factors) can be saved in a file if namelist parameter 646 \np{ln\_write\_cfg} (namelist \ngn{namcfg}) is set to \forcode{.true.}; the output 647 filename is set thorugh parameter \np{cn\_domcfg\_out}. This is only really useful 648 if the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 658 Most of the arrays relating to a particular ocean model configuration discussed in this chapter 659 (grid-point position, scale factors) 660 can be saved in a file if 661 namelist parameter \np{ln\_write\_cfg} (namelist \nam{cfg}) is set to \forcode{.true.}; 662 the output filename is set through parameter \np{cn\_domcfg\_out}. 663 This is only really useful if 664 the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 649 665 checking or confirmation is required. 650 666 … … 652 668 653 669 Alternatively, all the arrays relating to a particular ocean model configuration 654 (grid-point position, scale factors, depths and masks) can be saved in a file called655 \texttt{mesh\_mask} if namelist parameter \np{ln\_meshmask} (namelist \ngn{namdom}) is set 656 to \forcode{.true.}. This file contains additional fields that can be useful for 657 post-processing applications 670 (grid-point position, scale factors, depths and masks) 671 can be saved in a file called \texttt{mesh\_mask} if 672 namelist parameter \np{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}. 673 This file contains additional fields that can be useful for post-processing applications. 658 674 659 675 % ================================================================ … … 664 680 \label{sec:DTA_tsd} 665 681 %-----------------------------------------namtsd------------------------------------------- 666 \nlst{namtsd} 682 \nlst{namtsd} 667 683 %------------------------------------------------------------------------------------------ 668 684 669 Basic initial state options are defined in \n gn{namtsd}. By default, the ocean starts670 from rest (the velocity field is set to zero) and the initialization of temperatureand671 salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter.685 Basic initial state options are defined in \nam{tsd}. 686 By default, the ocean starts from rest (the velocity field is set to zero) and 687 the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter. 672 688 673 689 \begin{description} 674 690 \item[\np{ln\_tsd\_init}\forcode{= .true.}] 675 Use T and S input files that can be given on the model grid itself or on their native 676 input data grids. In the latter case, the data will be interpolated on-the-fly both in677 the horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}). The678 information relating to the input files are specified in the \np{sn\_tem} and679 \np{sn\_sal} structures.The computation is done in the \mdl{dtatsd} module.691 Use T and S input files that can be given on the model grid itself or on their native input data grids. 692 In the latter case, the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 693 (see \autoref{subsec:SBC_iof}). 694 The information relating to the input files are specified in the \np{sn\_tem} and \np{sn\_sal} structures. 695 The computation is done in the \mdl{dtatsd} module. 680 696 \item[\np{ln\_tsd\_init}\forcode{= .false.}] 681 Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine 682 contained in \mdl{userdef\_istate}. The default version sets horizontally uniform T and683 profiles as used in the GYRE configuration(see \autoref{sec:CFG_gyre}).697 Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}. 698 The default version sets horizontally uniform T and profiles as used in the GYRE configuration 699 (see \autoref{sec:CFG_gyre}). 684 700 \end{description} 685 701 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DYN.tex
r11263 r11512 8 8 \label{chap:DYN} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 Using the representation described in \autoref{chap:DOM}, … … 36 36 (surface wind stress calculation using bulk formulae, estimation of mixing coefficients) 37 37 that are carried out in modules SBC, LDF and ZDF and are described in 38 \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 38 \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 39 39 40 40 In the present chapter we also describe the diagnostic equations used to compute the horizontal divergence, 41 41 curl of the velocities (\emph{divcur} module) and the vertical velocity (\emph{wzvmod} module). 42 42 43 The different options available to the user are managed by namelist variables. 44 For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, 43 The different options available to the user are managed by namelist variables. 44 For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, 45 45 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 46 If a CPP key is used for this term its name is \key{ttt}.46 %If a CPP key is used for this term its name is \key{ttt}. 47 47 The corresponding code can be found in the \textit{dynttt\_xxx} module in the DYN directory, 48 48 and it is usually computed in the \textit{dyn\_ttt\_xxx} subroutine. 49 49 50 50 The user has the option of extracting and outputting each tendency term from the 3D momentum equations 51 (\ key{trddyn} defined), as described in \autoref{chap:MISC}.52 Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \ key{trdvor} is defined)51 (\texttt{trddyn?} defined), as described in \autoref{chap:MISC}. 52 Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \texttt{trdvor?} is defined) 53 53 can be derived from the 3D terms. 54 54 %%% 55 \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does 55 \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does 56 56 MISC correspond to "extracting tendency terms" or "vorticity balance"?} 57 57 … … 69 69 \label{subsec:DYN_divcur} 70 70 71 The vorticity is defined at an $f$-point (\ie corner point) as follows:71 The vorticity is defined at an $f$-point (\ie\ corner point) as follows: 72 72 \begin{equation} 73 73 \label{eq:divcur_cur} 74 74 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 75 75 -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 76 \end{equation} 76 \end{equation} 77 77 78 78 The horizontal divergence is defined at a $T$-point. … … 97 97 ensure perfect restartability. 98 98 The vorticity and divergence at the \textit{now} time step are used for the computation of 99 the nonlinear advection and of the vertical velocity respectively. 99 the nonlinear advection and of the vertical velocity respectively. 100 100 101 101 %-------------------------------------------------------------------------------------------------------------- … … 117 117 \end{aligned} 118 118 \end{equation} 119 where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 119 where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 120 120 expressed in Kg/m$^2$/s (which is equal to mm/s), 121 121 and $\rho_w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation). 122 122 If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then 123 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 123 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 124 124 The sea-surface height is evaluated using exactly the same time stepping scheme as 125 125 the tracer equation \autoref{eq:tra_nxt}: 126 126 a leapfrog scheme in combination with an Asselin time filter, 127 \ie the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity).127 \ie\ the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 128 128 This is of paramount importance. 129 129 Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to … … 144 144 \end{equation} 145 145 146 In the case of a non-linear free surface (\ key{vvl}), the top vertical velocity is $-\textit{emp}/\rho_w$,146 In the case of a non-linear free surface (\texttt{vvl?}), the top vertical velocity is $-\textit{emp}/\rho_w$, 147 147 as changes in the divergence of the barotropic transport are absorbed into the change of the level thicknesses, 148 148 re-orientated downward. … … 151 151 The upper boundary condition applies at a fixed level $z=0$. 152 152 The top vertical velocity is thus equal to the divergence of the barotropic transport 153 (\ie the first term in the right-hand-side of \autoref{eq:dynspg_ssh}).153 (\ie\ the first term in the right-hand-side of \autoref{eq:dynspg_ssh}). 154 154 155 155 Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates, … … 158 158 Note also that the $k$-axis is re-orientated downwards in the \fortran code compared to 159 159 the indexing used in the semi-discrete equations such as \autoref{eq:wzv} 160 (see \autoref{subsec:DOM_Num_Index_vertical}). 160 (see \autoref{subsec:DOM_Num_Index_vertical}). 161 161 162 162 … … 168 168 %-----------------------------------------nam_dynadv---------------------------------------------------- 169 169 170 \nlst{namdyn_adv} 170 \nlst{namdyn_adv} 171 171 %------------------------------------------------------------------------------------------------------------- 172 172 173 173 The vector invariant form of the momentum equations is the one most often used in 174 applications of the \NEMO ocean model.174 applications of the \NEMO\ ocean model. 175 175 The flux form option (see next section) has been present since version $2$. 176 Options are defined through the \n gn{namdyn\_adv} namelist variables Coriolis and176 Options are defined through the \nam{dyn\_adv} namelist variables Coriolis and 177 177 momentum advection terms are evaluated using a leapfrog scheme, 178 \ie the velocity appearing in these expressions is centred in time (\textit{now} velocity).178 \ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity). 179 179 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied following 180 180 \autoref{chap:LBC}. 181 181 182 182 % ------------------------------------------------------------------------------------------------------------- 183 % Vorticity term 183 % Vorticity term 184 184 % ------------------------------------------------------------------------------------------------------------- 185 185 \subsection[Vorticity term (\textit{dynvor.F90})] … … 188 188 %------------------------------------------nam_dynvor---------------------------------------------------- 189 189 190 \nlst{namdyn_vor} 190 \nlst{namdyn_vor} 191 191 %------------------------------------------------------------------------------------------------------------- 192 192 193 Options are defined through the \n gn{namdyn\_vor} namelist variables.194 Four discretisations of the vorticity term (\ np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available:193 Options are defined through the \nam{dyn\_vor} namelist variables. 194 Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 195 195 conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); 196 196 conserving horizontal kinetic energy (ENE scheme); … … 212 212 In the enstrophy conserving case (ENS scheme), 213 213 the discrete formulation of the vorticity term provides a global conservation of the enstrophy 214 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie $\chi$=$0$),214 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie\ $\chi$=$0$), 215 215 but does not conserve the total kinetic energy. 216 216 It is given by: … … 225 225 \end{aligned} 226 226 \right. 227 \end{equation} 227 \end{equation} 228 228 229 229 %------------------------------------------------------------- … … 246 246 \end{aligned} 247 247 \right. 248 \end{equation} 248 \end{equation} 249 249 250 250 %------------------------------------------------------------- … … 285 285 the presence of grid point oscillation structures that will be invisible to the operator. 286 286 These structures are \textit{computational modes} that will be at least partly damped by 287 the momentum diffusion operator (\ie the subgrid-scale advection), but not by the resolved advection term.287 the momentum diffusion operator (\ie\ the subgrid-scale advection), but not by the resolved advection term. 288 288 The ENS and ENE schemes therefore do not contribute to dump any grid point noise in the horizontal velocity field. 289 289 Such noise would result in more noise in the vertical velocity field, an undesirable feature. … … 291 291 $u$ and $v$ are located at different grid points, 292 292 a price worth paying to avoid a double averaging in the pressure gradient term as in the $B$-grid. 293 \gmcomment{ To circumvent this, Adcroft (ADD REF HERE) 293 \gmcomment{ To circumvent this, Adcroft (ADD REF HERE) 294 294 Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....} 295 295 … … 299 299 \citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}). 300 300 301 The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified 302 for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme. 303 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 301 The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified 302 for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme. 303 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 304 304 \[ 305 305 % \label{eq:pot_vor} … … 307 307 \] 308 308 where the relative vorticity is defined by (\autoref{eq:divcur_cur}), 309 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 309 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 310 310 \begin{equation} 311 311 \label{eq:een_e3f} … … 326 326 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 327 327 328 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 328 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 329 329 It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks 330 330 (\np{nn\_een\_e3f}\forcode{ = 1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}). … … 334 334 (with a systematic reduction of $e_{3f}$ when a model level intercept the bathymetry) 335 335 that tends to reinforce the topostrophy of the flow 336 (\ie the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}.336 (\ie\ the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}. 337 337 338 338 Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as 339 339 the following triad combinations of the neighbouring potential vorticities defined at f-points 340 (\autoref{fig:DYN_een_triad}): 340 (\autoref{fig:DYN_een_triad}): 341 341 \begin{equation} 342 342 \label{eq:Q_triads} … … 344 344 = \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) 345 345 \end{equation} 346 where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. 347 348 Finally, the vorticity terms are represented as: 346 where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. 347 348 Finally, the vorticity terms are represented as: 349 349 \begin{equation} 350 350 \label{eq:dynvor_een} … … 357 357 \end{aligned} 358 358 } \right. 359 \end{equation} 359 \end{equation} 360 360 361 361 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 362 362 It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow 363 (\ie $\chi$=$0$) (see \autoref{subsec:C_vorEEN}).363 (\ie\ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 364 364 Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of 365 365 the noise in the vertical velocity field \citep{le-sommer.penduff.ea_OM09}. 366 366 Furthermore, used in combination with a partial steps representation of bottom topography, 367 367 it improves the interaction between current and topography, 368 leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. 368 leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. 369 369 370 370 %-------------------------------------------------------------------------------------------------------------- … … 412 412 When \np{ln\_dynzad\_zts}\forcode{ = .true.}, 413 413 a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 414 This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 414 This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 415 415 Note that in this case, 416 416 a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, … … 425 425 %------------------------------------------nam_dynadv---------------------------------------------------- 426 426 427 \nlst{namdyn_adv} 427 \nlst{namdyn_adv} 428 428 %------------------------------------------------------------------------------------------------------------- 429 429 430 Options are defined through the \n gn{namdyn\_adv} namelist variables.430 Options are defined through the \nam{dyn\_adv} namelist variables. 431 431 In the flux form (as in the vector invariant form), 432 432 the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, 433 \ie the velocity appearing in their expressions is centred in time (\textit{now} velocity).433 \ie\ the velocity appearing in their expressions is centred in time (\textit{now} velocity). 434 434 At the lateral boundaries either free slip, 435 435 no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}. … … 445 445 In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the "metric" term. 446 446 This altered Coriolis parameter is thus discretised at $f$-points. 447 It is given by: 447 It is given by: 448 448 \begin{multline*} 449 449 % \label{eq:dyncor_metric} … … 451 451 \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] 452 452 - \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right] } \ \right) 453 \end{multline*} 453 \end{multline*} 454 454 455 455 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to 456 456 compute the product of the Coriolis parameter and the vorticity. 457 457 However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has exclusively been used to date. 458 This term is evaluated using a leapfrog scheme, \ie the velocity is centred in time (\textit{now} velocity).458 This term is evaluated using a leapfrog scheme, \ie\ the velocity is centred in time (\textit{now} velocity). 459 459 460 460 %-------------------------------------------------------------------------------------------------------------- … … 487 487 or a $3^{rd}$ order upstream biased scheme, UBS. 488 488 The latter is described in \citet{shchepetkin.mcwilliams_OM05}. 489 The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 489 The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 490 490 In flux form, the schemes differ by the choice of a space and time interpolation to define the value of 491 $u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie at the $T$-, $f$-,492 and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 491 $u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-, 492 and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 493 493 494 494 %------------------------------------------------------------- … … 508 508 \end{aligned} 509 509 \right. 510 \end{equation} 511 512 The scheme is non diffusive (\ie conserves the kinetic energy) but dispersive (\ieit may create false extrema).510 \end{equation} 511 512 The scheme is non diffusive (\ie\ conserves the kinetic energy) but dispersive (\ie\ it may create false extrema). 513 513 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to 514 514 produce a sensible solution. … … 535 535 \end{equation} 536 536 where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$. 537 This results in a dissipatively dominant (\ie hyper-diffusive) truncation error537 This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error 538 538 \citep{shchepetkin.mcwilliams_OM05}. 539 539 The overall performance of the advection scheme is similar to that reported in \citet{farrow.stevens_JPO95}. … … 541 541 It is not a \emph{positive} scheme, meaning that false extrema are permitted. 542 542 But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. 543 As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 544 (\ie \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}),543 As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 544 (\ie\ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), 545 545 and it is recommended to do so. 546 546 547 547 The UBS scheme is not used in all directions. 548 In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie $u_{uw}^{ubs}$ and548 In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie\ $u_{uw}^{ubs}$ and 549 549 $u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. 550 UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm pursue the 550 UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm pursue the 551 551 sentence:Since vertical mixing of momentum is a source term of the TKE equation... } 552 552 … … 578 578 %------------------------------------------nam_dynhpg--------------------------------------------------- 579 579 580 \nlst{namdyn_hpg} 580 \nlst{namdyn_hpg} 581 581 %------------------------------------------------------------------------------------------------------------- 582 582 583 Options are defined through the \n gn{namdyn\_hpg} namelist variables.583 Options are defined through the \nam{dyn\_hpg} namelist variables. 584 584 The key distinction between the different algorithms used for 585 585 the hydrostatic pressure gradient is the vertical coordinate used, 586 since HPG is a \emph{horizontal} pressure gradient, \ie computed along geopotential surfaces.586 since HPG is a \emph{horizontal} pressure gradient, \ie\ computed along geopotential surfaces. 587 587 As a result, any tilt of the surface of the computational levels will require a specific treatment to 588 588 compute the hydrostatic pressure gradient. 589 589 590 590 The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme, 591 \ie the density appearing in its expression is centred in time (\emph{now} $\rho$),591 \ie\ the density appearing in its expression is centred in time (\emph{now} $\rho$), 592 592 or a semi-implcit scheme. 593 593 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied. … … 616 616 \end{aligned} 617 617 \right. 618 \end{equation} 618 \end{equation} 619 619 620 620 for $1<k<km$ (interior layer) … … 631 631 \end{aligned} 632 632 \right. 633 \end{equation} 633 \end{equation} 634 634 635 635 Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as 636 636 the vertical derivative of the scale factor at the surface level ($z=0$). 637 Note also that in case of variable volume level (\ key{vvl} defined),637 Note also that in case of variable volume level (\texttt{vvl?} defined), 638 638 the surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and 639 639 \autoref{eq:dynhpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. … … 649 649 Before taking horizontal gradients between these tracer points, 650 650 a linear interpolation is used to approximate the deeper tracer as if 651 it actually lived at the depth of the shallower tracer point. 651 it actually lived at the depth of the shallower tracer point. 652 652 653 653 Apart from this modification, … … 668 668 669 669 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers 670 (\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}). 670 (\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}). 671 671 A number of different pressure gradient options are coded but the ROMS-like, 672 672 density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. … … 683 683 \end{aligned} 684 684 \right. 685 \end{equation} 685 \end{equation} 686 686 687 687 Where the first term is the pressure gradient along coordinates, 688 688 computed as in \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, 689 and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 689 and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 690 690 ($e_{3w}$). 691 691 692 692 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{ = .true.}). 693 693 This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{ = .true.}). … … 695 695 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) 696 696 697 $\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 697 $\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 698 698 (\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 699 699 700 700 Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is activated 701 (\ key{vvl}) because in that case, even with a flat bottom,701 (\texttt{vvl?}) because in that case, even with a flat bottom, 702 702 the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}. 703 703 The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as 704 an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \ key{vvl} is active.704 an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \texttt{vvl?} is active. 705 705 The pressure Jacobian scheme uses a constrained cubic spline to 706 706 reconstruct the density profile across the water column. … … 723 723 724 724 The pressure gradient due to ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in 725 \autoref{subsec:DYN_hpg_sco}. 725 \autoref{subsec:DYN_hpg_sco}. 726 726 727 727 %-------------------------------------------------------------------------------------------------------------- … … 742 742 It involves the evaluation of the hydrostatic pressure gradient as 743 743 an average over the three time levels $t-\rdt$, $t$, and $t+\rdt$ 744 (\ie \textit{before}, \textit{now} and \textit{after} time-steps),745 rather than at the central time level $t$ only, as in the standard leapfrog scheme. 744 (\ie\ \textit{before}, \textit{now} and \textit{after} time-steps), 745 rather than at the central time level $t$ only, as in the standard leapfrog scheme. 746 746 747 747 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): … … 795 795 %-----------------------------------------nam_dynspg---------------------------------------------------- 796 796 797 \nlst{namdyn_spg} 797 \nlst{namdyn_spg} 798 798 %------------------------------------------------------------------------------------------------------------ 799 799 800 Options are defined through the \n gn{namdyn\_spg} namelist variables.800 Options are defined through the \nam{dyn\_spg} namelist variables. 801 801 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 802 802 The main distinction is between the fixed volume case (linear free surface) and 803 the variable volume case (nonlinear free surface, \ key{vvl} is defined).803 the variable volume case (nonlinear free surface, \texttt{vvl?} is defined). 804 804 In the linear free surface case (\autoref{subsec:PE_free_surface}) 805 805 the vertical scale factors $e_{3}$ are fixed in time, 806 806 while they are time-dependent in the nonlinear case (\autoref{subsec:PE_free_surface}). 807 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 807 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 808 808 which imposes a very small time step when an explicit time stepping is used. 809 Two methods are proposed to allow a longer time step for the three-dimensional equations: 810 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}), 809 Two methods are proposed to allow a longer time step for the three-dimensional equations: 810 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}), 811 811 and the split-explicit free surface described below. 812 The extra term introduced in the filtered method is calculated implicitly, 812 The extra term introduced in the filtered method is calculated implicitly, 813 813 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 814 814 … … 819 819 an explicit formulation which requires a small time step; 820 820 a filtered free surface formulation which allows a larger time step by 821 adding a filtering term into the momentum equation; 821 adding a filtering term into the momentum equation; 822 822 and a split-explicit free surface formulation, described below, which also allows a larger time step. 823 823 … … 829 829 % Explicit free surface formulation 830 830 %-------------------------------------------------------------------------------------------------------------- 831 \subsection[Explicit free surface (\texttt{ \textbf{key\_dynspg\_exp}})]832 {Explicit free surface (\protect\ key{dynspg\_exp})}831 \subsection[Explicit free surface (\texttt{ln\_dynspg\_exp}\forcode{ = .true.})] 832 {Explicit free surface (\protect\np{ln\_dynspg\_exp}\forcode{ = .true.})} 833 833 \label{subsec:DYN_spg_exp} 834 834 835 In the explicit free surface formulation (\ key{dynspg\_exp} defined),835 In the explicit free surface formulation (\np{ln\_dynspg\_exp} set to true), 836 836 the model time step is chosen to be small enough to resolve the external gravity waves 837 837 (typically a few tens of seconds). 838 The surface pressure gradient, evaluated using a leap-frog scheme (\ie centered in time),838 The surface pressure gradient, evaluated using a leap-frog scheme (\ie\ centered in time), 839 839 is thus simply given by : 840 840 \begin{equation} … … 846 846 \end{aligned} 847 847 \right. 848 \end{equation} 849 850 Note that in the non-linear free surface case (\ie \key{vvl} defined),848 \end{equation} 849 850 Note that in the non-linear free surface case (\ie\ \texttt{vvl?} defined), 851 851 the surface pressure gradient is already included in the momentum tendency through 852 852 the level thickness variation allowed in the computation of the hydrostatic pressure gradient. … … 856 856 % Split-explict free surface formulation 857 857 %-------------------------------------------------------------------------------------------------------------- 858 \subsection[Split-explicit free surface (\texttt{ \textbf{key\_dynspg\_ts}})]859 {Split-explicit free surface (\protect\ key{dynspg\_ts})}858 \subsection[Split-explicit free surface (\texttt{ln\_dynspg\_ts}\forcode{ = .true.})] 859 {Split-explicit free surface (\protect\np{ln\_dynspg\_ts}\forcode{ = .true.})} 860 860 \label{subsec:DYN_spg_ts} 861 861 %------------------------------------------namsplit----------------------------------------------------------- … … 864 864 %------------------------------------------------------------------------------------------------------------- 865 865 866 The split-explicit free surface formulation used in \NEMO (\key{dynspg\_ts} defined),866 The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true), 867 867 also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}. 868 868 The general idea is to solve the free surface equation and the associated barotropic velocity equations with … … 897 897 Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm 898 898 detailed in \citet{shchepetkin.mcwilliams_OM05}. 899 AB3-AM4 coefficients used in \NEMO follow the second-order accurate,899 AB3-AM4 coefficients used in \NEMO\ follow the second-order accurate, 900 900 "multi-purpose" stability compromise as defined in \citet{shchepetkin.mcwilliams_ibk09} 901 (see their figure 12, lower left). 901 (see their figure 12, lower left). 902 902 903 903 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > … … 935 935 provide time filtered quantities. 936 936 These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. 937 Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, 937 Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, 938 938 asselin filtering is not applied to barotropic quantities.\\ 939 939 Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step … … 963 963 964 964 One can eventually choose to feedback instantaneous values by not using any time filter 965 (\np{ln\_bt\_av}\forcode{ = .false.}). 965 (\np{ln\_bt\_av}\forcode{ = .false.}). 966 966 In that case, external mode equations are continuous in time, 967 \ie they are not re-initialized when starting a new sub-stepping sequence.967 \ie\ they are not re-initialized when starting a new sub-stepping sequence. 968 968 This is the method used so far in the POM model, the stability being maintained by 969 969 refreshing at (almost) each barotropic time step advection and horizontal diffusion terms. 970 Since the latter terms have not been added in \NEMO for computational efficiency,970 Since the latter terms have not been added in \NEMO\ for computational efficiency, 971 971 removing time filtering is not recommended except for debugging purposes. 972 972 This may be used for instance to appreciate the damping effect of the standard formulation on … … 976 976 977 977 %>>>>>=============== 978 \gmcomment{ %%% copy from griffies Book 978 \gmcomment{ %%% copy from griffies Book 979 979 980 980 \textbf{title: Time stepping the barotropic system } … … 983 983 Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using 984 984 the small barotropic time step $\rdt$. 985 We have 985 We have 986 986 987 987 \[ … … 1006 1006 and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over 1007 1007 a single cycle. 1008 This is also the time that sets the barotropic time steps via 1008 This is also the time that sets the barotropic time steps via 1009 1009 \[ 1010 1010 % \label{eq:DYN_spg_ts_t} … … 1012 1012 \] 1013 1013 with $n$ an integer. 1014 The density scaled surface pressure is evaluated via 1014 The density scaled surface pressure is evaluated via 1015 1015 \[ 1016 1016 % \label{eq:DYN_spg_ts_ps} … … 1021 1021 \end{cases} 1022 1022 \] 1023 To get started, we assume the following initial conditions 1023 To get started, we assume the following initial conditions 1024 1024 \[ 1025 1025 % \label{eq:DYN_spg_ts_eta} … … 1029 1029 \end{split} 1030 1030 \] 1031 with 1031 with 1032 1032 \[ 1033 1033 % \label{eq:DYN_spg_ts_etaF} … … 1035 1035 \] 1036 1036 the time averaged surface height taken from the previous barotropic cycle. 1037 Likewise, 1037 Likewise, 1038 1038 \[ 1039 1039 % \label{eq:DYN_spg_ts_u} … … 1041 1041 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 1042 1042 \] 1043 with 1043 with 1044 1044 \[ 1045 1045 % \label{eq:DYN_spg_ts_u} … … 1047 1047 \] 1048 1048 the time averaged vertically integrated transport. 1049 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 1049 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 1050 1050 1051 1051 Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , 1052 1052 the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at 1053 baroclinic time $\tau + \rdt \tau$ 1053 baroclinic time $\tau + \rdt \tau$ 1054 1054 \[ 1055 1055 % \label{eq:DYN_spg_ts_u} … … 1057 1057 \] 1058 1058 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using 1059 the following form 1059 the following form 1060 1060 1061 1061 \begin{equation} 1062 1062 \label{eq:DYN_spg_ts_ssh} 1063 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 1063 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 1064 1064 \end{equation} 1065 1065 1066 1066 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between 1067 1067 the mass/volume budgets and the tracer budgets. 1068 More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 1069 1068 More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 1069 1070 1070 In general, some form of time filter is needed to maintain integrity of the surface height field due to 1071 1071 the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. … … 1078 1078 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 1079 1079 \end{equation} 1080 Another approach tried was 1080 Another approach tried was 1081 1081 1082 1082 \[ … … 1091 1091 eliminating tracer and surface height time filtering (see ?? for more complete discussion). 1092 1092 However, in the general case with a non-zero $\alpha$, 1093 the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 1093 the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 1094 1094 1095 1095 } %%end gm comment (copy of griffies book) … … 1101 1101 % Filtered free surface formulation 1102 1102 %-------------------------------------------------------------------------------------------------------------- 1103 \subsection[Filtered free surface (\texttt{ \textbf{key\_dynspg\_flt}})]1104 {Filtered free surface (\protect\ key{dynspg\_flt})}1103 \subsection[Filtered free surface (\texttt{dynspg\_flt?})] 1104 {Filtered free surface (\protect\texttt{dynspg\_flt?})} 1105 1105 \label{subsec:DYN_spg_fltp} 1106 1106 1107 The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. 1108 The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 1107 The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. 1108 The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 1109 1109 The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 1110 1110 1111 1111 %% gm %%======>>>> given here the discrete eqs provided to the solver 1112 \gmcomment{ %%% copy from chap-model basics 1112 \gmcomment{ %%% copy from chap-model basics 1113 1113 \[ 1114 1114 % \label{eq:spg_flt} … … 1123 1123 } %end gmcomment 1124 1124 1125 Note that in the linear free surface formulation (\ key{vvl} not defined),1125 Note that in the linear free surface formulation (\texttt{vvl?} not defined), 1126 1126 the ocean depth is time-independent and so is the matrix to be inverted. 1127 It is computed once and for all and applies to all ocean time steps. 1127 It is computed once and for all and applies to all ocean time steps. 1128 1128 1129 1129 % ================================================================ … … 1135 1135 %------------------------------------------nam_dynldf---------------------------------------------------- 1136 1136 1137 \nlst{namdyn_ldf} 1137 \nlst{namdyn_ldf} 1138 1138 %------------------------------------------------------------------------------------------------------------- 1139 1139 1140 Options are defined through the \n gn{namdyn\_ldf} namelist variables.1140 Options are defined through the \nam{dyn\_ldf} namelist variables. 1141 1141 The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. 1142 1142 The coefficients may be constant or spatially variable; 1143 1143 the description of the coefficients is found in the chapter on lateral physics (\autoref{chap:LDF}). 1144 1144 The lateral diffusion of momentum is evaluated using a forward scheme, 1145 \ie the velocity appearing in its expression is the \textit{before} velocity in time,1145 \ie\ the velocity appearing in its expression is the \textit{before} velocity in time, 1146 1146 except for the pure vertical component that appears when a tensor of rotation is used. 1147 1147 This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). … … 1159 1159 In finite difference methods, 1160 1160 the biharmonic operator is frequently the method of choice to achieve this scale selective dissipation since 1161 its damping time (\ie its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$1161 its damping time (\ie\ its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 1162 1162 (so that short waves damped more rapidelly than long ones), 1163 1163 whereas the Laplace operator damping time scales only like $\lambda^{-2}$. … … 1169 1169 \label{subsec:DYN_ldf_lap} 1170 1170 1171 For lateral iso-level diffusion, the discrete operator is: 1171 For lateral iso-level diffusion, the discrete operator is: 1172 1172 \begin{equation} 1173 1173 \label{eq:dynldf_lap} … … 1175 1175 \begin{aligned} 1176 1176 D_u^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm} 1177 \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ 1177 \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ 1178 1178 {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\ 1179 1179 D_v^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm} 1180 \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ 1180 \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ 1181 1181 {A_f^{lm} \;e_{3f} \zeta } \right] 1182 1182 \end{aligned} 1183 1183 \right. 1184 \end{equation} 1184 \end{equation} 1185 1185 1186 1186 As explained in \autoref{subsec:PE_ldf}, 1187 1187 this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and 1188 ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 1188 ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 1189 1189 1190 1190 %-------------------------------------------------------------------------------------------------------------- … … 1230 1230 -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} 1231 1231 \right)} \right]} \right. \\ 1232 & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 1232 & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 1233 1233 }\,\delta_{j} [v] - e_{1t}\, r_{2t} 1234 1234 \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}} 1235 1235 \right)} \right] \\ 1236 & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 1236 & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 1237 1237 {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\ 1238 1238 & \ \qquad \qquad \qquad \quad\ 1239 1239 - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\ 1240 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1240 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1241 1241 +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 1242 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 1242 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 1243 1243 \end{split} 1244 1244 \end{equation} 1245 1245 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and 1246 the surface of computation ($z$- or $s$-surfaces). 1246 the surface of computation ($z$- or $s$-surfaces). 1247 1247 The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}). 1248 1248 … … 1270 1270 %----------------------------------------------namzdf------------------------------------------------------ 1271 1271 1272 \nlst{namzdf} 1272 \nlst{namzdf} 1273 1273 %------------------------------------------------------------------------------------------------------------- 1274 1274 1275 Options are defined through the \n gn{namzdf} namelist variables.1275 Options are defined through the \nam{zdf} namelist variables. 1276 1276 The large vertical diffusion coefficient found in the surface mixed layer together with high vertical resolution implies that in the case of explicit time stepping there would be too restrictive a constraint on the time step. 1277 1277 Two time stepping schemes can be used for the vertical diffusion term: … … 1280 1280 $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}) 1281 1281 (see \autoref{chap:STP}). 1282 Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 1282 Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 1283 1283 1284 1284 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. … … 1309 1309 where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in 1310 1310 the (\textbf{i},\textbf{j}) coordinate system. 1311 The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in 1311 The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in 1312 1312 the vertical over the mixed layer depth. 1313 1313 If the vertical mixing coefficient is small (when no mixed layer scheme is used) … … 1326 1326 Besides the surface and bottom stresses (see the above section) 1327 1327 which are introduced as boundary conditions on the vertical mixing, 1328 three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 1328 three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 1329 1329 1330 1330 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), … … 1335 1335 1336 1336 (3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used 1337 (\ie when the sea-ice is embedded in the ocean),1337 (\ie\ when the sea-ice is embedded in the ocean), 1338 1338 the snow-ice mass is taken into account when computing the surface pressure gradient. 1339 1339 … … 1343 1343 1344 1344 % ================================================================ 1345 % Wetting and drying 1345 % Wetting and drying 1346 1346 % ================================================================ 1347 1347 \section{Wetting and drying } … … 1359 1359 1360 1360 The following terminology is used. The depth of the topography (positive downwards) 1361 at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the NEMOcode.1361 at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the \NEMO\ code. 1362 1362 The height of the free surface (positive upwards) is denoted by $ \mathrm{ssh}$. Given the sign 1363 1363 conventions used, the water depth, $h$, is the height of the free surface plus the depth of the … … 1367 1367 covered by water. They require the topography specified with a model 1368 1368 configuration to have negative depths at points where the land is higher than the 1369 topography's reference sea-level. The vertical grid in NEMOis normally computed relative to an1369 topography's reference sea-level. The vertical grid in \NEMO\ is normally computed relative to an 1370 1370 initial state with zero sea surface height elevation. 1371 1371 The user can choose to compute the vertical grid and heights in the model relative to … … 1386 1386 All these configurations have used pure sigma coordinates. It is expected that 1387 1387 the wetting and drying code will work in domains with more general s-coordinates provided 1388 the coordinates are pure sigma in the region where wetting and drying actually occurs. 1388 the coordinates are pure sigma in the region where wetting and drying actually occurs. 1389 1389 1390 1390 The next sub-section descrbies the directional limiter and the following sub-section the iterative limiter. … … 1399 1399 \label{subsec:DYN_wd_directional_limiter} 1400 1400 The principal idea of the directional limiter is that 1401 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than rn\_wdmin1).1401 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn\_wdmin1}). 1402 1402 1403 1403 All the changes associated with this option are made to the barotropic solver for the non-linear … … 1409 1409 1410 1410 The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj). 1411 If the user sets ln\_wd\_dl\_ramp = .False.then zuwdmask is 1 when the1412 flux is from a cell with water depth greater than rn\_wdmin1and 0 otherwise. If the user sets1413 ln\_wd\_dl\_ramp = .True.the flux across the face is ramped down as the water depth decreases1414 from 2 * rn\_wdmin1 to rn\_wdmin1. The use of this ramp reduced grid-scale noise in idealised test cases.1411 If the user sets \np{ln\_wd\_dl\_ramp}\forcode{ = .false.} then zuwdmask is 1 when the 1412 flux is from a cell with water depth greater than \np{rn\_wdmin1} and 0 otherwise. If the user sets 1413 \np{ln\_wd\_dl\_ramp}\forcode{ = .true.} the flux across the face is ramped down as the water depth decreases 1414 from 2 * \np{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. 1415 1415 1416 1416 At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen … … 1428 1428 fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because 1429 1429 the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts 1430 to equal their mean value during the barotropic steps. If the user sets ln\_wd\_dl\_bc = .True., the1431 baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. 1430 to equal their mean value during the barotropic steps. If the user sets \np{ln\_wd\_dl\_bc}\forcode{ = .true.}, the 1431 baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. 1432 1432 1433 1433 %----------------------------------------------------------------------------------------- … … 1455 1455 1456 1456 \begin{align} \label{dyn_wd_continuity_2} 1457 \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 1457 \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 1458 1458 &= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j} + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\ 1459 1459 &= \mathrm{zzflx}_{i,j} . … … 1471 1471 1472 1472 \begin{equation} \label{dyn_wd_zzflx_p_n_1} 1473 \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . 1473 \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . 1474 1474 \end{equation} 1475 1475 … … 1495 1495 1496 1496 \begin{equation} \label{dyn_wd_zzflx_initial} 1497 \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 1497 \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 1498 1498 \end{equation} 1499 1499 … … 1525 1525 \begin{split} 1526 1526 \mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 1527 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 1527 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 1528 1528 \end{split} 1529 1529 \end{equation} … … 1635 1635 1636 1636 % ================================================================ 1637 % Time evolution term 1637 % Time evolution term 1638 1638 % ================================================================ 1639 1639 \section[Time evolution term (\textit{dynnxt.F90})] … … 1643 1643 %----------------------------------------------namdom---------------------------------------------------- 1644 1644 1645 \nlst{namdom} 1645 \nlst{namdom} 1646 1646 %------------------------------------------------------------------------------------------------------------- 1647 1647 1648 Options are defined through the \n gn{namdom} namelist variables.1648 Options are defined through the \nam{dom} namelist variables. 1649 1649 The general framework for dynamics time stepping is a leap-frog scheme, 1650 \ie a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}).1650 \ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}). 1651 1651 The scheme is applied to the velocity, except when 1652 1652 using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) 1653 in the variable volume case (\ key{vvl} defined),1654 where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum}) 1653 in the variable volume case (\texttt{vvl?} defined), 1654 where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum}) 1655 1655 1656 1656 $\bullet$ vector invariant form or linear free surface 1657 (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \ key{vvl} not defined):1657 (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \texttt{vvl?} not defined): 1658 1658 \[ 1659 1659 % \label{eq:dynnxt_vec} … … 1667 1667 1668 1668 $\bullet$ flux form and nonlinear free surface 1669 (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \ key{vvl} defined):1669 (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \texttt{vvl?} defined): 1670 1670 \[ 1671 1671 % \label{eq:dynnxt_flux} -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_LBC.tex
r11263 r11512 3 3 \begin{document} 4 4 % ================================================================ 5 % Chapter — Lateral Boundary Condition (LBC) 5 % Chapter — Lateral Boundary Condition (LBC) 6 6 % ================================================================ 7 7 \chapter{Lateral Boundary Condition (LBC)} 8 8 \label{chap:LBC} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \newpage … … 22 22 %--------------------------------------------nam_lbc------------------------------------------------------- 23 23 24 \nlst{namlbc} 24 \nlst{namlbc} 25 25 %-------------------------------------------------------------------------------------------------------------- 26 26 27 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt (no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 28 29 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computation is performed over the whole domain, \ie we do not try to restrict the computation to ocean-only points. This choice has two motivations. Firstly, working on ocean only grid points overloads the code and harms the code readability. Secondly, and more importantly, it drastically reduces the vector portion of the computation, leading to a dramatic increase of CPU time requirement on vector computers. The current section describes how the masking affects the computation of the various terms of the equations with respect to the boundary condition at solid walls. The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 30 31 Options are defined through the \ngn{namlbc} namelist variables. 27 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt 28 %(no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). 29 %They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 30 31 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, 32 %and includes the use of a full or partial step representation of bottom topography. 33 %The computation is performed over the whole domain, \ie\ we do not try to restrict the computation to ocean-only points. 34 %This choice has two motivations. 35 %Firstly, working on ocean only grid points overloads the code and harms the code readability. 36 %Secondly, and more importantly, it drastically reduces the vector portion of the computation, 37 %leading to a dramatic increase of CPU time requirement on vector computers. 38 %The current section describes how the masking affects the computation of the various terms of the equations 39 %with respect to the boundary condition at solid walls. 40 %The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 41 42 Options are defined through the \nam{lbc} namelist variables. 32 43 The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 33 44 arrays that include large portions where a computation is not required as the model variables remain at zero. … … 41 52 Since most of the boundary conditions consist of a zero flux across the solid boundaries, 42 53 they can be simply applied by multiplying variables by the correct mask arrays, 43 \ie the mask array of the grid point where the flux is evaluated.54 \ie\ the mask array of the grid point where the flux is evaluated. 44 55 For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points. 45 56 Evaluating this quantity as, … … 52 63 (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and 53 64 at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points 54 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 65 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 55 66 56 67 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 104 115 \item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at 105 116 the coastline is equal to the offshore velocity, 106 \ie the normal derivative of the tangential velocity is zero at the coast,117 \ie\ the normal derivative of the tangential velocity is zero at the coast, 107 118 so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast 108 119 (\autoref{fig:LBC_shlat}-a). … … 114 125 the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction 115 126 (\autoref{fig:LBC_shlat}-b). 116 Therefore, the vorticity along the coastlines is given by: 127 Therefore, the vorticity along the coastlines is given by: 117 128 118 129 \[ … … 130 141 131 142 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at 132 the coastline is smaller than the offshore velocity, \ie there is a lateral friction but143 the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 133 144 not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 134 145 This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. … … 140 151 \end{description} 141 152 142 Note that when the bottom topography is entirely represented by the $s$-coor -dinates (pure $s$-coordinate),153 Note that when the bottom topography is entirely represented by the $s$-coordinates (pure $s$-coordinate), 143 154 the lateral boundary condition on tangential velocity is of much less importance as 144 155 it is only applied next to the coast where the minimum water depth can be quite shallow. … … 149 160 % ================================================================ 150 161 \section[Model domain boundary condition (\texttt{jperio})] 151 {Model domain boundary condition (\protect\ np{jperio})}162 {Model domain boundary condition (\protect\jp{jperio})} 152 163 \label{sec:LBC_jperio} 153 164 … … 155 166 closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or 156 167 bi-cyclic east-west and north-fold. 157 The north-fold boundary condition is associated with the 3-pole ORCA mesh. 168 The north-fold boundary condition is associated with the 3-pole ORCA mesh. 158 169 159 170 % ------------------------------------------------------------------------------------------------------------- 160 % Closed, cyclic (\ np{jperio}\forcode{ = 0..2})171 % Closed, cyclic (\jp{jperio}\forcode{ = 0..2}) 161 172 % ------------------------------------------------------------------------------------------------------------- 162 173 \subsection[Closed, cyclic (\forcode{jperio = [0127]})] 163 {Closed, cyclic (\protect\ np{jperio}\forcode{ = [0127]})}174 {Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})} 164 175 \label{subsec:LBC_jperio012} 165 176 166 177 The choice of closed or cyclic model domain boundary condition is made by 167 setting \ np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}.178 setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}. 168 179 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 169 180 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 170 \ie in the model interior.181 \ie\ in the model interior. 171 182 To choose a lateral model boundary condition is to specify the first and last rows and columns of 172 the model variables. 183 the model variables. 173 184 174 185 \begin{description} 175 186 176 \item[For closed boundary (\ np{jperio}\forcode{ = 0})],187 \item[For closed boundary (\jp{jperio}\forcode{ = 0})], 177 188 solid walls are imposed at all model boundaries: 178 189 first and last rows and columns are set to zero. 179 190 180 \item[For cyclic east-west boundary (\ np{jperio}\forcode{ = 1})],191 \item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})], 181 192 first and last rows are set to zero (closed) whilst the first column is set to 182 193 the value of the last-but-one column and the last column to the value of the second one … … 184 195 Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 185 196 186 \item[For cyclic north-south boundary (\ np{jperio}\forcode{ = 2})],197 \item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})], 187 198 first and last columns are set to zero (closed) whilst the first row is set to 188 199 the value of the last-but-one row and the last row to the value of the second one … … 190 201 Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 191 202 192 \item[Bi-cyclic east-west and north-south boundary (\ np{jperio}\forcode{ = 7})] combines cases 1 and 2.203 \item[Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ = 7})] combines cases 1 and 2. 193 204 194 205 \end{description} … … 207 218 208 219 % ------------------------------------------------------------------------------------------------------------- 209 % North fold (\textit{jperio = 3 }to $6)$ 220 % North fold (\textit{jperio = 3 }to $6)$ 210 221 % ------------------------------------------------------------------------------------------------------------- 211 222 \subsection[North-fold (\forcode{jperio = [3-6]})] 212 {North-fold (\protect\ np{jperio}\forcode{ = [3-6]})}223 {North-fold (\protect\jp{jperio}\forcode{ = [3-6]})} 213 224 \label{subsec:LBC_north_fold} 214 225 … … 216 227 a three-polar ORCA grid. 217 228 Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, 218 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 229 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 219 230 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 220 231 … … 234 245 235 246 % ==================================================================== 236 % Exchange with neighbouring processors 247 % Exchange with neighbouring processors 237 248 % ==================================================================== 238 249 \section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})] … … 272 283 After a computation, a communication phase starts: 273 284 each processor sends to its neighbouring processors the update values of the points corresponding to 274 the interior overlapping area to its neighbouring sub-domain (\ie the innermost of the two overlapping rows).285 the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 275 286 The communication is done through the Message Passing Interface (MPI). 276 287 The data exchanges between processors are required at the very place where 277 288 lateral domain boundary conditions are set in the mono-domain computation: 278 289 the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with 279 routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie when \key{mpp\_mpi} defined).290 routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined). 280 291 It has to be pointed out that when using the MPP version of the model, 281 292 the east-west cyclic boundary condition is done implicitly, … … 297 308 The i-axis is divided by \jp{jpni} and 298 309 the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ 299 (parameters set in \n gn{nammpp} namelist).310 (parameters set in \nam{mpp} namelist). 300 311 Each processor is independent and without message passing or synchronous process, 301 312 programs run alone and access just its own local memory. … … 304 315 These dimensions include the internal domain and the overlapping rows. 305 316 The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). 306 The whole domain dimensions are named \ np{jpiglo}, \np{jpjglo} and \jp{jpk}.317 The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 307 318 The relationship between the whole domain and a sub-domain is: 308 319 \[ … … 312 323 where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 313 324 314 One also defines variables nldi and nlei which correspond to the internal domain bounds, 315 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 325 One also defines variables nldi and nlei which correspond to the internal domain bounds, 326 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 316 327 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 317 a global array (whole domain) by the relationship: 328 a global array (whole domain) by the relationship: 318 329 \[ 319 330 % \label{eq:lbc_nimpp} … … 337 348 338 349 339 The \NEMO model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points).350 The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 340 351 It is easily readable and very efficient in the context of a computer with vectorial architecture. 341 352 However, in the case of a scalar processor, computations over the land regions become more expensive in 342 terms of CPU time. 353 terms of CPU time. 343 354 It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where 344 355 more than 50 \% of points are land points. … … 349 360 The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, 350 361 leading to the elimination of $jpni \times jpnj - jpnij$ land processors. 351 When those parameters are specified in \n gn{nammpp} namelist,362 When those parameters are specified in \nam{mpp} namelist, 352 363 the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that 353 364 the land-only processors are not taken into account. 354 365 355 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp 366 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp 356 367 routine should be suppressed from the code.} 357 368 … … 360 371 Note that this is a problem for the meshmask file which requires to be defined over the whole domain. 361 372 Therefore, user should not eliminate land processors when creating a meshmask file 362 (\ie when setting a non-zero value to \np{nn\_msh}).373 (\ie\ when setting a non-zero value to \np{nn\_msh}). 363 374 364 375 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 381 392 382 393 % ==================================================================== 383 % Unstructured open boundaries BDY 394 % Unstructured open boundaries BDY 384 395 % ==================================================================== 385 396 \section{Unstructured open boundary conditions (BDY)} … … 388 399 %-----------------------------------------nambdy-------------------------------------------- 389 400 390 \nlst{nambdy} 401 \nlst{nambdy} 391 402 %----------------------------------------------------------------------------------------------- 392 403 %-----------------------------------------nambdy_dta-------------------------------------------- 393 404 394 \nlst{nambdy_dta} 405 \nlst{nambdy_dta} 395 406 %----------------------------------------------------------------------------------------------- 396 407 397 Options are defined through the \n gn{nambdy} \ngn{nambdy\_dta} namelist variables.398 The BDY module is the core implementation of open boundary conditions for regional configurations on 399 temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses ).400 401 The BDY module was modelled on the OBC module (see NEMO3.4) and shares many features and408 Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables. 409 The BDY module is the core implementation of open boundary conditions for regional configurations on 410 temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses. 411 412 The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and 402 413 a similar coding structure \citep{chanut_rpt05}. 403 414 The specification of the location of the open boundary is completely flexible and 404 allows for example the open boundary to follow an isobath or other irregular contour.405 Boundary data files used with versions of NEMOprior to Version 3.4 may need to be re-ordered to work with this version.415 allows any type of setup, from regular boundaries to irregular contour (it includes the possibility to set an open boundary able to follow an isobath). 416 Boundary data files used with versions of \NEMO\ prior to Version 3.4 may need to be re-ordered to work with this version. 406 417 See the section on the Input Boundary Data Files for details. 407 418 … … 415 426 Each boundary set may be defined as a set of straight line segments in a namelist 416 427 (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). 417 If the set is defined in a namelist, then the namelists \n gn{nambdy\_index} must be included separately, one for each set.428 If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set. 418 429 If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. 419 The coordinates.bdy file is analagous to the usual NEMO``\ifile{coordinates}'' file.430 The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 420 431 In the example above, there are two boundary sets, the first of which is defined via a file and 421 432 the second is defined in a namelist. … … 423 434 424 435 For each boundary set a boundary condition has to be chosen for the barotropic solution 425 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 436 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 426 437 for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice''). 427 438 For each set of variables there is a choice of algorithm and a choice for the data, 428 eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 439 eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 429 440 430 441 The choice of algorithm is currently as follows: … … 436 447 \item[\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables. 437 448 \item[\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables. 438 \item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 439 \item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 449 \item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 450 \item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 440 451 \item[\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only. 441 452 \end{description} … … 443 454 The main choice for the boundary data is to use initial conditions as boundary data 444 455 (\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). 445 In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 456 In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 446 457 the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. } 447 458 For the barotropic solution there is also the option to use tidal harmonic forcing either by 448 459 itself (\np{nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\ 449 Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. 450 451 If external boundary data is required then the \ngn{nambdy\_dta} namelist must be defined. 452 One \ngn{nambdy\_dta} namelist is required for each boundary set in the order in which 453 the boundary sets are defined in nambdy. 454 In the example given, two boundary sets have been defined. The first one is reading data file in the \ngn{nambdy\_dta} namelist shown above 455 and the second one is using data from intial condition (no namelist bloc needed). 460 Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. 461 462 If external boundary data is required then the \nam{bdy\_dta} namelist must be defined. 463 One \nam{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy. 464 In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above 465 and the second one is using data from intial condition (no namelist block needed). 456 466 The boundary data is read in using the fldread module, 457 so the \n gn{nambdy\_dta} namelist is in the format required for fldread.458 For each variable required, the filename, the frequency of the files and459 the frequency of the data in the files isgiven.467 so the \nam{bdy\_dta} namelist is in the format required for fldread. 468 For each required variable, the filename, the frequency of the files and 469 the frequency of the data in the files are given. 460 470 Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.\\ 461 471 462 472 There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. 463 If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. 464 However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 465 a bilinear interpolation onto the native grid will be triggered at runtime. 466 For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 467 These correspond to the depths and scale factors of the input data, 473 If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. 474 However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 475 a bilinear interpolation onto the native grid will be triggered at runtime. 476 For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 477 These correspond to the depths and scale factors of the input data, 468 478 the latter used to make any adjustment to the velocity fields due to differences in the total water depths between the two vertical grids.\\ 469 479 470 In the example namelists given, two boundary sets are defined.480 In the example of given namelists, two boundary sets are defined. 471 481 The first set is defined via a file and applies FRS conditions to temperature and salinity and 472 482 Flather conditions to the barotropic variables. No condition specified for the baroclinic velocity and sea-ice. … … 474 484 Tidal harmonic forcing is also used. 475 485 The second set is defined in a namelist. 476 FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 486 FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 477 487 478 488 %---------------------------------------------- … … 505 515 is relaxed towards the external conditions over the rest of the FRS zone. 506 516 The application of a relaxation zone helps to prevent spurious reflection of 507 outgoing signals from the model boundary. 517 outgoing signals from the model boundary. 508 518 509 519 The function $\alpha$ is specified as a $tanh$ function: … … 534 544 Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, 535 545 so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 536 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie between the two $T$ grid points.546 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. 537 547 538 548 %---------------------------------------------- … … 575 585 \end{equation} 576 586 577 Generally the relaxation time scale at inward propagation points \np{(rn\_time\_dmp}) is set much shorter than the time scale at outward propagation587 Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 578 588 points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 579 See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 580 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 589 See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 590 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 581 591 that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including 582 592 this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations … … 587 597 \label{subsec:BDY_relaxation} 588 598 589 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 599 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 590 600 It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set. 591 601 592 The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 602 The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 593 603 This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$): 594 604 … … 597 607 \] 598 608 599 The same scaling is applied in the Orlanski damping. 609 The same scaling is applied in the Orlanski damping. 600 610 601 611 %---------------------------------------------- … … 605 615 Each open boundary set is defined as a list of points. 606 616 The information is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ structure. 607 The $nbi$ and $nbj$ arrays define the local $(i,j)$ ind ices of each point in the boundary zone and608 the $nbr$ array defines the discrete distance from the boundary with $nbr=1$ meaningthat609 the point is next to the edge of the model domain and $nbr>1$ showingthat610 the point is increasingly further away from the edge of the model domain.617 The $nbi$ and $nbj$ arrays define the local $(i,j)$ indexes of each point in the boundary zone and 618 the $nbr$ array defines the discrete distance from the boundary: $nbr=1$ means that 619 the boundary point is next to the edge of the model domain, while $nbr>1$ means that 620 the boundary point is increasingly further away from the edge of the model domain. 611 621 A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. 612 Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 622 Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 613 623 614 624 The boundary geometry for each set may be defined in a namelist nambdy\_index or 615 625 by reading in a ``\ifile{coordinates.bdy}'' file. 616 626 The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries. 617 One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes.618 For the northern boundary, \ np{nbdysegn} gives the number of segments,619 \ np{jpjnob} gives the $j$ index for each segment and \np{jpindt} and620 \ np{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries.627 One nambdy\_index namelist block is needed for each boundary condition defined by indexes. 628 For the northern boundary, \texttt{nbdysegn} gives the number of segments, 629 \jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and 630 \jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 621 631 These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 622 632 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{ > 1}. 623 633 624 634 The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 625 Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file .635 Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above. 626 636 The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. 627 637 The arrays must be in order of increasing $nbr$. … … 629 639 Typically this file will be used to generate external boundary data via interpolation and so 630 640 will also contain the latitudes and longitudes of each point as shown. 631 However, this is not necessary to run the model. 641 However, this is not necessary to run the model. 632 642 633 643 For some choices of irregular boundary the model domain may contain areas of ocean which 634 644 are not part of the computational domain. 635 For example if an open boundary is defined along an isobath, say at the shelf break,645 For example, if an open boundary is defined along an isobath, say at the shelf break, 636 646 then the areas of ocean outside of this boundary will need to be masked out. 637 647 This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist. … … 658 668 a time dimension; 659 669 $xb$ which is the index of the boundary data point in the horizontal; 660 and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard NEMOI/O routines.661 The 3D fields also have a depth dimension. 670 and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard \NEMO\ I/O routines. 671 The 3D fields also have a depth dimension. 662 672 663 673 From Version 3.4 there are new restrictions on the order in which the boundary points are defined … … 670 680 \item All the data for a particular boundary set must be in the same order. 671 681 (Prior to 3.4 it was possible to define barotropic data in a different order to 672 the data for tracers and baroclinic velocities). 682 the data for tracers and baroclinic velocities). 673 683 \end{enumerate} 674 684 … … 697 707 This is controlled by the \np{ln\_vol} parameter in the namelist. 698 708 A value of \np{ln\_vol}\forcode{ = .false.} indicates that this option is not used. 699 Two options to control the volume are available (\np{nn\_volctl}). 709 Two options to control the volume are available (\np{nn\_volctl}). 700 710 If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at 701 711 each timestep to ensure that the integrated volume flow through the boundary is zero. … … 713 723 %-----------------------------------------nambdy_tide-------------------------------------------- 714 724 715 \nlst{nambdy_tide} 725 \nlst{nambdy_tide} 716 726 %----------------------------------------------------------------------------------------------- 717 727 718 728 Tidal forcing at open boundaries requires the activation of surface 719 tides (i.e., in \n gn{nam\_tide}, \np{ln\_tide} needs to be set to729 tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to 720 730 \forcode{.true.} and the required constituents need to be activated by 721 including their names in the \np{c name} array; see731 including their names in the \np{clname} array; see 722 732 \autoref{sec:SBC_tide}). Specific options related to the reading in of 723 733 the complex harmonic amplitudes of elevation (SSH) and barotropic 724 734 velocity (u,v) at open boundaries are defined through the 725 \n gn{nambdy\_tide} namelist parameters.\\735 \nam{bdy\_tide} namelist parameters.\\ 726 736 727 737 The tidal harmonic data at open boundaries can be specified in two -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_LDF.tex
r11353 r11512 9 9 \label{chap:LDF} 10 10 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage … … 22 22 (3) the space and time variations of the eddy coefficients. 23 23 These three aspects of the lateral diffusion are set through namelist parameters 24 (see the \n gn{nam\_traldf} and \ngn{nam\_dynldf} below).24 (see the \nam{tra\_ldf} and \nam{dyn\_ldf} below). 25 25 Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 26 26 Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{ = .true.}, … … 53 53 {Laplacian mixing (\protect\np{ln\_traldf\_lap}, \protect\np{ln\_dynldf\_lap})} 54 54 Setting \protect\np{ln\_traldf\_lap}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_lap}\forcode{ = .true.} enables 55 a second order diffusion on tracers and momentum respectively. Note that in \NEMO 4, one can not combine55 a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 56 56 Laplacian and Bilaplacian operators for the same variable. 57 57 … … 60 60 Setting \protect\np{ln\_traldf\_blp}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_blp}\forcode{ = .true.} enables 61 61 a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 62 We stress again that from \NEMO 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed.62 We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 63 63 64 64 % ================================================================ … … 90 90 \subsection{Slopes for tracer geopotential mixing in the $s$-coordinate} 91 91 92 In $s$-coordinates, geopotential mixing (\ie horizontal mixing) $r_1$ and $r_2$ are the slopes between92 In $s$-coordinates, geopotential mixing (\ie\ horizontal mixing) $r_1$ and $r_2$ are the slopes between 93 93 the geopotential and computational surfaces. 94 94 Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} when 95 95 the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform, 96 \ie a linear function of $z_T$, the depth of a $T$-point.96 \ie\ a linear function of $z_T$, the depth of a $T$-point. 97 97 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 98 98 … … 124 124 Their formulation does not depend on the vertical coordinate used. 125 125 Their discrete formulation is found using the fact that the diffusive fluxes of 126 locally referenced potential density (\ie $in situ$ density) vanish.126 locally referenced potential density (\ie\ $in situ$ density) vanish. 127 127 So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in 128 128 the three directions to zero leads to the following definition for the neutral slopes: … … 230 230 To overcome this problem, several techniques have been proposed in which the numerical schemes of 231 231 the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 232 Griffies's scheme is now available in \NEMO if \np{ln\_traldf\_triad}=\forcode{= .true.}; see \autoref{apdx:triad}.232 Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:triad}. 233 233 Here, another strategy is presented \citep{lazar_phd97}: 234 234 a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of … … 284 284 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 285 285 which has to be adjusted at the surface boundary 286 \ie it must tend to zero at the surface since there is no mixing across the air-sea interface:286 \ie\ it must tend to zero at the surface since there is no mixing across the air-sea interface: 287 287 wall boundary condition). 288 288 Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown, … … 309 309 \textit{vw}- points for the $v$-component. 310 310 They are computed from the slopes used for tracer diffusion, 311 \ie \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}:311 \ie\ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}: 312 312 313 313 \[ … … 323 323 The major issue remaining is in the specification of the boundary conditions. 324 324 The same boundary conditions are chosen as those used for lateral diffusion along model level surfaces, 325 \ie using the shear computed along the model levels and with no additional friction at the ocean bottom325 \ie\ using the shear computed along the model levels and with no additional friction at the ocean bottom 326 326 (see \autoref{sec:LBC_coast}). 327 327 … … 399 399 A_l = \left\{ 400 400 \begin{aligned} 401 & \frac{ \max(e_1,e_2)}{e_{ref}} A_o^l& \text{for laplacian operator } \\402 & \frac{ \max(e_1,e_2)^{3}}{e_{ref}^{3}} A_o^l& \text{for bilaplacian operator }401 & \frac{1}{2} U_{scl} \max(e_1,e_2) & \text{for laplacian operator } \\ 402 & \frac{1}{12} U_{scl} \max(e_1,e_2)^{3} & \text{for bilaplacian operator } 403 403 \end{aligned} 404 404 \right. 405 405 \end{equation} 406 where $e_{ref}$ is a reference grid size harcoded to a $1^{\circ}$ grid size (\ie $e_{ref}\approx 111 km$), 407 and $A_o^l$ is the user defined mixing coefficient defined according to \autoref{eq:constantah}. 406 where $U_{scl}$ is a user defined velocity scale (\np{rn\_Ud}, \np{rn\_Uv}). 408 407 This variation is intended to reflect the lesser need for subgrid scale eddy mixing where 409 408 the grid size is smaller in the domain. … … 421 420 422 421 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 423 \ie a hyperbolic tangent variation with depth associated with a grid size dependence of422 \ie\ a hyperbolic tangent variation with depth associated with a grid size dependence of 424 423 the magnitude of the coefficient. 425 424 … … 528 527 the formulation of which depends on the slopes of iso-neutral surfaces. 529 528 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 530 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinates,529 \ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinates, 531 530 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. 532 531 533 If isopycnal mixing is used in the standard way, \ie \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by:532 If isopycnal mixing is used in the standard way, \ie\ \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by: 534 533 \begin{equation} 535 534 \label{eq:ldfeiv} … … 540 539 \end{split} 541 540 \end{equation} 542 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \n gn{namtra\_eiv} namelist parameter.541 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \nam{tra\_eiv} namelist parameter. 543 542 The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and 544 543 added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed. … … 571 570 %-------------------------------------------------------------------------------------------------------------- 572 571 573 If \np{ln\_mle}\forcode{ = .true.} in \n gn{namtra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection.572 If \np{ln\_mle}\forcode{ = .true.} in \nam{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 574 573 575 574 \colorbox{yellow}{TBC} -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_OBS.tex
r11353 r11512 8 8 \label{chap:OBS} 9 9 10 \ minitoc10 \chaptertoc 11 11 12 12 \vfill … … 15 15 \begin{tabular}{l||l|m{0.65\linewidth}} 16 16 Release & Author & Modifications \\ 17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates} \\17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 18 18 {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\ 19 19 {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version} \\ … … 32 32 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step. 33 33 The code is then called again after each time step from \mdl{step}. 34 The code is only activated if the \n gn{namobs} namelist logical \np{ln\_diaobs} is set to true.34 The code is only activated if the \nam{obs} namelist logical \np{ln\_diaobs} is set to true. 35 35 36 36 For all data types a 2D horizontal interpolator or averager is needed to … … 40 40 This now works in a generalised vertical coordinate system. 41 41 42 Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities.42 Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities. 43 43 The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 44 44 the \np{nn\_profdavtypes} namelist array. … … 48 48 Otherwise (by default) the model value from the nearest time step to the observation time is used. 49 49 50 The code is controlled by the namelist \n gn{namobs}.50 The code is controlled by the namelist \nam{obs}. 51 51 See the following sections for more details on setting up the namelist. 52 52 … … 68 68 In this section an example of running the observation operator code is described using 69 69 profile observation data which can be freely downloaded. 70 It shows how to adapt an existing run and build of \NEMO to run the observation operator. Note also the observation operator and the assimilation increments code are run in the \np{ORCA2\_ICE\_OBS}SETTE test.70 It shows how to adapt an existing run and build of \NEMO\ to run the observation operator. Note also the observation operator and the assimilation increments code are run in the ORCA2\_ICE\_OBS SETTE test. 71 71 72 72 \begin{enumerate} 73 \item Compile NEMO.73 \item Compile \NEMO. 74 74 75 75 \item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. … … 77 77 the observation operator compares the model and observations for a matching date and time. 78 78 79 \item Compile the OBSTOOLS code in the \ np{tools} directory using:79 \item Compile the OBSTOOLS code in the \path{tools} directory using: 80 80 \begin{cmds} 81 81 ./maketools -n OBSTOOLS -m [ARCH] 82 82 \end{cmds} 83 83 84 replacing \ np{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate repository under \np{utils/tools}.84 replacing \texttt{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate location of the repository (under \path{/utils/tools}). 85 85 86 86 \item Convert the EN4 data into feedback format: … … 89 89 \end{cmds} 90 90 91 \item Include the following in the \NEMO namelist to run the observation operator on this data:91 \item Include the following in the \NEMO\ namelist to run the observation operator on this data: 92 92 \end{enumerate} 93 93 94 Options are defined through the \n gn{namobs} namelist variables.94 Options are defined through the \nam{obs} namelist variables. 95 95 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code. 96 96 The filename or array of filenames are specified using the \np{cn\_profbfiles} variable. … …