Changeset 10354 for NEMO/trunk/doc
- Timestamp:
- 2018-11-21T17:59:55+01:00 (6 years ago)
- Location:
- NEMO/trunk/doc/latex/NEMO/subfiles
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/latex/NEMO/subfiles/abstract_foreword.tex
r9393 r10354 11 11 12 12 {\small 13 The ocean engine of NEMO (Nucleus for European Modelling of the Ocean) is a primitive 14 equation model adapted to regional and global ocean circulation problems. It is intended to 15 be a flexible tool for studying the ocean and its interactions with the others components of 16 the earth climate system over a wide range of space and time scales. 17 Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height, 18 the \textit{Conservative} Temperature and the \textit{Absolute} Salinity. 19 In the horizontal direction, the model uses a curvilinear orthogonal grid and in the vertical direction, 20 a full or partial step $z$-coordinate, or $s$-coordinate, or a mixture of the two. 21 The distribution of variables is a three-dimensional Arakawa C-type grid. 22 Various physical choices are available to describe ocean physics, including TKE, and GLS vertical physics. 23 Within NEMO, the ocean is interfaced with a sea-ice model (LIM or CICE), passive tracer and 24 biogeochemical models (TOP) and, via the OASIS coupler, with several atmospheric general circulation models. 25 It also support two-way grid embedding via the AGRIF software. 13 The ocean engine of NEMO (Nucleus for European Modelling of the Ocean) is a primitive equation model adapted to 14 regional and global ocean circulation problems. 15 It is intended to be a flexible tool for studying the ocean and its interactions with 16 the others components of the earth climate system over a wide range of space and time scales. 17 Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height, 18 the \textit{Conservative} Temperature and the \textit{Absolute} Salinity. 19 In the horizontal direction, the model uses a curvilinear orthogonal grid and in the vertical direction, 20 a full or partial step $z$-coordinate, or $s$-coordinate, or a mixture of the two. 21 The distribution of variables is a three-dimensional Arakawa C-type grid. 22 Various physical choices are available to describe ocean physics, including TKE, and GLS vertical physics. 23 Within NEMO, the ocean is interfaced with a sea-ice model (LIM or CICE), 24 passive tracer and biogeochemical models (TOP) and, 25 via the OASIS coupler, with several atmospheric general circulation models. 26 It also support two-way grid embedding via the AGRIF software. 26 27 } 27 28 … … 31 32 \chapter*{Disclaimer} 32 33 33 Like all components of NEMO, the ocean component is developed under the \href{http://www.cecill.info/}{CECILL license}, 34 which is a French adaptation of the GNU GPL (General Public License). Anyone may use it 35 freely for research purposes, and is encouraged to communicate back to the NEMO team 36 its own developments and improvements. The model and the present document have been 37 made available as a service to the community. We cannot certify that the code and its manual 38 are free of errors. Bugs are inevitable and some have undoubtedly survived the testing phase. 39 Users are encouraged to bring them to our attention. The author assumes no responsibility 40 for problems, errors, or incorrect usage of NEMO. 34 Like all components of NEMO, 35 the ocean component is developed under the \href{http://www.cecill.info/}{CECILL license}, 36 which is a French adaptation of the GNU GPL (General Public License). 37 Anyone may use it freely for research purposes, 38 and is encouraged to communicate back to the NEMO team its own developments and improvements. 39 The model and the present document have been made available as a service to the community. 40 We cannot certify that the code and its manual are free of errors. 41 Bugs are inevitable and some have undoubtedly survived the testing phase. 42 Users are encouraged to bring them to our attention. 43 The author assumes no responsibility for problems, errors, or incorrect usage of NEMO. 41 44 42 45 \vspace{1cm} -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_A.tex
r9414 r10354 19 19 20 20 In order to establish the set of Primitive Equation in curvilinear $s$-coordinates 21 ($i.e.$ an orthogonal curvilinear coordinate in the horizontal and an Arbitrary Lagrangian 22 Eulerian (ALE) coordinate in the vertical), we start from the set of equations established 23 in \autoref{subsec:PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce 24 an arbitrary vertical coordinate $a = a(i,j,z,t)$. Let us define a new vertical scale factor by 25 $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and the horizontal 26 slope of $s-$surfaces by : 21 ($i.e.$ an orthogonal curvilinear coordinate in the horizontal and 22 an Arbitrary Lagrangian Eulerian (ALE) coordinate in the vertical), 23 we start from the set of equations established in \autoref{subsec:PE_zco_Eq} for 24 the special case $k = z$ and thus $e_3 = 1$, 25 and we introduce an arbitrary vertical coordinate $a = a(i,j,z,t)$. 26 Let us define a new vertical scale factor by $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and 27 the horizontal slope of $s-$surfaces by: 27 28 \begin{equation} \label{apdx:A_s_slope} 28 29 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s … … 31 32 \end{equation} 32 33 33 The chain rule to establish the model equations in the curvilinear $s-$coordinate 34 system is: 34 The chain rule to establish the model equations in the curvilinear $s-$coordinate system is: 35 35 \begin{equation} \label{apdx:A_s_chain_rule} 36 36 \begin{aligned} … … 52 52 \end{equation} 53 53 54 In particular applying the time derivative chain rule to $z$ provides the expression 55 for $w_s$,the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate:54 In particular applying the time derivative chain rule to $z$ provides the expression for $w_s$, 55 the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate: 56 56 \begin{equation} \label{apdx:A_w_in_s} 57 57 w_s = \left. \frac{\partial z }{\partial t} \right|_s … … 67 67 \label{sec:A_continuity} 68 68 69 Using (\autoref{apdx:A_s_chain_rule}) and the fact that the horizontal scale factors70 $e_1$ and $e_2$ do not depend on the vertical coordinate, the divergence of 71 the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows72 in order toobtain its expression in the curvilinear $s-$coordinate system:69 Using (\autoref{apdx:A_s_chain_rule}) and 70 the fact that the horizontal scale factors $e_1$ and $e_2$ do not depend on the vertical coordinate, 71 the divergence of the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows in order to 72 obtain its expression in the curvilinear $s-$coordinate system: 73 73 74 74 \begin{subequations} … … 128 128 \end{subequations} 129 129 130 Here, $w$ is the vertical velocity relative to the $z-$coordinate system. 131 Introducing the dia-surface velocity component, $\omega $, defined as132 the volume flux across the moving $s$-surfaces per unit horizontal area:130 Here, $w$ is the vertical velocity relative to the $z-$coordinate system. 131 Introducing the dia-surface velocity component, 132 $\omega $, defined as the volume flux across the moving $s$-surfaces per unit horizontal area: 133 133 \begin{equation} \label{apdx:A_w_s} 134 134 \omega = w - w_s - \sigma _1 \,u - \sigma _2 \,v \\ 135 135 \end{equation} 136 with $w_s$ given by \autoref{apdx:A_w_in_s}, we obtain the expression for137 the divergence of the velocity in the curvilinear $s-$coordinate system:136 with $w_s$ given by \autoref{apdx:A_w_in_s}, 137 we obtain the expression for the divergence of the velocity in the curvilinear $s-$coordinate system: 138 138 \begin{subequations} 139 139 \begin{align*} {\begin{array}{*{20}l} … … 167 167 \end{subequations} 168 168 169 As a result, the continuity equation \autoref{eq:PE_continuity} in the 170 $s-$coordinates is: 169 As a result, the continuity equation \autoref{eq:PE_continuity} in the $s-$coordinates is: 171 170 \begin{equation} \label{apdx:A_sco_Continuity} 172 171 \frac{1}{e_3 } \frac{\partial e_3}{\partial t} … … 176 175 +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 177 176 \end{equation} 178 A additional term has appeared that take into account the contribution of the time variation179 of the vertical coordinate to the volume budget.177 A additional term has appeared that take into account 178 the contribution of the time variation of the vertical coordinate to the volume budget. 180 179 181 180 … … 186 185 \label{sec:A_momentum} 187 186 188 Here we only consider the first component of the momentum equation, 187 Here we only consider the first component of the momentum equation, 189 188 the generalization to the second one being straightforward. 190 189 … … 193 192 $\bullet$ \textbf{Total derivative in vector invariant form} 194 193 195 Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum 196 equation in the vector invariant form. Its total $z-$coordinate time derivative, 197 $\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain 194 Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum equation in the vector invariant form. 195 Its total $z-$coordinate time derivative, 196 $\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain 198 197 its expression in the curvilinear $s-$coordinate system: 199 198 … … 258 257 \end{subequations} 259 258 % 260 Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) 261 to $u$ and using (\autoref{apdx:A_w_in_s}) provides the expression of the last term 262 of the right hand side, 259 Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) to $u$ and 260 using (\autoref{apdx:A_w_in_s}) provides the expression of the last term of the right hand side, 263 261 \begin{equation*} {\begin{array}{*{20}l} 264 262 w_s \;\frac{\partial u}{\partial s} … … 267 265 \end{array} } 268 266 \end{equation*} 269 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 267 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 270 268 $i.e.$ the total $s-$coordinate time derivative : 271 269 \begin{align} \label{apdx:A_sco_Dt_vect} … … 276 274 + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} 277 275 \end{align} 278 Therefore, the vector invariant form of the total time derivative has exactly the same 279 mathematical form in $z-$ and $s-$coordinates. This is not the case for the flux form 280 as shown in next paragraph.276 Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in 277 $z-$ and $s-$coordinates. 278 This is not the case for the flux form as shown in next paragraph. 281 279 282 280 $\ $\newline % force a new ligne … … 284 282 $\bullet$ \textbf{Total derivative in flux form} 285 283 286 Let us start from the total time derivative in the curvilinear $s-$coordinate system 287 we have just establish. Following the procedure used to establish (\autoref{eq:PE_flux_form}), 288 it can be transformed into : 284 Let us start from the total time derivative in the curvilinear $s-$coordinate system we have just establish. 285 Following the procedure used to establish (\autoref{eq:PE_flux_form}), it can be transformed into : 289 286 %\begin{subequations} 290 287 \begin{align*} {\begin{array}{*{20}l} … … 355 352 \end{subequations} 356 353 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 357 $i.e.$ the total $s-$coordinate time derivative in flux form 354 $i.e.$ the total $s-$coordinate time derivative in flux form: 358 355 \begin{flalign}\label{apdx:A_sco_Dt_flux} 359 356 \left. \frac{D u}{D t} \right|_s = \frac{1}{e_3} \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s … … 363 360 \end{flalign} 364 361 which is the total time derivative expressed in the curvilinear $s-$coordinate system. 365 It has the same form as in the $z-$coordinate but for the vertical scale factor 366 that has appeared inside the time derivative which comes from the modification 367 of (\autoref{apdx:A_sco_Continuity}), the continuity equation. 362 It has the same form as in the $z-$coordinate but for 363 the vertical scale factor that has appeared inside the time derivative which 364 comes from the modification of (\autoref{apdx:A_sco_Continuity}), 365 the continuity equation. 368 366 369 367 $\ $\newline % force a new ligne … … 380 378 \end{split} 381 379 \end{equation*} 382 Applying similar manipulation to the second component and replacing383 $\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes:380 Applying similar manipulation to the second component and 381 replacing $\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes: 384 382 \begin{equation} \label{apdx:A_grad_p_1} 385 383 \begin{split} … … 394 392 \end{equation} 395 393 396 An additional term appears in (\autoref{apdx:A_grad_p_1}) which accounts for the 397 tilt of $s-$surfaces with respect to geopotential $z-$surfaces. 398 399 As in $z$-coordinate, the horizontal pressure gradient can be split in two parts 400 following \citet{Marsaleix_al_OM08}. Let defined a density anomaly, $d$, by $d=(\rho - \rho_o)/ \rho_o$, 401 and a hydrostatic pressure anomaly, $p_h'$, by $p_h'= g \; \int_z^\eta d \; e_3 \; dk$. 394 An additional term appears in (\autoref{apdx:A_grad_p_1}) which accounts for 395 the tilt of $s-$surfaces with respect to geopotential $z-$surfaces. 396 397 As in $z$-coordinate, 398 the horizontal pressure gradient can be split in two parts following \citet{Marsaleix_al_OM08}. 399 Let defined a density anomaly, $d$, by $d=(\rho - \rho_o)/ \rho_o$, 400 and a hydrostatic pressure anomaly, $p_h'$, by $p_h'= g \; \int_z^\eta d \; e_3 \; dk$. 402 401 The pressure is then given by: 403 402 \begin{equation*} … … 416 415 \end{equation*} 417 416 418 Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and using the definition of419 the density anomaly it comes the expression in two parts:417 Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and 418 using the definition of the density anomaly it comes the expression in two parts: 420 419 \begin{equation} \label{apdx:A_grad_p_2} 421 420 \begin{split} … … 429 428 \end{split} 430 429 \end{equation} 431 This formulation of the pressure gradient is characterised by the appearance of a term depending on the432 the sea surface height only (last term on the right hand side of expression \autoref{apdx:A_grad_p_2}). 433 This term will be loosely termed \textit{surface pressure gradient} 434 whereas the first term will be termed the 435 \textit{hydrostatic pressure gradient} by analogy to the $z$-coordinate formulation. 436 In fact, the the true surface pressure gradient is $1/\rho_o \nabla (\rho \eta)$, and 437 $\eta$ is implicitly included in the computation of $p_h'$ through the upper bound of 438 the vertical integration.439 430 This formulation of the pressure gradient is characterised by the appearance of 431 a term depending on the sea surface height only 432 (last term on the right hand side of expression \autoref{apdx:A_grad_p_2}). 433 This term will be loosely termed \textit{surface pressure gradient} whereas 434 the first term will be termed the \textit{hydrostatic pressure gradient} by analogy to 435 the $z$-coordinate formulation. 436 In fact, the true surface pressure gradient is $1/\rho_o \nabla (\rho \eta)$, 437 and $\eta$ is implicitly included in the computation of $p_h'$ through the upper bound of the vertical integration. 438 440 439 441 440 $\ $\newline % force a new ligne … … 443 442 $\bullet$ \textbf{The other terms of the momentum equation} 444 443 445 The coriolis and forcing terms as well as the the vertical physics remain unchanged 446 as they involve neither time nor space derivatives. The form of the lateral physics is 447 discussed in \autoref{apdx:B}.444 The coriolis and forcing terms as well as the the vertical physics remain unchanged as 445 they involve neither time nor space derivatives. 446 The form of the lateral physics is discussed in \autoref{apdx:B}. 448 447 449 448 … … 452 451 $\bullet$ \textbf{Full momentum equation} 453 452 454 To sum up, in a curvilinear $s$-coordinate system, the vector invariant momentum equation455 solved by the model has the same mathematical expression as the one in a curvilinear 456 $z-$coordinate, except for the pressure gradient term:453 To sum up, in a curvilinear $s$-coordinate system, 454 the vector invariant momentum equation solved by the model has the same mathematical expression as 455 the one in a curvilinear $z-$coordinate, except for the pressure gradient term: 457 456 \begin{subequations} \label{apdx:A_dyn_vect} 458 457 \begin{multline} \label{apdx:A_PE_dyn_vect_u} … … 475 474 \end{multline} 476 475 \end{subequations} 477 whereas the flux form momentum equation differ from it by the formulation of both478 the time derivative and the pressure gradient term:476 whereas the flux form momentum equation differs from it by 477 the formulation of both the time derivative and the pressure gradient term: 479 478 \begin{subequations} \label{apdx:A_dyn_flux} 480 479 \begin{multline} \label{apdx:A_PE_dyn_flux_u} … … 503 502 \end{equation} 504 503 505 It is important to realize that the change in coordinate system has only concerned 506 the position on the vertical. It has not affected (\textbf{i},\textbf{j},\textbf{k}), the 507 orthogonal curvilinear set of unit vectors. ($u$,$v$) are always horizontal velocities 508 so that their evolution is driven by \emph{horizontal} forces, in particular 509 the pressure gradient. By contrast, $\omega$ is not $w$, the third component of the velocity, 510 but the dia-surface velocity component, $i.e.$ the volume flux across the moving 511 $s$-surfaces per unit horizontal area. 504 It is important to realize that the change in coordinate system has only concerned the position on the vertical. 505 It has not affected (\textbf{i},\textbf{j},\textbf{k}), the orthogonal curvilinear set of unit vectors. 506 ($u$,$v$) are always horizontal velocities so that their evolution is driven by \emph{horizontal} forces, 507 in particular the pressure gradient. 508 By contrast, $\omega$ is not $w$, the third component of the velocity, but the dia-surface velocity component, 509 $i.e.$ the volume flux across the moving $s$-surfaces per unit horizontal area. 512 510 513 511 … … 518 516 \label{sec:A_tracer} 519 517 520 The tracer equation is obtained using the same calculation as for the continuity 521 equation and thenregrouping the time derivative terms in the left hand side :518 The tracer equation is obtained using the same calculation as for the continuity equation and then 519 regrouping the time derivative terms in the left hand side : 522 520 523 521 \begin{multline} \label{apdx:A_tracer} … … 531 529 532 530 533 The expression for the advection term is a straight consequence of (A.4), the534 expression of the 3D divergence in the $s-$coordinates established above.531 The expression for the advection term is a straight consequence of (A.4), 532 the expression of the 3D divergence in the $s-$coordinates established above. 535 533 536 534 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_B.tex
r9407 r10354 19 19 20 20 \subsubsection*{In z-coordinates} 21 In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator 22 is given by: 21 In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator is given by: 23 22 \begin{eqnarray} \label{apdx:B1} 24 23 &D^T = \frac{1}{e_1 \, e_2} \left[ … … 30 29 31 30 \subsubsection*{In generalized vertical coordinates} 32 In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and 33 $\sigma_2$ by \autoref{apdx:A_s_slope} and the vertical/horizontal ratio of diffusion 34 coefficient by $\epsilon = A^{vT} / A^{lT}$.The diffusion operator is given by:31 In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{apdx:A_s_slope} and 32 the vertical/horizontal ratio of diffusion coefficient by $\epsilon = A^{vT} / A^{lT}$. 33 The diffusion operator is given by: 35 34 36 35 \begin{equation} \label{apdx:B2} … … 56 55 \end{subequations} 57 56 58 Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any 59 additional assumption.Indeed, for the special case $k=z$ and thus $e_3 =1$,60 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} 61 anduse \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}.62 Since no cross horizontal derivative $\partial _i \partial _j $ appears in 63 \autoref{apdx:B1},the ($i$,$z$) and ($j$,$z$) planes are independent.64 The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) 65 transformation withoutany loss of generality:57 Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption. 58 Indeed, for the special case $k=z$ and thus $e_3 =1$, 59 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} and 60 use \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}. 61 Since no cross horizontal derivative $\partial _i \partial _j $ appears in \autoref{apdx:B1}, 62 the ($i$,$z$) and ($j$,$z$) planes are independent. 63 The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) transformation without 64 any loss of generality: 66 65 67 66 \begin{subequations} … … 143 142 \subsubsection*{In z-coordinates} 144 143 145 The iso/diapycnal diffusive tensor $\textbf {A}_{\textbf I}$ expressed in the ($i$,$j$,$k$) 146 curvilinear coordinate system in which the equations of the ocean circulation model are 147 formulated, takes the following form \citep{Redi_JPO82}: 144 The iso/diapycnal diffusive tensor $\textbf {A}_{\textbf I}$ expressed in 145 the ($i$,$j$,$k$) curvilinear coordinate system in which 146 the equations of the ocean circulation model are formulated, 147 takes the following form \citep{Redi_JPO82}: 148 148 149 149 \begin{equation} \label{apdx:B3} … … 155 155 \end{array} }} \right] 156 156 \end{equation} 157 where ($a_1$, $a_2$) are the isopycnal slopes in ($\textbf{i}$, 158 $\textbf{j}$) directions, relative to geopotentials: 157 where ($a_1$, $a_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials: 159 158 \begin{equation*} 160 159 a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1} … … 164 163 \end{equation*} 165 164 166 In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, so167 $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}:165 In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, 166 so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}: 168 167 \begin{subequations} \label{apdx:B4} 169 168 \begin{equation} \label{apdx:B4a} … … 183 182 184 183 185 Physically, the full tensor \autoref{apdx:B3} 186 represents strong isoneutral diffusion on a plane parallel to the isoneutral 187 surface and weak dianeutral diffusion perpendicular to this plane. 188 However, the approximate `weak-slope' tensor \autoref{apdx:B4a} represents strong 189 diffusion along the isoneutral surface, with weak 190 \emph{vertical} diffusion -- the principal axes of the tensor are no 191 longer orthogonal. This simplification also decouples 192 the ($i$,$z$) and ($j$,$z$) planes of the tensor. The weak-slope operator therefore takes the same 193 form, \autoref{apdx:B4}, as \autoref{apdx:B2}, the diffusion operator for geopotential 194 diffusion written in non-orthogonal $i,j,s$-coordinates. Written out 195 explicitly, 184 Physically, the full tensor \autoref{apdx:B3} represents strong isoneutral diffusion on a plane parallel to 185 the isoneutral surface and weak dianeutral diffusion perpendicular to this plane. 186 However, 187 the approximate `weak-slope' tensor \autoref{apdx:B4a} represents strong diffusion along the isoneutral surface, 188 with weak \emph{vertical} diffusion -- the principal axes of the tensor are no longer orthogonal. 189 This simplification also decouples the ($i$,$z$) and ($j$,$z$) planes of the tensor. 190 The weak-slope operator therefore takes the same form, \autoref{apdx:B4}, as \autoref{apdx:B2}, 191 the diffusion operator for geopotential diffusion written in non-orthogonal $i,j,s$-coordinates. 192 Written out explicitly, 196 193 197 194 \begin{multline} \label{apdx:B_ldfiso} … … 204 201 205 202 The isopycnal diffusion operator \autoref{apdx:B4}, 206 \autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its 207 square. The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence 208 of fluxes.Let us demonstrate the second one:203 \autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its square. 204 The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence of fluxes. 205 Let us demonstrate the second one: 209 206 \begin{equation*} 210 207 \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv … … 229 226 \end{subequations} 230 227 \addtocounter{equation}{-1} 231 228 the property becomes obvious. 232 229 233 230 \subsubsection*{In generalized vertical coordinates} 234 231 235 Because the weak-slope operator \autoref{apdx:B4}, \autoref{apdx:B_ldfiso} is decoupled 236 in the ($i$,$z$) and ($j$,$z$) planes, it may be transformed into 237 generalized $s$-coordinates in the same way as \autoref{sec:B_1} was transformed into 238 \autoref{sec:B_2}. The resulting operator then takes the simple form 232 Because the weak-slope operator \autoref{apdx:B4}, 233 \autoref{apdx:B_ldfiso} is decoupled in the ($i$,$z$) and ($j$,$z$) planes, 234 it may be transformed into generalized $s$-coordinates in the same way as 235 \autoref{sec:B_1} was transformed into \autoref{sec:B_2}. 236 The resulting operator then takes the simple form 239 237 240 238 \begin{equation} \label{apdx:B_ldfiso_s} … … 249 247 \end{equation} 250 248 251 where ($r_1$, $r_2$) are the isopycnal slopes in ($\textbf{i}$, 252 $\textbf{j}$) directions,relative to $s$-coordinate surfaces:249 where ($r_1$, $r_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, 250 relative to $s$-coordinate surfaces: 253 251 \begin{equation*} 254 252 r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1} … … 258 256 \end{equation*} 259 257 260 To prove \autoref{apdx:B5} by direct re-expression of \autoref{apdx:B_ldfiso} is 261 straightforward, but laborious. An easier way is first to note (by reversing the 262 derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that the 263 weak-slope operator may be \emph{exactly} reexpressed in 264 non-orthogonal $i,j,\rho$-coordinates as 258 To prove \autoref{apdx:B5} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious. 259 An easier way is first to note (by reversing the derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that 260 the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as 265 261 266 262 \begin{equation} \label{apdx:B5} … … 273 269 \end{array} }} \right). 274 270 \end{equation} 275 Then direct transformation from $i,j,\rho$-coordinates to 276 $i,j,s$-coordinates gives \autoref{apdx:B_ldfiso_s} immediately. 277 278 Note that the weak-slope approximation is only made in 279 transforming from the (rotated,orthogonal) isoneutral axes to the 280 non-orthogonal $i,j,\rho$-coordinates. The further transformation 281 into $i,j,s$-coordinates is exact, whatever the steepness of 282 the $s$-surfaces, in the same way as the transformation of 283 horizontal/vertical Laplacian diffusion in $z$-coordinates, 271 Then direct transformation from $i,j,\rho$-coordinates to $i,j,s$-coordinates gives 272 \autoref{apdx:B_ldfiso_s} immediately. 273 274 Note that the weak-slope approximation is only made in transforming from 275 the (rotated,orthogonal) isoneutral axes to the non-orthogonal $i,j,\rho$-coordinates. 276 The further transformation into $i,j,s$-coordinates is exact, whatever the steepness of the $s$-surfaces, 277 in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates, 284 278 \autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. 285 279 … … 291 285 \label{sec:B_3} 292 286 293 The second order momentum diffusion operator (Laplacian) in the $z$-coordinate 294 is found by applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian 295 of a vector, to the horizontal velocity vector:287 The second order momentum diffusion operator (Laplacian) in the $z$-coordinate is found by 288 applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian of a vector, 289 to the horizontal velocity vector: 296 290 \begin{align*} 297 291 \Delta {\textbf{U}}_h … … 329 323 \end{array} }} \right) 330 324 \end{align*} 331 Using \autoref{eq:PE_div}, the definition of the horizontal divergence, the third332 componant of the second vector is obviously zero and thus :325 Using \autoref{eq:PE_div}, the definition of the horizontal divergence, 326 the third componant of the second vector is obviously zero and thus : 333 327 \begin{equation*} 334 328 \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right) 335 329 \end{equation*} 336 330 337 Note that this operator ensures a full separation between the vorticity and horizontal338 divergence fields (see \autoref{apdx:C}). It is only equal to a Laplacian 339 applied to each component in Cartesian coordinates, not on the sphere.340 341 The horizontal/vertical second order (Laplacian type) operator used to diffuse 342 horizontal momentum in the $z$-coordinate therefore takes the following form:331 Note that this operator ensures a full separation between 332 the vorticity and horizontal divergence fields (see \autoref{apdx:C}). 333 It is only equal to a Laplacian applied to each component in Cartesian coordinates, not on the sphere. 334 335 The horizontal/vertical second order (Laplacian type) operator used to diffuse horizontal momentum in 336 the $z$-coordinate therefore takes the following form: 343 337 \begin{equation} \label{apdx:B_Lap_U} 344 338 {\textbf{D}}^{\textbf{U}} = … … 360 354 \end{align*} 361 355 362 Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to a363 useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate.364 Similarly, we did not found an expression of practical use for the geopotential365 horizontal/vertical Laplacian operator in the $s$-coordinate. Generally, 366 \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is 367 a Laplacian diffusion is applied on momentum along the coordinate directions.356 Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to 357 a useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate. 358 Similarly, we did not found an expression of practical use for 359 the geopotential horizontal/vertical Laplacian operator in the $s$-coordinate. 360 Generally, \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, 361 that is a Laplacian diffusion is applied on momentum along the coordinate directions. 368 362 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex
r9414 r10354 22 22 \label{sec:C.0} 23 23 24 Notation used in this appendix in the demonstations 24 Notation used in this appendix in the demonstations: 25 25 26 26 fluxes at the faces of a $T$-box: … … 37 37 38 38 $dv=e_1\,e_2\,e_3 \,di\,dj\,dk$ is the volume element, with only $e_3$ that depends on time. 39 $D$ and $S$ are the ocean domain volume and surface, respectively. 40 No wetting/drying is allow ($i.e.$ $\frac{\partial S}{\partial t} = 0$) 41 Let $k_s$ and $k_b$ be the ocean surface and bottom, resp. 39 $D$ and $S$ are the ocean domain volume and surface, respectively. 40 No wetting/drying is allow ($i.e.$ $\frac{\partial S}{\partial t} = 0$). 41 Let $k_s$ and $k_b$ be the ocean surface and bottom, resp. 42 42 ($i.e.$ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 43 43 \begin{flalign*} … … 60 60 = \int_D { \frac{1}{e_3} \partial_t \left( e_3 \, Q \right) dv } =0 61 61 \end{equation*} 62 equation of evolution of $Q$ written as the time evolution of the vertical content of $Q$ 63 like for tracers, or momentum in flux form, the quadratic quantity $\frac{1}{2}Q^2$ is conserved when : 62 equation of evolution of $Q$ written as 63 the time evolution of the vertical content of $Q$ like for tracers, or momentum in flux form, 64 the quadratic quantity $\frac{1}{2}Q^2$ is conserved when: 64 65 \begin{flalign*} 65 66 \partial_t \left( \int_D{ \frac{1}{2} \,Q^2\;dv } \right) … … 74 75 - \frac{1}{2} \int_D { \frac{Q^2}{e_3} \partial_t (e_3) \;dv } 75 76 \end{flalign} 76 equation of evolution of $Q$ written as the time evolution of $Q$ 77 like for momentum in vector invariant form, the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:77 equation of evolution of $Q$ written as the time evolution of $Q$ like for momentum in vector invariant form, 78 the quadratic quantity $\frac{1}{2}Q^2$ is conserved when: 78 79 \begin{flalign*} 79 80 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) … … 82 83 + \int_D { \frac{1}{2} Q^2 \, \partial_t e_3 \;e_1e_2\;di\,dj\,dk } \\ 83 84 \end{flalign*} 84 that is in a more compact form 85 that is in a more compact form: 85 86 \begin{flalign} \label{eq:Q2_vect} 86 87 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) … … 97 98 98 99 99 The discretization of pimitive equation in $s$-coordinate ($i.e.$ time and space varying 100 vertical coordinate) must be chosen so that the discrete equation of the model satisfy 101 integral constrains on energy and enstrophy. 100 The discretization of pimitive equation in $s$-coordinate ($i.e.$ time and space varying vertical coordinate) 101 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 102 102 103 103 104 104 Let us first establish those constraint in the continuous world. 105 The total energy ($i.e.$ kinetic plus potential energies) is conserved 105 The total energy ($i.e.$ kinetic plus potential energies) is conserved: 106 106 \begin{flalign} \label{eq:Tot_Energy} 107 107 \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 + \rho \, g \, z \right) \;dv \right) = & 0 108 108 \end{flalign} 109 under the following assumptions: no dissipation, no forcing 110 (wind, buoyancy flux, atmospheric pressure variations), mass 111 conservation, and closed domain. 112 113 This equation can be transformed to obtain several sub-equalities. 114 The transformation for the advection term depends on whether 115 the vector invariant form or the flux form is used for the momentum equation. 116 Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in \autoref{eq:Tot_Energy} 117 for the former form and 118 Using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in \autoref{eq:Tot_Energy} 119 for the latter form leads to: 109 under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations), 110 mass conservation, and closed domain. 111 112 This equation can be transformed to obtain several sub-equalities. 113 The transformation for the advection term depends on whether the vector invariant form or 114 the flux form is used for the momentum equation. 115 Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in 116 \autoref{eq:Tot_Energy} for the former form and 117 using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in 118 \autoref{eq:Tot_Energy} for the latter form leads to: 120 119 121 120 \begin{subequations} \label{eq:E_tot} … … 348 347 349 348 Substituting the discrete expression of the time derivative of the velocity either in vector invariant, 350 leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}. 349 leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}. 351 350 352 351 % ------------------------------------------------------------------------------------------------------------- … … 356 355 \label{subsec:C_vor} 357 356 358 Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), or 359 the planetary ($q=f/e_{3f}$), or the total potential vorticity ($q=(\zeta +f) /e_{3f}$). 360 Two discretisation of the vorticity term (ENE and EEN) allows the conservation of 361 the kinetic energy. 357 Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), 358 or the planetary ($q=f/e_{3f}$), or the total potential vorticity ($q=(\zeta +f) /e_{3f}$). 359 Two discretisation of the vorticity term (ENE and EEN) allows the conservation of the kinetic energy. 362 360 % ------------------------------------------------------------------------------------------------------------- 363 361 % Vorticity Term with ENE scheme … … 366 364 \label{subsec:C_vorENE} 367 365 368 For the ENE scheme, the two components of the vorticity term are given by 366 For the ENE scheme, the two components of the vorticity term are given by: 369 367 \begin{equation*} 370 368 - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h \equiv … … 377 375 \end{equation*} 378 376 379 This formulation does not conserve the enstrophy but it does conserve the 380 total kinetic energy. Indeed, the kinetic energy tendency associated to the 381 vorticity term and averaged over the ocean domain can be transformed as 382 follows: 377 This formulation does not conserve the enstrophy but it does conserve the total kinetic energy. 378 Indeed, the kinetic energy tendency associated to the vorticity term and 379 averaged over the ocean domain can be transformed as follows: 383 380 \begin{flalign*} 384 381 &\int\limits_D - \left( e_3 \, q \;\textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv && \\ … … 412 409 \end{aligned} } \right. 413 410 \end{equation} 414 where the indices $i_p$ and $j_p$ take the following value: 415 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 411 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$, 416 412 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 417 413 \begin{equation} \tag{\ref{eq:Q_triads}} … … 420 416 \end{equation} 421 417 422 This formulation does conserve the total kinetic energy. Indeed, 418 This formulation does conserve the total kinetic energy. 419 Indeed, 423 420 \begin{flalign*} 424 421 &\int\limits_D - \textbf{U}_h \cdot \left( \zeta \;\textbf{k} \times \textbf{U}_h \right) \; dv && \\ … … 473 470 \label{subsec:C_zad} 474 471 475 The change of Kinetic Energy (KE) due to the vertical advection is exactly 476 balanced by the change of KE due to the horizontal gradient of KE~: 472 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~: 477 473 \begin{equation*} 478 474 \int_D \textbf{U}_h \cdot \frac{1}{e_3 } \omega \partial_k \textbf{U}_h \;dv … … 480 476 + \frac{1}{2} \int_D { \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } \\ 481 477 \end{equation*} 482 Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry 483 property of the $\delta$ operator) and the continuity equation, then 484 \autoref{eq:DOM_di_adj} again, then the commutativity of operators 485 $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 486 ($i.e.$ the symmetry property of the $\overline {\,\cdot \,}$ operator) 478 Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry property of the $\delta$ operator) 479 and the continuity equation, then \autoref{eq:DOM_di_adj} again, 480 then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 481 ($i.e.$ the symmetry property of the $\overline {\,\cdot \,}$ operator) 487 482 applied in the horizontal and vertical directions, it becomes: 488 483 \begin{flalign*} … … 543 538 \end{flalign*} 544 539 545 There is two main points here. First, the satisfaction of this property links the choice of 546 the discrete formulation of the vertical advection and of the horizontal gradient 547 of KE. Choosing one imposes the other. For example KE can also be discretized 548 as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$. This leads to the following 549 expression for the vertical advection: 540 There is two main points here. 541 First, the satisfaction of this property links the choice of the discrete formulation of the vertical advection and 542 of the horizontal gradient of KE. 543 Choosing one imposes the other. 544 For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$. 545 This leads to the following expression for the vertical advection: 550 546 \begin{equation*} 551 547 \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h … … 557 553 \end{array}} } \right) 558 554 \end{equation*} 559 a formulation that requires an additional horizontal mean in contrast with 560 the one used in NEMO. Nine velocity points have to be used instead of 3. 555 a formulation that requires an additional horizontal mean in contrast with the one used in NEMO. 556 Nine velocity points have to be used instead of 3. 561 557 This is the reason why it has not been chosen. 562 558 563 Second, as soon as the chosen $s$-coordinate depends on time, an extra constraint564 a rises on the time derivative of the volume at $u$- and $v$-points:559 Second, as soon as the chosen $s$-coordinate depends on time, 560 an extra constraint arises on the time derivative of the volume at $u$- and $v$-points: 565 561 \begin{flalign*} 566 562 e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2} \\ … … 583 579 584 580 \gmcomment{ 585 A pressure gradient has no contribution to the evolution of the vorticity as the 586 curl of a gradient is zero. In the $z$-coordinate, this property is satisfied locally 587 on a C-grid with 2nd order finite differences(property \autoref{eq:DOM_curl_grad}).581 A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. 582 In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences 583 (property \autoref{eq:DOM_curl_grad}). 588 584 } 589 585 590 When the equation of state is linear ($i.e.$ when an advection-diffusion equation591 for density can be derived from those of temperature and salinity) the change of 592 KE due to the work of pressure forces is balanced by the change of potential 593 energy due to buoyancy forces:586 When the equation of state is linear 587 ($i.e.$ when an advection-diffusion equation for density can be derived from those of temperature and salinity) 588 the change of KE due to the work of pressure forces is balanced by 589 the change of potential energy due to buoyancy forces: 594 590 \begin{equation*} 595 591 - \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv … … 598 594 \end{equation*} 599 595 600 This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates. 601 Indeed, defining the depth of a $T$-point, $z_t$, as the sum of the vertical scale602 factors at $w$-points starting from the surface, the work of pressure forces can be 603 written as:596 This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates. 597 Indeed, defining the depth of a $T$-point, $z_t$, 598 as the sum of the vertical scale factors at $w$-points starting from the surface, 599 the work of pressure forces can be written as: 604 600 \begin{flalign*} 605 601 &- \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv … … 658 654 \end{flalign*} 659 655 The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}. 660 It remains to demonstrate that the last term, which is obviously a discrete analogue of 661 $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \autoref{eq:KE+PE_vect_discrete}. 656 It remains to demonstrate that the last term, 657 which is obviously a discrete analogue of $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to 658 the last term of \autoref{eq:KE+PE_vect_discrete}. 662 659 In other words, the following property must be satisfied: 663 660 \begin{flalign*} … … 666 663 \end{flalign*} 667 664 668 Let introduce $p_w$ the pressure at $w$-point such that $\delta_k [p_w] = - \rho \,g\,e_{3t}$. 665 Let introduce $p_w$ the pressure at $w$-point such that $\delta_k [p_w] = - \rho \,g\,e_{3t}$. 669 666 The right-hand-side of the above equation can be transformed as follows: 670 667 … … 718 715 719 716 720 Note that this property strongly constrains the discrete expression of both 721 the depth of $T-$points and of the term added to the pressure gradient in the 722 $s$-coordinate. Nevertheless, it is almost never satisfied since a linear equation 723 of state is rarely used. 717 Note that this property strongly constrains the discrete expression of both the depth of $T-$points and 718 of the term added to the pressure gradient in the $s$-coordinate. 719 Nevertheless, it is almost never satisfied since a linear equation of state is rarely used. 724 720 725 721 … … 755 751 \end{flalign*} 756 752 757 Substituting the discrete expression of the time derivative of the velocity either in vector invariant or in flux form,758 leads to the discrete equivalent of the 753 Substituting the discrete expression of the time derivative of the velocity either in 754 vector invariant or in flux form, leads to the discrete equivalent of the ???? 759 755 760 756 … … 771 767 \label{subsec:C.3.3} 772 768 773 In flux from the vorticity term reduces to a Coriolis term in which the Coriolis 774 parameter has been modified to account for the ``metric'' term. This altered 775 Coriolis parameter is discretised at an f-point. It is given by: 769 In flux from the vorticity term reduces to a Coriolis term in which 770 the Coriolis parameter has been modified to account for the ``metric'' term. 771 This altered Coriolis parameter is discretised at an f-point. 772 It is given by: 776 773 \begin{equation*} 777 774 f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\; … … 781 778 \end{equation*} 782 779 783 Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form. 784 It therefore conserves the total KE. The derivation is the same as for the785 vorticity term in the vector invariant form (\autoref{subsec:C_vor}).780 Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form. 781 It therefore conserves the total KE. 782 The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:C_vor}). 786 783 787 784 % ------------------------------------------------------------------------------------------------------------- … … 791 788 \label{subsec:C.3.4} 792 789 793 The flux form operator of the momentum advection is evaluated using a 794 centered second order finite difference scheme. Because of the flux form, 795 the discrete operator does not contribute to the global budget of linear 796 momentum. Because of the centered second order scheme, it conserves 797 the horizontal kinetic energy, that is : 790 The flux form operator of the momentum advection is evaluated using 791 a centered second order finite difference scheme. 792 Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum. 793 Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is: 798 794 799 795 \begin{equation} \label{eq:C_ADV_KE_flux} … … 804 800 \end{equation} 805 801 806 Let us first consider the first term of the scalar product ($i.e.$ just the the terms807 associated with the i-component of the advection):802 Let us first consider the first term of the scalar product 803 ($i.e.$ just the the terms associated with the i-component of the advection): 808 804 \begin{flalign*} 809 805 & - \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv \\ … … 845 841 \biggl\{ \left( \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} \right) \; b_t \biggr\} &&& \\ 846 842 \end{flalign*} 847 Applying similar manipulation applied to the second term of the scalar product 848 leads to : 843 Applying similar manipulation applied to the second term of the scalar product leads to: 849 844 \begin{equation*} 850 845 - \int_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} … … 854 849 \biggl\{ \left( \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} \right) \; b_t \biggr\} 855 850 \end{equation*} 856 which is the discrete form of 857 $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv $. 851 which is the discrete form of $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv $. 858 852 \autoref{eq:C_ADV_KE_flux} is thus satisfied. 859 853 860 854 861 When the UBS scheme is used to evaluate the flux form momentum advection, 862 the discrete operator does not contribute to the global budget of linear momentum 863 (flux form). The horizontal kinetic energy is not conserved, but forced to decay 864 ($i.e.$ the scheme is diffusive). 855 When the UBS scheme is used to evaluate the flux form momentum advection, 856 the discrete operator does not contribute to the global budget of linear momentum (flux form). 857 The horizontal kinetic energy is not conserved, but forced to decay ($i.e.$ the scheme is diffusive). 865 858 866 859 … … 894 887 \end{equation} 895 888 896 The scheme does not allow but the conservation of the total kinetic energy but the conservation 897 of $q^2$, the potential enstrophy for a horizontally non-divergent flow ($i.e.$ when $\chi$=$0$). 898 Indeed, using the symmetry or skew symmetry properties of the operators ( \autoref{eq:DOM_mi_adj} 899 and \autoref{eq:DOM_di_adj}), it can be shown that: 889 The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$, 890 the potential enstrophy for a horizontally non-divergent flow ($i.e.$ when $\chi$=$0$). 891 Indeed, using the symmetry or skew symmetry properties of the operators 892 ( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}), 893 it can be shown that: 900 894 \begin{equation} \label{eq:C_1.1} 901 895 \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 902 896 \end{equation} 903 where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. Indeed, using904 \autoref{eq:dynvor_ens}, the discrete form of the right hand side of \autoref{eq:C_1.1} 905 can be transformed as follow:897 where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. 898 Indeed, using \autoref{eq:dynvor_ens}, 899 the discrete form of the right hand side of \autoref{eq:C_1.1} can be transformed as follow: 906 900 \begin{flalign*} 907 901 &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times … … 955 949 \end{aligned} } \right. 956 950 \end{equation} 957 where the indices $i_p$ and $k_p$ take the following value :951 where the indices $i_p$ and $k_p$ take the following values: 958 952 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 959 953 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: … … 966 960 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow ($i.e.$ $\chi=0$). 967 961 968 Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, 969 similar manipulation can be done for the 3 others. The discrete form of the right hand 970 side of \autoref{eq:C_1.1} applied to this triad only can be transformed as follow: 962 Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, 963 similar manipulation can be done for the 3 others. 964 The discrete form of the right hand side of \autoref{eq:C_1.1} applied to 965 this triad only can be transformed as follow: 971 966 972 967 \begin{flalign*} … … 1020 1015 1021 1016 1022 All the numerical schemes used in NEMO are written such that the tracer content 1023 is conserved by the internal dynamics and physics (equations in flux form). 1024 For advection, only the CEN2 scheme ($i.e.$ $2^{nd}$ order finite different scheme) 1025 conserves the global variance of tracer. Nevertheless the other schemes ensure 1026 that the global variance decreases ($i.e.$ they are at least slightly diffusive). 1027 For diffusion, all the schemes ensure the decrease of the total tracer variance, 1028 except the iso-neutral operator. There is generally no strict conservation of mass, 1029 as the equation of state is non linear with respect to $T$ and $S$. In practice, 1030 the mass is conserved to a very high accuracy. 1017 All the numerical schemes used in NEMO are written such that the tracer content is conserved by 1018 the internal dynamics and physics (equations in flux form). 1019 For advection, 1020 only the CEN2 scheme ($i.e.$ $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 1021 Nevertheless the other schemes ensure that the global variance decreases 1022 ($i.e.$ they are at least slightly diffusive). 1023 For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator. 1024 There is generally no strict conservation of mass, 1025 as the equation of state is non linear with respect to $T$ and $S$. 1026 In practice, the mass is conserved to a very high accuracy. 1031 1027 % ------------------------------------------------------------------------------------------------------------- 1032 1028 % Advection Term … … 1049 1045 1050 1046 1051 Whatever the advection scheme considered it conserves of the tracer content as all 1052 the scheme are written in flux form. Indeed, let $T$ be the tracer and $\tau_u$, $\tau_v$, 1053 and $\tau_w$ its interpolated values at velocity point (whatever the interpolation is), 1047 Whatever the advection scheme considered it conserves of the tracer content as 1048 all the scheme are written in flux form. 1049 Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point 1050 (whatever the interpolation is), 1054 1051 the conservation of the tracer content due to the advection tendency is obtained as follows: 1055 1052 \begin{flalign*} … … 1067 1064 \end{flalign*} 1068 1065 1069 The conservation of the variance of tracer due to the advection tendency 1070 can be achieved only with the CEN2 scheme, $i.e.$ when 1071 $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 1066 The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme, 1067 $i.e.$ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 1072 1068 It can be demonstarted as follows: 1073 1069 \begin{flalign*} … … 1103 1099 1104 1100 1105 The discrete formulation of the horizontal diffusion of momentum ensures the 1106 conservation of potential vorticity and the horizontal divergence, and the 1107 dissipation of the square of these quantities ($i.e.$ enstrophy and the 1108 variance of the horizontal divergence) as well as the dissipation of the 1109 horizontal kinetic energy. In particular, when the eddy coefficients are 1110 horizontally uniform, it ensures a complete separation of vorticity and 1111 horizontal divergence fields, so that diffusion (dissipation) of vorticity 1112 (enstrophy) does not generate horizontal divergence (variance of the 1113 horizontal divergence) and \textit{vice versa}. 1114 1115 These properties of the horizontal diffusion operator are a direct consequence 1116 of properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 1117 When the vertical curl of the horizontal diffusion of momentum (discrete sense) 1118 is taken, the term associated with the horizontal gradient of the divergence is 1119 locally zero. 1101 The discrete formulation of the horizontal diffusion of momentum ensures 1102 the conservation of potential vorticity and the horizontal divergence, 1103 and the dissipation of the square of these quantities 1104 ($i.e.$ enstrophy and the variance of the horizontal divergence) as well as 1105 the dissipation of the horizontal kinetic energy. 1106 In particular, when the eddy coefficients are horizontally uniform, 1107 it ensures a complete separation of vorticity and horizontal divergence fields, 1108 so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence 1109 (variance of the horizontal divergence) and \textit{vice versa}. 1110 1111 These properties of the horizontal diffusion operator are a direct consequence of 1112 properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 1113 When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, 1114 the term associated with the horizontal gradient of the divergence is locally zero. 1120 1115 1121 1116 % ------------------------------------------------------------------------------------------------------------- … … 1125 1120 \label{subsec:C.6.1} 1126 1121 1127 The lateral momentum diffusion term conserves the potential vorticity 1122 The lateral momentum diffusion term conserves the potential vorticity: 1128 1123 \begin{flalign*} 1129 1124 &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times … … 1211 1206 \label{subsec:C.6.3} 1212 1207 1213 The lateral momentum diffusion term dissipates the enstrophy when the eddy 1214 coefficients are horizontally uniform: 1208 The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform: 1215 1209 \begin{flalign*} 1216 1210 &\int\limits_D \zeta \; \textbf{k} \cdot \nabla \times … … 1236 1230 \label{subsec:C.6.4} 1237 1231 1238 When the horizontal divergence of the horizontal diffusion of momentum 1239 (discrete sense) is taken, the term associated with the vertical curl of the 1240 vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 1241 The resulting term conserves the $\chi$ and dissipates $\chi^2$ 1242 when the eddy coefficients are horizontally uniform. 1232 When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, 1233 the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 1234 The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform. 1243 1235 \begin{flalign*} 1244 1236 & \int\limits_D \nabla_h \cdot … … 1291 1283 \label{sec:C.7} 1292 1284 1293 As for the lateral momentum physics, the continuous form of the vertical diffusion1294 of momentum satisfies several integral constraints. The first two are associated 1295 with the conservation of momentum and the dissipation of horizontal kinetic energy:1285 As for the lateral momentum physics, 1286 the continuous form of the vertical diffusion of momentum satisfies several integral constraints. 1287 The first two are associated with the conservation of momentum and the dissipation of horizontal kinetic energy: 1296 1288 \begin{align*} 1297 1289 \int\limits_D \frac{1} {e_3 }\; \frac{\partial } {\partial k} … … 1306 1298 \end{align*} 1307 1299 1308 The first property is obvious. The second results from: 1300 The first property is obvious. 1301 The second results from: 1309 1302 \begin{flalign*} 1310 1303 \int\limits_D … … 1326 1319 \end{flalign*} 1327 1320 1328 The vorticity is also conserved. Indeed: 1321 The vorticity is also conserved. 1322 Indeed: 1329 1323 \begin{flalign*} 1330 1324 \int \limits_D … … 1346 1340 \end{flalign*} 1347 1341 1348 If the vertical diffusion coefficient is uniform over the whole domain, the 1349 enstrophy is dissipated, $i.e.$ 1342 If the vertical diffusion coefficient is uniform over the whole domain, the enstrophy is dissipated, $i.e.$ 1350 1343 \begin{flalign*} 1351 1344 \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times … … 1378 1371 &\left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right] \right] \biggr\} &&\\ 1379 1372 \end{flalign*} 1380 Using the fact that the vertical diffusion coefficients are uniform, and that in 1381 $z$-coordinate, the vertical scale factors do not depend on $i$ and $j$ so 1382 that: $e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, 1383 it follows: 1373 Using the fact that the vertical diffusion coefficients are uniform, 1374 and that in $z$-coordinate, the vertical scale factors do not depend on $i$ and $j$ so that: 1375 $e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows: 1384 1376 \begin{flalign*} 1385 1377 \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k … … 1398 1390 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&&\\ 1399 1391 \end{flalign*} 1400 and the square of the horizontal divergence decreases ($i.e.$ the horizontal 1401 divergence is dissipated) if the vertical diffusion coefficient is uniform over the 1402 whole domain: 1392 and the square of the horizontal divergence decreases ($i.e.$ the horizontal divergence is dissipated) if 1393 the vertical diffusion coefficient is uniform over the whole domain: 1403 1394 1404 1395 \begin{flalign*} … … 1463 1454 \label{sec:C.8} 1464 1455 1465 The numerical schemes used for tracer subgridscale physics are written such 1466 th at the heat and salt contents are conserved (equations in flux form).1467 Since a flux form is used to compute the temperature and salinity, 1468 the quadratic form of these quantities ($i.e.$ their variance) globally tends to diminish. 1456 The numerical schemes used for tracer subgridscale physics are written such that 1457 the heat and salt contents are conserved (equations in flux form). 1458 Since a flux form is used to compute the temperature and salinity, 1459 the quadratic form of these quantities ($i.e.$ their variance) globally tends to diminish. 1469 1460 As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 1470 1461 -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_D.tex
r9407 r10354 13 13 14 14 15 A "model life" is more than ten years. Its software, composed of a few16 hundred modules, is used by many people who are scientists or students 17 and do not necessarily know every aspect of computing very well. 18 Moreover, a well thought-out program is easier to read and understand, 19 less difficult to modify, produces fewer bugs and is easier to maintain. 20 Therefore, it is essential that the model development follows some rules 15 A "model life" is more than ten years. 16 Its software, composed of a few hundred modules, is used by many people who are scientists or students and 17 do not necessarily know every aspect of computing very well. 18 Moreover, a well thought-out program is easier to read and understand, less difficult to modify, 19 produces fewer bugs and is easier to maintain. 20 Therefore, it is essential that the model development follows some rules: 21 21 22 22 - well planned and designed … … 32 32 - flexible. 33 33 34 To satisfy part of these aims, \NEMO is written with a coding standard which 35 is close to the ECMWF rules,named DOCTOR \citep{Gibson_TR86}.36 These rules present some advantages like 34 To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, 35 named DOCTOR \citep{Gibson_TR86}. 36 These rules present some advantages like: 37 37 38 38 - to provide a well presented program 39 39 40 - to use rules for variable names which allow recognition of their type 40 - to use rules for variable names which allow recognition of their type 41 41 (integer, real, parameter, local or shared variables, etc. ). 42 42 … … 49 49 \label{sec:D_structure} 50 50 51 Each program begins with a set of headline comments containing 51 Each program begins with a set of headline comments containing: 52 52 53 53 - the program title … … 65 65 - the author name(s), the date of creation and any updates. 66 66 67 - Each program is split into several well separated sections and 67 - Each program is split into several well separated sections and 68 68 sub-sections with an underlined title and specific labelled statements. 69 69 70 70 - A program has not more than 200 to 300 lines. 71 71 72 A template of a module style can be found on the NEMO depository 73 in the following file :NEMO/OPA\_SRC/module\_example.72 A template of a module style can be found on the NEMO depository in the following file: 73 NEMO/OPA\_SRC/module\_example. 74 74 % ================================================================ 75 75 % Coding conventions … … 78 78 \label{sec:D_coding} 79 79 80 - Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent 81 features like statement functions, do not use GO TO and EQUIVALENCE statements. 82 83 - A continuation line begins with the character {\&} indented by three spaces 84 compared to the previous line, while the previous line ended with the character {\&}. 85 86 - All the variables must be declared. The code is usually compiled with implicit none. 80 - Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent features like statement functions, 81 do not use GO TO and EQUIVALENCE statements. 82 83 - A continuation line begins with the character {\&} indented by three spaces compared to the previous line, 84 while the previous line ended with the character {\&}. 85 86 - All the variables must be declared. 87 The code is usually compiled with implicit none. 87 88 88 - Never use continuation lines in the declaration of a variable. When searching a 89 variable in the code through a \textit{grep} command, the declaration line will be found. 90 91 - In the declaration of a PUBLIC variable, the comment part at the end of the line 92 should start with the two characters "\verb?!:?". the following UNIX command, \\ 89 - Never use continuation lines in the declaration of a variable. 90 When searching a variable in the code through a \textit{grep} command, the declaration line will be found. 91 92 - In the declaration of a PUBLIC variable, the comment part at the end of the line should start with 93 the two characters "\verb?!:?". 94 The following UNIX command, \\ 93 95 \verb?grep var_name *90 \ grep \!: ? \\ 94 96 will display the module name and the line where the var\_name declaration is. 95 97 96 - Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF 97 statements. 98 - Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF statements. 98 99 99 100 - use a space after a comma, except when it appears to separate the indices of an array. … … 109 110 \label{sec:D_naming} 110 111 111 The purpose of the naming conventions is to use prefix letters to classify 112 model variables. These conventions allow the variable type to be easily 113 known and rapidly identified. The naming conventions are summarised 114 in the Table below: 112 The purpose of the naming conventions is to use prefix letters to classify model variables. 113 These conventions allow the variable type to be easily known and rapidly identified. 114 The naming conventions are summarised in the Table below: 115 115 116 116 … … 192 192 %-------------------------------------------------------------------------------------------------------------- 193 193 194 N.B. Parameter here, in not only parameter in the \textsc{Fortran} acceptation, it is also used for code variables195 that are read in namelist and should never been modified during a simulation.194 N.B. Parameter here, in not only parameter in the \textsc{Fortran} acceptation, 195 it is also used for code variables that are read in namelist and should never been modified during a simulation. 196 196 It is the case, for example, for the size of a domain (jpi,jpj,jpk). 197 197 -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_E.tex
r9407 r10354 10 10 \newpage 11 11 $\ $\newline % force a new ligne 12 13 This appendix some on going consideration on algorithms used or planned to be used 14 in \NEMO. 12 13 This appendix some on going consideration on algorithms used or planned to be used in \NEMO. 15 14 16 15 $\ $\newline % force a new ligne … … 22 21 \label{sec:TRA_adv_ubs} 23 22 24 The UBS advection scheme is an upstream biased third order scheme based on 25 an upstream-biased parabolic interpolation. It is also known as Cell Averaged26 QUICK scheme (Quadratic Upstream Interpolation for Convective 27 Kinematics). For example, in the $i$-direction:23 The UBS advection scheme is an upstream biased third order scheme based on 24 an upstream-biased parabolic interpolation. 25 It is also known as Cell Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective Kinematics). 26 For example, in the $i$-direction: 28 27 \begin{equation} \label{eq:tra_adv_ubs2} 29 28 \tau _u^{ubs} = \left\{ \begin{aligned} … … 38 37 - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 39 38 \end{equation} 40 where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and 41 $\tau "_i =\delta _i \left[ {\delta _{i+1/2} \left[ \tau \right]} \right]$. 42 By choosing this expression for $\tau "$ we consider a fourth order approximation 43 of $\partial_i^2$ with a constant i-grid spacing ($\Delta i=1$). 39 where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and 40 $\tau "_i =\delta _i \left[ {\delta _{i+1/2} \left[ \tau \right]} \right]$. 41 By choosing this expression for $\tau "$ we consider a fourth order approximation of $\partial_i^2$ with 42 a constant i-grid spacing ($\Delta i=1$). 44 43 45 44 Alternative choice: introduce the scale factors: … … 47 46 48 47 49 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation 50 error \citep{Shchepetkin_McWilliams_OM05}. The overall performance of the 51 advection scheme is similar to that reported in \cite{Farrow1995}. 52 It is a relatively good compromise between accuracy and smoothness. It is 53 not a \emph{positive} scheme meaning false extrema are permitted but the 54 amplitude of such are significantly reduced over the centred second order 55 method. Nevertheless it is not recommended to apply it to a passive tracer 56 that requires positivity. 57 58 The intrinsic diffusion of UBS makes its use risky in the vertical direction 59 where the control of artificial diapycnal fluxes is of paramount importance. 60 It has therefore been preferred to evaluate the vertical flux using the TVD 61 scheme when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 62 63 For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds 64 to a second order centred scheme is evaluated using the \textit{now} velocity 65 (centred in time) while the second term which is the diffusive part of the scheme, 66 is evaluated using the \textit{before} velocity (forward in time. This is discussed 67 by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. UBS and QUICK 68 schemes only differ by one coefficient. Substituting 1/6 with 1/8 in 69 (\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 70 This option is not available through a namelist parameter, since the 1/6 71 coefficient is hard coded. Nevertheless it is quite easy to make the 72 substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme 73 74 NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can 75 be controlled by vertical advection (not vertical diffusion which is usually 76 solved using an implicit scheme). Computer time can be saved by using a 77 time-splitting technique on vertical advection. This possibility have been 78 implemented and validated in ORCA05-L301. It is not currently offered in the 79 current reference version. 80 81 NB 2 : In a forthcoming release four options will be proposed for the 82 vertical component used in the UBS scheme. $\tau _w^{ubs}$ will be 83 evaluated using either \textit{(a)} a centred $2^{nd}$ order scheme , 84 or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative 85 parabolic splines following \citet{Shchepetkin_McWilliams_OM05} implementation of UBS in ROMS, 86 or \textit{(d)} an UBS. The $3^{rd}$ case has dispersion properties similar to an 87 eight-order accurate conventional scheme. 88 89 NB 3 : It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: 48 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error 49 \citep{Shchepetkin_McWilliams_OM05}. 50 The overall performance of the advection scheme is similar to that reported in \cite{Farrow1995}. 51 It is a relatively good compromise between accuracy and smoothness. 52 It is not a \emph{positive} scheme meaning false extrema are permitted but 53 the amplitude of such are significantly reduced over the centred second order method. 54 Nevertheless it is not recommended to apply it to a passive tracer that requires positivity. 55 56 The intrinsic diffusion of UBS makes its use risky in the vertical direction where 57 the control of artificial diapycnal fluxes is of paramount importance. 58 It has therefore been preferred to evaluate the vertical flux using the TVD scheme when 59 \np{ln\_traadv\_ubs}\forcode{ = .true.}. 60 61 For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds to 62 a second order centred scheme is evaluated using the \textit{now} velocity (centred in time) while 63 the second term which is the diffusive part of the scheme, is evaluated using the \textit{before} velocity 64 (forward in time). 65 This is discussed by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. 66 UBS and QUICK schemes only differ by one coefficient. 67 Substituting 1/6 with 1/8 in (\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 68 This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded. 69 Nevertheless it is quite easy to make the substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme. 70 71 NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can be controlled by vertical advection 72 (not vertical diffusion which is usually solved using an implicit scheme). 73 Computer time can be saved by using a time-splitting technique on vertical advection. 74 This possibility have been implemented and validated in ORCA05-L301. 75 It is not currently offered in the current reference version. 76 77 NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme. 78 $\tau _w^{ubs}$ will be evaluated using either \textit{(a)} a centered $2^{nd}$ order scheme, 79 or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative parabolic splines following 80 \citet{Shchepetkin_McWilliams_OM05} implementation of UBS in ROMS, or \textit{(d)} an UBS. 81 The $3^{rd}$ case has dispersion properties similar to an eight-order accurate conventional scheme. 82 83 NB 3: It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: 90 84 \begin{equation} \label{eq:tra_adv_ubs2} 91 85 \tau _u^{ubs} = \left\{ \begin{aligned} … … 102 96 \end{split} 103 97 \end{equation} 104 \autoref{eq:tra_adv_ubs2} has several advantages. First it clearly evidence that105 the UBS scheme is based on the fourth order scheme to which is added an 106 upstream biased diffusive term. Second, this emphasises that the $4^{th}$ order 107 part have to be evaluated at \emph{now} time step, not only the $2^{th}$ order 108 part as stated above using \autoref{eq:tra_adv_ubs}. Third, the diffusive term is 109 in fact a biharmonic operator with a eddy coefficient with is simply proportional 110 to the velocity.98 \autoref{eq:tra_adv_ubs2} has several advantages. 99 First it clearly evidences that the UBS scheme is based on the fourth order scheme to which 100 is added an upstream biased diffusive term. 101 Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step, 102 not only the $2^{th}$ order part as stated above using \autoref{eq:tra_adv_ubs}. 103 Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient which 104 is simply proportional to the velocity. 111 105 112 106 laplacian diffusion: … … 135 129 with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, 136 130 $i.e.$ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 137 it comes 131 it comes: 138 132 \begin{equation} \label{eq:tra_ldf_lap} 139 133 \begin{split} … … 163 157 \end{split} 164 158 \end{equation} 165 if the velocity is uniform ($i.e.$ $|u|=cst$) and 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]$ 159 if the velocity is uniform ($i.e.$ $|u|=cst$) and 160 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]$ 166 161 167 162 sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$): … … 191 186 \label{sec:LF} 192 187 193 We adopt the following semi-discrete notation for time derivative. Given the values of a variable $q$ at successive time step, the time derivation and averaging operators at the mid time step are: 188 We adopt the following semi-discrete notation for time derivative. 189 Given the values of a variable $q$ at successive time step, 190 the time derivation and averaging operators at the mid time step are: 194 191 \begin{subequations} \label{eq:dt_mt} 195 192 \begin{align} … … 198 195 \end{align} 199 196 \end{subequations} 200 As for space operator, the adjoint of the derivation and averaging time operators are201 $\delta_t^*=\delta_{t+\rdt/2}$ and $\overline{\cdot}^{\,t\,*}= \overline{\cdot}^{\,t+\Delta/2}$ 202 , respectively. 197 As for space operator, 198 the adjoint of the derivation and averaging time operators are $\delta_t^*=\delta_{t+\rdt/2}$ and 199 $\overline{\cdot}^{\,t\,*}= \overline{\cdot}^{\,t+\Delta/2}$, respectively. 203 200 204 201 The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as: … … 208 205 = \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} 209 206 \end{equation} 210 Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$211 as it can be found sometime in literature. 212 The leap-Frog time stepping is a second order centered scheme. As such it respects213 the quadratic invariant in integral forms, $i.e.$ the following continuous property,207 Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, 208 not $2\rdt$ as it can be found sometimes in literature. 209 The leap-Frog time stepping is a second order centered scheme. 210 As such it respects the quadratic invariant in integral forms, $i.e.$ the following continuous property, 214 211 \begin{equation} \label{eq:Energy} 215 212 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} … … 217 214 = \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) , 218 215 \end{equation} 219 is satisfied in discrete form. Indeed, 216 is satisfied in discrete form. 217 Indeed, 220 218 \begin{equation} \begin{split} 221 219 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} … … 228 226 \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) 229 227 \end{split} \end{equation} 230 NB here pb of boundary condition when applying the adjoin ! In space, setting to 0231 the quantity in land area is sufficient to get rid of the boundary condition232 (equivalently of the boundary value of the integration by part). In time this boundary233 condition is not physical and \textbf{add something here!!!}228 NB here pb of boundary condition when applying the adjoint! 229 In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition 230 (equivalently of the boundary value of the integration by part). 231 In time this boundary condition is not physical and \textbf{add something here!!!} 234 232 235 233 … … 249 247 \subsection{Griffies iso-neutral diffusion operator} 250 248 251 Let try to define a scheme that get its inspiration from the \citet{Griffies_al_JPO98} 252 scheme, but is formulated within the \NEMO framework ($i.e.$ using scale 253 factors rather than grid-size and having a position of $T$-points that is not 254 necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 255 256 In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, 257 the off-diagonal terms of the small angle diffusion tensor contain several double 258 spatial averages of a gradient, for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$. 259 It is apparent that the combination of a $k$ average and a $k$ derivative of the tracer 260 allows for the presence of grid point oscillation structures that will be invisible 261 to the operator. These structures are \textit{computational modes}. They 262 will not be damped by the iso-neutral operator, and even possibly amplified by it. 263 In other word, the operator applied to a tracer does not warranties the decrease of 264 its global average variance. To circumvent this, we have introduced a smoothing of 265 the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). Nevertheless, this technique 266 works fine for $T$ and $S$ as they are active tracers ($i.e.$ they enter the computation 267 of density), but it does not work for a passive tracer. \citep{Griffies_al_JPO98} introduce 268 a different way to discretise the off-diagonal terms that nicely solve the problem. 269 The idea is to get rid of combinations of an averaged in one direction combined 270 with a derivative in the same direction by considering triads. For example in the 271 (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 249 Let try to define a scheme that get its inspiration from the \citet{Griffies_al_JPO98} scheme, 250 but is formulated within the \NEMO framework 251 ($i.e.$ using scale factors rather than grid-size and having a position of $T$-points that 252 is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 253 254 In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, 255 the off-diagonal terms of the small angle diffusion tensor contain several double spatial averages of a gradient, 256 for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$. 257 It is apparent that the combination of a $k$ average and a $k$ derivative of the tracer allows for 258 the presence of grid point oscillation structures that will be invisible to the operator. 259 These structures are \textit{computational modes}. 260 They will not be damped by the iso-neutral operator, and even possibly amplified by it. 261 In other word, the operator applied to a tracer does not warranties the decrease of its global average variance. 262 To circumvent this, we have introduced a smoothing of the slopes of the iso-neutral surfaces 263 (see \autoref{chap:LDF}). 264 Nevertheless, this technique works fine for $T$ and $S$ as they are active tracers 265 ($i.e.$ they enter the computation of density), but it does not work for a passive tracer. 266 \citep{Griffies_al_JPO98} introduce a different way to discretise the off-diagonal terms that 267 nicely solve the problem. 268 The idea is to get rid of combinations of an averaged in one direction combined with 269 a derivative in the same direction by considering triads. 270 For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 272 271 \begin{equation} \label{eq:Gf_triads} 273 272 _i^k \mathbb{T}_{i_p}^{k_p} (T) … … 277 276 \right) 278 277 \end{equation} 279 where the indices $i_p$ and $k_p$ define the four triads and take the following value: 280 $i_p = -1/2$ or $1/2$ and $k_p = -1/2$ or $1/2$, 281 $b_u= e_{1u}\,e_{2u}\,e_{3u}$ is the volume of $u$-cells, 278 where the indices $i_p$ and $k_p$ define the four triads and take the following value: 279 $i_p = -1/2$ or $1/2$ and $k_p = -1/2$ or $1/2$, 280 $b_u= e_{1u}\,e_{2u}\,e_{3u}$ is the volume of $u$-cells, 282 281 $A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point, 283 and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad 282 and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad: 284 283 \begin{equation} \label{eq:Gf_slopes} 285 284 _i^k \mathbb{R}_{i_p}^{k_p} … … 288 287 {\left(\alpha / \beta \right)_i^k \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 289 288 \end{equation} 290 Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of 291 multiplying the temperature derivative by $\alpha$ and the salinity derivative 292 by $\beta$. This is more efficient as the ratio $\alpha / \beta$ can to be 293 evaluated directly. 294 295 Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of 296 ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$. This choice has been motivated by the decrease 297 of tracer variance and the presence of partial cell at the ocean bottom 298 (see \autoref{apdx:Gf_operator}). 289 Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of 290 multiplying the temperature derivative by $\alpha$ and the salinity derivative by $\beta$. 291 This is more efficient as the ratio $\alpha / \beta$ can to be evaluated directly. 292 293 Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$. 294 This choice has been motivated by the decrease of tracer variance and 295 the presence of partial cell at the ocean bottom (see \autoref{apdx:Gf_operator}). 299 296 300 297 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 301 298 \begin{figure}[!ht] \begin{center} 302 299 \includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 303 \caption{ \protect\label{fig:ISO_triad} 304 Triads used in the Griffies's like iso-neutral diffision scheme for 305 $u$-component (upper panel) and $w$-component (lower panel).}300 \caption{ \protect\label{fig:ISO_triad} 301 Triads used in the Griffies's like iso-neutral diffision scheme for 302 $u$-component (upper panel) and $w$-component (lower panel).} 306 303 \end{center} 307 304 \end{figure} … … 309 306 310 307 The four iso-neutral fluxes associated with the triads are defined at $T$-point. 311 They take the following expression 308 They take the following expression: 312 309 \begin{flalign} \label{eq:Gf_fluxes} 313 310 \begin{split} … … 320 317 \end{flalign} 321 318 322 The resulting iso-neutral fluxes at $u$- and $w$-points are then given by the323 sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}):319 The resulting iso-neutral fluxes at $u$- and $w$-points are then given by 320 the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}): 324 321 \begin{flalign} \label{eq:iso_flux} 325 322 \textbf{F}_{iso}(T) … … 350 347 % \end{pmatrix} 351 348 \end{flalign} 352 resulting in a iso-neutral diffusion tendency on temperature given by the divergence353 of the sum of all the four triad fluxes:349 resulting in a iso-neutral diffusion tendency on temperature given by 350 the divergence of the sum of all the four triad fluxes: 354 351 \begin{equation} \label{eq:Gf_operator} 355 352 D_l^T = \frac{1}{b_T} \sum_{\substack{i_p,\,k_p}} \left\{ … … 359 356 where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. 360 357 361 This expression of the iso-neutral diffusion has been chosen in order to satisfy 362 the following six properties: 358 This expression of the iso-neutral diffusion has been chosen in order to satisfy the following six properties: 363 359 \begin{description} 364 \item[$\bullet$ horizontal diffusion] The discretization of the diffusion operator 365 recovers the traditional five-point Laplacian in the limit of flat iso-neutral direction : 360 \item[$\bullet$ horizontal diffusion] 361 The discretization of the diffusion operator recovers the traditional five-point Laplacian in 362 the limit of flat iso-neutral direction: 366 363 \begin{equation} \label{eq:Gf_property1a} 367 364 D_l^T = \frac{1}{b_T} \ \delta_{i} … … 371 368 \end{equation} 372 369 373 \item[$\bullet$ implicit treatment in the vertical] In the diagonal term associated374 with the vertical divergence of the iso-neutral fluxes (i.e. the term associated 375 with a second order vertical derivative) appears only tracer values associated 376 with a single water column. This is of paramount importance since it means 377 that the implicit in time algorithm for solving the vertical diffusion equation can 378 be used to evaluate this term. It is a necessity since the vertical eddy diffusivity 379 associated with this term,370 \item[$\bullet$ implicit treatment in the vertical] 371 In the diagonal term associated with the vertical divergence of the iso-neutral fluxes 372 (i.e. the term associated with a second order vertical derivative) 373 appears only tracer values associated with a single water column. 374 This is of paramount importance since it means that 375 the implicit in time algorithm for solving the vertical diffusion equation can be used to evaluate this term. 376 It is a necessity since the vertical eddy diffusivity associated with this term, 380 377 \begin{equation} 381 378 \sum_{\substack{i_p, \,k_p}} \left\{ … … 385 382 can be quite large. 386 383 387 \item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of locally referenced388 potential density is zero, $i.e.$384 \item[$\bullet$ pure iso-neutral operator] 385 The iso-neutral flux of locally referenced potential density is zero, $i.e.$ 389 386 \begin{align} \label{eq:Gf_property2} 390 387 \begin{matrix} … … 397 394 \end{matrix} 398 395 \end{align} 399 This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ 400 andthe definition of the triads' slopes \autoref{eq:Gf_slopes}.401 402 \item[$\bullet$ conservation of tracer] The iso-neutral diffusion term conserve the403 total tracer content, $i.e.$396 This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ and 397 the definition of the triads' slopes \autoref{eq:Gf_slopes}. 398 399 \item[$\bullet$ conservation of tracer] 400 The iso-neutral diffusion term conserve the total tracer content, $i.e.$ 404 401 \begin{equation} \label{eq:Gf_property1} 405 402 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 406 403 \end{equation} 407 This property is trivially satisfied since the iso-neutral diffusive operator 408 is written in flux form. 409 410 \item[$\bullet$ decrease of tracer variance] The iso-neutral diffusion term does 411 not increase the total tracer variance, $i.e.$ 404 This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form. 405 406 \item[$\bullet$ decrease of tracer variance] 407 The iso-neutral diffusion term does not increase the total tracer variance, $i.e.$ 412 408 \begin{equation} \label{eq:Gf_property1} 413 409 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 414 410 \end{equation} 415 The property is demonstrated in the \autoref{apdx:Gf_operator}. It is a 416 key property for a diffusion term. It means that the operator is also a dissipation 417 term, $i.e.$ it is a sink term for the square of the quantity on which it is applied. 418 It therfore ensure that, when the diffusivity coefficient is large enough, the field 419 on which it is applied become free of grid-point noise. 420 421 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion operator is self-adjoint, 422 $i.e.$ 411 The property is demonstrated in the \autoref{apdx:Gf_operator}. 412 It is a key property for a diffusion term. 413 It means that the operator is also a dissipation term, 414 $i.e.$ it is a sink term for the square of the quantity on which it is applied. 415 It therfore ensures that, when the diffusivity coefficient is large enough, 416 the field on which it is applied become free of grid-point noise. 417 418 \item[$\bullet$ self-adjoint operator] 419 The iso-neutral diffusion operator is self-adjoint, $i.e.$ 423 420 \begin{equation} \label{eq:Gf_property1} 424 421 \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 425 422 \end{equation} 426 In other word, there is no needs to develop a specific routine from the adjoint of this 427 operator. We just have to apply the same routine. This properties can be demonstrated 428 quite easily in a similar way the "non increase of tracer variance" property has been 429 proved (see \autoref{apdx:Gf_operator}).423 In other word, there is no needs to develop a specific routine from the adjoint of this operator. 424 We just have to apply the same routine. 425 This properties can be demonstrated quite easily in a similar way the "non increase of tracer variance" property 426 has been proved (see \autoref{apdx:Gf_operator}). 430 427 \end{description} 431 428 … … 437 434 \subsection{Eddy induced velocity and skew flux formulation} 438 435 439 When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined), 440 an additional advection term is added. The associated velocity is the so called441 eddy induced velocity, the formulation of which depends on the slopes of iso- 442 neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used 443 here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo} 444 is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 445 + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates.436 When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined), 437 an additional advection term is added. 438 The associated velocity is the so called eddy induced velocity, 439 the formulation of which depends on the slopes of iso-neutral surfaces. 440 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 441 $i.e.$ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 442 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 446 443 447 444 The eddy induced velocity is given by: … … 456 453 \end{split} 457 454 \end{equation} 458 where $A_{e}$ is the eddy induced velocity coefficient, and $r_i$ and $r_j$ the459 slopes between the iso-neutral and the geopotential surfaces.455 where $A_{e}$ is the eddy induced velocity coefficient, 456 and $r_i$ and $r_j$ the slopes between the iso-neutral and the geopotential surfaces. 460 457 %%gm wrong: to be modified with 2 2D streamfunctions 461 In other words, 462 the eddy induced velocity can be derived from a vector streamfuntion, $\phi$, which 463 is given by $\phi = A_e\,\textbf{r}$ as $\textbf{U}^* = \textbf{k} \times \nabla \phi$ 458 In other words, the eddy induced velocity can be derived from a vector streamfuntion, $\phi$, 459 which is given by $\phi = A_e\,\textbf{r}$ as $\textbf{U}^* = \textbf{k} \times \nabla \phi$. 464 460 %%end gm 465 461 466 A traditional way to implement this additional advection is to add it to the eulerian 467 velocity prior to compute the tracer advection. This allows us to take advantage of 468 all the advection schemes offered for the tracers (see \autoref{sec:TRA_adv}) and not just 469 a $2^{nd}$ order advection scheme. This is particularly useful for passive tracers 470 where \emph{positivity} of the advection scheme is of paramount importance. 462 A traditional way to implement this additional advection is to add it to the eulerian velocity prior to 463 compute the tracer advection. 464 This allows us to take advantage of all the advection schemes offered for the tracers 465 (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme. 466 This is particularly useful for passive tracers where 467 \emph{positivity} of the advection scheme is of paramount importance. 471 468 % give here the expression using the triads. It is different from the one given in \autoref{eq:ldfeiv} 472 469 % see just below a copy of this equation: … … 490 487 \end{equation} 491 488 492 \citep{Griffies_JPO98} introduces another way to implement the eddy induced advection, 493 the so-called skew form. It is based on a transformation of the advective fluxes 494 using the non-divergent nature of the eddy induced velocity. 495 For example in the (\textbf{i},\textbf{k}) plane, the tracer advective fluxes can be 496 transformed as follows: 489 \citep{Griffies_JPO98} introduces another way to implement the eddy induced advection, the so-called skew form. 490 It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity. 491 For example in the (\textbf{i},\textbf{k}) plane, the tracer advective fluxes can be transformed as follows: 497 492 \begin{flalign*} 498 493 \begin{split} … … 519 514 \end{split} 520 515 \end{flalign*} 521 and since the eddy induces velocity field is no-divergent, we end up with the skew522 form of the eddy induced advective fluxes:516 and since the eddy induces velocity field is no-divergent, 517 we end up with the skew form of the eddy induced advective fluxes: 523 518 \begin{equation} \label{eq:eiv_skew_continuous} 524 519 \textbf{F}_{eiv}^T = \begin{pmatrix} … … 527 522 \end{pmatrix} 528 523 \end{equation} 529 The tendency associated with eddy induced velocity is then simply the divergence 530 of the \autoref{eq:eiv_skew_continuous} fluxes. It naturally conserves the tracer 531 content, as it is expressed in flux form and, as the advective form, it preserve the 532 tracer variance. Another interesting property of \autoref{eq:eiv_skew_continuous} 533 form is that when $A=A_e$, a simplification occurs in the sum of the iso-neutral 534 diffusion and eddy induced velocity terms:524 The tendency associated with eddy induced velocity is then simply the divergence of 525 the \autoref{eq:eiv_skew_continuous} fluxes. 526 It naturally conserves the tracer content, as it is expressed in flux form and, 527 as the advective form, it preserves the tracer variance. 528 Another interesting property of \autoref{eq:eiv_skew_continuous} form is that when $A=A_e$, 529 a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms: 535 530 \begin{flalign} \label{eq:eiv_skew+eiv_continuous} 536 531 \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= … … 549 544 \end{pmatrix} 550 545 \end{flalign} 551 The horizontal component reduces to the one use for an horizontal laplacian 552 operator and the vertical one keep the same complexity, but not more. This property 553 has been used to reduce the computational time \citep{Griffies_JPO98}, but it is 554 not of practical use as usually $A \neq A_e$. Nevertheless this property can be used to 555 choose a discret form of \autoref{eq:eiv_skew_continuous} which is consistent with the 556 is o-neutral operator \autoref{eq:Gf_operator}. Using the slopes \autoref{eq:Gf_slopes}557 and defining $A_e$ at $T$-point($i.e.$ as $A$, the eddy diffusivity coefficient),558 the resulting discret form is given by:546 The horizontal component reduces to the one use for an horizontal laplacian operator and 547 the vertical one keeps the same complexity, but not more. 548 This property has been used to reduce the computational time \citep{Griffies_JPO98}, 549 but it is not of practical use as usually $A \neq A_e$. 550 Nevertheless this property can be used to choose a discret form of \autoref{eq:eiv_skew_continuous} which 551 is consistent with the iso-neutral operator \autoref{eq:Gf_operator}. 552 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point($i.e.$ as $A$, 553 the eddy diffusivity coefficient), the resulting discret form is given by: 559 554 \begin{equation} \label{eq:eiv_skew} 560 555 \textbf{F}_{eiv}^T \equiv \frac{1}{4} \left( \begin{aligned} … … 569 564 \end{equation} 570 565 Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. 571 In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces 572 must be added to$\mathbb{R}$ for the discret form to be exact.573 574 Such a choice of discretisation is consistent with the iso-neutral operator as it uses the575 same definition for the slopes. It also ensures the conservation of the tracer variance 576 (see Appendix \autoref{apdx:eiv_skew}), $i.e.$ it does not include a diffusive component 577 but is a "pure" advection term.566 In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to 567 $\mathbb{R}$ for the discret form to be exact. 568 569 Such a choice of discretisation is consistent with the iso-neutral operator as 570 it uses the same definition for the slopes. 571 It also ensures the conservation of the tracer variance (see Appendix \autoref{apdx:eiv_skew}), 572 $i.e.$ it does not include a diffusive component but is a "pure" advection term. 578 573 579 574 … … 591 586 This part will be moved in an Appendix. 592 587 593 The continuous property to be demonstrated is 588 The continuous property to be demonstrated is: 594 589 \begin{align*} 595 590 \int_D D_l^T \; T \;dv \leq 0 … … 642 637 % 643 638 \allowdisplaybreaks 644 \intertext{The summation is done over all $i$ and $k$ indices, it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to regroup all the terms of the summation by triad at a ($i$,$k$) point. In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices. It becomes: } 639 \intertext{The summation is done over all $i$ and $k$ indices, 640 it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to 641 regroup all the terms of the summation by triad at a ($i$,$k$) point. 642 In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices. 643 It becomes: } 645 644 % 646 645 &\equiv -\sum_{i,k} … … 672 671 % 673 672 \allowdisplaybreaks 674 \intertext{Then outing in factor the triad in each of the four terms of the summation and substituting the triads by their expression given in \autoref{eq:Gf_triads}. It becomes: } 673 \intertext{Then outing in factor the triad in each of the four terms of the summation and 674 substituting the triads by their expression given in \autoref{eq:Gf_triads}. 675 It becomes: } 675 676 % 676 677 &\equiv -\sum_{i,k} … … 710 711 The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities. 711 712 712 Note that, if instead of multiplying $D_l^T$ by $T$, we were using another tracer field, let say $S$, then the previous demonstration would have let to: 713 Note that, if instead of multiplying $D_l^T$ by $T$, we were using another tracer field, let say $S$, 714 then the previous demonstration would have let to: 713 715 \begin{align*} 714 716 \int_D S \; D_l^T \;dv &\equiv \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\} \\ … … 729 731 &\equiv \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\} 730 732 \end{align*} 731 This means that the iso-neutral operator is self-adjoint. There is no need to develop a specific to obtain it. 733 This means that the iso-neutral operator is self-adjoint. 734 There is no need to develop a specific to obtain it. 732 735 733 736 … … 745 748 This have to be moved in an Appendix. 746 749 747 The continuous property to be demonstrated is 750 The continuous property to be demonstrated is: 748 751 \begin{align*} 749 752 \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv \equiv 0 … … 797 800 \end{matrix} 798 801 \end{align*} 799 The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the 800 same but of opposite signs,they cancel out.801 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$. 802 The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the 803 s ame but both of opposite signs and shifted by 1 in $k$ direction. When summing over $k$804 they cancel out with the neighbouring grid points. 805 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the 806 $i$ direction. Therefore the sum over the domain is zero, $i.e.$ the variance of the 807 tracer is preserved by the discretisation of the skew fluxes.802 The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs, 803 they cancel out. 804 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$. 805 The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the same but both of opposite signs and 806 shifted by 1 in $k$ direction. 807 When summing over $k$ they cancel out with the neighbouring grid points. 808 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the $i$ direction. 809 Therefore the sum over the domain is zero, 810 $i.e.$ the variance of the tracer is preserved by the discretisation of the skew fluxes. 808 811 809 812 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/annex_iso.tex
r10146 r10354 15 15 %--------------------------------------------------------------------------------------------------------- 16 16 17 Two scheme are available to perform the iso-neutral diffusion. 18 If the namelist logical \np{ln\_traldf\_triad} is set true, 19 \NEMO updates both active and passive tracers using the Griffies triad representation 20 of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes. 21 If the namelist logical \np{ln\_traldf\_iso} is set true, 22 the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}). 23 In the present implementation of the Griffies scheme, 17 Two scheme are available to perform the iso-neutral diffusion. 18 If the namelist logical \np{ln\_traldf\_triad} is set true, 19 \NEMO updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and 20 the eddy-induced advective skew (GM) fluxes. 21 If the namelist logical \np{ln\_traldf\_iso} is set true, 22 the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}). 23 In the present implementation of the Griffies scheme, 24 24 the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 25 25 26 Values of iso-neutral diffusivity and GM coefficient are set as 27 described in \autoref{sec:LDF_coef}. Note that when GM fluxes are used, 28 the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS, 26 Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 27 Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS, 29 28 even though the eddy advection is accomplished by means of the skew fluxes. 30 29 … … 32 31 The options specific to the Griffies scheme include: 33 32 \begin{description}[font=\normalfont] 34 \item[\np{ln\_triad\_iso}] See \autoref{sec:taper}. If this is set false (the default), then 35 `iso-neutral' mixing is accomplished within the surface mixed-layer 36 along slopes linearly decreasing with depth from the value immediately below 37 the mixed-layer to zero (flat) at the surface (\autoref{sec:lintaper}). 38 This is the same treatment as used in the default implementation \autoref{subsec:LDF_slp_iso}; \autoref{fig:eiv_slp}. 39 Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced 40 to ensure no vertical buoyancy flux, giving an almost pure 41 horizontal diffusive tracer flux within the mixed layer. This is similar to 42 the tapering suggested by \citet{Gerdes1991}. See \autoref{subsec:Gerdes-taper} 43 \item[\np{ln\_botmix\_triad}] See \autoref{sec:iso_bdry}. 33 \item[\np{ln\_triad\_iso}] 34 See \autoref{sec:taper}. 35 If this is set false (the default), 36 then `iso-neutral' mixing is accomplished within the surface mixed-layer along slopes linearly decreasing with 37 depth from the value immediately below the mixed-layer to zero (flat) at the surface (\autoref{sec:lintaper}). 38 This is the same treatment as used in the default implementation 39 \autoref{subsec:LDF_slp_iso}; \autoref{fig:eiv_slp}. 40 Where \np{ln\_triad\_iso} is set true, 41 the vertical skew flux is further reduced to ensure no vertical buoyancy flux, 42 giving an almost pure horizontal diffusive tracer flux within the mixed layer. 43 This is similar to the tapering suggested by \citet{Gerdes1991}. See \autoref{subsec:Gerdes-taper} 44 \item[\np{ln\_botmix\_triad}] 45 See \autoref{sec:iso_bdry}. 44 46 If this is set false (the default) then the lateral diffusive fluxes 45 47 associated with triads partly masked by topography are neglected. 46 48 If it is set true, however, then these lateral diffusive fluxes are applied, 47 49 giving smoother bottom tracer fields at the cost of introducing diapycnal mixing. 48 \item[\np{rn\_sw\_triad}] blah blah to be added.... 50 \item[\np{rn\_sw\_triad}] 51 blah blah to be added.... 49 52 \end{description} 50 53 The options shared with the Standard scheme include: … … 56 59 \section{Triad formulation of iso-neutral diffusion} 57 60 \label{sec:iso} 58 We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98}, 61 We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98}, 59 62 but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 60 63 61 64 \subsection{Iso-neutral diffusion operator} 62 The iso-neutral second order tracer diffusive operator for small 63 angles between iso-neutral surfaces and geopotentials is given by 64 \autoref{eq:iso_tensor_1}: 65 The iso-neutral second order tracer diffusive operator for small angles between 66 iso-neutral surfaces and geopotentials is given by \autoref{eq:iso_tensor_1}: 65 67 \begin{subequations} \label{eq:iso_tensor_1} 66 68 \begin{equation} … … 94 96 % {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 95 97 % \end{array} }} \right) 96 98 Here \autoref{eq:PE_iso_slopes} 97 99 \begin{align*} 98 100 r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i} … … 104 106 }{\partial k} \right)^{-1} 105 107 \end{align*} 106 is the $i$-component of the slope of the iso-neutral surface relative to the computational 107 surface, and $r_2$ is the $j$-component. 108 109 We will find it useful to consider the fluxes per unit area in $i,j,k$ 110 space; we write 108 is the $i$-component of the slope of the iso-neutral surface relative to the computational surface, 109 and $r_2$ is the $j$-component. 110 111 We will find it useful to consider the fluxes per unit area in $i,j,k$ space; we write 111 112 \begin{equation} 112 113 \label{eq:Fijk} 113 114 \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right). 114 115 \end{equation} 115 Additionally, we will sometimes write the contributions towards the 116 fluxes $\vect{f}$ and $\vect{F}_{\mathrm{iso}}$ from the component 117 $R_{ij}$ of $\Re$ as $f_{ij}$, $F_{\mathrm{iso}\: ij}$, with 118 $f_{ij}=R_{ij}e_i^{-1}\partial T/\partial x_i$ (no summation) etc. 116 Additionally, we will sometimes write the contributions towards the fluxes $\vect{f}$ and 117 $\vect{F}_{\mathrm{iso}}$ from the component $R_{ij}$ of $\Re$ as $f_{ij}$, $F_{\mathrm{iso}\: ij}$, 118 with $f_{ij}=R_{ij}e_i^{-1}\partial T/\partial x_i$ (no summation) etc. 119 119 120 120 The off-diagonal terms of the small angle diffusion tensor 121 \autoref{eq:iso_tensor_1}, \autoref{eq:iso_tensor_2} produce skew-fluxes along the122 $i$- and $j$-directions resulting from the vertical tracer gradient:121 \autoref{eq:iso_tensor_1}, \autoref{eq:iso_tensor_2} produce skew-fluxes along 122 the $i$- and $j$-directions resulting from the vertical tracer gradient: 123 123 \begin{align} 124 124 \label{eq:i13c} … … 129 129 \end{align} 130 130 131 The vertical diffusive flux associated with the $_{33}$ 132 component of the small angle diffusion tensor is 131 The vertical diffusive flux associated with the $_{33}$ component of the small angle diffusion tensor is 133 132 \begin{equation} 134 133 \label{eq:i33c} … … 136 135 \end{equation} 137 136 138 Since there are no cross terms involving $r_1$ and $r_2$ in the above, we can 139 consider the iso-neutral diffusive fluxes separately in the $i$-$k$ and $j$-$k$ 140 planes, just adding together the vertical components from each 141 plane. The following description will describe the fluxes on the $i$-$k$ 142 plane. 143 144 There is no natural discretization for the $i$-component of the 145 skew-flux, \autoref{eq:i13c}, as 146 although it must be evaluated at $u$-points, it involves vertical 147 gradients (both for the tracer and the slope $r_1$), defined at 148 $w$-points. Similarly, the vertical skew flux, \autoref{eq:i31c}, is evaluated at 149 $w$-points but involves horizontal gradients defined at $u$-points. 137 Since there are no cross terms involving $r_1$ and $r_2$ in the above, 138 we can consider the iso-neutral diffusive fluxes separately in the $i$-$k$ and $j$-$k$ planes, 139 just adding together the vertical components from each plane. 140 The following description will describe the fluxes on the $i$-$k$ plane. 141 142 There is no natural discretization for the $i$-component of the skew-flux, \autoref{eq:i13c}, 143 as although it must be evaluated at $u$-points, 144 it involves vertical gradients (both for the tracer and the slope $r_1$), defined at $w$-points. 145 Similarly, the vertical skew flux, \autoref{eq:i31c}, 146 is evaluated at $w$-points but involves horizontal gradients defined at $u$-points. 150 147 151 148 \subsection{Standard discretization} 152 149 The straightforward approach to discretize the lateral skew flux 153 \autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 154 into OPA, \autoref{eq:tra_ldf_iso}, is to calculate a mean vertical 155 gradient at the $u$-point from the average of the four surrounding 156 vertical tracer gradients, and multiply this by a mean slope at the 157 $u$-point, calculated from the averaged surrounding vertical density 158 gradients. The total area-integrated skew-flux (flux per unit area in 159 $ijk$ space) from tracer cell $i,k$ 160 to $i+1,k$, noting that the $e_{{3}_{i+1/2}^k}$ in the area 161 $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with 162 the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer 163 gradient, is then \autoref{eq:tra_ldf_iso} 150 \autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 into OPA, 151 \autoref{eq:tra_ldf_iso}, is to calculate a mean vertical gradient at the $u$-point from 152 the average of the four surrounding vertical tracer gradients, and multiply this by a mean slope at the $u$-point, 153 calculated from the averaged surrounding vertical density gradients. 154 The total area-integrated skew-flux (flux per unit area in $ijk$ space) from tracer cell $i,k$ to $i+1,k$, 155 noting that the $e_{{3}_{i+1/2}^k}$ in the area $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with 156 the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer gradient, is then \autoref{eq:tra_ldf_iso} 164 157 \begin{equation*} 165 158 \left(F_u^{13} \right)_{i+\hhalf}^k = \Alts_{i+\hhalf}^k … … 173 166 \frac{\delta_{i+1/2} [\rho]}{\overline{\overline{\delta_k \rho}}^{\,i,k}}, 174 167 \end{equation*} 175 and here and in the following we drop the $^{lT}$ superscript from 176 $\Alt$ for simplicity. 177 Unfortunately the resulting combination $\overline{\overline{\delta_k 178 \bullet}}^{\,i,k}$ of a $k$ average and a $k$ difference %of the tracer 179 reduces to $\bullet_{k+1}-\bullet_{k-1}$, so two-grid-point oscillations are 180 invisible to this discretization of the iso-neutral operator. These 181 \emph{computational modes} will not be damped by this operator, and 182 may even possibly be amplified by it. Consequently, applying this 183 operator to a tracer does not guarantee the decrease of its 184 global-average variance. To correct this, we introduced a smoothing of 185 the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). This 186 technique works for $T$ and $S$ in so far as they are active tracers 187 ($i.e.$ they enter the computation of density), but it does not work 188 for a passive tracer. 168 and here and in the following we drop the $^{lT}$ superscript from $\Alt$ for simplicity. 169 Unfortunately the resulting combination $\overline{\overline{\delta_k\bullet}}^{\,i,k}$ of a $k$ average and 170 a $k$ difference of the tracer reduces to $\bullet_{k+1}-\bullet_{k-1}$, 171 so two-grid-point oscillations are invisible to this discretization of the iso-neutral operator. 172 These \emph{computational modes} will not be damped by this operator, and may even possibly be amplified by it. 173 Consequently, applying this operator to a tracer does not guarantee the decrease of its global-average variance. 174 To correct this, we introduced a smoothing of the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). 175 This technique works for $T$ and $S$ in so far as they are active tracers 176 ($i.e.$ they enter the computation of density), but it does not work for a passive tracer. 189 177 190 178 \subsection{Expression of the skew-flux in terms of triad slopes} 191 \citep{Griffies_al_JPO98} introduce a different discretization of the 192 off-diagonal terms thatnicely solves the problem.179 \citep{Griffies_al_JPO98} introduce a different discretization of the off-diagonal terms that 180 nicely solves the problem. 193 181 % Instead of multiplying the mean slope calculated at the $u$-point by 194 182 % the mean vertical gradient at the $u$-point, … … 203 191 \end{center} \end{figure} 204 192 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 205 They get the skew flux from the products of the vertical gradients at 206 each $w$-point surrounding the $u$-point with the corresponding `triad' 207 slope calculated from the lateral density gradient across the $u$-point 208 divided by the vertical density gradient at the same $w$-point as the 209 tracer gradient. See \autoref{fig:ISO_triad}a, where the thick lines 210 denote the tracer gradients, and the thin lines the corresponding 211 triads, with slopes $s_1, \dotsc s_4$. The total area-integrated 212 skew-flux from tracer cell $i,k$ to $i+1,k$ 193 They get the skew flux from the products of the vertical gradients at each $w$-point surrounding the $u$-point with 194 the corresponding `triad' slope calculated from the lateral density gradient across the $u$-point divided by 195 the vertical density gradient at the same $w$-point as the tracer gradient. 196 See \autoref{fig:ISO_triad}a, where the thick lines denote the tracer gradients, 197 and the thin lines the corresponding triads, with slopes $s_1, \dotsc s_4$. 198 The total area-integrated skew-flux from tracer cell $i,k$ to $i+1,k$ 213 199 \begin{multline} 214 200 \label{eq:i13} … … 222 208 _{k-\frac{1}{2}} \left[ T^i \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}, 223 209 \end{multline} 224 where the contributions of the triad fluxes are weighted by areas 225 $a_1, \dotsc a_4$, and $\Alts$ is now defined at the tracer points 226 rather than the $u$-points. This discretization gives a much closer 227 stencil, and disallows the two-point computational modes. 228 229 The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at the 230 $w$-point $i,k+\hhalf$ is constructed similarly (\autoref{fig:ISO_triad}b) 231 by multiplying lateral tracer gradients from each of the four 232 surrounding $u$-points by the appropriate triad slope: 210 where the contributions of the triad fluxes are weighted by areas $a_1, \dotsc a_4$, 211 and $\Alts$ is now defined at the tracer points rather than the $u$-points. 212 This discretization gives a much closer stencil, and disallows the two-point computational modes. 213 214 The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at 215 the $w$-point $i,k+\hhalf$ is constructed similarly (\autoref{fig:ISO_triad}b) by 216 multiplying lateral tracer gradients from each of the four surrounding $u$-points by the appropriate triad slope: 233 217 \begin{multline} 234 218 \label{eq:i31} … … 241 225 242 226 We notate the triad slopes $s_i$ and $s'_i$ in terms of the `anchor point' $i,k$ 243 (appearing in both the vertical and lateral gradient), and the $u$- and244 $w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the 245 triad as follows(see also \autoref{fig:ISO_triad}):227 (appearing in both the vertical and lateral gradient), 228 and the $u$- and $w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the triad as follows 229 (see also \autoref{fig:ISO_triad}): 246 230 \begin{equation} 247 231 \label{eq:R} … … 253 237 { \alpha_i^k \ \delta_{k+k_p}[T^i] - \beta_i^k \ \delta_{k+k_p}[S^i] }. 254 238 \end{equation} 255 In calculating the slopes of the local neutral surfaces, 256 the expansion coefficients $\alpha$ and $\beta$ are evaluated at the anchor points of the triad, 239 In calculating the slopes of the local neutral surfaces, 240 the expansion coefficients $\alpha$ and $\beta$ are evaluated at the anchor points of the triad, 257 241 while the metrics are calculated at the $u$- and $w$-points on the arms. 258 242 … … 261 245 \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 262 246 \caption{ \protect\label{fig:qcells} 263 Triad notation for quarter cells. $T$-cells are inside264 boxes, while the $i+\half,k$ $u$-cell is shaded in green and the265 $i,k+\half$ $w$-cell is shaded in pink.}247 Triad notation for quarter cells. $T$-cells are inside boxes, 248 while the $i+\half,k$ $u$-cell is shaded in green and 249 the $i,k+\half$ $w$-cell is shaded in pink.} 266 250 \end{center} \end{figure} 267 251 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 268 252 269 Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:qcells}) with the quarter 270 cell that is the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell. 271 Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 272 we have $e.g.$ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 273 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) 274 to calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$, 275 and then again as an $s'$ to calculate the vertical flux along its $w$-arm at $(i,k+k_p)$. 276 Each vertical area $a_i$ used to calculate the lateral flux and horizontal area $a'_i$ used 277 to calculate the vertical flux can also be identified as the area across the $u$- and $w$-arms 278 of a unique triad, and we notate these areas, similarly to the triad slopes, 279 as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, 280 where $e.g.$ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 253 Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:qcells}) with the quarter cell that is 254 the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell. 255 Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 256 we have $e.g.$ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 257 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) to 258 calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$, 259 and then again as an $s'$ to calculate the vertical flux along its $w$-arm at $(i,k+k_p)$. 260 Each vertical area $a_i$ used to calculate the lateral flux and horizontal area $a'_i$ used to 261 calculate the vertical flux can also be identified as the area across the $u$- and $w$-arms of a unique triad, 262 and we notate these areas, similarly to the triad slopes, 263 as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, 264 where $e.g.$ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 281 265 and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 282 266 283 267 \subsection{Full triad fluxes} 284 A key property of iso-neutral diffusion is that it should not affect 285 the (locally referenced) density. In particular there should be no 286 lateral or vertical density flux. The lateral density flux disappears so long as the 287 area-integrated lateral diffusive flux from tracer cell $i,k$ to 288 $i+1,k$ coming from the $_{11}$ term of the diffusion tensor takes the 289 form 268 A key property of iso-neutral diffusion is that it should not affect the (locally referenced) density. 269 In particular there should be no lateral or vertical density flux. 270 The lateral density flux disappears so long as the area-integrated lateral diffusive flux from 271 tracer cell $i,k$ to $i+1,k$ coming from the $_{11}$ term of the diffusion tensor takes the form 290 272 \begin{equation} 291 273 \label{eq:i11} … … 295 277 \frac{\delta _{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}}, 296 278 \end{equation} 297 where the areas $a_i$ are as in \autoref{eq:i13}. In this case, 298 separating the total lateral flux, the sum of \autoref{eq:i13} and 299 \autoref{eq:i11}, into triad components, a lateral tracer 300 flux 279 where the areas $a_i$ are as in \autoref{eq:i13}. 280 In this case, separating the total lateral flux, the sum of \autoref{eq:i13} and \autoref{eq:i11}, 281 into triad components, a lateral tracer flux 301 282 \begin{equation} 302 283 \label{eq:latflux-triad} … … 308 289 \right) 309 290 \end{equation} 310 can be identified with each triad. Then, because the 311 same metric factors ${e_{3w}}_{\,i}^{\,k+k_p}$ and 312 ${e_{1u}}_{\,i+i_p}^{\,k}$ are employed for both the density gradients 313 in $ _i^k \mathbb{R}_{i_p}^{k_p}$ and the tracer gradients, the lateral 314 density flux associated with each triad separately disappears. 291 can be identified with each triad. 292 Then, because the same metric factors ${e_{3w}}_{\,i}^{\,k+k_p}$ and ${e_{1u}}_{\,i+i_p}^{\,k}$ are employed for both 293 the density gradients in $ _i^k \mathbb{R}_{i_p}^{k_p}$ and the tracer gradients, 294 the lateral density flux associated with each triad separately disappears. 315 295 \begin{equation} 316 296 \label{eq:latflux-rho} 317 297 {\mathbb{F}_u}_{i_p}^{k_p} (\rho)=-\alpha _i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (S)=0 318 298 \end{equation} 319 Thus the total flux $\left( F_u^{31} \right) ^i _{i,k+\frac{1}{2}} + 320 \left( F_u^{11} \right) ^i _{i,k+\frac{1}{2}}$ from tracer cell $i,k$ 321 to $i+1,k$ must also vanish since it is a sum of four such triad fluxes. 322 323 The squared slope $r_1^2$ in the expression \autoref{eq:i33c} for the 324 $_{33}$ component is also expressed in terms of area-weighted 325 squared triad slopes, so the area-integrated vertical flux from tracer 326 cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is 299 Thus the total flux $\left( F_u^{31} \right) ^i _{i,k+\frac{1}{2}} + \left( F_u^{11} \right) ^i _{i,k+\frac{1}{2}}$ from 300 tracer cell $i,k$ to $i+1,k$ must also vanish since it is a sum of four such triad fluxes. 301 302 The squared slope $r_1^2$ in the expression \autoref{eq:i33c} for the $_{33}$ component is also expressed in 303 terms of area-weighted squared triad slopes, 304 so the area-integrated vertical flux from tracer cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is 327 305 \begin{equation} 328 306 \label{eq:i33} … … 333 311 + \Alts_i^k a_{4}' s_{4}'^2 \right)\delta_{k+\frac{1}{2}} \left[ T^{i+1} \right], 334 312 \end{equation} 335 where the areas $a'$ and slopes $s'$ are the same as in 336 \autoref{eq:i31}. 337 Then, separating the total vertical flux, the sum of \autoref{eq:i31} and 338 \autoref{eq:i33}, into triad components, a vertical flux 313 where the areas $a'$ and slopes $s'$ are the same as in \autoref{eq:i31}. 314 Then, separating the total vertical flux, the sum of \autoref{eq:i31} and \autoref{eq:i33}, 315 into triad components, a vertical flux 339 316 \begin{align} 340 317 \label{eq:vertflux-triad} … … 349 326 {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2} 350 327 \end{align} 351 may be associated with each triad. Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ 352 associated with a triad then separately disappears (because the 353 lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (\rho)$ 354 disappears). Consequently the total vertical density flux $\left( F_w^{31} \right)_i ^{k+\frac{1}{2}} + 355 \left( F_w^{33} \right)_i^{k+\frac{1}{2}}$ from tracer cell $i,k$ 356 to $i,k+1$ must also vanish since it is a sum of four such triad 357 fluxes. 358 359 We can explicitly identify (\autoref{fig:qcells}) the triads associated with the $s_i$, $a_i$, and $s'_i$, $a'_i$ used in the definition of 360 the $u$-fluxes and $w$-fluxes in 361 \autoref{eq:i31}, \autoref{eq:i13}, \autoref{eq:i11} \autoref{eq:i33} and 362 \autoref{fig:ISO_triad} to write out the iso-neutral fluxes at $u$- and 363 $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces: 328 may be associated with each triad. 329 Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ associated with a triad then 330 separately disappears (because the lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (\rho)$ disappears). 331 Consequently the total vertical density flux 332 $\left( F_w^{31} \right)_i ^{k+\frac{1}{2}} + \left( F_w^{33} \right)_i^{k+\frac{1}{2}}$ from 333 tracer cell $i,k$ to $i,k+1$ must also vanish since it is a sum of four such triad fluxes. 334 335 We can explicitly identify (\autoref{fig:qcells}) the triads associated with the $s_i$, $a_i$, 336 and $s'_i$, $a'_i$ used in the definition of the $u$-fluxes and $w$-fluxes in \autoref{eq:i31}, 337 \autoref{eq:i13}, \autoref{eq:i11} \autoref{eq:i33} and \autoref{fig:ISO_triad} to write out 338 the iso-neutral fluxes at $u$- and $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces: 364 339 %(\autoref{fig:ISO_triad}): 365 340 \begin{flalign} \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv … … 375 350 \label{subsec:variance} 376 351 377 We now require that this operator should not increase the 378 globally-integrated tracer variance. 352 We now require that this operator should not increase the globally-integrated tracer variance. 379 353 %This changes according to 380 354 % \begin{align*} … … 387 361 % + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \ \delta_{k+1/2} [T] \right\} \\ 388 362 % \end{align*} 389 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ drives a lateral flux 390 $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ across the $u$-point $i+i_p,k$ and 391 a vertical flux $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ across the 392 $w$-point $i,k+k_p$. The lateral flux drives a net rate of change of 393 variance, summed over the two $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 363 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ drives a lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ across 364 the $u$-point $i+i_p,k$ and a vertical flux $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ across the $w$-point $i,k+k_p$. 365 The lateral flux drives a net rate of change of variance, 366 summed over the two $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 394 367 \begin{multline} 395 368 {b_T}_{i+i_p-1/2}^k\left(\frac{\partial T}{\partial t}T\right)_{i+i_p-1/2}^k+ … … 402 375 \end{aligned} 403 376 \end{multline} 404 while the vertical flux similarly drives a net rate of change of 405 variance summed over the $T$-points $i,k+k_p-\half$ (above) and 406 $i,k+k_p+\half$ (below) of 377 while the vertical flux similarly drives a net rate of change of variance summed over 378 the $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 407 379 \begin{equation} 408 380 \label{eq:dvar_iso_k} 409 381 _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 410 382 \end{equation} 411 The total variance tendency driven by the triad is the sum of these 412 two. Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and 413 $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \autoref{eq:latflux-triad} and 414 \autoref{eq:vertflux-triad}, it is 383 The total variance tendency driven by the triad is the sum of these two. 384 Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with 385 \autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, it is 415 386 \begin{multline*} 416 387 -\Alts_i^k\left \{ … … 428 399 \right \}. 429 400 \end{multline*} 430 The key point is then that if we require 431 $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$ and $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$ 432 to be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by 401 The key point is then that if we require $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$ and $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$ to 402 be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by 433 403 \begin{equation} 434 404 \label{eq:V-A} … … 447 417 \right)^2\leq 0. 448 418 \end{equation} 449 Thus, the constraint \autoref{eq:V-A} ensures that the fluxes (\autoref{eq:latflux-triad}, \autoref{eq:vertflux-triad}) associated 450 with a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase 451 the net variance. Since the total fluxes are sums of such fluxes from 452 the various triads, this constraint, applied to all triads, is 453 sufficient to ensure that the globally integrated variance does not 454 increase. 455 456 The expression \autoref{eq:V-A} can be interpreted as a discretization 457 of the global integral 419 Thus, the constraint \autoref{eq:V-A} ensures that the fluxes 420 (\autoref{eq:latflux-triad}, \autoref{eq:vertflux-triad}) associated with 421 a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase the net variance. 422 Since the total fluxes are sums of such fluxes from the various triads, this constraint, applied to all triads, 423 is sufficient to ensure that the globally integrated variance does not increase. 424 425 The expression \autoref{eq:V-A} can be interpreted as a discretization of the global integral 458 426 \begin{equation} 459 427 \label{eq:cts-var} … … 461 429 \int\!\mathbf{F}\cdot\nabla T\, dV, 462 430 \end{equation} 463 where, within each triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$, the 464 lateral and vertical fluxes/unit area 431 where, within each triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$, the lateral and vertical fluxes/unit area 465 432 \[ 466 433 \mathbf{F}=\left( … … 477 444 478 445 \subsection{Triad volumes in Griffes's scheme and in \NEMO} 479 To complete the discretization we now need only specify the triad 480 volumes $_i^k\mathbb{V}_{i_p}^{k_p}$. \citet{Griffies_al_JPO98} identify 481 these $_i^k\mathbb{V}_{i_p}^{k_p}$ as the volumes of the quarter 482 cells, defined in terms of the distances between $T$, $u$,$f$ and 483 $w$-points. This is the natural discretization of 484 \autoref{eq:cts-var}. The \NEMO model, however, operates with scale 485 factors instead of grid sizes, and scale factors for the quarter 486 cells are not defined. Instead, therefore we simply choose 446 To complete the discretization we now need only specify the triad volumes $_i^k\mathbb{V}_{i_p}^{k_p}$. 447 \citet{Griffies_al_JPO98} identifies these $_i^k\mathbb{V}_{i_p}^{k_p}$ as the volumes of the quarter cells, 448 defined in terms of the distances between $T$, $u$,$f$ and $w$-points. 449 This is the natural discretization of \autoref{eq:cts-var}. 450 The \NEMO model, however, operates with scale factors instead of grid sizes, 451 and scale factors for the quarter cells are not defined. 452 Instead, therefore we simply choose 487 453 \begin{equation} 488 454 \label{eq:V-NEMO} 489 455 _i^k\mathbb{V}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k, 490 456 \end{equation} 491 as a quarter of the volume of the $u$-cell inside which the triad 492 quarter-cell lies. This has the nice property that when the slopes 493 $\mathbb{R}$ vanish, the lateral flux from tracer cell $i,k$ to 494 $i+1,k$ reduces to the classical form 457 as a quarter of the volume of the $u$-cell inside which the triad quarter-cell lies. 458 This has the nice property that when the slopes $\mathbb{R}$ vanish, 459 the lateral flux from tracer cell $i,k$ to $i+1,k$ reduces to the classical form 495 460 \begin{equation} 496 461 \label{eq:lat-normal} … … 500 465 = -\overline\Alts_{\,i+1/2}^k\;\frac{{e_{1w}}_{\,i + 1/2}^{\,k}\:{e_{1v}}_{\,i + 1/2}^{\,k}\;\delta_{i+ 1/2}[T^k]}{{e_{1u}}_{\,i + 1/2}^{\,k}}. 501 466 \end{equation} 502 In fact if the diffusive coefficient is defined at $u$-points, so that503 we employ $\Alts_{i+i_p}^k$ instead of $\Alts_i^k$ in the definitions of the 504 triad fluxes\autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad},467 In fact if the diffusive coefficient is defined at $u$-points, 468 so that we employ $\Alts_{i+i_p}^k$ instead of $\Alts_i^k$ in the definitions of the triad fluxes 469 \autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, 505 470 we can replace $\overline{A}_{\,i+1/2}^k$ by $A_{i+1/2}^k$ in the above. 506 471 507 472 \subsection{Summary of the scheme} 508 The iso-neutral fluxes at $u$- and 509 $w$-points are the sums of the triad fluxes that cross the $u$- and 510 $w$-faces \autoref{eq:iso_flux}: 473 The iso-neutral fluxes at $u$- and $w$-points are the sums of the triad fluxes that 474 cross the $u$- and $w$-faces \autoref{eq:iso_flux}: 511 475 \begin{subequations}\label{eq:alltriadflux} 512 476 \begin{flalign}\label{eq:vect_isoflux} … … 545 509 \end{subequations} 546 510 547 511 The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at 548 512 each tracer point: 549 513 \begin{equation} \label{eq:iso_operator} D_l^T = \frac{1}{b_T} … … 555 519 The diffusion scheme satisfies the following six properties: 556 520 \begin{description} 557 \item[$\bullet$ horizontal diffusion] The discretization of the558 diffusion operator recovers \autoref{eq:lat-normal} the traditional five-point Laplacian in559 the limit of flat iso-neutral direction:521 \item[$\bullet$ horizontal diffusion] 522 The discretization of the diffusion operator recovers the traditional five-point Laplacian 523 \autoref{eq:lat-normal} in the limit of flat iso-neutral direction: 560 524 \begin{equation} \label{eq:iso_property0} D_l^T = \frac{1}{b_T} \ 561 525 \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; … … 564 528 \end{equation} 565 529 566 \item[$\bullet$ implicit treatment in the vertical] Only tracer values 567 associated with a single water column appear in the expression 568 \autoref{eq:i33} for the $_{33}$ fluxes, vertical fluxes driven by 569 vertical gradients. This is of paramount importance since it means 570 that a time-implicit algorithm can be used to solve the vertical 571 diffusion equation. This is necessary 572 since the vertical eddy 573 diffusivity associated with this term, 530 \item[$\bullet$ implicit treatment in the vertical] 531 Only tracer values associated with a single water column appear in the expression \autoref{eq:i33} for 532 the $_{33}$ fluxes, vertical fluxes driven by vertical gradients. 533 This is of paramount importance since it means that a time-implicit algorithm can be used to 534 solve the vertical diffusion equation. 535 This is necessary since the vertical eddy diffusivity associated with this term, 574 536 \begin{equation} 575 537 \frac{1}{b_w}\sum_{\substack{i_p, \,k_p}} \left\{ … … 579 541 {b_u}_{i+i_p}^k\: \Alts_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2 580 542 \right\}, 581 \end{equation}543 \end{equation} 582 544 (where $b_w= e_{1w}\,e_{2w}\,e_{3w}$ is the volume of $w$-cells) can be quite large. 583 545 584 \item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of585 locally referenced potential density is zero. See586 \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}.587 588 \item[$\bullet$ conservation of tracer] The iso-neutral diffusion589 conserves tracer content, $i.e.$546 \item[$\bullet$ pure iso-neutral operator] 547 The iso-neutral flux of locally referenced potential density is zero. 548 See \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}. 549 550 \item[$\bullet$ conservation of tracer] 551 The iso-neutral diffusion conserves tracer content, $i.e.$ 590 552 \begin{equation} \label{eq:iso_property1} \sum_{i,j,k} \left\{ D_l^T \ 591 553 b_T \right\} = 0 592 554 \end{equation} 593 This property is trivially satisfied since the iso-neutral diffusive 594 operator is written in flux form. 595 596 \item[$\bullet$ no increase of tracer variance] The iso-neutral diffusion 597 does not increase the tracer variance, $i.e.$ 555 This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form. 556 557 \item[$\bullet$ no increase of tracer variance] 558 The iso-neutral diffusion does not increase the tracer variance, $i.e.$ 598 559 \begin{equation} \label{eq:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T 599 560 \ b_T \right\} \leq 0 600 561 \end{equation} 601 The property is demonstrated in 602 \autoref{subsec:variance} above. It is a key property for a diffusion 603 term. It means that it is also a dissipation term, $i.e.$ it 604 dissipates the square of the quantity on which it is applied. It 605 therefore ensures that, when the diffusivity coefficient is large 606 enough, the field on which it is applied becomes free of grid-point 607 noise. 608 609 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion 610 operator is self-adjoint, $i.e.$ 562 The property is demonstrated in \autoref{subsec:variance} above. 563 It is a key property for a diffusion term. 564 It means that it is also a dissipation term, 565 $i.e.$ it dissipates the square of the quantity on which it is applied. 566 It therefore ensures that, when the diffusivity coefficient is large enough, 567 the field on which it is applied becomes free of grid-point noise. 568 569 \item[$\bullet$ self-adjoint operator] 570 The iso-neutral diffusion operator is self-adjoint, $i.e.$ 611 571 \begin{equation} \label{eq:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T 612 572 \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 613 573 \end{equation} 614 In other word, there is no need to develop a specific routine from 615 the adjoint of this operator. We just have to apply the same 616 routine. This property can be demonstrated similarly to the proof of 617 the `no increase of tracer variance' property. The contribution by a 618 single triad towards the left hand side of \autoref{eq:iso_property3}, can 619 be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} 620 and \autoref{eq:dvar_iso_k}. This results in a term similar to 621 \autoref{eq:perfect-square}, 574 In other word, there is no need to develop a specific routine from the adjoint of this operator. 575 We just have to apply the same routine. 576 This property can be demonstrated similarly to the proof of the `no increase of tracer variance' property. 577 The contribution by a single triad towards the left hand side of \autoref{eq:iso_property3}, 578 can be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} and \autoref{eq:dvar_iso_k}. 579 This results in a term similar to \autoref{eq:perfect-square}, 622 580 \begin{equation} 623 581 \label{eq:TScovar} … … 634 592 \right). 635 593 \end{equation} 636 This is symmetrical in $T $ and $S$, so exactly the same term arises 637 from the discretization of this triad's contribution towards the 638 RHS of \autoref{eq:iso_property3}. 594 This is symmetrical in $T $ and $S$, so exactly the same term arises from 595 the discretization of this triad's contribution towards the RHS of \autoref{eq:iso_property3}. 639 596 \end{description} 640 597 641 598 \subsection{Treatment of the triads at the boundaries}\label{sec:iso_bdry} 642 The triad slope can only be defined where both the grid boxes centred at 643 the end of the arms exist. Triads that would poke up 644 through the upper ocean surface into the atmosphere, or down into the 645 ocean floor, must be masked out. See \autoref{fig:bdry_triads}. Surface layer triads 646 $\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and 647 $\triad{i+1}{1}{R}{-1/2}{-1/2}$ (blue) that require density to be 648 specified above the ocean surface are masked (\autoref{fig:bdry_triads}a): this ensures that lateral 649 tracer gradients produce no flux through the ocean surface. However, 650 to prevent surface noise, it is customary to retain the $_{11}$ contributions towards 651 the lateral triad fluxes $\triad[u]{i}{1}{F}{1/2}{-1/2}$ and 652 $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$; this drives diapycnal tracer 653 fluxes. Similar comments apply to triads that would intersect the 654 ocean floor (\autoref{fig:bdry_triads}b). Note that both near bottom 655 triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 656 $\triad{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the $i,k+1$ 657 or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point is 658 masked. The associated lateral fluxes (grey-black dashed line) are 659 masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 660 giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 661 662 The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the 663 bbl mixing option is enabled (\key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), 664 or for simple idealized problems. For setups with topography without 665 bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 599 The triad slope can only be defined where both the grid boxes centred at the end of the arms exist. 600 Triads that would poke up through the upper ocean surface into the atmosphere, 601 or down into the ocean floor, must be masked out. 602 See \autoref{fig:bdry_triads}. 603 Surface layer triads $\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and $\triad{i+1}{1}{R}{-1/2}{-1/2}$ (blue) that 604 require density to be specified above the ocean surface are masked (\autoref{fig:bdry_triads}a): 605 this ensures that lateral tracer gradients produce no flux through the ocean surface. 606 However, to prevent surface noise, it is customary to retain the $_{11}$ contributions towards 607 the lateral triad fluxes $\triad[u]{i}{1}{F}{1/2}{-1/2}$ and $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$; 608 this drives diapycnal tracer fluxes. 609 Similar comments apply to triads that would intersect the ocean floor (\autoref{fig:bdry_triads}b). 610 Note that both near bottom triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 611 $\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, 612 i.e.\ the $i,k+1$ $u$-point is masked. 613 The associated lateral fluxes (grey-black dashed line) are masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, 614 but left unmasked, giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 615 616 The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled 617 (\key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 618 For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 666 619 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 667 620 \begin{figure}[h] \begin{center} 668 621 \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 669 622 \caption{ \protect\label{fig:bdry_triads} 670 (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer 671 points (black dots), and $i+1/2,1$ $u$-point (blue square). Triad 672 slopes $\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and $\triad{i+1}{1}{R}{-1/2}{-1/2}$ 673 (blue) poking through the ocean surface are masked (faded in 674 figure). However, the lateral $_{11}$ contributions towards 675 $\triad[u]{i}{1}{F}{1/2}{-1/2}$ and $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$ 676 (yellow line) are still applied, giving diapycnal diffusive 677 fluxes.\newline 623 (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer points (black dots), 624 and $i+1/2,1$ $u$-point (blue square). 625 Triad slopes $\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and $\triad{i+1}{1}{R}{-1/2}{-1/2}$ (blue) poking through 626 the ocean surface are masked (faded in figure). 627 However, the lateral $_{11}$ contributions towards $\triad[u]{i}{1}{F}{1/2}{-1/2}$ and 628 $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$ (yellow line) are still applied, 629 giving diapycnal diffusive fluxes.\newline 678 630 (b) Both near bottom triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 679 $\triad{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the $i,k+1$ 680 or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point681 is masked. The associated lateral fluxes (grey-black dashed682 line) are masked if \protect\np{botmix\_triad}\forcode{ = .false.}, but left683 unmasked,giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}}631 $\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, 632 i.e.\ the $i,k+1$ $u$-point is masked. 633 The associated lateral fluxes (grey-black dashed line) are masked if 634 \protect\np{botmix\_triad}\forcode{ = .false.}, but left unmasked, 635 giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}} 684 636 \end{center} \end{figure} 685 637 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 686 638 687 639 \subsection{ Limiting of the slopes within the interior}\label{sec:limit} 688 As discussed in \autoref{subsec:LDF_slp_iso}, iso-neutral slopes relative to689 geopotentials must be bounded everywhere, both for consistency with the small-slope 690 approximation and for numerical stability \citep{Cox1987, 691 Griffies_Bk04}. The bound chosen in \NEMO is applied to each 692 component of the slope separately andhas a value of $1/100$ in the ocean interior.640 As discussed in \autoref{subsec:LDF_slp_iso}, 641 iso-neutral slopes relative to geopotentials must be bounded everywhere, 642 both for consistency with the small-slope approximation and for numerical stability \citep{Cox1987, Griffies_Bk04}. 643 The bound chosen in \NEMO is applied to each component of the slope separately and 644 has a value of $1/100$ in the ocean interior. 693 645 %, ramping linearly down above 70~m depth to zero at the surface 694 It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to 695 geopotentials (here the $\sigma_i$ are the slopes of the coordinate surfaces relative to 696 geopotentials) \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate 697 surfaces, so we require 646 It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to geopotentials 647 (here the $\sigma_i$ are the slopes of the coordinate surfaces relative to geopotentials) 648 \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate surfaces, so we require 698 649 \begin{equation*} 699 650 |\tilde{r}_i|\leq \tilde{r}_\mathrm{max}=0.01. … … 701 652 and then recalculate the slopes $r_i$ relative to coordinates. 702 653 Each individual triad slope 703 \begin{equation} 704 \label{eq:Rtilde} 705 _i^k\tilde{\mathbb{R}}_{i_p}^{k_p} = {}_i^k\mathbb{R}_{i_p}^{k_p} + \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}} 706 \end{equation} 707 is limited like this and then the corresponding 708 $_i^k\mathbb{R}_{i_p}^{k_p} $ are recalculated and combined to form the fluxes. 709 Note that where the slopes have been limited, there is now a non-zero 710 iso-neutral density flux that drives dianeutral mixing. In particular this iso-neutral density flux 711 is always downwards, and so acts to reduce gravitational potential energy. 654 \begin{equation} 655 \label{eq:Rtilde} 656 _i^k\tilde{\mathbb{R}}_{i_p}^{k_p} = {}_i^k\mathbb{R}_{i_p}^{k_p} + \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}} 657 \end{equation} 658 is limited like this and then the corresponding $_i^k\mathbb{R}_{i_p}^{k_p} $ are recalculated and 659 combined to form the fluxes. 660 Note that where the slopes have been limited, there is now a non-zero iso-neutral density flux that 661 drives dianeutral mixing. 662 In particular this iso-neutral density flux is always downwards, 663 and so acts to reduce gravitational potential energy. 712 664 713 665 \subsection{Tapering within the surface mixed layer}\label{sec:taper} 714 Additional tapering of the iso-neutral fluxes is necessary within the 715 surface mixed layer. When the Griffies triads are used, we offer two 716 options for this. 666 Additional tapering of the iso-neutral fluxes is necessary within the surface mixed layer. 667 When the Griffies triads are used, we offer two options for this. 717 668 718 669 \subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:lintaper} 719 This is the option activated by the default choice 720 \np{ln\_triad\_iso}\forcode{ = .false.}. Slopes $\tilde{r}_i$ relative to 721 geopotentials are tapered linearly from their value immediately below the mixed layer to zero at the 722 surface, as described in option (c) of \autoref{fig:eiv_slp}, to values 670 This is the option activated by the default choice \np{ln\_triad\_iso}\forcode{ = .false.}. 671 Slopes $\tilde{r}_i$ relative to geopotentials are tapered linearly from their value immediately below 672 the mixed layer to zero at the surface, as described in option (c) of \autoref{fig:eiv_slp}, to values 723 673 \begin{subequations} 724 674 \begin{equation} 725 \label{eq:rmtilde}726 727 -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for } z>-h,675 \label{eq:rmtilde} 676 \rMLt = 677 -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for } z>-h, 728 678 \end{equation} 729 and then the $r_i$ relative to vertical coordinate surfaces are appropriately 730 adjusted to 679 and then the $r_i$ relative to vertical coordinate surfaces are appropriately adjusted to 731 680 \begin{equation} 732 \label{eq:rm}733 \rML =\rMLt -\sigma_i \quad \text{ for } z>-h.681 \label{eq:rm} 682 \rML =\rMLt -\sigma_i \quad \text{ for } z>-h. 734 683 \end{equation} 735 684 \end{subequations} … … 744 693 \end{equation} 745 694 746 This slope tapering gives a natural connection between tracer in the 747 mixed-layer and in isopycnal layers immediately below, in the 748 thermocline. It is consistent with the way the $\tilde{r}_i$ are 749 tapered within the mixed layer (see \autoref{sec:taperskew} below) 750 so as to ensure a uniform GM eddy-induced velocity throughout the 751 mixed layer. However, it gives a downwards density flux and so acts so 752 as to reduce potential energy in the same way as does the slope 753 limiting discussed above in \autoref{sec:limit}. 695 This slope tapering gives a natural connection between tracer in the mixed-layer and 696 in isopycnal layers immediately below, in the thermocline. 697 It is consistent with the way the $\tilde{r}_i$ are tapered within the mixed layer 698 (see \autoref{sec:taperskew} below) so as to ensure a uniform GM eddy-induced velocity throughout the mixed layer. 699 However, it gives a downwards density flux and so acts so as to reduce potential energy in the same way as 700 does the slope limiting discussed above in \autoref{sec:limit}. 754 701 755 As in \autoref{sec:limit} above, the tapering 756 \autoref{eq:rmtilde} is applied separately to each triad 757 $_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the 758 $_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted. For clarity, we assume 759 $z$-coordinates in the following; the conversion from 760 $\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as described 761 above by \autoref{eq:Rtilde}. 702 As in \autoref{sec:limit} above, the tapering \autoref{eq:rmtilde} is applied separately to 703 each triad $_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the $_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted. 704 For clarity, we assume $z$-coordinates in the following; 705 the conversion from $\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as 706 described above by \autoref{eq:Rtilde}. 762 707 \begin{enumerate} 763 \item Mixed-layer depth is defined so as to avoid including regions of weak 764 vertical stratification in the slope definition. 765 At each $i,j$ (simplified to $i$ in 766 \autoref{fig:MLB_triad}), we define the mixed-layer by setting 767 the vertical index of the tracer point immediately below the mixed 768 layer, $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) 769 such that the potential density 770 ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, where $i,k_{10}$ is 771 the tracer gridbox within which the depth reaches 10~m. See the left 772 side of \autoref{fig:MLB_triad}. We use the $k_{10}$-gridbox 773 instead of the surface gridbox to avoid problems e.g.\ with thin 774 daytime mixed-layers. Currently we use the same 775 $\Delta\rho_c=0.01\;\mathrm{kg\:m^{-3}}$ for ML triad tapering as is 776 used to output the diagnosed mixed-layer depth 777 $h_{\mathrm{ML}}=|z_{W}|_{k_{\mathrm{ML}}+1/2}$, the depth of the $w$-point 778 above the $i,k_{\mathrm{ML}}$ tracer point. 779 780 \item We define `basal' triad slopes 781 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ as the slopes 782 of those triads whose vertical `arms' go down from the 783 $i,k_{\mathrm{ML}}$ tracer point to the $i,k_{\mathrm{ML}}-1$ tracer point 784 below. This is to ensure that the vertical density gradients 785 associated with these basal triad slopes 786 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are 787 representative of the thermocline. The four basal triads defined in the bottom part 788 of \autoref{fig:MLB_triad} are then 708 \item 709 Mixed-layer depth is defined so as to avoid including regions of weak vertical stratification in 710 the slope definition. 711 At each $i,j$ (simplified to $i$ in \autoref{fig:MLB_triad}), 712 we define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer, 713 $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that 714 the potential density ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, 715 where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m. 716 See the left side of \autoref{fig:MLB_triad}. 717 We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems e.g.\ with thin daytime mixed-layers. 718 Currently we use the same $\Delta\rho_c=0.01\;\mathrm{kg\:m^{-3}}$ for ML triad tapering as is used to 719 output the diagnosed mixed-layer depth $h_{\mathrm{ML}}=|z_{W}|_{k_{\mathrm{ML}}+1/2}$, 720 the depth of the $w$-point above the $i,k_{\mathrm{ML}}$ tracer point. 721 \item 722 We define `basal' triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ as 723 the slopes of those triads whose vertical `arms' go down from the $i,k_{\mathrm{ML}}$ tracer point to 724 the $i,k_{\mathrm{ML}}-1$ tracer point below. 725 This is to ensure that the vertical density gradients associated with 726 these basal triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are representative of the thermocline. 727 The four basal triads defined in the bottom part of \autoref{fig:MLB_triad} are then 789 728 \begin{align} 790 729 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &= … … 795 734 {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}. \notag 796 735 \end{align} 797 The vertical flux associated with each of these triads passes through the $w$-point 798 $i,k_{\mathrm{ML}}-1/2$ lying \emph{below} the $i,k_{\mathrm{ML}}$ tracer point, 799 so it is this depth 736 The vertical flux associated with each of these triads passes through 737 the $w$-point $i,k_{\mathrm{ML}}-1/2$ lying \emph{below} the $i,k_{\mathrm{ML}}$ tracer point, so it is this depth 800 738 \begin{equation} 801 739 \label{eq:zbase} 802 740 {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2} 803 741 \end{equation} 804 (one gridbox deeper than the 805 diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper 806 the slopes in \autoref{eq:rmtilde}. 807 \item Finally, we calculate the adjusted triads 808 ${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within the mixed 809 layer, by multiplying the appropriate 810 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ by the ratio of 811 the depth of the $w$-point ${z_w}_{k+k_p}$ to ${z_{\mathrm{base}}}_{\,i}$. For 812 instance the green triad centred on $i,k$ 742 one gridbox deeper than the diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper the slopes in 743 \autoref{eq:rmtilde}. 744 \item 745 Finally, we calculate the adjusted triads ${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within 746 the mixed layer, by multiplying the appropriate ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ by 747 the ratio of the depth of the $w$-point ${z_w}_{k+k_p}$ to ${z_{\mathrm{base}}}_{\,i}$. 748 For instance the green triad centred on $i,k$ 813 749 \begin{align} 814 750 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,1/2}^{-1/2} &= … … 824 760 \begin{figure}[h] 825 761 % \fcapside { 826 \caption{\protect\label{fig:MLB_triad} Definition of 827 mixed-layer depth and calculation of linearly tapered 828 triads. The figure shows a water column at a given $i,j$ 829 (simplified to $i$), with the ocean surface at the top. Tracer points are denoted by 830 bullets, and black lines the edges of the tracer cells; $k$ 831 increases upwards. \newline 832 \hspace{5 em}We define the mixed-layer by setting the vertical index 833 of the tracer point immediately below the mixed layer, 834 $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) 835 such that ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, 836 where $i,k_{10}$ is the tracer gridbox within which the depth 837 reaches 10~m. We calculate the triad slopes within the mixed 838 layer by linearly tapering them from zero (at the surface) to 839 the `basal' slopes, the slopes of the four triads passing through the 840 $w$-point $i,k_{\mathrm{ML}}-1/2$ (blue square), 841 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$. Triads with 842 different $i_p,k_p$, denoted by different colours, (e.g. the green 843 triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 762 \caption{\protect\label{fig:MLB_triad} 763 Definition of mixed-layer depth and calculation of linearly tapered triads. 764 The figure shows a water column at a given $i,j$ (simplified to $i$), with the ocean surface at the top. 765 Tracer points are denoted by bullets, and black lines the edges of the tracer cells; 766 $k$ increases upwards. \newline 767 \hspace{5 em} 768 We define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer, 769 $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that 770 ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, 771 where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m. 772 We calculate the triad slopes within the mixed layer by linearly tapering them from zero 773 (at the surface) to the `basal' slopes, 774 the slopes of the four triads passing through the $w$-point $i,k_{\mathrm{ML}}-1/2$ (blue square), 775 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$. 776 Triads with different $i_p,k_p$, denoted by different colours, 777 (e.g. the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 844 778 %} 845 779 {\includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads}} … … 849 783 \subsubsection{Additional truncation of skew iso-neutral flux components} 850 784 \label{subsec:Gerdes-taper} 851 The alternative option is activated by setting \np{ln\_triad\_iso} = 852 true. This retains the same tapered slope $\rML$ described above for the 853 calculation of the $_{33}$ term of the iso-neutral diffusion tensor (the 854 vertical tracer flux driven by vertical tracer gradients), but 855 replaces the $\rML$ in the skew term by 785 The alternative option is activated by setting \np{ln\_triad\_iso} = true. 786 This retains the same tapered slope $\rML$ described above for the calculation of the $_{33}$ term of 787 the iso-neutral diffusion tensor (the vertical tracer flux driven by vertical tracer gradients), 788 but replaces the $\rML$ in the skew term by 856 789 \begin{equation} 857 790 \label{eq:rm*} … … 868 801 \end{equation} 869 802 This operator 870 \footnote{ To ensure good behaviour where horizontal density871 gradients are weak, we in fact follow \citet{Gerdes1991} and set872 $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$.} 873 then has the property it gives no vertical density flux, and so does 874 not change the potential energy.875 This approach is similar to multiplying the iso-neutral diffusion876 coefficient by $\tilde{r}_{\mathrm{max}}^{-2}\tilde{r}_i^{-2}$ for steep 877 slopes,as suggested by \citet{Gerdes1991} (see also \citet{Griffies_Bk04}).803 \footnote{ 804 To ensure good behaviour where horizontal density gradients are weak, 805 we in fact follow \citet{Gerdes1991} and 806 set $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$.} 807 then has the property it gives no vertical density flux, and so does not change the potential energy. 808 This approach is similar to multiplying the iso-neutral diffusion coefficient by 809 $\tilde{r}_{\mathrm{max}}^{-2}\tilde{r}_i^{-2}$ for steep slopes, 810 as suggested by \citet{Gerdes1991} (see also \citet{Griffies_Bk04}). 878 811 Again it is applied separately to each triad $_i^k\mathbb{R}_{i_p}^{k_p}$ 879 812 880 In practice, this approach gives weak vertical tracer fluxes through 881 the mixed-layer, as well as vanishing density fluxes. While it is 882 theoretically advantageous that it does not change the potential 883 energy, it may give a discontinuity between the 884 fluxes within the mixed-layer (purely horizontal) and just below (along 885 iso-neutral surfaces). 813 In practice, this approach gives weak vertical tracer fluxes through the mixed-layer, 814 as well as vanishing density fluxes. 815 While it is theoretically advantageous that it does not change the potential energy, 816 it may give a discontinuity between the fluxes within the mixed-layer (purely horizontal) and 817 just below (along iso-neutral surfaces). 886 818 % This may give strange looking results, 887 819 % particularly where the mixed-layer depth varies strongly laterally. … … 893 825 \subsection{Continuous skew flux formulation}\label{sec:continuous-skew-flux} 894 826 895 When Gent and McWilliams's [1990] diffusion is used, 896 an additional advection term is added. The associated velocity is the so called 897 eddy induced velocity, the formulation of which depends on the slopes of iso- 898 neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used 899 here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo} 900 is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 901 + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 827 When Gent and McWilliams's [1990] diffusion is used, an additional advection term is added. 828 The associated velocity is the so called eddy induced velocity, 829 the formulation of which depends on the slopes of iso-neutral surfaces. 830 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 831 $i.e.$ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 832 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 902 833 903 834 The eddy induced velocity is given by: … … 919 850 \end{equation} 920 851 \end{subequations} 921 with $A_{e}$ the eddy induced velocity coefficient, and $\tilde{r}_1$ and $\tilde{r}_2$ the slopes between the iso-neutral and the geopotential surfaces. 922 923 The traditional way to implement this additional advection is to add 924 it to the Eulerian velocity prior to computing the tracer 925 advection. This is implemented if \key{traldf\_eiv} is set in the 926 default implementation, where \np{ln\_traldf\_triad} is set 927 false. This allows us to take advantage of all the advection schemes 928 offered for the tracers (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ 929 order advection scheme. This is particularly useful for passive 930 tracers where \emph{positivity} of the advection scheme is of 931 paramount importance. 932 933 However, when \np{ln\_traldf\_triad} is set true, \NEMO instead 934 implements eddy induced advection according to the so-called skew form 935 \citep{Griffies_JPO98}. It is based on a transformation of the advective fluxes 936 using the non-divergent nature of the eddy induced velocity. 937 For example in the (\textbf{i},\textbf{k}) plane, the tracer advective 938 fluxes per unit area in $ijk$ space can be 939 transformed as follows: 852 with $A_{e}$ the eddy induced velocity coefficient, 853 and $\tilde{r}_1$ and $\tilde{r}_2$ the slopes between the iso-neutral and the geopotential surfaces. 854 855 The traditional way to implement this additional advection is to add it to the Eulerian velocity prior to 856 computing the tracer advection. 857 This is implemented if \key{traldf\_eiv} is set in the default implementation, 858 where \np{ln\_traldf\_triad} is set false. 859 This allows us to take advantage of all the advection schemes offered for the tracers 860 (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme. 861 This is particularly useful for passive tracers where 862 \emph{positivity} of the advection scheme is of paramount importance. 863 864 However, when \np{ln\_traldf\_triad} is set true, 865 \NEMO instead implements eddy induced advection according to the so-called skew form \citep{Griffies_JPO98}. 866 It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity. 867 For example in the (\textbf{i},\textbf{k}) plane, 868 the tracer advective fluxes per unit area in $ijk$ space can be transformed as follows: 940 869 \begin{flalign*} 941 870 \begin{split} … … 962 891 \end{split} 963 892 \end{flalign*} 964 and since the eddy induced velocity field is non-divergent, we end up with the skew965 form of the eddy induced advective fluxes per unit area in $ijk$ space:893 and since the eddy induced velocity field is non-divergent, 894 we end up with the skew form of the eddy induced advective fluxes per unit area in $ijk$ space: 966 895 \begin{equation} \label{eq:eiv_skew_ijk} 967 896 \textbf{F}_\mathrm{eiv}^T = \begin{pmatrix} … … 979 908 \end{split} 980 909 \end{equation} 981 Note that \autoref{eq:eiv_skew_physical} takes the same form whatever the982 vertical coordinate, though of course the slopes 983 $\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:eiv_psi} are relative togeopotentials.984 The tendency associated with eddy induced velocity is then simply the convergence 985 of the fluxes(\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so910 Note that \autoref{eq:eiv_skew_physical} takes the same form whatever the vertical coordinate, 911 though of course the slopes $\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:eiv_psi} are relative to 912 geopotentials. 913 The tendency associated with eddy induced velocity is then simply the convergence of the fluxes 914 (\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so 986 915 \begin{equation} \label{eq:skew_eiv_conv} 987 916 \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 } \left[ … … 992 921 + e_{1} \psi_2 \partial_j T \right) \right] 993 922 \end{equation} 994 It naturally conserves the tracer content, as it is expressed in flux 995 form. Since it has the same divergence as the advective form it also 996 preserves the tracer variance. 923 It naturally conserves the tracer content, as it is expressed in flux form. 924 Since it has the same divergence as the advective form it also preserves the tracer variance. 997 925 998 926 \subsection{Discrete skew flux formulation} 999 The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}), like the off-diagonal terms1000 (\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor, are best 1001 expressed in terms of the triad slopes, as in \autoref{fig:ISO_triad} 1002 and (\autoref{eq:i13}, \autoref{eq:i31}); but now in terms of the triad slopes 1003 $\tilde{\mathbb{R}}$ relative to geopotentials instead of the 1004 $\mathbb{R}$ relative to coordinate surfaces. The discrete form of 1005 \autoref{eq:eiv_skew_ijk} using the slopes \autoref{eq:R} and927 The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}), 928 like the off-diagonal terms (\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor, 929 are best expressed in terms of the triad slopes, as in \autoref{fig:ISO_triad} and 930 (\autoref{eq:i13}, \autoref{eq:i31}); 931 but now in terms of the triad slopes $\tilde{\mathbb{R}}$ relative to geopotentials instead of 932 the $\mathbb{R}$ relative to coordinate surfaces. 933 The discrete form of \autoref{eq:eiv_skew_ijk} using the slopes \autoref{eq:R} and 1006 934 defining $A_e$ at $T$-points is then given by: 1007 935 … … 1017 945 \end{pmatrix}, 1018 946 \end{flalign} 1019 where the skew flux in the $i$-direction associated with a given 1020 triad is (\autoref{eq:latflux-triad},\autoref{eq:triadfluxu}):947 where the skew flux in the $i$-direction associated with a given triad is (\autoref{eq:latflux-triad}, 948 \autoref{eq:triadfluxu}): 1021 949 \begin{align} 1022 950 \label{eq:skewfluxu} … … 1034 962 \end{subequations} 1035 963 1036 Such a discretisation is consistent with the iso-neutral 1037 operator as it uses the same definition for the slopes. It also 1038 ensures the following two key properties. 964 Such a discretisation is consistent with the iso-neutral operator as it uses the same definition for the slopes. 965 It also ensures the following two key properties. 1039 966 1040 967 \subsubsection{No change in tracer variance} 1041 The discretization conserves tracer variance, $i.e.$ it does not 1042 include a diffusive component but is a `pure' advection term. This can 1043 be seen 1044 %either from Appendix \autoref{apdx:eiv_skew} or 1045 by considering the 1046 fluxes associated with a given triad slope 1047 $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. For, following 1048 \autoref{subsec:variance} and \autoref{eq:dvar_iso_i}, the 1049 associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ 1050 drives a net rate of change of variance, summed over the two 1051 $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 968 The discretization conserves tracer variance, $i.e.$ it does not include a diffusive component but is a `pure' advection term. 969 This can be seen %either from Appendix \autoref{apdx:eiv_skew} or 970 by considering the fluxes associated with a given triad slope $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. 971 For, following \autoref{subsec:variance} and \autoref{eq:dvar_iso_i}, 972 the associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ drives a net rate of change of variance, 973 summed over the two $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 1052 974 \begin{equation} 1053 975 \label{eq:dvar_eiv_i} 1054 976 _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], 1055 977 \end{equation} 1056 while the associated vertical skew-flux gives a variance change summed over the1057 $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of978 while the associated vertical skew-flux gives a variance change summed over 979 the $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 1058 980 \begin{equation} 1059 981 \label{eq:dvar_eiv_k} 1060 982 _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 1061 983 \end{equation} 1062 Inspection of the definitions (\autoref{eq:skewfluxu}, \autoref{eq:skewfluxw}) 1063 shows that these two variance changes (\autoref{eq:dvar_eiv_i}, \autoref{eq:dvar_eiv_k}) 1064 sum to zero. Hence the two fluxes associated with each triad make no 1065 net contribution to the variance budget. 984 Inspection of the definitions (\autoref{eq:skewfluxu}, \autoref{eq:skewfluxw}) shows that 985 these two variance changes (\autoref{eq:dvar_eiv_i}, \autoref{eq:dvar_eiv_k}) sum to zero. 986 Hence the two fluxes associated with each triad make no net contribution to the variance budget. 1066 987 1067 988 \subsubsection{Reduction in gravitational PE} 1068 The vertical density flux associated with the vertical skew-flux 1069 always has the same sign as the vertical density gradient; thus, so 1070 long as the fluid is stable (the vertical density gradient is 1071 negative) the vertical density flux is negative (downward) and hence 1072 reduces the gravitational PE. 989 The vertical density flux associated with the vertical skew-flux always has the same sign as 990 the vertical density gradient; 991 thus, so long as the fluid is stable (the vertical density gradient is negative) 992 the vertical density flux is negative (downward) and hence reduces the gravitational PE. 1073 993 1074 994 For the change in gravitational PE driven by the $k$-flux is … … 1091 1011 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1092 1012 \end{align} 1093 using the definition of the triad slope $\rtriad{R}$, 1094 \autoref{eq:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+ 1095 \beta_i^k\delta_{i+ i_p}[S^k]$ in terms of $-\alpha_i^k \delta_{k+ 1096 k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$. 1013 using the definition of the triad slope $\rtriad{R}$, \autoref{eq:R} to 1014 express $-\alpha _i^k\delta_{i+ i_p}[T^k]+\beta_i^k\delta_{i+ i_p}[S^k]$ in terms of 1015 $-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$. 1097 1016 1098 1017 Where the coordinates slope, the $i$-flux gives a PE change … … 1108 1027 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1109 1028 \end{multline} 1110 (using \autoref{eq:skewfluxu}) and so the total PE change 1111 \autoref{eq: vert_densityPE} + \autoref{eq:lat_densityPE} associated with the triad fluxes is1029 (using \autoref{eq:skewfluxu}) and so the total PE change \autoref{eq:vert_densityPE} + 1030 \autoref{eq:lat_densityPE} associated with the triad fluxes is 1112 1031 \begin{multline} 1113 1032 \label{eq:tot_densityPE} … … 1122 1041 1123 1042 \subsection{Treatment of the triads at the boundaries}\label{sec:skew_bdry} 1124 Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes 1125 are masked at the boundaries in exactly the same way as are the triad 1126 slopes \rtriad{R} used for the iso-neutral diffusive fluxes, as 1127 described in \autoref{sec:iso_bdry} and 1128 \autoref{fig:bdry_triads}. Thus surface layer triads 1129 $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are 1130 masked, and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ 1131 and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the 1132 $i,k+1$ or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ 1133 $u$-point is masked. The namelist parameter \np{ln\_botmix\_triad} has 1134 no effect on the eddy-induced skew-fluxes. 1043 Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes are masked at the boundaries 1044 in exactly the same way as are the triad slopes \rtriad{R} used for the iso-neutral diffusive fluxes, 1045 as described in \autoref{sec:iso_bdry} and \autoref{fig:bdry_triads}. 1046 Thus surface layer triads $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are masked, 1047 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 1048 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point is masked. 1049 The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 1135 1050 1136 1051 \subsection{Limiting of the slopes within the interior}\label{sec:limitskew} 1137 Presently, the iso-neutral slopes $\tilde{r}_i$ relative 1138 to geopotentials are limited to be less than $1/100$, exactly as in 1139 calculating the iso-neutral diffusion, \S \autoref{sec:limit}. Each 1140 individual triad \rtriadt{R} is so limited. 1052 Presently, the iso-neutral slopes $\tilde{r}_i$ relative to geopotentials are limited to be less than $1/100$, 1053 exactly as in calculating the iso-neutral diffusion, \S \autoref{sec:limit}. 1054 Each individual triad \rtriadt{R} is so limited. 1141 1055 1142 1056 \subsection{Tapering within the surface mixed layer}\label{sec:taperskew} 1143 The slopes $\tilde{r}_i$ relative to 1144 geopotentials (and thus the individual triads \rtriadt{R}) are always tapered linearly from their value immediately below the mixed layer to zero at the 1145 surface \autoref{eq:rmtilde}, as described in \autoref{sec:lintaper}. This is 1146 option (c) of \autoref{fig:eiv_slp}. This linear tapering for the 1147 slopes used to calculate the eddy-induced fluxes is 1148 unaffected by the value of \np{ln\_triad\_iso}. 1149 1150 The justification for this linear slope tapering is that, for $A_e$ 1151 that is constant or varies only in the horizontal (the most commonly 1152 used options in \NEMO: see \autoref{sec:LDF_coef}), it is 1153 equivalent to a horizontal eiv (eddy-induced velocity) that is uniform 1154 within the mixed layer \autoref{eq:eiv_v}. This ensures that the 1155 eiv velocities do not restratify the mixed layer \citep{Treguier1997, 1156 Danabasoglu_al_2008}. Equivantly, in terms 1157 of the skew-flux formulation we use here, the 1158 linear slope tapering within the mixed-layer gives a linearly varying 1159 vertical flux, and so a tracer convergence uniform in depth (the 1160 horizontal flux convergence is relatively insignificant within the mixed-layer). 1057 The slopes $\tilde{r}_i$ relative to geopotentials (and thus the individual triads \rtriadt{R}) 1058 are always tapered linearly from their value immediately below the mixed layer to zero at the surface 1059 \autoref{eq:rmtilde}, as described in \autoref{sec:lintaper}. 1060 This is option (c) of \autoref{fig:eiv_slp}. 1061 This linear tapering for the slopes used to calculate the eddy-induced fluxes is unaffected by 1062 the value of \np{ln\_triad\_iso}. 1063 1064 The justification for this linear slope tapering is that, for $A_e$ that is constant or varies only in 1065 the horizontal (the most commonly used options in \NEMO: see \autoref{sec:LDF_coef}), 1066 it is equivalent to a horizontal eiv (eddy-induced velocity) that is uniform within the mixed layer 1067 \autoref{eq:eiv_v}. 1068 This ensures that the eiv velocities do not restratify the mixed layer \citep{Treguier1997,Danabasoglu_al_2008}. 1069 Equivantly, in terms of the skew-flux formulation we use here, 1070 the linear slope tapering within the mixed-layer gives a linearly varying vertical flux, 1071 and so a tracer convergence uniform in depth 1072 (the horizontal flux convergence is relatively insignificant within the mixed-layer). 1161 1073 1162 1074 \subsection{Streamfunction diagnostics}\label{sec:sfdiag} 1163 Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, diagnosed 1164 mean eddy-induced velocities are output. Each time step, 1165 streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at 1166 $uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ 1167 (integer $i$, integer +1/2 $j$, integer +1/2 $k$) points (see Table 1168 \autoref{tab:cell}) respectively. We follow \citep{Griffies_Bk04} and 1169 calculate the streamfunction at a given $uw$-point from the 1170 surrounding four triads according to: 1075 Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, 1076 diagnosed mean eddy-induced velocities are output. 1077 Each time step, streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at 1078 $uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ (integer $i$, integer +1/2 $j$, integer +1/2 $k$) 1079 points (see Table \autoref{tab:cell}) respectively. 1080 We follow \citep{Griffies_Bk04} and calculate the streamfunction at a given $uw$-point from 1081 the surrounding four triads according to: 1171 1082 \begin{equation} 1172 1083 \label{eq:sfdiagi} … … 1175 1086 \end{equation} 1176 1087 The streamfunction $\psi_1$ is calculated similarly at $vw$ points. 1177 The eddy-induced velocities are then calculated from the 1178 straightforward discretisation of \autoref{eq:eiv_v}: 1088 The eddy-induced velocities are then calculated from the straightforward discretisation of \autoref{eq:eiv_v}: 1179 1089 \begin{equation}\label{eq:eiv_v_discrete} 1180 1090 \begin{split} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex
r10146 r10354 15 15 $\ $\newline % force a new line 16 16 17 The ASM code adds the functionality to apply increments to the model variables: 18 temperature, salinity,sea surface height, velocity and sea ice concentration.19 These are read into the model from a NetCDF file which may be produced by separate data 20 assimilation code. The code can also output model background fields which are used 21 as an input to data assimilation code. This is all controlled by the namelist 22 \textit{\ngn{nam\_asminc} }. There is a brief description of all the namelist options 23 provided.To build the ASM code \key{asminc} must be set.17 The ASM code adds the functionality to apply increments to the model variables: temperature, salinity, 18 sea surface height, velocity and sea ice concentration. 19 These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 20 The code can also output model background fields which are used as an input to data assimilation code. 21 This is all controlled by the namelist \textit{\ngn{nam\_asminc} }. 22 There is a brief description of all the namelist options provided. 23 To build the ASM code \key{asminc} must be set. 24 24 25 25 %=============================================================== … … 28 28 \label{sec:ASM_DI} 29 29 30 Direct initialization (DI) refers to the instantaneous correction 31 of the model background state usingthe analysis increment.30 Direct initialization (DI) refers to the instantaneous correction of the model background state using 31 the analysis increment. 32 32 DI is used when \np{ln\_asmdin} is set to true. 33 33 … … 36 36 37 37 Rather than updating the model state directly with the analysis increment, 38 it may be preferable to introduce the increment gradually into the ocean 39 m odel in order to minimize spurious adjustment processes. This technique40 is referred to as Incremental Analysis Updates (IAU) \citep{Bloom_al_MWR96}.38 it may be preferable to introduce the increment gradually into the ocean model in order to 39 minimize spurious adjustment processes. 40 This technique is referred to as Incremental Analysis Updates (IAU) \citep{Bloom_al_MWR96}. 41 41 IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI. 42 42 IAU is used when \np{ln\_asmiau} is set to true. 43 43 44 With IAU, the model state trajectory ${\bf x}$ in the assimilation window 45 ($t_{0} \leq t_{i} \leq t_{N}$) 46 is corrected by adding the analysis increments for temperature, salinity, horizontal velocity and SSH 47 as additional tendency terms to the prognostic equations: 44 With IAU, the model state trajectory ${\bf x}$ in the assimilation window ($t_{0} \leq t_{i} \leq t_{N}$) 45 is corrected by adding the analysis increments for temperature, salinity, horizontal velocity and SSH as 46 additional tendency terms to the prognostic equations: 48 47 \begin{eqnarray} \label{eq:wa_traj_iau} 49 48 {\bf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\bf x}^{b}(t_{0})] 50 49 \; + \; F_{i} \delta \tilde{\bf x}^{a} 51 50 \end{eqnarray} 52 where $F_{i}$ is a weighting function for applying the increments $\delta 53 \tilde{\bf x}^{a}$ defined such that $\sum_{i=1}^{N} F_{i}=1$. 54 ${\bf x}^b$ denotes the model initial state and ${\bf x}^a$ is the model state 55 after the increments are applied. 51 where $F_{i}$ is a weighting function for applying the increments $\delta\tilde{\bf x}^{a}$ defined such that 52 $\sum_{i=1}^{N} F_{i}=1$. 53 ${\bf x}^b$ denotes the model initial state and ${\bf x}^a$ is the model state after the increments are applied. 56 54 To control the adjustment time of the model to the increment, 57 the increment can be applied over an arbitrary sub-window, 58 $t_{m} \leq t_{i} \leq t_{n}$, of the main assimilation window, 59 where $t_{0} \leq t_{m} \leq t_{i}$ and $t_{i} \leq t_{n} \leq t_{N}$, 55 the increment can be applied over an arbitrary sub-window, $t_{m} \leq t_{i} \leq t_{n}$, 56 of the main assimilation window, where $t_{0} \leq t_{m} \leq t_{i}$ and $t_{i} \leq t_{n} \leq t_{N}$. 60 57 Typically the increments are spread evenly over the full window. 61 58 In addition, two different weighting functions have been implemented. … … 70 67 \end{eqnarray} 71 68 where $M = m-n$. 72 The second function employs peaked hat-like weights in order to give maximum 73 weight in the centre of the sub-window, with the weighting reduced 74 linearly to a small value at the window end-points: 69 The second function employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window, 70 with the weighting reduced linearly to a small value at the window end-points: 75 71 \begin{eqnarray} \label{eq:F2_i} 76 72 F^{(2)}_{i} … … 83 79 \end{eqnarray} 84 80 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 85 The weights described by \autoref{eq:F2_i} provide a 86 smoother transition of the analysis trajectory from one assimilation cycle 87 to the next than that described by \autoref{eq:F1_i}. 81 The weights described by \autoref{eq:F2_i} provide a smoother transition of the analysis trajectory from 82 one assimilation cycle to the next than that described by \autoref{eq:F1_i}. 88 83 89 84 %========================================================================== … … 92 87 \label{sec:ASM_div_dmp} 93 88 94 The velocity increments may be initialized by the iterative application of 95 a divergence damping operator. In iteration step $n$ new estimates of 96 velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 89 The velocity increments may be initialized by the iterative application of a divergence damping operator. 90 In iteration step $n$ new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 97 91 \begin{equation} \label{eq:asm_dmp} 98 92 \left\{ \begin{aligned} … … 110 104 +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 111 105 \end{equation} 112 By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered 113 in each iteration, and the vorticity is left unchanged. In the presence of coastal boundaries 114 with zero velocity increments perpendicular to the coast the divergence is strongly damped. 115 This type of the initialisation reduces the vertical velocity magnitude and alleviates the 116 problem of the excessive unphysical vertical mixing in the first steps of the model 117 integration \citep{Talagrand_JAS72, Dobricic_al_OS07}. Diffusion coefficients are defined as 118 $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. The divergence damping is activated by 119 assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist a value greater than zero. 120 By choosing this value to be of the order of 100 the increments in the vertical velocity will 121 be significantly reduced. 106 By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered in each iteration, 107 and the vorticity is left unchanged. 108 In the presence of coastal boundaries with zero velocity increments perpendicular to the coast 109 the divergence is strongly damped. 110 This type of the initialisation reduces the vertical velocity magnitude and 111 alleviates the problem of the excessive unphysical vertical mixing in the first steps of the model integration 112 \citep{Talagrand_JAS72, Dobricic_al_OS07}. 113 Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. 114 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist 115 a value greater than zero. 116 By choosing this value to be of the order of 100 the increments in 117 the vertical velocity will be significantly reduced. 122 118 123 119 … … 127 123 \label{sec:ASM_details} 128 124 129 Here we show an example \ngn{namasm} namelist and the header of an example assimilation 130 increments file onthe ORCA2 grid.125 Here we show an example \ngn{namasm} namelist and the header of an example assimilation increments file on 126 the ORCA2 grid. 131 127 132 128 %------------------------------------------namasm----------------------------------------------------- -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_CONFIG.tex
r10146 r10354 18 18 19 19 20 The purpose of this part of the manual is to introduce the \NEMO reference configurations. 21 These configurations are offered as means to explore various numerical and physical options, 22 thus allowing the user to verify that the code is performing in a manner consistent with that 23 we are running. This form of verification is critical as one adopts the code for his or her particular 24 research purposes. The reference configurations also provide a sense for some of the options available 25 in the code,though by no means are all options exercised in the reference configurations.20 The purpose of this part of the manual is to introduce the \NEMO reference configurations. 21 These configurations are offered as means to explore various numerical and physical options, 22 thus allowing the user to verify that the code is performing in a manner consistent with that we are running. 23 This form of verification is critical as one adopts the code for his or her particular research purposes. 24 The reference configurations also provide a sense for some of the options available in the code, 25 though by no means are all options exercised in the reference configurations. 26 26 27 27 %------------------------------------------namcfg---------------------------------------------------- … … 40 40 $\ $\newline 41 41 42 The 1D model option simulates a stand alone water column within the 3D \NEMO system. 43 It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers 44 or a biogeochemical model. It is set up by defining the position of the 1D water column in the grid 42 The 1D model option simulates a stand alone water column within the 3D \NEMO system. 43 It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers or a biogeochemical model. 44 It is set up by defining the position of the 1D water column in the grid 45 45 (see \textit{CONFIG/SHARED/namelist\_ref} ). 46 The 1D model is a very useful tool 47 \textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes ;48 \textit{(b)} to investigate suitable parameterisations of unresolved turbulence (surface wave49 breaking, Langmuir circulation, ...) ; 50 \textit{(c)} to compare the behaviour of different vertical mixing schemes ;51 \textit{(d)} to perform sensitivity studies on the vertical diffusion at a particular point of an ocean domain ;46 The 1D model is a very useful tool 47 \textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes; 48 \textit{(b)} to investigate suitable parameterisations of unresolved turbulence 49 (surface wave breaking, Langmuir circulation, ...); 50 \textit{(c)} to compare the behaviour of different vertical mixing schemes; 51 \textit{(d)} to perform sensitivity studies on the vertical diffusion at a particular point of an ocean domain; 52 52 \textit{(d)} to produce extra diagnostics, without the large memory requirement of the full 3D model. 53 53 54 The methodology is based on the use of the zoom functionality over the smallest possible 55 domain : a 3x3 domain centered on the grid point of interest, 56 with some extra routines. There is no need to define a new mesh, bathymetry, 57 initial state or forcing, since the 1D model will use those of the configuration it is a zoom of. 58 The chosen grid point is set in \textit{\ngn{namcfg}} namelist by setting the \np{jpizoom} and \np{jpjzoom}59 parameters to the indices of the location of the chosen grid point.60 61 The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero, and62 second, the two components of the velocity are moved on a $T$-point.54 The methodology is based on the use of the zoom functionality over the smallest possible domain: 55 a 3x3 domain centered on the grid point of interest, with some extra routines. 56 There is no need to define a new mesh, bathymetry, initial state or forcing, 57 since the 1D model will use those of the configuration it is a zoom of. 58 The chosen grid point is set in \textit{\ngn{namcfg}} namelist by 59 setting the \np{jpizoom} and \np{jpjzoom} parameters to the indices of the location of the chosen grid point. 60 61 The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero, 62 and second, the two components of the velocity are moved on a $T$-point. 63 63 Therefore, defining \key{c1d} changes five main things in the code behaviour: 64 64 \begin{description} 65 \item[(1)] the lateral boundary condition routine (\rou{lbc\_lnk}) set the value of the central column 66 of the 3x3 domain is imposed over the whole domain ; 67 \item[(3)] a call to \rou{lbc\_lnk} is systematically done when reading input data ($i.e.$ in \mdl{iom}) ; 68 \item[(3)] a simplified \rou{stp} routine is used (\rou{stp\_c1d}, see \mdl{step\_c1d} module) in which 69 both lateral tendancy terms and lateral physics are not called ; 70 \item[(4)] the vertical velocity is zero (so far, no attempt at introducing a Ekman pumping velocity 71 has been made) ; 72 \item[(5)] a simplified treatment of the Coriolis term is performed as $U$- and $V$-points are the same 73 (see \mdl{dyncor\_c1d}). 65 \item[(1)] 66 the lateral boundary condition routine (\rou{lbc\_lnk}) set the value of the central column of 67 the 3x3 domain is imposed over the whole domain; 68 \item[(3)] 69 a call to \rou{lbc\_lnk} is systematically done when reading input data ($i.e.$ in \mdl{iom}); 70 \item[(3)] 71 a simplified \rou{stp} routine is used (\rou{stp\_c1d}, see \mdl{step\_c1d} module) in which 72 both lateral tendancy terms and lateral physics are not called; 73 \item[(4)] 74 the vertical velocity is zero 75 (so far, no attempt at introducing a Ekman pumping velocity has been made); 76 \item[(5)] 77 a simplified treatment of the Coriolis term is performed as $U$- and $V$-points are the same 78 (see \mdl{dyncor\_c1d}). 74 79 \end{description} 75 All the relevant \textit{\_c1d} modules can be found in the NEMOGCM/NEMO/OPA\_SRC/C1D directory of 80 All the relevant \textit{\_c1d} modules can be found in the NEMOGCM/NEMO/OPA\_SRC/C1D directory of 76 81 the \NEMO distribution. 77 82 … … 84 89 \label{sec:CFG_orca} 85 90 86 The ORCA family is a series of global ocean configurations that are run together with 87 the LIM sea-ice model (ORCA-LIM) and possibly with PISCES biogeochemical model 88 (ORCA-LIM-PISCES),using various resolutions.89 An appropriate namelist is available in \path{CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg} 90 for ORCA2. 91 The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, this file is available in tar file in the wiki of NEMO: \\91 The ORCA family is a series of global ocean configurations that are run together with 92 the LIM sea-ice model (ORCA-LIM) and possibly with PISCES biogeochemical model (ORCA-LIM-PISCES), 93 using various resolutions. 94 An appropriate namelist is available in \path{CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg} for ORCA2. 95 The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, 96 this file is available in tar file in the wiki of NEMO: \\ 92 97 https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ReferenceConfigurations/ORCA2\_LIM3\_PISCES \\ 93 98 In this namelist\_cfg the name of domain input file is set in \ngn{namcfg} block of namelist. 94 99 95 100 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 96 \begin{figure}[!t] \begin{center} 97 \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 98 \caption{ \protect\label{fig:MISC_ORCA_msh} 99 ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\degN. 100 The two "north pole" are the foci of a series of embedded ellipses (blue curves) 101 which are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes). 102 Then, following \citet{Madec_Imbard_CD96}, the normal to the series of ellipses (red curves) is computed 103 which provide the j-lines of the mesh (pseudo longitudes). } 104 \end{center} \end{figure} 101 \begin{figure}[!t] 102 \begin{center} 103 \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 104 \caption{ \protect\label{fig:MISC_ORCA_msh} 105 ORCA mesh conception. 106 The departure from an isotropic Mercator grid start poleward of 20\degN. 107 The two "north pole" are the foci of a series of embedded ellipses (blue curves) which 108 are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes). 109 Then, following \citet{Madec_Imbard_CD96}, the normal to the series of ellipses (red curves) is computed which 110 provides the j-lines of the mesh (pseudo longitudes). } 111 \end{center} 112 \end{figure} 105 113 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 106 114 … … 111 119 \label{subsec:CFG_orca_grid} 112 120 113 The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}. 114 It allows to construct a global orthogonal curvilinear ocean mesh which has no singularity point inside 121 The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}. 122 It allows to construct a global orthogonal curvilinear ocean mesh which has no singularity point inside 115 123 the computational domain since two north mesh poles are introduced and placed on lands. 116 The method involves defining an analytical set of mesh parallels in the stereographic polar plan, 117 computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere. 118 The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north 119 poles (\autoref{fig:MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in 120 either the mesh lines or the scale factors, or even the scale factor derivatives over the whole 121 ocean domain, as the mesh is not a composite mesh. 122 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 123 \begin{figure}[!tbp] \begin{center} 124 \includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 125 \includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 126 \caption { \protect\label{fig:MISC_ORCA_e1e2} 127 \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and 128 \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) 129 for ORCA 0.5\deg ~mesh. South of 20\degN a Mercator grid is used ($e_1 = e_2$) 130 so that the anisotropy ratio is 1. Poleward of 20\degN, the two "north pole" 131 introduce a weak anisotropy over the ocean areas ($< 1.2$) except in vicinity of Victoria Island 132 (Canadian Arctic Archipelago). } 124 The method involves defining an analytical set of mesh parallels in the stereographic polar plan, 125 computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere. 126 The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north poles 127 (\autoref{fig:MISC_ORCA_msh}). 128 The resulting mesh presents no loss of continuity in either the mesh lines or the scale factors, 129 or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh. 130 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 131 \begin{figure}[!tbp] 132 \begin{center} 133 \includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 134 \includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 135 \caption { \protect\label{fig:MISC_ORCA_e1e2} 136 \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and 137 \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) 138 for ORCA 0.5\deg ~mesh. 139 South of 20\degN a Mercator grid is used ($e_1 = e_2$) so that the anisotropy ratio is 1. 140 Poleward of 20\degN, the two "north pole" introduce a weak anisotropy over the ocean areas ($< 1.2$) except in 141 vicinity of Victoria Island (Canadian Arctic Archipelago). } 133 142 \end{center} \end{figure} 134 143 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 135 144 136 145 137 The method is applied to Mercator grid ($i.e.$ same zonal and meridional grid spacing) poleward 138 of 20\degN, so that the Equator is a mesh line, which provides a better numerical solution 139 for equatorial dynamics. The choice of the series of embedded ellipses (position of the foci and 140 variation of the ellipses) is a compromise between maintaining the ratio of mesh anisotropy 141 ($e_1 / e_2$) close to one in the ocean (especially in area of strong eddy activities such as 142 the Gulf Stream) and keeping the smallest scale factor in the northern hemisphere larger 143 than the smallest one in the southern hemisphere. 144 The resulting mesh is shown in \autoref{fig:MISC_ORCA_msh} and \autoref{fig:MISC_ORCA_e1e2} 145 for a half a degree grid (ORCA\_R05). 146 The smallest ocean scale factor is found in along Antarctica, while the ratio of anisotropy remains close to one except near the Victoria Island 147 in the Canadian Archipelago. 146 The method is applied to Mercator grid ($i.e.$ same zonal and meridional grid spacing) poleward of 20\degN, 147 so that the Equator is a mesh line, which provides a better numerical solution for equatorial dynamics. 148 The choice of the series of embedded ellipses (position of the foci and variation of the ellipses) 149 is a compromise between maintaining the ratio of mesh anisotropy ($e_1 / e_2$) close to one in the ocean 150 (especially in area of strong eddy activities such as the Gulf Stream) and keeping the smallest scale factor in 151 the northern hemisphere larger than the smallest one in the southern hemisphere. 152 The resulting mesh is shown in \autoref{fig:MISC_ORCA_msh} and \autoref{fig:MISC_ORCA_e1e2} for 153 a half a degree grid (ORCA\_R05). 154 The smallest ocean scale factor is found in along Antarctica, 155 while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago. 148 156 149 157 % ------------------------------------------------------------------------------------------------------------- … … 154 162 155 163 156 The NEMO system is provided with five built-in ORCA configurations which differ in the 157 horizontal resolution. The value of the resolution is given by the resolution at the Equator 158 expressed in degrees. Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 159 which sets the grid size and configuration name parameters. The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file (Tab. \autoref{tab:ORCA}). 164 The NEMO system is provided with five built-in ORCA configurations which differ in the horizontal resolution. 165 The value of the resolution is given by the resolution at the Equator expressed in degrees. 166 Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 167 which sets the grid size and configuration name parameters. 168 The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file 169 (Tab. \autoref{tab:ORCA}). 160 170 161 171 … … 176 186 \hline \hline 177 187 \end{tabular} 178 \caption{ \protect\label{tab:ORCA} 179 Domain size of ORCA family configurations.180 The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. }188 \caption{ \protect\label{tab:ORCA} 189 Domain size of ORCA family configurations. 190 The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. } 181 191 \end{center} 182 192 \end{table} … … 184 194 185 195 186 The ORCA\_R2 configuration has the following specificity : starting from a 2\deg~ORCA mesh, 187 local mesh refinements were applied to the Mediterranean, Red, Black and Caspian Seas, 188 so that the resolution is 1\deg \time 1\deg there. A local transformation were also applied 189 with in the Tropics in order to refine the meridional resolution up to 0.5\deg at the Equator. 190 191 The ORCA\_R1 configuration has only a local tropical transformation to refine the meridional 192 resolution up to 1/3\deg~at the Equator. Note that the tropical mesh refinements in ORCA\_R2 193 and R1 strongly increases the mesh anisotropy there. 196 The ORCA\_R2 configuration has the following specificity: starting from a 2\deg~ORCA mesh, 197 local mesh refinements were applied to the Mediterranean, Red, Black and Caspian Seas, 198 so that the resolution is 1\deg \time 1\deg there. 199 A local transformation were also applied with in the Tropics in order to refine the meridional resolution up to 200 0.5\deg at the Equator. 201 202 The ORCA\_R1 configuration has only a local tropical transformation to refine the meridional resolution up to 203 1/3\deg~at the Equator. 204 Note that the tropical mesh refinements in ORCA\_R2 and R1 strongly increases the mesh anisotropy there. 194 205 195 206 The ORCA\_R05 and higher global configurations do not incorporate any regional refinements. 196 207 197 For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, 198 otherwise 46 are used. In the other ORCA configurations, 31 levels are used 208 For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used. 209 In the other ORCA configurations, 31 levels are used 199 210 (see \autoref{tab:orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}). 200 211 201 Only the ORCA\_R2 is provided with all its input files in the \NEMO distribution. 202 It is very similar to that used as part of the climate model developed at IPSL for the 4th IPCC 203 assessment of climate change (Marti et al., 2009). It is also the basis for the \NEMO contribution 204 to the Coordinate Ocean-ice Reference Experiments (COREs) documented in \citet{Griffies_al_OM09}. 205 206 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) 207 in the upper 150m (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 212 Only the ORCA\_R2 is provided with all its input files in the \NEMO distribution. 213 It is very similar to that used as part of the climate model developed at IPSL for the 4th IPCC assessment of 214 climate change (Marti et al., 2009). 215 It is also the basis for the \NEMO contribution to the Coordinate Ocean-ice Reference Experiments (COREs) 216 documented in \citet{Griffies_al_OM09}. 217 218 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) in the upper 150m 219 (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 208 220 The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 209 221 The default forcing uses the boundary forcing from \citet{Large_Yeager_Rep04} (see \autoref{subsec:SBC_blk_core}), 210 which was developed for the purpose of running global coupled ocean-ice simulations 211 without an interactive atmosphere. This \citet{Large_Yeager_Rep04} dataset is available 212 through the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 213 The "normal year" of \citet{Large_Yeager_Rep04} has been chosen of the \NEMO distribution 214 since release v3.3.215 216 ORCA\_R2 pre-defined configuration can also be run with an AGRIF zoom over the Agulhas 217 current area ( \key{agrif} defined) and, by setting the appropriate variables, see \path{CONFIG/SHARED/namelist_ref} 218 a regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations 219 usingsponge layers at open boundaries.222 which was developed for the purpose of running global coupled ocean-ice simulations without 223 an interactive atmosphere. 224 This \citet{Large_Yeager_Rep04} dataset is available through 225 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 226 The "normal year" of \citet{Large_Yeager_Rep04} has been chosen of the \NEMO distribution since release v3.3. 227 228 ORCA\_R2 pre-defined configuration can also be run with an AGRIF zoom over the Agulhas current area 229 (\key{agrif} defined) and, by setting the appropriate variables, see \path{CONFIG/SHARED/namelist_ref}. 230 A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using 231 sponge layers at open boundaries. 220 232 221 233 % ------------------------------------------------------------------------------------------------------------- … … 225 237 \label{sec:CFG_gyre} 226 238 227 The GYRE configuration \citep{Levy_al_OM10} has been built to simulate228 the seasonal cycle of a double-gyre box model. It consists in an idealized domain 229 similar to that used in the studies of \citet{Drijfhout_JPO94} and \citet{Hazeleger_Drijfhout_JPO98, 230 Hazeleger_Drijfhout_JPO99, Hazeleger_Drijfhout_JGR00, Hazeleger_Drijfhout_JPO00}, 231 over which an analytical seasonal forcing is applied. This allows to investigate the232 spontaneous generation of a large number of interacting, transient mesoscale eddies239 The GYRE configuration \citep{Levy_al_OM10} has been built to 240 simulate the seasonal cycle of a double-gyre box model. 241 It consists in an idealized domain similar to that used in the studies of \citet{Drijfhout_JPO94} and 242 \citet{Hazeleger_Drijfhout_JPO98, Hazeleger_Drijfhout_JPO99, Hazeleger_Drijfhout_JGR00, Hazeleger_Drijfhout_JPO00}, 243 over which an analytical seasonal forcing is applied. 244 This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies 233 245 and their contribution to the large scale circulation. 234 246 235 The domain geometry is a closed rectangular basin on the $\beta$-plane centred 236 at $\sim$ 30\degN and rotated by 45\deg, 3180~km long, 2120~km wide 237 and 4~km deep (\autoref{fig:MISC_strait_hand}). 238 The domain is bounded by vertical walls and by a flat bottom. The configuration is 239 meant to represent an idealized North Atlantic or North Pacific basin. 240 The circulation is forced by analytical profiles of wind and buoyancy fluxes. 241 The applied forcings vary seasonally in a sinusoidal manner between winter 242 and summer extrema \citep{Levy_al_OM10}. 243 The wind stress is zonal and its curl changes sign at 22\degN and 36\degN. 244 It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain 245 and a small recirculation gyre in the southern corner. 246 The net heat flux takes the form of a restoring toward a zonal apparent air 247 temperature profile. A portion of the net heat flux which comes from the solar radiation 248 is allowed to penetrate within the water column. 249 The fresh water flux is also prescribed and varies zonally. 250 It is determined such as, at each time step, the basin-integrated flux is zero. 251 The basin is initialised at rest with vertical profiles of temperature and salinity 252 uniformly applied to the whole domain. 253 254 The GYRE configuration is set like an analytical configuration. Through \np{ln\_read\_cfg}\forcode{ = .false.} in \textit{namcfg} namelist defined in the reference configuration \path{CONFIG/GYRE/EXP00/namelist_cfg} anaylitical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. Its horizontal resolution 255 (and thus the size of the domain) is determined by setting \np{nn\_GYRE} in \ngn{namusr\_def}: \\ 247 The domain geometry is a closed rectangular basin on the $\beta$-plane centred at $\sim$ 30\degN and 248 rotated by 45\deg, 3180~km long, 2120~km wide and 4~km deep (\autoref{fig:MISC_strait_hand}). 249 The domain is bounded by vertical walls and by a flat bottom. 250 The configuration is meant to represent an idealized North Atlantic or North Pacific basin. 251 The circulation is forced by analytical profiles of wind and buoyancy fluxes. 252 The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{Levy_al_OM10}. 253 The wind stress is zonal and its curl changes sign at 22\degN and 36\degN. 254 It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain and 255 a small recirculation gyre in the southern corner. 256 The net heat flux takes the form of a restoring toward a zonal apparent air temperature profile. 257 A portion of the net heat flux which comes from the solar radiation is allowed to penetrate within the water column. 258 The fresh water flux is also prescribed and varies zonally. 259 It is determined such as, at each time step, the basin-integrated flux is zero. 260 The basin is initialised at rest with vertical profiles of temperature and salinity uniformly applied to 261 the whole domain. 262 263 The GYRE configuration is set like an analytical configuration. 264 Through \np{ln\_read\_cfg}\forcode{ = .false.} in \textit{namcfg} namelist defined in 265 the reference configuration \path{CONFIG/GYRE/EXP00/namelist_cfg} 266 analytical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. 267 Its horizontal resolution (and thus the size of the domain) is determined by 268 setting \np{nn\_GYRE} in \ngn{namusr\_def}: \\ 256 269 \np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2 \\ 257 270 \np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2 \\ 258 Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations259 pages on the NEMO web site (Using NEMO\/Configurations).271 Obviously, the namelist parameters have to be adjusted to the chosen resolution, 272 see the Configurations pages on the NEMO web site (Using NEMO\/Configurations). 260 273 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}). 261 274 262 The GYRE configuration is also used in benchmark test as it is very simple to increase 263 its resolution and as it does not requires any input file. For example, keeping a same model size 264 on each processor while increasing the number of processor used is very easy, even though the 265 physical integrity of the solution can be compromised. Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \ngn{namusr\_def} in namelist \path{CONFIG/GYRE/EXP00/namelist_cfg}. 266 267 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 268 \begin{figure}[!t] \begin{center} 269 \includegraphics[width=1.0\textwidth]{Fig_GYRE} 270 \caption{ \protect\label{fig:GYRE} 271 Snapshot of relative vorticity at the surface of the model domain 272 in GYRE R9, R27 and R54. From \citet{Levy_al_OM10}.} 273 \end{center} \end{figure} 275 The GYRE configuration is also used in benchmark test as it is very simple to increase its resolution and 276 as it does not requires any input file. 277 For example, keeping a same model size on each processor while increasing the number of processor used is very easy, 278 even though the physical integrity of the solution can be compromised. 279 Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \ngn{namusr\_def} in 280 namelist \path{CONFIG/GYRE/EXP00/namelist_cfg}. 281 282 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 283 \begin{figure}[!t] 284 \begin{center} 285 \includegraphics[width=1.0\textwidth]{Fig_GYRE} 286 \caption{ \protect\label{fig:GYRE} 287 Snapshot of relative vorticity at the surface of the model domain in GYRE R9, R27 and R54. 288 From \citet{Levy_al_OM10}.} 289 \end{center} 290 \end{figure} 274 291 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 275 292 … … 280 297 \label{sec:MISC_config_AMM} 281 298 282 The AMM, Atlantic Margins Model, is a regional model covering the 283 Northwest European Shelf domain on a regular lat-lon grid at 284 approximately 12km horizontal resolution. The appropriate 285 \textit{\&namcfg} namelist is available in \textit{CONFIG/AMM12/EXP00/namelist\_cfg}. 299 The AMM, Atlantic Margins Model, is a regional model covering the Northwest European Shelf domain on 300 a regular lat-lon grid at approximately 12km horizontal resolution. 301 The appropriate \textit{\&namcfg} namelist is available in \textit{CONFIG/AMM12/EXP00/namelist\_cfg}. 286 302 It is used to build the correct dimensions of the AMM domain. 287 303 288 This configuration tests several features of NEMO functionality specific 289 to the shelf seas. 290 In particular, the AMM uses $S$-coordinates in the vertical rather than 291 $z$-coordinates and is forced with tidal lateral boundary conditions 292 using a flather boundary condition from the BDY module. 293 The AMM configuration uses the GLS (\key{zdfgls}) turbulence scheme, the 294 VVL non-linear free surface(\key{vvl}) and time-splitting 295 (\key{dynspg\_ts}). 296 297 In addition to the tidal boundary condition the model may also take 298 open boundary conditions from a North Atlantic model. Boundaries may be 299 completely omitted by setting \np{ln\_bdy} to false. 300 Sample surface fluxes, river forcing and a sample initial restart file 301 are included to test a realistic model run. The Baltic boundary is 302 included within the river input file and is specified as a river source. 303 Unlike ordinary river points the Baltic inputs also include salinity and 304 temperature data. 304 This configuration tests several features of NEMO functionality specific to the shelf seas. 305 In particular, the AMM uses $S$-coordinates in the vertical rather than $z$-coordinates and 306 is forced with tidal lateral boundary conditions using a flather boundary condition from the BDY module. 307 The AMM configuration uses the GLS (\key{zdfgls}) turbulence scheme, 308 the VVL non-linear free surface(\key{vvl}) and time-splitting (\key{dynspg\_ts}). 309 310 In addition to the tidal boundary condition the model may also take open boundary conditions from 311 a North Atlantic model. 312 Boundaries may be completely omitted by setting \np{ln\_bdy} to false. 313 Sample surface fluxes, river forcing and a sample initial restart file are included to test a realistic model run. 314 The Baltic boundary is included within the river input file and is specified as a river source. 315 Unlike ordinary river points the Baltic inputs also include salinity and temperature data. 305 316 306 317 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex
r10146 r10354 17 17 \label{sec:DIA_io_old} 18 18 19 The model outputs are of three types: the restart file, the output listing, and 20 the diagnostic output file(s). 21 The restart file is used internally by the code when the user wants to start the model with 19 The model outputs are of three types: the restart file, the output listing, and the diagnostic output file(s). 20 The restart file is used internally by the code when the user wants to start the model with 22 21 initial conditions defined by a previous simulation. 23 It contains all the information that is necessary in order for there to be no changes in 24 the model results (even at the computer precision) between a run performed with several restarts and 22 It contains all the information that is necessary in order for there to be no changes in the model results 23 (even at the computer precision) between a run performed with several restarts and 25 24 the same run performed in one step. 26 It should be noted that this requires that the restart file contains two consecutive time steps for 27 all the prognostic variables, and that it is saved in the same binary format as the one used by 28 the computer that is to read it (in particular, 32 bits binary IEEE format must not be used for this file). 29 30 The output listing and file(s) are predefined but should be checked and eventually adapted to 31 the user's needs. 25 It should be noted that this requires that the restart file contains two consecutive time steps for 26 all the prognostic variables, and that it is saved in the same binary format as the one used by the computer that 27 is to read it (in particular, 32 bits binary IEEE format must not be used for this file). 28 29 The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 32 30 The output listing is stored in the $ocean.output$ file. 33 31 The information is printed from within the code on the logical unit $numout$. … … 35 33 36 34 By default, diagnostic output files are written in NetCDF format. 37 Since version 3.2, when defining \key{iomput}, an I/O server has been added which 38 provides more flexibility in the choice of the fields to be written as well as 39 how the writing work is distributed over the processors in massively parallel computing. 40 A complete description of the use of this I/O server is presented in the next section. 41 42 By default, \key{iomput} is not defined, NEMO produces NetCDF with the old IOIPSL library which43 has been kept for compatibility and its easy installation.44 However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, 45 many diagnostic options have been added presuming the use of \key{iomput}. 46 The usefulness of the default IOIPSL-based option is expected to reduce with each new release. 47 If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and 48 contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of 35 Since version 3.2, when defining \key{iomput}, an I/O server has been added which 36 provides more flexibility in the choice of the fields to be written as well as how 37 the writing work is distributed over the processors in massively parallel computing. 38 A complete description of the use of this I/O server is presented in the next section. 39 40 By default, \key{iomput} is not defined, 41 NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation. 42 However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, 43 many diagnostic options have been added presuming the use of \key{iomput}. 44 The usefulness of the default IOIPSL-based option is expected to reduce with each new release. 45 If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and 46 contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of 49 47 nn\_write time-steps (namelist parameter). 50 48 … … 57 55 \label{sec:DIA_iom} 58 56 59 Since version 3.2, iomput is the NEMO output interface of choice. 60 It has been designed to be simple to use, flexible and efficient. 57 Since version 3.2, iomput is the NEMO output interface of choice. 58 It has been designed to be simple to use, flexible and efficient. 61 59 The two main purposes of iomput are: 62 60 63 61 \begin{enumerate} 64 \item The complete and flexible control of the output files through external XML files adapted by 65 the user from standard templates. 66 \item To achieve high performance and scalable output through the optional distribution of 67 all diagnostic output related tasks to dedicated processes. 62 \item 63 The complete and flexible control of the output files through external XML files adapted by 64 the user from standard templates. 65 \item 66 To achieve high performance and scalable output through the optional distribution of 67 all diagnostic output related tasks to dedicated processes. 68 68 \end{enumerate} 69 69 … … 72 72 73 73 \begin{itemize} 74 \item The choice of output frequencies that can be different for each file 75 (including real months and years). 76 \item The choice of file contents; includes complete flexibility over which data are written in 77 which files (the same data can be written in different files). 78 \item The possibility to split output files at a chosen frequency. 79 \item The possibility to extract a vertical or an horizontal subdomain. 80 \item The choice of the temporal operation to perform, 81 e.g.: average, accumulate, instantaneous, min, max and once. 82 \item Control over metadata via a large XML "database" of possible output fields. 74 \item 75 The choice of output frequencies that can be different for each file (including real months and years). 76 \item 77 The choice of file contents; includes complete flexibility over which data are written in which files 78 (the same data can be written in different files). 79 \item 80 The possibility to split output files at a chosen frequency. 81 \item 82 The possibility to extract a vertical or an horizontal subdomain. 83 \item 84 The choice of the temporal operation to perform, $e.g.$: average, accumulate, instantaneous, min, max and once. 85 \item 86 Control over metadata via a large XML "database" of possible output fields. 83 87 \end{itemize} 84 88 85 In addition, iomput allows the user to add in the code the output of any new variable (scalar, 2D or 86 3D)in a very easy way.89 In addition, iomput allows the user to add in the code the output of any new variable (scalar, 2D or 3D) 90 in a very easy way. 87 91 All details of iomput functionalities are listed in the following subsections. 88 Examples of the XML files that control the outputs can be found in: 89 \path{NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml}, \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and 90 \path{NEMOGCM/CONFIG/SHARED/domain_def.xml}. \\ 92 Examples of the XML files that control the outputs can be found in: \path{NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml}, 93 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml}. \\ 91 94 92 95 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 93 Iomput provides the possibility to specify N dedicated I/O processes (in addition to 94 t he NEMO processes) to collect and write the outputs.95 With an appropriate choice of N by the user, the bottleneck associated with the writing of 96 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) 97 to collect and write the outputs. 98 With an appropriate choice of N by the user, the bottleneck associated with the writing of 96 99 the output files can be greatly reduced. 97 100 98 In version 3.6, the iom\_put interface depends on an external code called99 \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}101 In version 3.6, the iom\_put interface depends on 102 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0} 100 103 (use of revision 618 or higher is required). 101 This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 104 This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 102 105 create a single output file and therefore to bypass the rebuilding phase. 103 Note that writing in parallel into the same NetCDF files requires that 104 your NetCDF4 library is linked to an HDF5 library that has been correctly compiled ($i.e.$ with 105 the configure option $--$enable-parallel). 106 Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 107 an HDF5 library that has been correctly compiled ($i.e.$ with the configure option $--$enable-parallel). 106 108 Note that the files created by iomput through XIOS are incompatible with NetCDF3. 107 All post-processsing and visualization tools must therefore be compatible with 108 NetCDF4 and not only NetCDF3. 109 110 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 111 where N is typically much less than the number of NEMO processors, 112 will reduce the number of output files created. 113 This can greatly reduce the post-processing burden usually associated with using 114 large numbers of NEMO processors. 115 Note that for smaller configurations, the rebuilding phase can be avoided, even without 116 a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 109 All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 110 111 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 112 where N is typically much less than the number of NEMO processors, will reduce the number of output files created. 113 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. 114 Note that for smaller configurations, the rebuilding phase can be avoided, 115 even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 117 116 118 117 \subsection{XIOS: XML Inputs-Outputs Server} … … 120 119 \subsubsection{Attached or detached mode?} 121 120 122 Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, 121 Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, 123 122 the io\_server developed by Yann Meurdesoif from IPSL. 124 123 The behaviour of the I/O subsystem is controlled by settings in the external XML files listed above. … … 127 126 \xmlline|<variable id="using_server" type="bool"></variable>| 128 127 129 The {\tt using\_server} setting determines whether or not the server will be used in 130 \textit{attached mode} (as a library) [{\tt> false <}] or in \textit{detached mode} (as 131 an external executable on N additional, dedicated cpus) [{\tt > true <}].128 The {\tt using\_server} setting determines whether or not the server will be used in \textit{attached mode} 129 (as a library) [{\tt> false <}] or in \textit{detached mode} 130 (as an external executable on N additional, dedicated cpus) [{\tt > true <}]. 132 131 The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications. 133 132 The type of each file can be either ''multiple\_file'' or ''one\_file''. 134 133 135 In \textit{attached mode} and if the type of file is ''multiple\_file'', 134 In \textit{attached mode} and if the type of file is ''multiple\_file'', 136 135 then each NEMO process will also act as an IO server and produce its own set of output files. 137 136 Superficially, this emulates the standard behaviour in previous versions. 138 However, the subdomain written out by each process does not correspond to 137 However, the subdomain written out by each process does not correspond to 139 138 the \forcode{jpi x jpj x jpk} domain actually computed by the process (although it may if \forcode{jpni=1}). 140 139 Instead each process will have collected and written out a number of complete longitudinal strips. 141 If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips and 140 If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips and 142 141 write (in parallel) to a single output file. 143 142 144 In \textit{detached mode} and if the type of file is ''multiple\_file'', then145 each stand-alone XIOS process will collect data for a range of complete longitudinal strips and 143 In \textit{detached mode} and if the type of file is ''multiple\_file'', 144 then each stand-alone XIOS process will collect data for a range of complete longitudinal strips and 146 145 write to its own set of output files. 147 If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 146 If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 148 147 write (in parallel) to a single output file. 149 148 Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 150 The following subsection provides a typical example but the syntax will vary in 151 different MPP environments. 149 The following subsection provides a typical example but the syntax will vary in different MPP environments. 152 150 153 151 \subsubsection{Number of cpu used by XIOS in detached mode} … … 156 154 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 157 155 cores dedicated to NEMO. 158 Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 156 Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 159 157 this is a general recommendation and not specific to NEMO. 160 It is difficult to provide precise recommendations because the optimal choice will depend on 158 It is difficult to provide precise recommendations because the optimal choice will depend on 161 159 the particular hardware properties of the target system 162 (parallel filesystem performance, available memory, memory bandwidth etc.) and163 the volume and frequency of data to be created.160 (parallel filesystem performance, available memory, memory bandwidth etc.) 161 and the volume and frequency of data to be created. 164 162 Here is an example of 2 cpus for the io\_server and 62 cpu for nemo using mpirun: 165 163 \cmd|mpirun -np 62 ./nemo.exe : -np 2 ./xios_server.exe| … … 167 165 \subsubsection{Control of XIOS: the context in iodef.xml} 168 166 169 As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in 170 the XIOS context in iodef.xml. 167 As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 171 168 See the XML basics section below for more details on XML syntax and rules. 172 169 … … 205 202 \subsubsection{Installation} 206 203 207 As mentioned, XIOS is supported separately and must be downloaded and compiled before 208 it can be used with NEMO. 209 See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for 210 help and guidance. 204 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. 205 See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 211 206 NEMO will need to link to the compiled XIOS library. 212 The 213 \href{https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ModelInterfacing/InputsOutputs#Inputs-OutputsusingXIOS} 214 {XIOS with NEMO} 215 guide provides an example illustration of how this can be achieved. 207 The \href{https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ModelInterfacing/InputsOutputs#Inputs-OutputsusingXIOS} 208 {XIOS with NEMO} guide provides an example illustration of how this can be achieved. 216 209 217 210 \subsubsection{Add your own outputs} 218 211 219 212 It is very easy to add your own outputs with iomput. 220 Many standard fields and diagnostics are already prepared ($i.e.$, steps 1 to 3 below have been done) and 213 Many standard fields and diagnostics are already prepared ($i.e.$, steps 1 to 3 below have been done) and 221 214 simply need to be activated by including the required output in a file definition in iodef.xml (step 4). 222 215 To add new output variables, all 4 of the following steps must be taken. 223 216 224 217 \begin{enumerate} 225 \item[1.] in NEMO code, add a \forcode{CALL iom\_put( 'identifier', array )} where you want to 226 output a 2D or 3D array. 227 \item[2.] If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 228 the upper part of your module. 229 \item[3.] in the field\_def.xml file, add the definition of your variable using 230 the same identifier you used in the f90 code (see subsequent sections for 231 a details of the XML syntax and rules). 232 For example: 218 \item[1.] 219 in NEMO code, add a \forcode{CALL iom\_put( 'identifier', array )} where you want to output a 2D or 3D array. 220 \item[2.] 221 If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 222 the upper part of your module. 223 \item[3.] 224 in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code 225 (see subsequent sections for a details of the XML syntax and rules). 226 For example: 233 227 234 228 \begin{xmllines} … … 241 235 \end{xmllines} 242 236 243 Note your definition must be added to the field\_group whose reference grid is consistent with 244 the size of thearray passed to iomput.245 The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, reference grids and246 axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in \mdl{iom}) or 247 defined in the domain\_def.xml file.237 Note your definition must be added to the field\_group whose reference grid is consistent with the size of 238 the array passed to iomput. 239 The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, 240 reference grids and axes either defined in the code 241 (iom\_set\_domain\_attr and iom\_set\_axis\_attr in \mdl{iom}) or defined in the domain\_def.xml file. 248 242 $e.g.$: 249 243 … … 252 246 \end{xmllines} 253 247 254 Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step, 248 Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step, 255 249 add the field definition within the field\_group defined with the id "SBC": 256 \xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of 257 operations (iom\_set\_field\_attr in \mdl{iom}) 258 \item[4.] add your field in one of the output files defined in iodef.xml 259 (again see subsequent sections for syntax and rules) 250 \xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of operations 251 (iom\_set\_field\_attr in \mdl{iom}) 252 \item[4.] 253 add your field in one of the output files defined in iodef.xml 254 (again see subsequent sections for syntax and rules) 260 255 261 256 \begin{xmllines} … … 274 269 275 270 XML tags begin with the less-than character ("$<$") and end with the greater-than character ("$>$"). 276 You use tags to mark the start and end of elements, which are the logical units of information in 277 an XML document. 278 In addition to marking the beginning of an element, XML start tags also provide a place to 279 specify attributes. 280 An attribute specifies a single property for an element, using a name/value pair, for example: 271 You use tags to mark the start and end of elements, which are the logical units of information in an XML document. 272 In addition to marking the beginning of an element, XML start tags also provide a place to specify attributes. 273 An attribute specifies a single property for an element, using a name/value pair, for example: 281 274 \xmlcode{<a b="x" c="y" d="z"> ... </a>}. 282 275 See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. … … 284 277 \subsubsection{Structure of the XML file used in NEMO} 285 278 286 The XML file used in XIOS is structured by 7 families of tags: 279 The XML file used in XIOS is structured by 7 families of tags: 287 280 context, axis, domain, grid, field, file and variable. 288 281 Each tag family has hierarchy of three flavors (except for context): … … 302 295 303 296 Each element may have several attributes. 304 Some attributes are mandatory, other are optional but have a default value and 305 other are completely optional. 297 Some attributes are mandatory, other are optional but have a default value and other are completely optional. 306 298 Id is a special attribute used to identify an element or a group of elements. 307 299 It must be unique for a kind of element. 308 300 It is optional, but no reference to the corresponding element can be done if it is not defined. 309 301 310 The XML file is split into context tags that are used to isolate IO definition from different codes or311 different parts of a code.302 The XML file is split into context tags that are used to isolate IO definition from 303 different codes or different parts of a code. 312 304 No interference is possible between 2 different contexts. 313 305 Each context has its own calendar and an associated timestep. … … 370 362 371 363 \noindent In NEMO, by default, the field and domain definition is done in 2 separate files: 372 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml} 373 thatare included in the main iodef.xml file through the following commands:364 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml} that 365 are included in the main iodef.xml file through the following commands: 374 366 \begin{xmllines} 375 367 <field_definition src="./field_def.xml" /> … … 380 372 381 373 XML extensively uses the concept of inheritance. 382 XML has a tree based structure with a parent-child oriented relation: 383 all children inherit attributes from parent, but an attribute defined in a child replace 384 the inherited attribute value. 385 Note that the special attribute ''id'' is never inherited. \\ \\ 374 XML has a tree based structure with a parent-child oriented relation: all children inherit attributes from parent, 375 but an attribute defined in a child replace the inherited attribute value. 376 Note that the special attribute ''id'' is never inherited. 377 \\ 378 \\ 386 379 example 1: Direct inheritance. 387 380 … … 393 386 \end{xmllines} 394 387 395 The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''average'' 396 ofthe attribute ''operation'' from its parent.388 The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''average'' of 389 the attribute ''operation'' from its parent. 397 390 Note that a child can overwrite the attribute definition inherited from its parents. 398 In the example above, the field ''sss'' will for example output instantaneous values instead of 399 average values. \\ \\ 391 In the example above, the field ''sss'' will for example output instantaneous values instead of average values. 392 \\ 393 \\ 400 394 example 2: Inheritance by reference. 401 395 … … 418 412 419 413 Groups can be used for 2 purposes. 420 Firstly, the group can be used to define common attributes to be shared by the elements of 414 Firstly, the group can be used to define common attributes to be shared by the elements of 421 415 the group through inheritance. 422 416 In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''. 423 Note that for the field ''toce'', we overwrite the grid definition inherited from the group by 424 ''grid\_T\_3D''. 417 Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 425 418 426 419 \begin{xmllines} … … 456 449 \subsection{Detailed functionalities} 457 450 458 The file \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml} provides several examples of the use of 451 The file \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml} provides several examples of the use of 459 452 the new functionalities offered by the XML interface of XIOS. 460 453 461 454 \subsubsection{Define horizontal subdomains} 462 455 463 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 456 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 464 457 the tag family domain. 465 458 It must therefore be done in the domain part of the XML file. … … 472 465 \end{xmllines} 473 466 474 The use of this subdomain is done through the redefinition of the attribute domain\_ref of 475 the tag family field. 467 The use of this subdomain is done through the redefinition of the attribute domain\_ref of the tag family field. 476 468 For example: 477 469 … … 483 475 484 476 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 485 The Equatorial section, the TAO, RAMA and PIRATA moorings are alre dy registered in the code and477 The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 486 478 can therefore be outputted without taking care of their (i,j) position in the grid. 487 479 These predefined domains can be activated by the use of specific domain\_ref: 488 ''EqT'', ''EqU'' or ''EqW'' for the equatorial sections and the mooring position for489 TAO, RAMA and PIRATA followed by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...)480 ''EqT'', ''EqU'' or ''EqW'' for the equatorial sections and 481 the mooring position for TAO, RAMA and PIRATA followed by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 490 482 491 483 \begin{xmllines} … … 503 495 \subsubsection{Define vertical zooms} 504 496 505 Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. 506 It must therefore be done in the axis part of the XML file. 497 Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. 498 It must therefore be done in the axis part of the XML file. 507 499 For example, in \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml}, we provide the following example: 508 500 … … 513 505 \end{xmllines} 514 506 515 The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of 516 the tag family field. 507 The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of the tag family field. 517 508 For example: 518 509 … … 539 530 \end{xmllines} 540 531 541 However it is often very convienent to define the file name with the name of the experiment, 542 the output file frequency and the date of the beginning and the end of the simulation 532 However it is often very convienent to define the file name with the name of the experiment, 533 the output file frequency and the date of the beginning and the end of the simulation 543 534 (which are informations stored either in the namelist or in the XML file). 544 To do so, we added the following rule: if the id of the tag file is ''fileN'' (where N = 1 to 999 on545 1 to 3 digits) or one of the predefined sections or moorings (see next subsection), 546 the following part of the name and the name\_suffix (that can be inherited) will be automatically 547 replaced by:535 To do so, we added the following rule: 536 if the id of the tag file is ''fileN'' (where N = 1 to 999 on 1 to 3 digits) or 537 one of the predefined sections or moorings (see next subsection), 538 the following part of the name and the name\_suffix (that can be inherited) will be automatically replaced by: 548 539 549 540 \begin{table} \scriptsize … … 580 571 \end{forlines} 581 572 582 \noindent will give the following file name radical: 583 \ifile{myfile\_ORCA2\_19891231\_freq1d} 573 \noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 584 574 585 575 \subsubsection{Other controls of the XML attributes from NEMO} 586 576 587 577 The values of some attributes are defined by subroutine calls within NEMO 588 (calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 589 Any definition given in the XML file will be overwritten. 590 By convention, these attributes are defined to ''auto'' (for string) or ''0000'' (for integer) in 591 the XML file (but this is not necessary). \\ 592 593 Here is the list of these attributes: \\ 578 (calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 579 Any definition given in the XML file will be overwritten. 580 By convention, these attributes are defined to ''auto'' (for string) or ''0000'' (for integer) in the XML file 581 (but this is not necessary). 582 \\ 583 584 Here is the list of these attributes: 585 \\ 594 586 595 587 \begin{table} \scriptsize … … 631 623 632 624 \begin{enumerate} 633 \item Simple computation: directly define the computation when refering to the variable in634 the file definition.625 \item 626 Simple computation: directly define the computation when refering to the variable in the file definition. 635 627 636 628 \begin{xmllines} … … 640 632 \end{xmllines} 641 633 642 \item Simple computation: define a new variable and use it in the file definition. 634 \item 635 Simple computation: define a new variable and use it in the file definition. 643 636 644 637 in field\_definition: … … 654 647 \end{xmllines} 655 648 656 Note that in this case, the following syntaxe \xmlcode{<field field_ref="sst2" />} is not working as 649 Note that in this case, the following syntaxe \xmlcode{<field field_ref="sst2" />} is not working as 657 650 sst2 won't be evaluated. 658 651 659 \item Change of variable precision: 652 \item 653 Change of variable precision: 660 654 661 655 \begin{xmllines} … … 667 661 668 662 Note that, then the code is crashing, writting real4 variables forces a numerical convection from 669 real8 to real4 which will create an internal error in NetCDF and will avoid the creation of 670 the output files. 671 Forcing double precision outputs with prec="8" (for example in the field\_definition) will 672 avoid this problem. 673 674 \item add user defined attributes: 663 real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 664 Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 665 666 \item 667 add user defined attributes: 675 668 676 669 \begin{xmllines} … … 687 680 \end{xmllines} 688 681 689 \item use of the ``@'' function: example 1, weighted temporal average 682 \item 683 use of the ``@'' function: example 1, weighted temporal average 690 684 691 685 - define a new variable in field\_definition … … 706 700 707 701 The freq\_op="5d" attribute is used to define the operation frequency of the ``@'' function: here 5 day. 708 The temporal operation done by the ``@'' is the one defined in the field definition: 702 The temporal operation done by the ``@'' is the one defined in the field definition: 709 703 here we use the default, average. 710 704 So, in the above case, @toce\_e3t will do the 5-day mean of toce*e3t. 711 Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': 712 here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of 705 Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': 706 here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of 713 707 the 2 mean values. 714 708 field\_ref="toce" means that attributes not explicitely defined, are inherited from toce field. 715 709 Note that in this case, freq\_op must be equal to the file output\_freq. 716 710 717 \item use of the ``@'' function: example 2, monthly SSH standard deviation 711 \item 712 use of the ``@'' function: example 2, monthly SSH standard deviation 718 713 719 714 - define a new variable in field\_definition … … 737 732 738 733 The freq\_op="1m" attribute is used to define the operation frequency of the ``@'' function: here 1 month. 739 The temporal operation done by the ``@'' is the one defined in the field definition: 734 The temporal operation done by the ``@'' is the one defined in the field definition: 740 735 here we use the default, average. 741 736 So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. 742 Operation="instant" refers to the temporal operation to be performed on 743 the field ''sqrt( @ssh2 - @ssh * @ssh )'': 737 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 744 738 here the temporal average is alreday done by the ``@'' function so we just use instant. 745 739 field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. 746 740 Note that in this case, freq\_op must be equal to the file output\_freq. 747 741 748 \item use of the ``@'' function: example 3, monthly average of SST diurnal cycle 742 \item 743 use of the ``@'' function: example 3, monthly average of SST diurnal cycle 749 744 750 745 - define 2 new variables in field\_definition … … 770 765 771 766 The freq\_op="1d" attribute is used to define the operation frequency of the ``@'' function: here 1 day. 772 The temporal operation done by the ``@'' is the one defined in the field definition: here maximum for773 sstmax and minimum for sstmin.767 The temporal operation done by the ``@'' is the one defined in the field definition: 768 here maximum for sstmax and minimum for sstmin. 774 769 So, in the above case, @sstmax will do the daily max and @sstmin the daily min. 775 Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': 770 Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': 776 771 here monthly mean (of daily max - daily min of the sst). 777 772 field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. … … 1126 1121 1127 1122 Output from the XIOS-1.0 IO server is compliant with 1128 \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} 1129 of the CF metadata standard. 1130 Therefore while a user may wish to add their own metadata to the output files (as demonstrated in 1131 example 4 of section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with 1132 the CF-1.5 standard. 1133 1134 Some metadata that may significantly increase the file size (horizontal cell areas and 1135 vertices) are controlled by the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. 1123 \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 1124 the CF metadata standard. 1125 Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 1126 section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 1127 1128 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 1129 the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. 1136 1130 This must be set to true if these metadata are to be included in the output files. 1137 1131 … … 1144 1138 1145 1139 Since version 3.3, support for NetCDF4 chunking and (loss-less) compression has been included. 1146 These options build on the standard NetCDF output and allow the user control over the size of 1147 the chunks vianamelist settings.1140 These options build on the standard NetCDF output and allow the user control over the size of the chunks via 1141 namelist settings. 1148 1142 Chunking and compression can lead to significant reductions in file sizes for a small runtime overhead. 1149 For a fuller discussion on chunking and other performance issues the reader is referred to 1150 the NetCDF4 documentation found 1151 \href{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Chunking}{here}. 1152 1153 The new features are only available when the code has been linked with a NetCDF4 library 1154 (version 4.1 onwards, recommended) which has been built with HDF5 support 1155 (version 1.8.4 onwards, recommended). 1156 Datasets created with chunking and compression are not backwards compatible with 1157 NetCDF3 "classic" format but most analysis codes can be relinked simply with the new libraries and 1158 will then read both NetCDF3 and NetCDF4 files. 1159 NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 1143 For a fuller discussion on chunking and other performance issues the reader is referred to 1144 the NetCDF4 documentation found \href{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Chunking}{here}. 1145 1146 The new features are only available when the code has been linked with a NetCDF4 library 1147 (version 4.1 onwards, recommended) which has been built with HDF5 support (version 1.8.4 onwards, recommended). 1148 Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 1149 most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 1150 NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 1160 1151 setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4} namelist: 1161 1152 … … 1166 1157 1167 1158 If \key{netcdf4} has not been defined, these namelist parameters are not read. 1168 In this case, \np{ln\_nc4zip} is set false and dummy routines for 1169 a few NetCDF4-specific functions are defined. 1170 These functions will not be used but need to be included so that compilation is possible with 1171 NetCDF3 libraries. 1172 1173 When using NetCDF4 libraries, \key{netcdf4} should be defined even if the intention is to 1159 In this case, \np{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 1160 These functions will not be used but need to be included so that compilation is possible with NetCDF3 libraries. 1161 1162 When using NetCDF4 libraries, \key{netcdf4} should be defined even if the intention is to 1174 1163 create only NetCDF3-compatible files. 1175 This is necessary to avoid duplication between the dummy routines and 1176 the actual routines present in the library. 1164 This is necessary to avoid duplication between the dummy routines and the actual routines present in the library. 1177 1165 Most compilers will fail at compile time when faced with such duplication. 1178 Thus when linking with NetCDF4 libraries the user must define \key{netcdf4} and 1166 Thus when linking with NetCDF4 libraries the user must define \key{netcdf4} and 1179 1167 control the type of NetCDF file produced via the namelist parameter. 1180 1168 1181 Chunking and compression is applied only to 4D fields and there is no advantage in1182 chunking across more than one time dimension since previously written chunks would have to 1183 be read back and decompressed before being added to.1169 Chunking and compression is applied only to 4D fields and 1170 there is no advantage in chunking across more than one time dimension since 1171 previously written chunks would have to be read back and decompressed before being added to. 1184 1172 Therefore, user control over chunk sizes is provided only for the three space dimensions. 1185 1173 The user sets an approximate number of chunks along each spatial axis. 1186 The actual size of the chunks will depend on global domain size for mono-processors or, 1187 more likely,the local processor domain size for distributed processing.1188 The derived values are subject to practical minimum values (to avoid wastefully small chunk sizes) and 1174 The actual size of the chunks will depend on global domain size for mono-processors or, more likely, 1175 the local processor domain size for distributed processing. 1176 The derived values are subject to practical minimum values (to avoid wastefully small chunk sizes) and 1189 1177 cannot be greater than the domain size in any dimension. 1190 1178 The algorithm used is: … … 1203 1191 \end{forlines} 1204 1192 1205 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\tt 46x38x1} respectively in 1193 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\tt 46x38x1} respectively in 1206 1194 the mono-processor case (i.e. global domain of {\small\tt 182x149x31}). 1207 1195 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 1208 table \autoref{tab:NC4} which compares the results of two short runs of 1209 the ORCA2\_LIM reference configuration witha 4x2 mpi partitioning.1210 Note the variation in the compression ratio achieved which reflects chiefly the dry to 1211 wet volume ratio ofeach processing region.1196 table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 1197 a 4x2 mpi partitioning. 1198 Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of 1199 each processing region. 1212 1200 1213 1201 %------------------------------------------TABLE---------------------------------------------------- … … 1249 1237 %---------------------------------------------------------------------------------------------------- 1250 1238 1251 When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for 1252 fields produced via \np{iom\_put} calls are set via an equivalent and identically named namelist to 1253 \ textit{namnc4} in \np{xmlio\_server.def}.1254 Typically this namelist serves the mean files whilst the \ngn{ namnc4} in 1255 the main namelist file continues toserve the restart files.1256 This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 1257 the individual files produced by the io\_server processes may be different to those produced by 1239 When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 1240 \np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in 1241 \np{xmlio\_server.def}. 1242 Typically this namelist serves the mean files whilst the \ngn{ namnc4} in the main namelist file continues to 1243 serve the restart files. 1244 This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 1245 the individual files produced by the io\_server processes may be different to those produced by 1258 1246 the invidual processing regions and different chunking choices may be desired. 1259 1247 … … 1269 1257 %------------------------------------------------------------------------------------------------------------- 1270 1258 1271 Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 1272 \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation ($i.e.$ at1273 the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines).1259 Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 1260 \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 1261 ($i.e.$ at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). 1274 1262 This capability is controlled by options offered in \ngn{namtrd} namelist. 1275 1263 Note that the output are done with xIOS, and therefore the \key{IOM} is required. … … 1278 1266 1279 1267 \begin{description} 1280 \item[\np{ln\_glo\_trd}]: at each \np{nn\_trd} time-step a check of the basin averaged properties of 1281 the momentum and tracer equations is performed. 1282 This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$, and 1283 potential energy time evolution equations properties; 1284 \item[\np{ln\_dyn\_trd}]: each 3D trend of the evolution of the two momentum components is output; 1285 \item[\np{ln\_dyn\_mxl}]: each 3D trend of the evolution of the two momentum components averaged over 1286 the mixed layer is output; 1287 \item[\np{ln\_vor\_trd}]: a vertical summation of the moment tendencies is performed, then 1288 the curl is computed to obtain the barotropic vorticity tendencies which 1289 are output; 1290 \item[\np{ln\_KE\_trd}] : each 3D trend of the Kinetic Energy equation is output ; 1291 \item[\np{ln\_tra\_trd}]: each 3D trend of the evolution of temperature and salinity is output ; 1292 \item[\np{ln\_tra\_mxl}]: each 2D trend of the evolution of temperature and salinity averaged over 1293 the mixed layer is output; 1268 \item[\np{ln\_glo\_trd}]: 1269 at each \np{nn\_trd} time-step a check of the basin averaged properties of 1270 the momentum and tracer equations is performed. 1271 This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$, 1272 and potential energy time evolution equations properties; 1273 \item[\np{ln\_dyn\_trd}]: 1274 each 3D trend of the evolution of the two momentum components is output; 1275 \item[\np{ln\_dyn\_mxl}]: 1276 each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 1277 \item[\np{ln\_vor\_trd}]: 1278 a vertical summation of the moment tendencies is performed, 1279 then the curl is computed to obtain the barotropic vorticity tendencies which are output; 1280 \item[\np{ln\_KE\_trd}] : 1281 each 3D trend of the Kinetic Energy equation is output; 1282 \item[\np{ln\_tra\_trd}]: 1283 each 3D trend of the evolution of temperature and salinity is output; 1284 \item[\np{ln\_tra\_mxl}]: 1285 each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 1294 1286 \end{description} 1295 1287 … … 1298 1290 1299 1291 \textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 1300 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are 1301 not working,and none of the options have been tested with variable volume ($i.e.$ \key{vvl} defined).1292 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 1293 and none of the options have been tested with variable volume ($i.e.$ \key{vvl} defined). 1302 1294 1303 1295 % ------------------------------------------------------------------------------------------------------------- … … 1311 1303 %-------------------------------------------------------------------------------------------------------------- 1312 1304 1313 The on-line computation of floats advected either by the three dimensional velocity field or 1314 constraint to remain at a given depth ($w = 0$ in the computation) have been introduced in 1315 the system during the CLIPPER project. 1305 The on-line computation of floats advected either by the three dimensional velocity field or constraint to 1306 remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 1316 1307 Options are defined by \ngn{namflo} namelis variables. 1317 The algorithm used is based either on the work of \cite{Blanke_Raynaud_JPO97} (default option), or1318 o n a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}).1319 Note that the \cite{Blanke_Raynaud_JPO97} algorithm have the advantage of providing trajectories which 1308 The algorithm used is based either on the work of \cite{Blanke_Raynaud_JPO97} (default option), 1309 or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). 1310 Note that the \cite{Blanke_Raynaud_JPO97} algorithm have the advantage of providing trajectories which 1320 1311 are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry. 1321 1312 1322 1313 \subsubsection{Input data: initial coordinates} 1323 1314 1324 Initial coordinates can be given with Ariane Tools convention (IJK coordinates,1325 ( \np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude.1315 Initial coordinates can be given with Ariane Tools convention 1316 (IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude. 1326 1317 1327 1318 In case of Ariane convention, input filename is \np{init\_float\_ariane}. … … 1368 1359 1369 1360 \np{jpnfl} is the total number of floats during the run. 1370 When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ), 1361 When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ), 1371 1362 \np{jpnflnewflo} can be added in the initialization file. 1372 1363 1373 1364 \subsubsection{Output data} 1374 1365 1375 \np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is 1376 the frequency ofcreation of the float restart file.1366 \np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is the frequency of 1367 creation of the float restart file. 1377 1368 1378 1369 Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{ = .true.}). … … 1382 1373 There are 2 possibilities: 1383 1374 1384 1385 1375 - if (\key{iomput}) is used, outputs are selected in iodef.xml. 1376 Here it is an example of specification to put in files description section: 1386 1377 1387 1378 \begin{xmllines} … … 1401 1392 - if (\key{iomput}) is not used, a file called \ifile{trajec\_float} will be created by IOIPSL library. 1402 1393 1403 See also \href{http://stockage.univ-brest.fr/~grima/Ariane/}{here} the web site describing 1404 the off-line use ofthis marvellous diagnostic tool.1394 See also \href{http://stockage.univ-brest.fr/~grima/Ariane/}{here} the web site describing the off-line use of 1395 this marvellous diagnostic tool. 1405 1396 1406 1397 % ------------------------------------------------------------------------------------------------------------- … … 1418 1409 This on-line Harmonic analysis is actived with \key{diaharm}. 1419 1410 1420 Some parameters are available in namelist \ngn{namdia\_harm} 1411 Some parameters are available in namelist \ngn{namdia\_harm}: 1421 1412 1422 1413 - \np{nit000\_han} is the first time step used for harmonic analysis … … 1430 1421 - \np{tname} is an array with names of tidal constituents to analyse 1431 1422 1432 \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation.1433 The restart capability is not implemented.1434 1435 The Harmonic analysis solve the following equation:1423 \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 1424 The restart capability is not implemented. 1425 1426 The Harmonic analysis solve the following equation: 1436 1427 1437 1428 \[h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[A_{j}cos(\nu_{j}t_{j}-\phi_{j})] = e_{i}\] 1438 1429 1439 With $A_{j}$, $\nu_{j}$, $\phi_{j}$, the amplitude, frequency and phase for each wave and 1440 $e_{i}$ the error. 1430 With $A_{j}$, $\nu_{j}$, $\phi_{j}$, the amplitude, frequency and phase for each wave and $e_{i}$ the error. 1441 1431 $h_{i}$ is the sea level for the time $t_{i}$ and $A_{0}$ is the mean sea level. \\ 1442 1432 We can rewrite this equation: … … 1459 1449 %------------------------------------------------------------------------------------------------------------- 1460 1450 1461 A module is available to compute the transport of volume, heat and salt through sections. 1451 A module is available to compute the transport of volume, heat and salt through sections. 1462 1452 This diagnostic is actived with \key{diadct}. 1463 1453 1464 1454 Each section is defined by the coordinates of its 2 extremities. 1465 The pathways between them are contructed using tools which can be found in 1466 \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT} 1467 and are written in a binary file 1468 \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} 1469 which is later read in by NEMO to compute on-line transports. 1455 The pathways between them are contructed using tools which can be found in \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT} 1456 and are written in a binary file \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is later read in by 1457 NEMO to compute on-line transports. 1470 1458 1471 1459 The on-line transports module creates three output ascii files: … … 1477 1465 - \texttt{salt\_transport} for salt transports (unit: $10^{9}Kg s^{-1}$) \\ 1478 1466 1479 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over 1480 whichthey are averaged, as well as the level of output for debugging:1467 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which 1468 they are averaged, as well as the level of output for debugging: 1481 1469 \np{nn\_dct} : frequency of instantaneous transports computing 1482 1470 \np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) … … 1485 1473 \subsubsection{Creating a binary file containing the pathway of each section} 1486 1474 1487 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, 1488 the file \textit{ {list\_sections.ascii\_global}} contains a list of all the sections that are to 1489 be computed(this list of sections is based on MERSEA project metrics).1475 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, 1476 the file \textit{ {list\_sections.ascii\_global}} contains a list of all the sections that are to be computed 1477 (this list of sections is based on MERSEA project metrics). 1490 1478 1491 1479 Another file is available for the GYRE configuration (\texttt{ {list\_sections.ascii\_GYRE}}). … … 1505 1493 - \texttt{ice} to compute surface and volume ice transports, \texttt{noice} if no. \\ 1506 1494 1507 \noindent The results of the computing of transports, and the directions of positive and 1508 negative flow do not depend on the order of the 2 extremities in this file. \\1509 1510 \noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\1495 \noindent The results of the computing of transports, and the directions of positive and 1496 negative flow do not depend on the order of the 2 extremities in this file. \\ 1497 1498 \noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\ 1511 1499 {\scriptsize \texttt{ 1512 1500 long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ … … 1531 1519 - \texttt{zsigp} for potential density classes \\ 1532 1520 1533 The script \texttt{job.ksh} computes the pathway for each section and 1534 creates a binary file\texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is read by NEMO. \\1535 1536 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 1537 the coordinates file name and path. \\1538 1539 Examples of two sections, the ACC\_Drake\_Passage with no classes, and the ATL\_Cuba\_Florida with 1540 4 temperature clases (5 class bounds), are shown: \\1521 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 1522 \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is read by NEMO. \\ 1523 1524 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 1525 the coordinates file name and path. \\ 1526 1527 Examples of two sections, the ACC\_Drake\_Passage with no classes, 1528 and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\ 1541 1529 \noindent {\scriptsize \texttt{ 1542 1530 -68. -54.5 -60. -64.7 00 okstrpond noice ACC\_Drake\_Passage \\ … … 1559 1547 transport\_total}} \\ 1560 1548 1561 For sections with classes, the first \texttt{nclass-1} lines correspond to the transport for 1562 each class andthe last line corresponds to the total transport summed over all classes.1563 For sections with no classes, class number \texttt{1} corresponds to \texttt{total class} and 1549 For sections with classes, the first \texttt{nclass-1} lines correspond to the transport for each class and 1550 the last line corresponds to the total transport summed over all classes. 1551 For sections with no classes, class number \texttt{1} corresponds to \texttt{total class} and 1564 1552 this class is called \texttt{N}, meaning \texttt{none}. 1565 1553 … … 1568 1556 - \texttt{transport\_direction2} is the negative part of the transport ($\leq$ 0). \\ 1569 1557 1570 \noindent The \texttt{section slope coefficient} gives information about the significance of 1571 transports signs anddirection: \\1558 \noindent The \texttt{section slope coefficient} gives information about the significance of transports signs and 1559 direction: \\ 1572 1560 1573 1561 \begin{table} \scriptsize … … 1591 1579 1592 1580 1593 Changes in steric sea level are caused when changes in the density of the water column imply an 1594 expansion orcontraction of the column.1595 It is essentially produced through surface heating/cooling and to a lesser extent through 1596 non-linear effects ofthe equation of state (cabbeling, thermobaricity...).1581 Changes in steric sea level are caused when changes in the density of the water column imply an expansion or 1582 contraction of the column. 1583 It is essentially produced through surface heating/cooling and to a lesser extent through non-linear effects of 1584 the equation of state (cabbeling, thermobaricity...). 1597 1585 Non-Boussinesq models contain all ocean effects within the ocean acting on the sea level. 1598 1586 In particular, they include the steric effect. 1599 In contrast, Boussinesq models, such as \NEMO, conserve volume, rather than mass, 1587 In contrast, Boussinesq models, such as \NEMO, conserve volume, rather than mass, 1600 1588 and so do not properly represent expansion or contraction. 1601 1589 The steric effect is therefore not explicitely represented. 1602 This approximation does not represent a serious error with respect to the flow field calculated by 1603 the model \citep{Greatbatch_JGR94}, but extra attention is required when investigating sea level, 1604 as steric changes are an important contribution to local changes in sea level on seasonal and 1605 climatic time scales. 1606 This is especially true for investigation into sea level rise due to global warming. 1607 1608 Fortunately, the steric contribution to the sea level consists of a spatially uniform component that 1590 This approximation does not represent a serious error with respect to the flow field calculated by the model 1591 \citep{Greatbatch_JGR94}, but extra attention is required when investigating sea level, 1592 as steric changes are an important contribution to local changes in sea level on seasonal and climatic time scales. 1593 This is especially true for investigation into sea level rise due to global warming. 1594 1595 Fortunately, the steric contribution to the sea level consists of a spatially uniform component that 1609 1596 can be diagnosed by considering the mass budget of the world ocean \citep{Greatbatch_JGR94}. 1610 In order to better understand how global mean sea level evolves and thus how the steric sea level can 1611 be diagnosed,we compare, in the following, the non-Boussinesq and Boussinesq cases.1597 In order to better understand how global mean sea level evolves and thus how the steric sea level can be diagnosed, 1598 we compare, in the following, the non-Boussinesq and Boussinesq cases. 1612 1599 1613 1600 Let denote … … 1628 1615 \] 1629 1616 1630 Temporal changes in total mass is obtained from the density conservation equation 1617 Temporal changes in total mass is obtained from the density conservation equation: 1631 1618 1632 1619 \[ \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) … … 1634 1621 \label{eq:Co_nBq} \] 1635 1622 1636 where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass 1637 exchanges with the other media of the Earth system (atmosphere, sea-ice, land). 1623 where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 1624 the Earth system (atmosphere, sea-ice, land). 1638 1625 Its global averaged leads to the total mass change 1639 1626 … … 1642 1629 1643 1630 where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. 1644 Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to 1631 Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to 1645 1632 the evolution equation of the mean sea level 1646 1633 … … 1649 1636 \label{eq:ssh_nBq} \] 1650 1637 1651 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or 1652 subtracting mass from the ocean. 1653 The second term arises from temporal changes in the global mean density; $i.e.$ from steric effects. 1654 1655 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when 1656 $\rho$ appears multiplied by the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations). 1657 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into 1658 the incompressibility equation: 1638 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 1639 The second term arises from temporal changes in the global mean density; $i.e.$ from steric effects. 1640 1641 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 1642 the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations). 1643 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 1659 1644 1660 1645 \[ \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) … … 1667 1652 \label{eq:V_Bq} \] 1668 1653 1669 Only the volume is conserved, not mass, or, more precisely, the mass which is conserved is 1670 the Boussinesq mass, $\mathcal{M}_o = \rho_o \mathcal{V}$. 1671 The total volume (or equivalently the global mean sea level) is altered only by net volume fluxes across 1672 the ocean surface, not by changes in mean mass of the ocean: the steric effect is missing in 1673 a Boussinesq fluid. 1674 1675 Nevertheless, following \citep{Greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 1654 Only the volume is conserved, not mass, or, more precisely, the mass which is conserved is the Boussinesq mass, 1655 $\mathcal{M}_o = \rho_o \mathcal{V}$. 1656 The total volume (or equivalently the global mean sea level) is altered only by net volume fluxes across 1657 the ocean surface, not by changes in mean mass of the ocean: the steric effect is missing in a Boussinesq fluid. 1658 1659 Nevertheless, following \citep{Greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 1676 1660 considering the mass budget of the ocean. 1677 The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by 1678 surface mass flux must be compensated by a spatially uniform change in the mean sea level due to 1679 expansion/contraction of the ocean\citep{Greatbatch_JGR94}.1680 In others words, the Boussinesq mass, $\mathcal{M}_o$, can be related to $\mathcal{M}$, 1681 the total mass of the ocean seen by the Boussinesq model, via the steric contribution to the sea level,1661 The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 1662 must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean 1663 \citep{Greatbatch_JGR94}. 1664 In others words, the Boussinesq mass, $\mathcal{M}_o$, can be related to $\mathcal{M}$, 1665 the total mass of the ocean seen by the Boussinesq model, via the steric contribution to the sea level, 1682 1666 $\eta_s$, a spatially uniform variable, as follows: 1683 1667 … … 1685 1669 \label{eq:M_Bq} \] 1686 1670 1687 Any change in $\mathcal{M}$ which cannot be explained by the net mass flux through 1688 the ocean surfaceis converted into a mean change in sea level.1689 Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, where1690 $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) in 1691 \autoref{eq:M_Bq} leads to a very simple form for the steric height:1671 Any change in $\mathcal{M}$ which cannot be explained by the net mass flux through the ocean surface 1672 is converted into a mean change in sea level. 1673 Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 1674 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) 1675 in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 1692 1676 1693 1677 \[ \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} … … 1699 1683 We do not recommend that. 1700 1684 Indeed, in this case $\rho_o$ depends on the initial state of the ocean. 1701 Since $\rho_o$ has a direct effect on the dynamics of the ocean (it appears in1702 the pressure gradient term of the momentum equation) it is definitively not a good idea when 1703 i nter-comparing experiments.1685 Since $\rho_o$ has a direct effect on the dynamics of the ocean 1686 (it appears in the pressure gradient term of the momentum equation) 1687 it is definitively not a good idea when inter-comparing experiments. 1704 1688 We better recommend to fixe once for all $\rho_o$ to $1035\;Kg\,m^{-3}$. 1705 This value is a sensible choice for the reference density used in a Boussinesq ocean climate model since, 1706 with the exception of only a small percentage of the ocean, density in the World Ocean varies by 1707 no more than2$\%$ from this value (\cite{Gill1982}, page 47).1708 1709 Second, we have assumed here that the total ocean surface, $\mathcal{A}$, does not change when1710 the sea level is changing as it is the case in all global ocean GCMs 1689 This value is a sensible choice for the reference density used in a Boussinesq ocean climate model since, 1690 with the exception of only a small percentage of the ocean, density in the World Ocean varies by no more than 1691 2$\%$ from this value (\cite{Gill1982}, page 47). 1692 1693 Second, we have assumed here that the total ocean surface, $\mathcal{A}$, 1694 does not change when the sea level is changing as it is the case in all global ocean GCMs 1711 1695 (wetting and drying of grid point is not allowed). 1712 1696 1713 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of 1714 free surface which is considered. 1697 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 1715 1698 In the non linear free surface case, $i.e.$ \key{vvl} defined, it is given by 1716 1699 … … 1719 1702 \label{eq:discrete_steric_Bq_nfs} \] 1720 1703 1721 whereas in the linear free surface, the volume above the \textit{z=0} surface must be explicitly 1722 taken into account to better approximate the total ocean mass and thus the steric sea level: 1704 whereas in the linear free surface, 1705 the volume above the \textit{z=0} surface must be explicitly taken into account to 1706 better approximate the total ocean mass and thus the steric sea level: 1723 1707 1724 1708 \[ \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } … … 1729 1713 In the real ocean, sea ice (and snow above it) depresses the liquid seawater through its mass loading. 1730 1714 This depression is a result of the mass of sea ice/snow system acting on the liquid ocean. 1731 There is, however, no dynamical effect associated with these depressions in the liquid ocean sea level, 1715 There is, however, no dynamical effect associated with these depressions in the liquid ocean sea level, 1732 1716 so that there are no associated ocean currents. 1733 Hence, the dynamically relevant sea level is the effective sea level, $i.e.$ the sea level as if 1734 sea ice (and snow) were converted to liquid seawater \citep{Campin_al_OM08}. 1735 However, in the current version of \NEMO the sea-ice is levitating above the ocean without 1736 mass exchanges between ice and ocean. 1737 Therefore the model effective sea level is always given by $\eta + \eta_s$, 1738 whether or not there is sea ice present. 1717 Hence, the dynamically relevant sea level is the effective sea level, 1718 $i.e.$ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{Campin_al_OM08}. 1719 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between 1720 ice and ocean. 1721 Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. 1739 1722 1740 1723 In AR5 outputs, the thermosteric sea level is demanded. … … 1747 1730 where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. 1748 1731 1749 Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs 1750 the \key{diaar5} defined tobe called.1732 Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs the \key{diaar5} defined to 1733 be called. 1751 1734 1752 1735 % ------------------------------------------------------------------------------------------------------------- … … 1761 1744 \subsection{Depth of various quantities (\protect\mdl{diahth})} 1762 1745 1763 Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key: 1746 Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key: 1764 1747 1765 1748 - the mixed layer depth (based on a density criterion \citep{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) … … 1782 1765 %----------------------------------------------------------------------------------------- 1783 1766 1784 The poleward heat and salt transports, their advective and diffusive component, and1785 the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true 1767 The poleward heat and salt transports, their advective and diffusive component, 1768 and the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true 1786 1769 (see the \textit{\ngn{namptr} } namelist below). 1787 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, 1788 Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S) as well as for the World Ocean. 1789 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains 1790 three 2D mask arrays, the Indo-Pacific mask been deduced from the sum of the Indian and 1791 Pacific mask (\autoref{fig:mask_subasins}). 1770 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 1771 Pacific and Indo-Pacific Oceans (defined north of 30\deg S) as well as for the World Ocean. 1772 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 1773 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 1792 1774 1793 1775 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1794 \begin{figure}[!t] \begin{center}1795 \includegraphics[width=1.0\textwidth]{Fig_mask_subasins}1796 \caption{ \protect\label{fig:mask_subasins}1797 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute the heat and 1798 salt transports as well as the meridional stream-function: Atlantic basin (red),1799 Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 1800 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from 1801 the sub-basins. Note also that the Arctic Ocean has been split into Atlantic and1802 1776 \begin{figure}[!t] 1777 \begin{center} 1778 \includegraphics[width=1.0\textwidth]{Fig_mask_subasins} 1779 \caption{ \protect\label{fig:mask_subasins} 1780 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 1781 compute the heat and salt transports as well as the meridional stream-function: 1782 Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 1783 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins. 1784 Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line.} 1803 1785 \end{center} \end{figure} 1804 1786 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 1827 1809 The 25 hour mean is available for daily runs by summing up the 25 hourly instantananeous hourly values from 1828 1810 midnight at the start of the day to midight at the day end. 1829 This diagnostic is actived with the logical $ln\_dia25h$1811 This diagnostic is actived with the logical $ln\_dia25h$. 1830 1812 1831 1813 % ----------------------------------------------------------- … … 1839 1821 %---------------------------------------------------------------------------------------------------------- 1840 1822 1841 A module is available to output the surface (top), mid water and bed diagnostics of a set of 1842 standard variables. 1843 This can be a useful diagnostic when hourly or sub-hourly output is required in 1844 high resolution tidal outputs. 1823 A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables. 1824 This can be a useful diagnostic when hourly or sub-hourly output is required in high resolution tidal outputs. 1845 1825 The tidal signal is retained but the overall data usage is cut to just three vertical levels. 1846 1826 Also the bottom level is calculated for each cell. 1847 This diagnostic is actived with the logical $ln\_diatmb$1827 This diagnostic is actived with the logical $ln\_diatmb$. 1848 1828 1849 1829 % ----------------------------------------------------------- … … 1859 1839 1860 1840 in the zonal, meridional and vertical directions respectively. 1861 The vertical component is included although it is not strictly valid as the vertical velocity is 1862 calculated fromthe continuity equation rather than as a prognostic variable.1841 The vertical component is included although it is not strictly valid as the vertical velocity is calculated from 1842 the continuity equation rather than as a prognostic variable. 1863 1843 Physically this represents the rate at which information is propogated across a grid cell. 1864 Values greater than 1 indicate that information is propagated across more than one grid cell in 1865 a single time step. 1866 1867 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in 1868 the \ngn{namctl} namelist. 1844 Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 1845 1846 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. 1869 1847 The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 1870 In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with 1871 the coordinates ofwhere the maximum value occurs.1872 At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is 1873 printed alongwith the coordinates of each.1848 In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 1849 where the maximum value occurs. 1850 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 1851 with the coordinates of each. 1874 1852 The maximum values from the run are also copied to the ocean.output file. 1875 1853 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex
r10146 r10354 18 18 The skin temperature can be split into three parts: 19 19 \begin{itemize} 20 \item A foundation SST which is free from diurnal warming. 21 \item A warm layer, typically ~3\,m thick, where heating from solar radiation can 22 cause a warm stably stratified layer during the daytime 23 \item A cool skin, a thin layer, approximately ~1\,mm thick, where long wave cooling 24 is dominant and cools the immediate ocean surface. 20 \item 21 A foundation SST which is free from diurnal warming. 22 \item 23 A warm layer, typically ~3\,m thick, 24 where heating from solar radiation can cause a warm stably stratified layer during the daytime 25 \item 26 A cool skin, a thin layer, approximately ~1\, mm thick, 27 where long wave cooling is dominant and cools the immediate ocean surface. 25 28 \end{itemize} 26 29 27 Models are provided for both the warm layer, \mdfl{diurnal_bulk}, and the cool skin, 28 \mdl{cool_skin}. Foundation SST is not considered as it can be obtained 29 either from the main NEMO model ($i.e.$ from the temperature of the top few model levels) 30 or from some other source. 31 It must be noted that both the cool skin and warm layer models produce estimates of 32 the change in temperature ($\Delta T_{\rm{cs}}$ and $\Delta T_{\rm{wl}}$) 33 and both must be added to a foundation SST to obtain the true skin temperature. 30 Models are provided for both the warm layer, \mdfl{diurnal_bulk}, and the cool skin, \mdl{cool_skin}. 31 Foundation SST is not considered as it can be obtained either from the main NEMO model 32 ($i.e.$ from the temperature of the top few model levels) or from some other source. 33 It must be noted that both the cool skin and warm layer models produce estimates of the change in temperature 34 ($\Delta T_{\rm{cs}}$ and $\Delta T_{\rm{wl}}$) and 35 both must be added to a foundation SST to obtain the true skin temperature. 34 36 35 37 Both the cool skin and warm layer models are controlled through the namelist \ngn{namdiu}: … … 38 40 This namelist contains only two variables: 39 41 \begin{description} 40 \item[\np{ln\_diurnal}] A logical switch for turning on/off both the cool skin and warm layer. 41 \item[\np{ln\_diurnal\_only}] A logical switch which if \forcode{.true.} will run the diurnal model 42 without the other dynamical parts of NEMO. 43 \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 42 \item[\np{ln\_diurnal}] 43 A logical switch for turning on/off both the cool skin and warm layer. 44 \item[\np{ln\_diurnal\_only}] 45 A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of NEMO. 46 \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 44 47 \end{description} 45 48 46 Output for the diurnal model is through the variables `sst\_wl' (warm\_layer) and 47 `sst\_cs' (cool skin). These are 2-D variables which will be included in the model 48 output if they are specified in the iodef.xml file. 49 Output for the diurnal model is through the variables `sst\_wl' (warm\_layer) and `sst\_cs' (cool skin). 50 These are 2-D variables which will be included in the model output if they are specified in the iodef.xml file. 49 51 50 Initialisation is through the restart file. Specifically the code will expect 51 the presence of the 2-D variable ``Dsst'' to initialise the warm layer. 52 The cool skin model, which is determined purely by the instantaneous fluxes, 53 has no initialisation variable. 52 Initialisation is through the restart file. 53 Specifically the code will expect the presence of the 2-D variable ``Dsst'' to initialise the warm layer. 54 The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable. 54 55 55 56 %=============================================================== … … 58 59 %=============================================================== 59 60 60 The warm layer is calculated using the model of \citet{Takaya_al_JGR10} (TAKAYA10 model 61 hereafter).This is a simple flux based model that is defined by the equations61 The warm layer is calculated using the model of \citet{Takaya_al_JGR10} (TAKAYA10 model hereafter). 62 This is a simple flux based model that is defined by the equations 62 63 \begin{eqnarray} 63 64 \frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p … … 66 67 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2} 67 68 \end{eqnarray} 68 where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm 69 layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. In 70 equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion 71 coefficient of water, $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat 72 capacity at constant pressure of sea water, $\rho_w$ is the 73 water density, and $L$ is the Monin-Obukhov length. The tunable 74 variable $\nu$ is a shape parameter that defines the expected 75 subskin temperature profile via $T(z)=T(0)-\left(\frac{z}{D_T}\right)^\nu\Delta 76 T_{\rm{wl}}$, 77 where $T$ is the absolute temperature and $z\le D_T$ is the depth 78 below the top of the warm layer. 79 The influence of wind on TAKAYA10 comes through the magnitude of the friction velocity 80 of the water 81 $u^*_{w}$, which can be related to the 10\,m wind speed $u_{10}$ through the relationship 82 $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is 83 the drag coefficient, and $\rho_a$ is the density of air. The symbol $Q$ in equation 84 (\autoref{eq:ecmwf1}) is the instantaneous total thermal energy 85 flux into 69 where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. 70 In equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water, 71 $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat capacity at constant pressure of sea water, 72 $\rho_w$ is the water density, and $L$ is the Monin-Obukhov length. 73 The tunable variable $\nu$ is a shape parameter that defines the expected subskin temperature profile via 74 $T(z)=T(0)-\left(\frac{z}{D_T}\right)^\nu\DeltaT_{\rm{wl}}$, 75 where $T$ is the absolute temperature and $z\le D_T$ is the depth below the top of the warm layer. 76 The influence of wind on TAKAYA10 comes through the magnitude of the friction velocity of the water $u^*_{w}$, 77 which can be related to the 10\,m wind speed $u_{10}$ through 78 the relationship $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is the drag coefficient, 79 and $\rho_a$ is the density of air. 80 The symbol $Q$ in equation (\autoref{eq:ecmwf1}) is the instantaneous total thermal energy flux into 86 81 the diurnal layer, $i.e.$ 87 82 \begin{equation} 88 83 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{eq:e_flux_eqn} 89 84 \end{equation} 90 where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long 91 wave flux, and $Q_{\rm{sol}}$ is the solar flux absorbed 92 within the diurnal warm layer. For $Q_{\rm{sol}}$ the 9 term 93 representation of \citet{Gentemann_al_JGR09} is used. In equation \autoref{eq:ecmwf1} 94 the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, where $L_a=0.3$\footnote{This 95 is a global average value, more accurately $L_a$ could be computed as 96 $L_a=(u^*_{w}/u_s)^{\frac{1}{2}}$, where $u_s$ is the stokes drift, but this is not 97 currently done} is the turbulent Langmuir number and is a 98 parametrization of the effect of waves. 85 where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long wave flux, 86 and $Q_{\rm{sol}}$ is the solar flux absorbed within the diurnal warm layer. 87 For $Q_{\rm{sol}}$ the 9 term representation of \citet{Gentemann_al_JGR09} is used. 88 In equation \autoref{eq:ecmwf1} the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, 89 where $L_a=0.3$\footnote{ 90 This is a global average value, more accurately $L_a$ could be computed as $L_a=(u^*_{w}/u_s)^{\frac{1}{2}}$, 91 where $u_s$ is the stokes drift, but this is not currently done 92 } is the turbulent Langmuir number and is a parametrization of the effect of waves. 99 93 The function $\Phi\!\left(\frac{D_T}{L}\right)$ is the similarity function that 100 parametrizes the stability of the water column and 101 is given by: 94 parametrizes the stability of the water column and is given by: 102 95 \begin{equation} 103 96 \Phi(\zeta) = \left\{ \begin{array}{cc} 1 + \frac{5\zeta + … … 106 99 \end{array} \right. \label{eq:stab_func_eqn} 107 100 \end{equation} 108 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of 109 (\autoref{eq:stab_func_eqn}), and thus of (\autoref{eq:ecmwf1}), 110 is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ inequation (\autoref{eq:ecmwf2})).101 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of (\autoref{eq:stab_func_eqn}), 102 and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in 103 equation (\autoref{eq:ecmwf2})). 111 104 112 105 The two terms on the right hand side of (\autoref{eq:ecmwf1}) represent different processes. 113 The first term is simply the diabatic heating or cooling of the 114 diurnal warm 115 layer due to thermal energy 116 fluxes into and out of the layer. The second term 117 parametrizes turbulent fluxes of heat out of the diurnal warm layer due to wind 118 induced mixing. In practice the second term acts as a relaxation 119 on the temperature. 106 The first term is simply the diabatic heating or cooling of the diurnal warm layer due to 107 thermal energy fluxes into and out of the layer. 108 The second term parametrizes turbulent fluxes of heat out of the diurnal warm layer due to wind induced mixing. 109 In practice the second term acts as a relaxation on the temperature. 120 110 121 111 %=============================================================== … … 126 116 %=============================================================== 127 117 128 The cool skin is modelled using the framework of \citet{Saunders_JAS82} who used a 129 formulation of the near surface temperature difference based upon the heat flux and 130 the friction velocity $u^*_{w}$. As the cool skin 131 is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the 132 Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes 118 The cool skin is modelled using the framework of \citet{Saunders_JAS82} who used a formulation of the near surface temperature difference based upon the heat flux and the friction velocity $u^*_{w}$. 119 As the cool skin is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes 133 120 \begin{equation} 134 121 \label{eq:sunders_eqn} … … 136 123 \end{equation} 137 124 where $Q_{\rm{ns}}$ is the, usually negative, non-solar heat flux into the ocean and 138 $k_t$ is the thermal conductivity of sea water. $\delta$ is the thickness of the139 skin layer and is given by125 $k_t$ is the thermal conductivity of sea water. 126 $\delta$ is the thickness of the skin layer and is given by 140 127 \begin{equation} 141 128 \label{eq:sunders_thick_eqn} 142 129 \delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,} 143 130 \end{equation} 144 where $\mu$ is the kinematic viscosity of sea water and $\lambda$ is a constant of 145 proportionality which\citet{Saunders_JAS82} suggested varied between 5 and 10.131 where $\mu$ is the kinematic viscosity of sea water and $\lambda$ is a constant of proportionality which 132 \citet{Saunders_JAS82} suggested varied between 5 and 10. 146 133 147 The value of $\lambda$ used in equation (\autoref{eq:sunders_thick_eqn}) is that of 148 \citet{Artale_al_JGR02}, 149 which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other 150 parametrisations at both low and high wind speeds.Specifically,134 The value of $\lambda$ used in equation (\autoref{eq:sunders_thick_eqn}) is that of \citet{Artale_al_JGR02}, 135 which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other parametrisations at 136 both low and high wind speeds. 137 Specifically, 151 138 \begin{equation} 152 139 \label{eq:artale_lambda_eqn} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex
r10146 r10354 20 20 $\ $\newline % force a new line 21 21 22 Having defined the continuous equations in \autoref{chap:PE} and chosen a time 23 discretization \autoref{chap:STP}, we need to choose a discretization on a grid, 24 and numerical algorithms. In the present chapter, we provide a general description 25 of the staggered grid used in \NEMO, and other information relevant to the main 26 directory routines as well as the DOM (DOMain) directory. 22 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP}, 23 we need to choose a discretization on a grid, and numerical algorithms. 24 In the present chapter, we provide a general description of the staggered grid used in \NEMO, 25 and other information relevant to the main directory routines as well as the DOM (DOMain) directory. 27 26 28 27 $\ $\newline % force a new line … … 43 42 \begin{figure}[!tb] \begin{center} 44 43 \includegraphics[width=0.90\textwidth]{Fig_cell} 45 \caption{ \protect\label{fig:cell} 46 Arrangement of variables. $t$ indicates scalar points where temperature, 47 salinity, density, pressure and horizontal divergence are defined. ($u$,$v$,$w$) 48 indicates vector points, and $f$ indicates vorticity points where both relative and 49 planetary vorticities are defined}44 \caption{ \protect\label{fig:cell} 45 Arrangement of variables. 46 $t$ indicates scalar points where temperature, salinity, density, pressure and horizontal divergence are defined. 47 ($u$,$v$,$w$) indicates vector points, 48 and $f$ indicates vorticity points where both relative and planetary vorticities are defined} 50 49 \end{center} \end{figure} 51 50 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 52 51 53 The numerical techniques used to solve the Primitive Equations in this model are 54 based on the traditional, centred second-order finite difference approximation. 55 Special attention has been given to the homogeneity of the solution in the three 56 space directions. The arrangement of variables is the same in all directions. 57 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector 58 points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:cell}). 59 This is the generalisation to three dimensions of the well-known ``C'' grid in 60 Arakawa's classification \citep{Mesinger_Arakawa_Bk76}. The relative and 61 planetary vorticity, $\zeta$ and $f$, are defined in the centre of each vertical edge 62 and the barotropic stream function $\psi$ is defined at horizontal points overlying 63 the $\zeta$ and $f$-points. 64 65 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined 66 by the transformation that gives ($\lambda$ ,$\varphi$ ,$z$) as a function of $(i,j,k)$. 67 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as 68 indicated on \autoref{tab:cell}. In all the following, subscripts $u$, $v$, $w$, 69 $f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where the scale 70 factors are defined. Each scale factor is defined as the local analytical value 71 provided by \autoref{eq:scale_factors}. As a result, the mesh on which partial 72 derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, and 73 $\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity. 74 Discrete partial derivatives are formulated by the traditional, centred second order 75 finite difference approximation while the scale factors are chosen equal to their 76 local analytical value. An important point here is that the partial derivative of the 77 scale factors must be evaluated by centred finite difference approximation, not 78 from their analytical expression. This preserves the symmetry of the discrete set 79 of equations and therefore satisfies many of the continuous properties (see 80 \autoref{apdx:C}). A similar, related remark can be made about the domain 81 size: when needed, an area, volume, or the total ocean depth must be evaluated 82 as the sum of the relevant scale factors (see \autoref{eq:DOM_bar}) in the next section). 52 The numerical techniques used to solve the Primitive Equations in this model are based on the traditional, 53 centred second-order finite difference approximation. 54 Special attention has been given to the homogeneity of the solution in the three space directions. 55 The arrangement of variables is the same in all directions. 56 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in 57 the centre of each face of the cells (\autoref{fig:cell}). 58 This is the generalisation to three dimensions of the well-known ``C'' grid in Arakawa's classification 59 \citep{Mesinger_Arakawa_Bk76}. 60 The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each vertical edge and 61 the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points. 62 63 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by 64 the transformation that gives ($\lambda$ ,$\varphi$ ,$z$) as a function of $(i,j,k)$. 65 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. 66 In all the following, subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of 67 the grid-point where the scale factors are defined. 68 Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}. 69 As a result, 70 the mesh on which partial derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, 71 and $\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity. 72 Discrete partial derivatives are formulated by the traditional, 73 centred second order finite difference approximation while 74 the scale factors are chosen equal to their local analytical value. 75 An important point here is that the partial derivative of the scale factors must be evaluated by 76 centred finite difference approximation, not from their analytical expression. 77 This preserves the symmetry of the discrete set of equations and 78 therefore satisfies many of the continuous properties (see \autoref{apdx:C}). 79 A similar, related remark can be made about the domain size: 80 when needed, an area, volume, or the total ocean depth must be evaluated as the sum of the relevant scale factors 81 (see \autoref{eq:DOM_bar}) in the next section). 83 82 84 83 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 96 95 \end{tabular} 97 96 \caption{ \protect\label{tab:cell} 98 Location of grid-points as a function of integer or integer and a half value of the column, 99 line or level. This indexing is only used for the writing of the semi-discrete equation. 100 In the code, the indexing uses integer values only and has a reverse direction 101 in the vertical(see \autoref{subsec:DOM_Num_Index})}97 Location of grid-points as a function of integer or integer and a half value of the column, line or level. 98 This indexing is only used for the writing of the semi-discrete equation. 99 In the code, the indexing uses integer values only and has a reverse direction in the vertical 100 (see \autoref{subsec:DOM_Num_Index})} 102 101 \end{center} 103 102 \end{table} … … 110 109 \label{subsec:DOM_operators} 111 110 112 Given the values of a variable $q$ at adjacent points, the differencing and113 averaging operators at the midpoint between them are:111 Given the values of a variable $q$ at adjacent points, 112 the differencing and averaging operators at the midpoint between them are: 114 113 \begin{subequations} \label{eq:di_mi} 115 114 \begin{align} … … 119 118 \end{subequations} 120 119 121 Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and 122 $k+1/2$. Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a 123 variable $q$ defined at a $t$-point has its three components defined at $u$-, $v$- 124 and $w$-points while its Laplacien is defined at $t$-point. These operators have 125 the following discrete forms in the curvilinear $s$-coordinate system:120 Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and $k+1/2$. 121 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at 122 a $t$-point has its three components defined at $u$-, $v$- and $w$-points while 123 its Laplacien is defined at $t$-point. 124 These operators have the following discrete forms in the curvilinear $s$-coordinate system: 126 125 \begin{equation} \label{eq:DOM_grad} 127 126 \nabla q\equiv \frac{1}{e_{1u} } \delta _{i+1/2 } [q] \;\,\mathbf{i} … … 136 135 \end{multline} 137 136 138 Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 139 defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, 140 and $f$-points, andits divergence defined at $t$-points:137 Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 138 defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, 139 and its divergence defined at $t$-points: 141 140 \begin{eqnarray} \label{eq:DOM_curl} 142 141 \nabla \times {\rm{\bf A}}\equiv & … … 151 150 \end{eqnarray} 152 151 153 The vertical average over the whole water column denoted by an overbar becomes 154 for a quantity $q$ whichis a masked field (i.e. equal to zero inside solid area):152 The vertical average over the whole water column denoted by an overbar becomes for a quantity $q$ which 153 is a masked field (i.e. equal to zero inside solid area): 155 154 \begin{equation} \label{eq:DOM_bar} 156 155 \bar q = \frac{1}{H} \int_{k^b}^{k^o} {q\;e_{3q} \,dk} 157 156 \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } 158 157 \end{equation} 159 where $H_q$ is the ocean depth, which is the masked sum of the vertical scale 160 factors at $q$ points, $k^b$ and $k^o$ are the bottom and surface $k$-indices, 161 and the symbol $k^o$ refers to a summation over all grid points of the same type 162 in the direction indicated bythe subscript (here $k$).158 where $H_q$ is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points, 159 $k^b$ and $k^o$ are the bottom and surface $k$-indices, 160 and the symbol $k^o$ refers to a summation over all grid points of the same type in the direction indicated by 161 the subscript (here $k$). 163 162 164 163 In continuous form, the following properties are satisfied: … … 170 169 \end{equation} 171 170 172 It is straightforward to demonstrate that these properties are verified locally in 173 discrete form as soon as the scalar $q$ is taken at $t$-points and the vector 174 \textbf{A} has its components defined at vector points $(u,v,w)$.175 176 Let $a$ and $b$ be two fields defined on the mesh, with value zero inside 177 continental area. Using integration by parts it can be shown that the differencing 178 operators ($\delta_i$, $\delta_j$ and $\delta_k$) are skew-symmetric linear operators, 179 and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$, 180 $\overline{\,\cdot\,}^{\,k}$ and $\overline{\,\cdot\,}^{\,k}$) are symmetric linear181 operators,$i.e.$171 It is straightforward to demonstrate that these properties are verified locally in discrete form as soon as 172 the scalar $q$ is taken at $t$-points and 173 the vector \textbf{A} has its components defined at vector points $(u,v,w)$. 174 175 Let $a$ and $b$ be two fields defined on the mesh, with value zero inside continental area. 176 Using integration by parts it can be shown that 177 the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$) are skew-symmetric linear operators, 178 and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$, $\overline{\,\cdot\,}^{\,k}$ and 179 $\overline{\,\cdot\,}^{\,k}$) are symmetric linear operators, 180 $i.e.$ 182 181 \begin{align} 183 182 \label{eq:DOM_di_adj} … … 189 188 \end{align} 190 189 191 In other words, the adjoint of the differencing and averaging operators are 192 $\delta_i^*=\delta_{i+1/2}$ and 190 In other words, the adjoint of the differencing and averaging operators are $\delta_i^*=\delta_{i+1/2}$ and 193 191 ${(\overline{\,\cdot \,}^{\,i})}^*= \overline{\,\cdot\,}^{\,i+1/2}$, respectively. 194 These two properties will be used extensively in the \autoref{apdx:C} to 192 These two properties will be used extensively in the \autoref{apdx:C} to 195 193 demonstrate integral conservative properties of the discrete formulation chosen. 196 194 … … 204 202 \begin{figure}[!tb] \begin{center} 205 203 \includegraphics[width=0.90\textwidth]{Fig_index_hor} 206 \caption{ \protect\label{fig:index_hor} 207 Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates 208 the cell in which variables contained in arrays have the same $i$- and $j$-indices}204 \caption{ \protect\label{fig:index_hor} 205 Horizontal integer indexing used in the \textsc{Fortran} code. 206 The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices} 209 207 \end{center} \end{figure} 210 208 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 211 209 212 The array representation used in the \textsc{Fortran} code requires an integer 213 indexing while the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is 214 associated with the use of integer values for $t$-points and both integer and 215 integer and a half values for all the other points. Therefore a specific integer 216 indexing must be defined for points other than $t$-points ($i.e.$ velocity and 217 vorticity grid-points). Furthermore, the direction of the vertical indexing has 218 been changed so that the surface level is at $k=1$. 210 The array representation used in the \textsc{Fortran} code requires an integer indexing while 211 the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of 212 integer values for $t$-points and both integer and integer and a half values for all the other points. 213 Therefore a specific integer indexing must be defined for points other than $t$-points 214 ($i.e.$ velocity and vorticity grid-points). 215 Furthermore, the direction of the vertical indexing has been changed so that the surface level is at $k=1$. 219 216 220 217 % ----------------------------------- … … 224 221 \label{subsec:DOM_Num_Index_hor} 225 222 226 The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}. 227 For an increasing $i$ index ($j$ index), the $t$-point and the eastward $u$-point 228 (northward $v$-point) have the same index (see the dashed area in \autoref{fig:index_hor}). 223 The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}. 224 For an increasing $i$ index ($j$ index), 225 the $t$-point and the eastward $u$-point (northward $v$-point) have the same index 226 (see the dashed area in \autoref{fig:index_hor}). 229 227 A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices. 230 228 … … 235 233 \label{subsec:DOM_Num_Index_vertical} 236 234 237 In the vertical, the chosen indexing requires special attention since the 238 $k$-axis is re-orientated downward in the \textsc{Fortran} code compared 239 to the indexing used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}. 240 The sea surface corresponds to the $w$-level $k=1$ which is the same index 241 as $t$-level just below (\autoref{fig:index_vert}). The last $w$-level ($k=jpk$) 242 either corresponds to the ocean floor or is inside the bathymetry while the last 243 $t$-level is always inside the bathymetry (\autoref{fig:index_vert}). Note that 244 for an increasing $k$ index, a $w$-point and the $t$-point just below have the 245 same $k$ index, in opposition to what is done in the horizontal plane where 246 it is the $t$-point and the nearest velocity points in the direction of the horizontal 247 axis that have the same $i$ or $j$ index (compare the dashed area in 248 \autoref{fig:index_hor} and \autoref{fig:index_vert}). Since the scale factors are 249 chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran} 250 code \emph{before all the vertical derivatives} of the discrete equations given in 251 this documentation. 235 In the vertical, the chosen indexing requires special attention since 236 the $k$-axis is re-orientated downward in the \textsc{Fortran} code compared to 237 the indexing used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}. 238 The sea surface corresponds to the $w$-level $k=1$ which is the same index as $t$-level just below 239 (\autoref{fig:index_vert}). 240 The last $w$-level ($k=jpk$) either corresponds to the ocean floor or is inside the bathymetry while 241 the last $t$-level is always inside the bathymetry (\autoref{fig:index_vert}). 242 Note that for an increasing $k$ index, a $w$-point and the $t$-point just below have the same $k$ index, 243 in opposition to what is done in the horizontal plane where 244 it is the $t$-point and the nearest velocity points in the direction of the horizontal axis that 245 have the same $i$ or $j$ index 246 (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). 247 Since the scale factors are chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran} 248 code \emph{before all the vertical derivatives} of the discrete equations given in this documentation. 252 249 253 250 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 254 251 \begin{figure}[!pt] \begin{center} 255 252 \includegraphics[width=.90\textwidth]{Fig_index_vert} 256 \caption{ \protect\label{fig:index_vert} 257 Vertical integer indexing used in the \textsc{Fortran } code. Note that 258 the $k$-axis is orientated downward. The dashed area indicates the cell in 259 which variables contained in arrays have the same $k$-index.}253 \caption{ \protect\label{fig:index_vert} 254 Vertical integer indexing used in the \textsc{Fortran } code. 255 Note that the $k$-axis is orientated downward. 256 The dashed area indicates the cell in which variables contained in arrays have the same $k$-index.} 260 257 \end{center} \end{figure} 261 258 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 267 264 \label{subsec:DOM_size} 268 265 269 The total size of the computational domain is set by the parameters \np{jpiglo}, 270 \np{jpjglo} and \np{jpkglo} in the $i$, $j$ and $k$ directions respectively. 266 The total size of the computational domain is set by the parameters \np{jpiglo}, 267 \np{jpjglo} and \np{jpkglo} in the $i$, $j$ and $k$ directions respectively. 271 268 %%% 272 269 %%% 273 270 %%% 274 Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when the code is 275 run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \autoref{sec:LBC_mpp}). 271 Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when 272 the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, 273 see \autoref{sec:LBC_mpp}). 276 274 277 275 … … 283 281 \section{Needed fields} 284 282 \label{sec:DOM_fields} 285 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined 286 by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 287 The grid-points are located at integer or integer and a half values of as indicated 288 in \autoref{tab:cell}. The associated scale factors are defined using the 289 analytical first derivative of the transformation \autoref{eq:scale_factors}. 283 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 284 The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. 285 The associated scale factors are defined using the analytical first derivative of the transformation 286 \autoref{eq:scale_factors}. 290 287 Necessary fields for configuration definition are: \\ 291 288 Geographic position : 292 289 293 longitude : glamt , glamu , glamv and glamf(at T, U, V and F point)294 295 latitude : gphit , gphiu, gphiv and gphif (at T, U, V and F point)\\290 longitude: glamt, glamu, glamv and glamf (at T, U, V and F point) 291 292 latitude: gphit, gphiu, gphiv and gphif (at T, U, V and F point)\\ 296 293 Coriolis parameter (if domain not on the sphere): 297 294 … … 301 298 e1t, e1u, e1v and e1f (on i direction), 302 299 303 e2t, e2u, e2v and e2f (on j direction) 304 305 andie1e2u\_v, e1e2u , e1e2v300 e2t, e2u, e2v and e2f (on j direction) and 301 302 ie1e2u\_v, e1e2u , e1e2v 306 303 307 304 e1e2u , e1e2v are u and v surfaces (if gridsize reduction in some straits)\\ 308 305 ie1e2u\_v is a flag to flag set u and v surfaces are neither read nor computed.\\ 309 306 310 These fields can be read in an domain input file which name is setted in \np{cn\_domcfg} parameter specified in \ngn{namcfg}. 307 These fields can be read in an domain input file which name is setted in 308 \np{cn\_domcfg} parameter specified in \ngn{namcfg}. 311 309 312 310 \nlst{namcfg} 313 311 or they can be defined in an analytical way in MY\_SRC directory of the configuration. 314 For Reference Configurations of NEMO input domain files are supplied by NEMO System Team. For analytical definition of input fields two routines are supplied: \mdl{userdef\_hgr} and \mdl{userdef\_zgr}. They are an example of GYRE configuration parameters, and they are available in NEMO/OPA\_SRC/USR directory, they provide the horizontal and vertical mesh. 312 For Reference Configurations of NEMO input domain files are supplied by NEMO System Team. 313 For analytical definition of input fields two routines are supplied: \mdl{userdef\_hgr} and \mdl{userdef\_zgr}. 314 They are an example of GYRE configuration parameters, and they are available in NEMO/OPA\_SRC/USR directory, 315 they provide the horizontal and vertical mesh. 315 316 % ------------------------------------------------------------------------------------------------------------- 316 317 % Needed fields … … 332 333 \label{subsec:DOM_hgr_coord_e} 333 334 334 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined 335 by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 336 The grid-points are located at integer or integer and a half values of as indicated 337 in \autoref{tab:cell}. The associated scale factors are defined using the 338 analytical first derivative of the transformation \autoref{eq:scale_factors}. These 339 definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, which 340 provide the horizontal and vertical meshes, respectively. This section deals with 341 the horizontal mesh parameters. 342 343 In a horizontal plane, the location of all the model grid points is defined from the 344 analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a 345 function of $(i,j)$. The horizontal scale factors are calculated using 346 \autoref{eq:scale_factors}. For example, when the longitude and latitude are 347 function of a single value ($i$ and $j$, respectively) (geographical configuration 348 of the mesh), the horizontal mesh definition reduces to define the wanted 349 $\lambda(i)$, $\varphi(j)$, and their derivatives $\lambda'(i)$ $\varphi'(j)$ in the 350 \mdl{domhgr} module. The model computes the grid-point positions and scale 351 factors in the horizontal plane as follows: 335 The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined by 336 the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 337 The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. 338 The associated scale factors are defined using the analytical first derivative of the transformation 339 \autoref{eq:scale_factors}. 340 These definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, 341 which provide the horizontal and vertical meshes, respectively. 342 This section deals with the horizontal mesh parameters. 343 344 In a horizontal plane, the location of all the model grid points is defined from 345 the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$. 346 The horizontal scale factors are calculated using \autoref{eq:scale_factors}. 347 For example, when the longitude and latitude are function of a single value 348 ($i$ and $j$, respectively) (geographical configuration of the mesh), 349 the horizontal mesh definition reduces to define the wanted $\lambda(i)$, $\varphi(j)$, 350 and their derivatives $\lambda'(i)$ $\varphi'(j)$ in the \mdl{domhgr} module. 351 The model computes the grid-point positions and scale factors in the horizontal plane as follows: 352 352 \begin{flalign*} 353 353 \lambda_t &\equiv \text{glamt}= \lambda(i) & \varphi_t &\equiv \text{gphit} = \varphi(j)\\ … … 366 366 e_{2f} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)| 367 367 \end{flalign*} 368 where the last letter of each computational name indicates the grid point 369 considered and $r_a$ is the earth radius (defined in \mdl{phycst} along with 370 all universal constants). Note that the horizontal position of and scale factors 371 at $w$-points are exactly equal to those of $t$-points, thus no specific arrays372 are defined at $w$-points. 373 374 Note that the definition of the scale factors ($i.e.$ as the analytical first derivative 375 of the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) is 376 specific to the \NEMO model \citep{Marti_al_JGR92}. As an example, $e_{1t}$ is defined 377 locally at a $t$-point, whereas many other models on a C grid choose to define 378 such a scale factor as the distance between the $U$-points on each side of the 379 $t$-point. Relying on an analytical transformation has two advantages: firstly, there 380 is no ambiguity in the scale factors appearing in the discrete equations, since they 381 are first introduced in the continuous equations; secondly, analytical transformations 382 encourage good practice by the definition of smoothly varying grids (rather than 383 allowing the user to set arbitrary jumps in thickness between adjacent layers) 384 \citep{Treguier1996}. An example of the effect of such a choice is shown in 385 \autoref{fig:zgr_e3}.368 where the last letter of each computational name indicates the grid point considered and 369 $r_a$ is the earth radius (defined in \mdl{phycst} along with all universal constants). 370 Note that the horizontal position of and scale factors at $w$-points are exactly equal to those of $t$-points, 371 thus no specific arrays are defined at $w$-points. 372 373 Note that the definition of the scale factors 374 ($i.e.$ as the analytical first derivative of the transformation that 375 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) 376 is specific to the \NEMO model \citep{Marti_al_JGR92}. 377 As an example, $e_{1t}$ is defined locally at a $t$-point, 378 whereas many other models on a C grid choose to define such a scale factor as 379 the distance between the $U$-points on each side of the $t$-point. 380 Relying on an analytical transformation has two advantages: 381 firstly, there is no ambiguity in the scale factors appearing in the discrete equations, 382 since they are first introduced in the continuous equations; 383 secondly, analytical transformations encourage good practice by the definition of smoothly varying grids 384 (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{Treguier1996}. 385 An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. 386 386 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 387 387 \begin{figure}[!t] \begin{center} 388 388 \includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 389 \caption{ \protect\label{fig:zgr_e3} 390 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 391 and (b) analytically derived grid-point position and scale factors. 392 For both grids here, the same $w$-point depth has been chosen but in (a) the 393 $t$-points are set half way between $w$-points while in (b) they are defined from 394 an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. 395 Note the resulting difference between the value of the grid-size $\Delta_k$ and 396 those of the scale factor $e_k$. } 389 \caption{ \protect\label{fig:zgr_e3} 390 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 391 and (b) analytically derived grid-point position and scale factors. 392 For both grids here, 393 the same $w$-point depth has been chosen but in (a) the $t$-points are set half way between $w$-points while 394 in (b) they are defined from an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. 395 Note the resulting difference between the value of the grid-size $\Delta_k$ and those of the scale factor $e_k$. } 397 396 \end{center} \end{figure} 398 397 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 411 410 \label{subsec:DOM_hgr_files} 412 411 413 All the arrays relating to a particular ocean model configuration (grid-point 414 position, scale factors, masks) can be saved in files if \np{nn\_msh} $\not= 0$ 415 (namelist variable in \ngn{namdom}). This can be particularly useful for plots and off-line 416 diagnostics. In some cases, the user may choose to make a local modification 417 of a scale factor in the code. This is the case in global configurations when 418 restricting the width of a specific strait (usually a one-grid-point strait that 419 happens to be too wide due to insufficient model resolution). An example 420 is Gibraltar Strait in the ORCA2 configuration. When such modifications are done, 412 All the arrays relating to a particular ocean model configuration (grid-point position, scale factors, masks) 413 can be saved in files if \np{nn\_msh} $\not= 0$ (namelist variable in \ngn{namdom}). 414 This can be particularly useful for plots and off-line diagnostics. 415 In some cases, the user may choose to make a local modification of a scale factor in the code. 416 This is the case in global configurations when restricting the width of a specific strait 417 (usually a one-grid-point strait that happens to be too wide due to insufficient model resolution). 418 An example is Gibraltar Strait in the ORCA2 configuration. 419 When such modifications are done, 421 420 the output grid written when \np{nn\_msh} $\not= 0$ is no more equal to the input grid. 422 421 … … 437 436 Variables are defined through the \ngn{namzgr} and \ngn{namdom} namelists. 438 437 In the vertical, the model mesh is determined by four things: 439 (1) the bathymetry given in meters ; 440 (2) the number of levels of the model (\jp{jpk}) ; 441 (3) the analytical transformation $z(i,j,k)$ and the vertical scale factors 442 (derivatives of the transformation) ; 443 and (4) the masking system, $i.e.$ the number of wet model levels at each 438 (1) the bathymetry given in meters; 439 (2) the number of levels of the model (\jp{jpk}); 440 (3) the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 441 (4) the masking system, $i.e.$ the number of wet model levels at each 444 442 $(i,j)$ column of points. 445 443 … … 447 445 \begin{figure}[!tb] \begin{center} 448 446 \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 449 \caption{ \protect\label{fig:z_zps_s_sps} 450 The ocean bottom as seen by the model: 451 (a) $z$-coordinate with full step, 452 (b) $z$-coordinate with partial step, 453 (c) $s$-coordinate: terrain following representation, 454 (d) hybrid $s-z$ coordinate, 455 (e) hybrid $s-z$ coordinate with partial step, and 456 (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). 457 Note that the non-linear free surface can be used with any of the 458 5 coordinates (a) to (e).} 447 \caption{ \protect\label{fig:z_zps_s_sps} 448 The ocean bottom as seen by the model: 449 (a) $z$-coordinate with full step, 450 (b) $z$-coordinate with partial step, 451 (c) $s$-coordinate: terrain following representation, 452 (d) hybrid $s-z$ coordinate, 453 (e) hybrid $s-z$ coordinate with partial step, and 454 (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). 455 Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).} 459 456 \end{center} \end{figure} 460 457 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 461 458 462 459 The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters, 463 must be done once of all at the beginning of an experiment. It is not intended as an 464 option which can be enabled or disabled in the middle of an experiment. Three main 465 choices are offered (\autoref{fig:z_zps_s_sps}a to c): $z$-coordinate with full step 466 bathymetry (\np{ln\_zco}\forcode{ = .true.}), $z$-coordinate with partial step bathymetry 467 (\np{ln\_zps}\forcode{ = .true.}), or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). 468 Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate 469 (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). By default a non-linear free surface is used: 470 the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 471 $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), 472 the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface 460 must be done once of all at the beginning of an experiment. 461 It is not intended as an option which can be enabled or disabled in the middle of an experiment. 462 Three main choices are offered (\autoref{fig:z_zps_s_sps}a to c): 463 $z$-coordinate with full step bathymetry (\np{ln\_zco}\forcode{ = .true.}), 464 $z$-coordinate with partial step bathymetry (\np{ln\_zps}\forcode{ = .true.}), 465 or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). 466 Hybridation of the three main coordinates are available: 467 $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps} and \autoref{fig:z_zps_s_sps}e). 468 By default a non-linear free surface is used: the coordinate follow the time-variation of the free surface so that 469 the transformation is time dependent: $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). 470 When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), 471 the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface 473 472 (in other words, the top of the ocean in not a rigid-lid). 474 The last choice in terms of vertical coordinate concerns the presence (or not) in the model domain475 of ocean cavities beneath ice shelves. Setting \np{ln\_isfcav} to true allows to manage ocean cavities, 476 otherwise they are filled in. This option is currently only available in $z$- or $zps$-coordinate, 477 and partial step are also applied at the ocean/ice shelf interface. 478 479 Contrary to the horizontal grid, the vertical grid is computed in the code and no 480 provision is made for reading it from a file. The only input file is the bathymetry 481 (in meters) (\ifile{bathy\_meter}). 482 \footnote{N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the 483 \ ifile{bathy\_meter} file, so that the computation of the number of wet ocean point484 in each water column is by-passed}. 485 If \np{ln\_isfcav}\forcode{ = .true.}, an extra file input file describing the ice shelf draft486 (in meters) (\ifile{isf\_draft\_meter}) is needed. 487 488 After reading the bathymetry, the algorithm for vertical grid definition differs 489 between the different options:473 The last choice in terms of vertical coordinate concerns the presence (or not) in 474 the model domain of ocean cavities beneath ice shelves. 475 Setting \np{ln\_isfcav} to true allows to manage ocean cavities, otherwise they are filled in. 476 This option is currently only available in $z$- or $zps$-coordinate, 477 and partial step are also applied at the ocean/ice shelf interface. 478 479 Contrary to the horizontal grid, the vertical grid is computed in the code and 480 no provision is made for reading it from a file. 481 The only input file is the bathymetry (in meters) (\ifile{bathy\_meter}) 482 \footnote{ 483 N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the \ifile{bathy\_meter} file, 484 so that the computation of the number of wet ocean point in each water column is by-passed}. 485 If \np{ln\_isfcav}\forcode{ = .true.}, 486 an extra file input file describing the ice shelf draft (in meters) (\ifile{isf\_draft\_meter}) is needed. 487 488 After reading the bathymetry, the algorithm for vertical grid definition differs between the different options: 490 489 \begin{description} 491 \item[\textit{zco}] set a reference coordinate transformation $z_0 (k)$, and set $z(i,j,k,t)=z_0 (k)$. 492 \item[\textit{zps}] set a reference coordinate transformation $z_0 (k)$, and 493 calculate the thickness of the deepest level at each $(i,j)$ point using the 494 bathymetry, to obtain the final three-dimensional depth and scale factor arrays. 495 \item[\textit{sco}] smooth the bathymetry to fulfil the hydrostatic consistency 496 criteria and set the three-dimensional transformation. 497 \item[\textit{s-z} and \textit{s-zps}] smooth the bathymetry to fulfil the hydrostatic 498 consistency criteria and set the three-dimensional transformation $z(i,j,k)$, and 499 possibly introduce masking of extra land points to better fit the original bathymetry file 490 \item[\textit{zco}] 491 set a reference coordinate transformation $z_0 (k)$, and set $z(i,j,k,t)=z_0 (k)$. 492 \item[\textit{zps}] 493 set a reference coordinate transformation $z_0 (k)$, 494 and calculate the thickness of the deepest level at each $(i,j)$ point using the bathymetry, 495 to obtain the final three-dimensional depth and scale factor arrays. 496 \item[\textit{sco}] 497 smooth the bathymetry to fulfil the hydrostatic consistency criteria and 498 set the three-dimensional transformation. 499 \item[\textit{s-z} and \textit{s-zps}] 500 smooth the bathymetry to fulfil the hydrostatic consistency criteria and 501 set the three-dimensional transformation $z(i,j,k)$, 502 and possibly introduce masking of extra land points to better fit the original bathymetry file. 500 503 \end{description} 501 504 %%% … … 503 506 %%% 504 507 505 Unless a linear free surface is used (\np{ln\_linssh}\forcode{ = .false.}), the arrays describing 506 the grid point depths and vertical scale factors are three set of three dimensional arrays $(i,j,k)$ 507 defined at \textit{before}, \textit{now} and \textit{after} time step. The time at which they are 508 defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. They are updated at each model time step 509 using a fixed reference coordinate system which computer names have a $\_0$ suffix. 510 When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now} 511 and \textit{after} arrays are simply set one for all to their reference counterpart. 508 Unless a linear free surface is used (\np{ln\_linssh}\forcode{ = .false.}), 509 the arrays describing the grid point depths and vertical scale factors are three set of 510 three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. 511 The time at which they are defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. 512 They are updated at each model time step using a fixed reference coordinate system which 513 computer names have a $\_0$ suffix. 514 When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), 515 \textit{before}, \textit{now} and \textit{after} arrays are simply set one for all to their reference counterpart. 512 516 513 517 … … 518 522 \label{subsec:DOM_bathy} 519 523 520 Three options are possible for defining the bathymetry, according to the 521 namelist variable \np{nn\_bathy}(found in \ngn{namdom} namelist):524 Three options are possible for defining the bathymetry, according to the namelist variable \np{nn\_bathy} 525 (found in \ngn{namdom} namelist): 522 526 \begin{description} 523 \item[\np{nn\_bathy}\forcode{ = 0}]: a flat-bottom domain is defined. The total depth $z_w (jpk)$ 524 is given by the coordinate transformation. The domain can either be a closed 525 basin or a periodic channel depending on the parameter \np{jperio}. 526 \item[\np{nn\_bathy}\forcode{ = -1}]: a domain with a bump of topography one third of the 527 domain width at the central latitude. This is meant for the "EEL-R5" configuration, 528 a periodic or open boundary channel with a seamount. 529 \item[\np{nn\_bathy}\forcode{ = 1}]: read a bathymetry and ice shelf draft (if needed). 530 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) 531 at each grid point of the model grid. The bathymetry is usually built by interpolating a standard bathymetry product 532 ($e.g.$ ETOPO2) onto the horizontal ocean mesh. Defining the bathymetry also 533 defines the coastline: where the bathymetry is zero, no model levels are defined 534 (all levels are masked). 535 536 The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) 537 at each grid point of the model grid. This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}. 538 Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 527 \item[\np{nn\_bathy}\forcode{ = 0}]: 528 a flat-bottom domain is defined. 529 The total depth $z_w (jpk)$ is given by the coordinate transformation. 530 The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}. 531 \item[\np{nn\_bathy}\forcode{ = -1}]: 532 a domain with a bump of topography one third of the domain width at the central latitude. 533 This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount. 534 \item[\np{nn\_bathy}\forcode{ = 1}]: 535 read a bathymetry and ice shelf draft (if needed). 536 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 537 each grid point of the model grid. 538 The bathymetry is usually built by interpolating a standard bathymetry product ($e.g.$ ETOPO2) onto 539 the horizontal ocean mesh. 540 Defining the bathymetry also defines the coastline: where the bathymetry is zero, 541 no model levels are defined (all levels are masked). 542 543 The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at 544 each grid point of the model grid. 545 This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}. 546 Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 539 547 \end{description} 540 548 541 When a global ocean is coupled to an atmospheric model it is better to represent 542 all large water bodies (e.g, great lakes, Caspian sea...) even if the model 543 resolution does not allow their communication with the rest of the ocean. 544 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 545 so these seas can be removed from the ocean domain. The user has the option546 to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), but the 547 code has to be adapted to the user's configuration.549 When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies 550 (e.g, great lakes, Caspian sea...) 551 even if the model resolution does not allow their communication with the rest of the ocean. 552 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 553 so these seas can be removed from the ocean domain. 554 The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), 555 but the code has to be adapted to the user's configuration. 548 556 549 557 % ------------------------------------------------------------------------------------------------------------- … … 557 565 \begin{figure}[!tb] \begin{center} 558 566 \includegraphics[width=0.90\textwidth]{Fig_zgr} 559 \caption{ \protect\label{fig:zgr} 560 Default vertical mesh for ORCA2: 30 ocean levels (L30). Vertical level functions for 561 (a) T-point depth and (b) the associated scale factor as computed 562 from\autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.}567 \caption{ \protect\label{fig:zgr} 568 Default vertical mesh for ORCA2: 30 ocean levels (L30). 569 Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from 570 \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.} 563 571 \end{center} \end{figure} 564 572 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 565 573 566 The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$ 567 and $gdepw_0$ for $t$- and $w$-points, respectively. As indicated on 568 \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the 569 ocean surface. There are at most \jp{jpk}-1 $t$-points inside the ocean, the 570 additional $t$-point at $jk=jpk$ is below the sea floor and is not used. 571 The vertical location of $w$- and $t$-levels is defined from the analytic expression 572 of the depth $z_0(k)$ whose analytical derivative with respect to $k$ provides the 573 vertical scale factors. The user must provide the analytical expression of both 574 $z_0$ and its first derivative with respect to $k$. This is done in routine \mdl{domzgr} 575 through statement functions, using parameters provided in the \ngn{namcfg} namelist. 576 577 It is possible to define a simple regular vertical grid by giving zero stretching (\np{ppacr=0}). 578 In that case, the parameters \jp{jpk} (number of $w$-levels) and \np{pphmax} 579 (total ocean depth in meters) fully define the grid. 580 581 For climate-related studies it is often desirable to concentrate the vertical resolution 582 near the ocean surface. The following function is proposed as a standard for a 583 $z$-coordinate (with either full or partial steps): 574 The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$ and $gdepw_0$ for 575 $t$- and $w$-points, respectively. 576 As indicated on \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the ocean surface. 577 There are at most \jp{jpk}-1 $t$-points inside the ocean, 578 the additional $t$-point at $jk=jpk$ is below the sea floor and is not used. 579 The vertical location of $w$- and $t$-levels is defined from the analytic expression of the depth $z_0(k)$ whose 580 analytical derivative with respect to $k$ provides the vertical scale factors. 581 The user must provide the analytical expression of both $z_0$ and its first derivative with respect to $k$. 582 This is done in routine \mdl{domzgr} through statement functions, 583 using parameters provided in the \ngn{namcfg} namelist. 584 585 It is possible to define a simple regular vertical grid by giving zero stretching (\np{ppacr=0}). 586 In that case, 587 the parameters \jp{jpk} (number of $w$-levels) and \np{pphmax} (total ocean depth in meters) fully define the grid. 588 589 For climate-related studies it is often desirable to concentrate the vertical resolution near the ocean surface. 590 The following function is proposed as a standard for a $z$-coordinate (with either full or partial steps): 584 591 \begin{equation} \label{eq:DOM_zgr_ana_1} 585 592 \begin{split} … … 588 595 \end{split} 589 596 \end{equation} 590 where $k=1$ to \jp{jpk} for $w$-levels and $k=1$ to $k=1$ for $T-$levels. Such an 591 expression allows us to define a nearly uniform vertical location of levels at the 592 ocean top and bottom with a smooth hyperbolic tangent transition in between 593 (\autoref{fig:zgr}). 594 595 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. 597 where $k=1$ to \jp{jpk} for $w$-levels and $k=1$ to $k=1$ for $T-$levels. 598 Such an expression allows us to define a nearly uniform vertical location of levels at the ocean top and bottom with 599 a smooth hyperbolic tangent transition in between (\autoref{fig:zgr}). 600 601 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. 596 602 However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 597 603 \begin{equation} \label{eq:DOM_zgr_ana_2} … … 605 611 606 612 607 The most used vertical grid for ORCA2 has $10~m$ ($500~m)$ resolution in the 608 surface (bottom) layers and a depth which varies from 0 at the sea surface to a 609 minimum of $-5000~m$.This leads to the following conditions:613 The most used vertical grid for ORCA2 has $10~m$ ($500~m)$ resolution in the surface (bottom) layers and 614 a depth which varies from 0 at the sea surface to a minimum of $-5000~m$. 615 This leads to the following conditions: 610 616 \begin{equation} \label{eq:DOM_zgr_coef} 611 617 \begin{split} … … 617 623 \end{equation} 618 624 619 With the choice of the stretching $h_{cr} =3$ and the number of levels 620 \jp{jpk}=$31$, the four coefficients $h_{sur}$, $h_{0}$, $h_{1}$, and $h_{th}$ in 621 \autoref{eq:DOM_zgr_ana_2} have been determined such that \autoref{eq:DOM_zgr_coef} is 622 satisfied, through an optimisation procedure using a bisection method. For the first 623 standard ORCA2 vertical grid this led to the following values: $h_{sur} =4762.96$, 624 $h_0 =255.58, h_1 =245.5813$, and $h_{th} =21.43336$. The resulting depths and 625 scale factors as a function of the model levels are shown in \autoref{fig:zgr} and 626 given in \autoref{tab:orca_zgr}. Those values correspond to the parameters 627 \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. 628 629 Rather than entering parameters $h_{sur}$, $h_{0}$, and $h_{1}$ directly, it is 630 possible to recalculate them. In that case the user sets 631 \np{ppsur}\forcode{ = }\np{ppa0}\forcode{ = }\np{ppa1}\forcode{ = 999999}., in \ngn{namcfg} namelist, 632 and specifies instead the four following parameters: 625 With the choice of the stretching $h_{cr} =3$ and the number of levels \jp{jpk}=$31$, 626 the four coefficients $h_{sur}$, $h_{0}$, $h_{1}$, and $h_{th}$ in 627 \autoref{eq:DOM_zgr_ana_2} have been determined such that 628 \autoref{eq:DOM_zgr_coef} is satisfied, through an optimisation procedure using a bisection method. 629 For the first standard ORCA2 vertical grid this led to the following values: 630 $h_{sur} =4762.96$, $h_0 =255.58, h_1 =245.5813$, and $h_{th} =21.43336$. 631 The resulting depths and scale factors as a function of the model levels are shown in 632 \autoref{fig:zgr} and given in \autoref{tab:orca_zgr}. 633 Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. 634 635 Rather than entering parameters $h_{sur}$, $h_{0}$, and $h_{1}$ directly, it is possible to recalculate them. 636 In that case the user sets \np{ppsur}\forcode{ = }\np{ppa0}\forcode{ = }\np{ppa1}\forcode{ = 999999}., 637 in \ngn{namcfg} namelist, and specifies instead the four following parameters: 633 638 \begin{itemize} 634 \item \np{ppacr}=$h_{cr} $: stretching factor (nondimensional). The larger 635 \np{ppacr}, the smaller the stretching. Values from $3$ to $10$ are usual. 636 \item \np{ppkth}=$h_{th} $: is approximately the model level at which maximum 637 stretching occurs (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk}) 638 \item \np{ppdzmin}: minimum thickness for the top layer (in meters) 639 \item \np{pphmax}: total depth of the ocean (meters). 639 \item 640 \np{ppacr}=$h_{cr} $: stretching factor (nondimensional). 641 The larger \np{ppacr}, the smaller the stretching. 642 Values from $3$ to $10$ are usual. 643 \item 644 \np{ppkth}=$h_{th} $: is approximately the model level at which maximum stretching occurs 645 (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk}) 646 \item 647 \np{ppdzmin}: minimum thickness for the top layer (in meters). 648 \item 649 \np{pphmax}: total depth of the ocean (meters). 640 650 \end{itemize} 641 As an example, for the $45$ layers used in the DRAKKAR configuration those 642 parameters are: \jp{jpk}\forcode{ = 46}, \np{ppacr}\forcode{ = 9}, \np{ppkth}\forcode{ = 23.563}, \np{ppdzmin}\forcode{ = 6}m, \np{pphmax}\forcode{ = 5750}m. 651 As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are: 652 \jp{jpk}\forcode{ = 46}, \np{ppacr}\forcode{ = 9}, \np{ppkth}\forcode{ = 23.563}, 653 \np{ppdzmin}\forcode{ = 6}m, \np{pphmax}\forcode{ = 5750}m. 643 654 644 655 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 678 689 31 & \textbf{5250.23}& 5000.00 & \textbf{500.56} & 500.33 \\ \hline 679 690 \end{tabular} \end{center} 680 \caption{ \protect\label{tab:orca_zgr} 681 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed 682 from\autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef}}691 \caption{ \protect\label{tab:orca_zgr} 692 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from 693 \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef}} 683 694 \end{table} 684 695 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 694 705 %-------------------------------------------------------------------------------------------------------------- 695 706 696 In $z$-coordinate partial step, the depths of the model levels are defined by the 697 reference analytical function $z_0 (k)$ as described in the previous 698 section, \emph{except} in the bottom layer. The thickness of the bottom layer is 699 allowed to vary as a function of geographical location $(\lambda,\varphi)$ to allow a 700 better representation of the bathymetry, especially in the case of small 701 slopes (where the bathymetry varies by less than one level thickness from 702 one grid point to the next). The reference layer thicknesses $e_{3t}^0$ have been 703 defined in the absence of bathymetry. With partial steps, layers from 1 to 704 \jp{jpk}-2 can have a thickness smaller than $e_{3t}(jk)$. The model deepest layer (\jp{jpk}-1) 705 is allowed to have either a smaller or larger thickness than $e_{3t}(jpk)$: the 706 maximum thickness allowed is $2*e_{3t}(jpk-1)$. This has to be kept in mind when 707 specifying values in \ngn{namdom} namelist, as the maximum depth \np{pphmax} 708 in partial steps: for example, with 709 \np{pphmax}$=5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean depth 710 allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk-1)$ being $250~m$). 711 Two variables in the namdom namelist are used to define the partial step 712 vertical grid. The mimimum water thickness (in meters) allowed for a cell 713 partially filled with bathymetry at level jk is the minimum of \np{rn\_e3zps\_min} 714 (thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} (a fraction, 715 usually 10\%, of the default thickness $e_{3t}(jk)$). 707 In $z$-coordinate partial step, 708 the depths of the model levels are defined by the reference analytical function $z_0 (k)$ as described in 709 the previous section, \emph{except} in the bottom layer. 710 The thickness of the bottom layer is allowed to vary as a function of geographical location $(\lambda,\varphi)$ to 711 allow a better representation of the bathymetry, especially in the case of small slopes 712 (where the bathymetry varies by less than one level thickness from one grid point to the next). 713 The reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry. 714 With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than $e_{3t}(jk)$. 715 The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger thickness than $e_{3t}(jpk)$: 716 the maximum thickness allowed is $2*e_{3t}(jpk-1)$. 717 This has to be kept in mind when specifying values in \ngn{namdom} namelist, 718 as the maximum depth \np{pphmax} in partial steps: 719 for example, with \np{pphmax}$=5750~m$ for the DRAKKAR 45 layer grid, 720 the maximum ocean depth allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk-1)$ being $250~m$). 721 Two variables in the namdom namelist are used to define the partial step vertical grid. 722 The mimimum water thickness (in meters) allowed for a cell partially filled with bathymetry at level jk is 723 the minimum of \np{rn\_e3zps\_min} (thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} 724 (a fraction, usually 10\%, of the default thickness $e_{3t}(jk)$). 716 725 717 726 \gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level } } … … 727 736 %-------------------------------------------------------------------------------------------------------------- 728 737 Options are defined in \ngn{namzgr\_sco}. 729 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model 730 levels are defined from the product of a depth field and either a stretching 731 function or its derivative, respectively: 738 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 739 the product of a depth field and either a stretching function or its derivative, respectively: 732 740 733 741 \begin{equation} \label{eq:DOM_sco_ana} … … 738 746 \end{equation} 739 747 740 where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point 741 location in the horizontal and $z_0(k)$ is a function which varies from $0$ at the sea 742 surface to $1$ at the ocean bottom. The depth field $h$ is not necessary the ocean 743 depth, since a mixed step-like and bottom-following representation of the 744 topography can be used(\autoref{fig:z_zps_s_sps}d-e) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}f).745 The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects746 the sea bed and becomes a pseudo z-coordinate.747 The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} 748 asthe minimum and maximum depths at which the terrain-following vertical coordinate is calculated.749 750 Options for stretching the coordinate are provided as examples, but care must be taken to ensure751 that the vertical stretch used is appropriate for the application.752 753 The original default NEMO s-coordinate stretching is available if neither of the other options 754 are specified as true(\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}).748 where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and 749 $z_0(k)$ is a function which varies from $0$ at the sea surface to $1$ at the ocean bottom. 750 The depth field $h$ is not necessary the ocean depth, 751 since a mixed step-like and bottom-following representation of the topography can be used 752 (\autoref{fig:z_zps_s_sps}d-e) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}f). 753 The namelist parameter \np{rn\_rmax} determines the slope at which 754 the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. 755 The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as 756 the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 757 758 Options for stretching the coordinate are provided as examples, 759 but care must be taken to ensure that the vertical stretch used is appropriate for the application. 760 761 The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true 762 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). 755 763 This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: 756 764 … … 760 768 \end{equation} 761 769 762 where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and 763 allows a $z$-coordinate to placed on top of the stretched coordinate, 770 where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and 771 allows a $z$-coordinate to placed on top of the stretched coordinate, 764 772 and $z$ is the depth (negative down from the asea surface). 765 773 … … 777 785 \end{equation} 778 786 779 A stretching function, modified from the commonly used \citet{Song_Haidvogel_JCP94} 780 stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), is also available and is more commonly used for shelf seas modelling: 787 A stretching function, 788 modified from the commonly used \citet{Song_Haidvogel_JCP94} stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), 789 is also available and is more commonly used for shelf seas modelling: 781 790 782 791 \begin{equation} … … 789 798 \begin{figure}[!ht] \begin{center} 790 799 \includegraphics[width=1.0\textwidth]{Fig_sco_function} 791 \caption{ \protect\label{fig:sco_function} 792 Examples of the stretching function applied to a seamount; from left to right: 793 surface, surface and bottom, and bottom intensified resolutions}800 \caption{ \protect\label{fig:sco_function} 801 Examples of the stretching function applied to a seamount; 802 from left to right: surface, surface and bottom, and bottom intensified resolutions} 794 803 \end{center} \end{figure} 795 804 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 796 805 797 where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from 798 pure $\sigma$ to the stretched coordinate, and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) 799 are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and 800 $0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom 801 increase of the vertical resolution (\autoref{fig:sco_function}). 802 803 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows 804 a fixed surface resolution in an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}. 806 where $H_c$ is the critical depth (\np{rn\_hc}) at which 807 the coordinate transitions from pure $\sigma$ to the stretched coordinate, 808 and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and bottom control parameters such that 809 $0\leqslant \theta \leqslant 20$, and $0\leqslant b\leqslant 1$. 810 $b$ has been designed to allow surface and/or bottom increase of the vertical resolution 811 (\autoref{fig:sco_function}). 812 813 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in 814 an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}. 805 815 In this case the a stretching function $\gamma$ is defined such that: 806 816 … … 821 831 \end{equation} 822 832 823 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of 824 the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards 825 the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn\_zs}) 826 and bottom depths. The bottom cell depth in this example is given as a function of water depth: 833 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of 834 the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards 835 the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and 836 user prescribed surface (\np{rn\_zs}) and bottom depths. 837 The bottom cell depth in this example is given as a function of water depth: 827 838 828 839 \begin{equation} \label{eq:DOM_zb} … … 834 845 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 835 846 \begin{figure}[!ht] 836 \includegraphics[width=1.0\textwidth]{FIG_DOM_compare_coordinates_surface} 837 \caption{A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines), a 50 level $Z$-coordinate (contoured surfaces) and the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. For clarity every third coordinate surface is shown.} 847 \includegraphics[width=1.0\textwidth]{Fig_DOM_compare_coordinates_surface} 848 \caption{ 849 A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines), 850 a 50 level $Z$-coordinate (contoured surfaces) and 851 the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in 852 the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. 853 For clarity every third coordinate surface is shown.} 838 854 \label{fig:fig_compare_coordinates_surface} 839 855 \end{figure} 840 856 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 841 857 842 This gives a smooth analytical stretching in computational space that is constrained to given specified surface and bottom grid cell thicknesses in real space. This is not to be confused with the hybrid schemes that superimpose geopotential coordinates on terrain following coordinates thus creating a non-analytical vertical coordinate that therefore may suffer from large gradients in the vertical resolutions. This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching, but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes. 843 844 As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than the critical depth $h_c$. In this example two options are available in depths shallower than $h_c$, with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$. 845 846 Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as large slopes lead to hydrostatic consistency. A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented, and is output as part of the model mesh file at the start of the run. 858 This gives a smooth analytical stretching in computational space that is constrained to 859 given specified surface and bottom grid cell thicknesses in real space. 860 This is not to be confused with the hybrid schemes that 861 superimpose geopotential coordinates on terrain following coordinates thus 862 creating a non-analytical vertical coordinate that 863 therefore may suffer from large gradients in the vertical resolutions. 864 This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching, 865 but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes. 866 867 As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than 868 the critical depth $h_c$. 869 In this example two options are available in depths shallower than $h_c$, 870 with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false 871 (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$). 872 873 Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as 874 large slopes lead to hydrostatic consistency. 875 A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented, 876 and is output as part of the model mesh file at the start of the run. 847 877 848 878 % ------------------------------------------------------------------------------------------------------------- … … 862 892 \label{subsec:DOM_msk} 863 893 864 Whatever the vertical coordinate used, the model offers the possibility of 865 representing the bottom topography with steps that follow the face of the 866 model cells (step like topography) \citep{Madec_al_JPO96}. The distribution of 867 the steps in the horizontal is defined in a 2D integer array, mbathy, which 868 gives the number of ocean levels ($i.e.$ those that are not masked) at each 869 $t$-point. mbathy is computed from the meter bathymetry using the definiton of 870 gdept as the number of $t$-points which gdept $\leq$ bathy. 871 872 Modifications of the model bathymetry are performed in the \textit{bat\_ctl} 873 routine (see \mdl{domzgr} module) after mbathy is computed. Isolated grid points 874 that do not communicate with another ocean point at the same level are eliminated. 875 876 As for the representation of bathymetry, a 2D integer array, misfdep, is created. 877 misfdep defines the level of the first wet $t$-point. All the cells between $k=1$ and $misfdep(i,j)-1$ are masked. 894 Whatever the vertical coordinate used, 895 the model offers the possibility of representing the bottom topography with steps that 896 follow the face of the model cells (step like topography) \citep{Madec_al_JPO96}. 897 The distribution of the steps in the horizontal is defined in a 2D integer array, mbathy, 898 which gives the number of ocean levels ($i.e.$ those that are not masked) at each $t$-point. 899 mbathy is computed from the meter bathymetry using the definiton of gdept as 900 the number of $t$-points which gdept $\leq$ bathy. 901 902 Modifications of the model bathymetry are performed in the \textit{bat\_ctl} routine (see \mdl{domzgr} module) after 903 mbathy is computed. 904 Isolated grid points that do not communicate with another ocean point at the same level are eliminated. 905 906 As for the representation of bathymetry, a 2D integer array, misfdep, is created. 907 misfdep defines the level of the first wet $t$-point. 908 All the cells between $k=1$ and $misfdep(i,j)-1$ are masked. 878 909 By default, misfdep(:,:)=1 and no cells are masked. 879 910 880 911 In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into 881 the cavities are performed in the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked. 912 the cavities are performed in the \textit{zgr\_isf} routine. 913 The compatibility between ice shelf draft and bathymetry is checked. 882 914 All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked). 883 If only one cell on the water column is opened at $t$-, $u$- or $v$-points, the bathymetry or the ice shelf draft is dug to fit this constrain. 915 If only one cell on the water column is opened at $t$-, $u$- or $v$-points, 916 the bathymetry or the ice shelf draft is dug to fit this constrain. 884 917 If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.\\ 885 918 … … 896 929 \end{align*} 897 930 898 Note that, without ice shelves cavities, masks at $t-$ and $w-$points are identical with899 the numerical indexing used (\autoref{subsec:DOM_Num_Index}). Nevertheless, $wmask$ are required 900 with oceean cavities to deal with the top boundary (ice shelf/ocean interface)931 Note that, without ice shelves cavities, 932 masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}). 933 Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 901 934 exactly in the same way as for the bottom boundary. 902 935 903 The specification of closed lateral boundaries requires that at least the first and last904 rows and columns of the \textit{mbathy} array are set to zero. In the particular 905 case of an east-west cyclical boundary condition, \textit{mbathy} has its last 906 column equal to the second one and its first column equal to the last but one936 The specification of closed lateral boundaries requires that at least 937 the first and last rows and columns of the \textit{mbathy} array are set to zero. 938 In the particular case of an east-west cyclical boundary condition, 939 \textit{mbathy} has its last column equal to the second one and its first column equal to the last but one 907 940 (and so too the mask arrays) (see \autoref{fig:LBC_jperio}). 908 941 … … 919 952 920 953 Options are defined in \ngn{namtsd}. 921 By default, the ocean start from rest (the velocity field is set to zero) and the initialization of 922 temperature and salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter. 954 By default, the ocean start from rest (the velocity field is set to zero) and the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter. 923 955 \begin{description} 924 \item[\np{ln\_tsd\_init}\forcode{ = .true.}] use a T and S input files that can be given on the model grid itself or 925 on their native input data grid. In the latter case, the data will be interpolated on-the-fly both in the 926 horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}). The information relative to the 927 input files are given in the \np{sn\_tem} and \np{sn\_sal} structures. 928 The computation is done in the \mdl{dtatsd} module. 929 \item[\np{ln\_tsd\_init}\forcode{ = .false.}] use constant salinity value of 35.5 psu and an analytical profile of temperature 930 (typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 956 \item[\np{ln\_tsd\_init}\forcode{ = .true.}] 957 use a T and S input files that can be given on the model grid itself or on their native input data grid. 958 In the latter case, 959 the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 960 (see \autoref{subsec:SBC_iof}). 961 The information relative to the input files are given in the \np{sn\_tem} and \np{sn\_sal} structures. 962 The computation is done in the \mdl{dtatsd} module. 963 \item[\np{ln\_tsd\_init}\forcode{ = .false.}] 964 use constant salinity value of 35.5 psu and an analytical profile of temperature (typical of the tropical ocean), 965 see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 931 966 \end{description} 932 967 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex
r10146 r10354 11 11 $\ $\newline %force an empty line 12 12 13 Using the representation described in \autoref{chap:DOM}, several semi-discrete14 s pace forms of the dynamical equations are available depending on the vertical15 coordinate used and on the conservation properties of the vorticity term. In all 16 the equations presented here, the masking has been omitted for simplicity. 17 One must be aware that all the quantities are masked fields and that each time an18 average or difference operator is used, the resulting field is multiplied by a mask.13 Using the representation described in \autoref{chap:DOM}, 14 several semi-discrete space forms of the dynamical equations are available depending on 15 the vertical coordinate used and on the conservation properties of the vorticity term. 16 In all the equations presented here, the masking has been omitted for simplicity. 17 One must be aware that all the quantities are masked fields and 18 that each time an average or difference operator is used, the resulting field is multiplied by a mask. 19 19 20 20 The prognostic ocean dynamics equation can be summarized as follows: … … 24 24 + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} 25 25 \end{equation*} 26 NXT stands for next, referring to the time-stepping. The first group of terms on27 the rhs of this equation corresponds to the Coriolis and advection 28 terms that are decomposed into either a vorticity part (VOR), a kinetic energy part (KEG) 29 a nd a vertical advection part (ZAD) in the vector invariant formulation, or a Coriolis30 and advection part (COR+ADV) in the flux formulation. The terms following these 31 are the pressure gradient contributions (HPG, Hydrostatic Pressure Gradient, 32 and SPG, Surface Pressure Gradient); and contributions from lateral diffusion 33 (LDF) and vertical diffusion (ZDF), which are added to the rhs in the \mdl{dynldf} 34 and \mdl{dynzdf} modules. The vertical diffusion term includes the surface and 35 bottom stresses. The external forcings and parameterisations require complex 36 inputs (surface wind stress calculation using bulk formulae, estimation of mixing 37 coefficients) that are carried out in modules SBC, LDF and ZDF and are described 38 in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 39 40 In the present chapter we also describe the diagnostic equations used to compute 41 the horizontal divergence, curl of the velocities (\emph{divcur} module) and 42 the vertical velocity (\emph{wzvmod} module).26 NXT stands for next, referring to the time-stepping. 27 The first group of terms on the rhs of this equation corresponds to the Coriolis and advection terms that 28 are decomposed into either a vorticity part (VOR), a kinetic energy part (KEG) and 29 a vertical advection part (ZAD) in the vector invariant formulation, 30 or a Coriolis and advection part (COR+ADV) in the flux formulation. 31 The terms following these are the pressure gradient contributions 32 (HPG, Hydrostatic Pressure Gradient, and SPG, Surface Pressure Gradient); 33 and contributions from lateral diffusion (LDF) and vertical diffusion (ZDF), 34 which are added to the rhs in the \mdl{dynldf} and \mdl{dynzdf} modules. 35 The vertical diffusion term includes the surface and bottom stresses. 36 The external forcings and parameterisations require complex inputs 37 (surface wind stress calculation using bulk formulae, estimation of mixing coefficients) 38 that are carried out in modules SBC, LDF and ZDF and are described in 39 \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 40 41 In the present chapter we also describe the diagnostic equations used to compute the horizontal divergence, 42 curl of the velocities (\emph{divcur} module) and the vertical velocity (\emph{wzvmod} module). 43 43 44 44 The different options available to the user are managed by namelist variables. 45 45 For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, 46 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 47 If a CPP key is used for this term its name is \key{ttt}. The corresponding 48 code can be found in the \textit{dynttt\_xxx} module in the DYN directory, and it is 49 usually computed in the \textit{dyn\_ttt\_xxx} subroutine. 50 51 The user has the option of extracting and outputting each tendency term from the 52 3D momentum equations (\key{trddyn} defined), as described in 53 \autoref{chap:MISC}. Furthermore, the tendency terms associated with the 2D 54 barotropic vorticity balance (when \key{trdvor} is defined) can be derived from the 55 3D terms. 46 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 47 If a CPP key is used for this term its name is \key{ttt}. 48 The corresponding code can be found in the \textit{dynttt\_xxx} module in the DYN directory, 49 and it is usually computed in the \textit{dyn\_ttt\_xxx} subroutine. 50 51 The user has the option of extracting and outputting each tendency term from the 3D momentum equations 52 (\key{trddyn} defined), as described in \autoref{chap:MISC}. 53 Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \key{trdvor} is defined) 54 can be derived from the 3D terms. 56 55 %%% 57 56 \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does … … 78 77 \end{equation} 79 78 80 The horizontal divergence is defined at a $T$-point. It is given by: 79 The horizontal divergence is defined at a $T$-point. 80 It is given by: 81 81 \begin{equation} \label{eq:divcur_div} 82 82 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } … … 85 85 \end{equation} 86 86 87 Note that although the vorticity has the same discrete expression in $z$- 88 and $s$-coordinates, its physical meaning is not identical. $\zeta$ is a pseudo 89 vorticity along $s$-surfaces (only pseudo because $(u,v)$ are still defined along 90 geopotential surfaces, but are not necessarily defined at the same depth). 91 92 The vorticity and divergence at the \textit{before} step are used in the computation 93 of the horizontal diffusion of momentum. Note that because they have been 94 calculated prior to the Asselin filtering of the \textit{before} velocities, the 95 \textit{before} vorticity and divergence arrays must be included in the restart file 96 to ensure perfect restartability. The vorticity and divergence at the \textit{now} 97 time step are used for the computation of the nonlinear advection and of the 98 vertical velocity respectively. 87 Note that although the vorticity has the same discrete expression in $z$- and $s$-coordinates, 88 its physical meaning is not identical. 89 $\zeta$ is a pseudo vorticity along $s$-surfaces 90 (only pseudo because $(u,v)$ are still defined along geopotential surfaces, 91 but are not necessarily defined at the same depth). 92 93 The vorticity and divergence at the \textit{before} step are used in the computation of 94 the horizontal diffusion of momentum. 95 Note that because they have been calculated prior to the Asselin filtering of the \textit{before} velocities, 96 the \textit{before} vorticity and divergence arrays must be included in the restart file to 97 ensure perfect restartability. 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 100 100 101 %-------------------------------------------------------------------------------------------------------------- … … 104 105 \label{subsec:DYN_sshwzv} 105 106 106 The sea surface height is given by 107 The sea surface height is given by: 107 108 \begin{equation} \label{eq:dynspg_ssh} 108 109 \begin{aligned} … … 115 116 \end{equation} 116 117 where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 117 expressed in Kg/m$^2$/s (which is equal to mm/s), and $\rho _w$=1,035~Kg/m$^3$ 118 is the reference density of sea water (Boussinesq approximation). If river runoff is 119 expressed as a surface freshwater flux (see \autoref{chap:SBC}) then \textit{emp} can be 120 written as the evaporation minus precipitation, minus the river runoff. 121 The sea-surface height is evaluated using exactly the same time stepping scheme 122 as the tracer equation \autoref{eq:tra_nxt}: 123 a leapfrog scheme in combination with an Asselin time filter, $i.e.$ the velocity appearing 124 in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 125 This is of paramount importance. Replacing $T$ by the number $1$ in the tracer equation and summing 126 over the water column must lead to the sea surface height equation otherwise tracer content 127 will not be conserved \citep{Griffies_al_MWR01, Leclair_Madec_OM09}. 128 129 The vertical velocity is computed by an upward integration of the horizontal 130 divergence starting at the bottom, taking into account the change of the thickness of the levels : 118 expressed in Kg/m$^2$/s (which is equal to mm/s), 119 and $\rho _w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation). 120 If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then 121 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 122 The sea-surface height is evaluated using exactly the same time stepping scheme as 123 the tracer equation \autoref{eq:tra_nxt}: 124 a leapfrog scheme in combination with an Asselin time filter, 125 $i.e.$ the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 126 This is of paramount importance. 127 Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to 128 the sea surface height equation otherwise tracer content will not be conserved 129 \citep{Griffies_al_MWR01, Leclair_Madec_OM09}. 130 131 The vertical velocity is computed by an upward integration of the horizontal divergence starting at the bottom, 132 taking into account the change of the thickness of the levels: 131 133 \begin{equation} \label{eq:wzv} 132 134 \left\{ \begin{aligned} … … 138 140 139 141 In the case of a non-linear free surface (\key{vvl}), the top vertical velocity is $-\textit{emp}/\rho_w$, 140 as changes in the divergence of the barotropic transport are absorbed into the change 141 of the level thicknesses,re-orientated downward.142 as changes in the divergence of the barotropic transport are absorbed into the change of the level thicknesses, 143 re-orientated downward. 142 144 \gmcomment{not sure of this... to be modified with the change in emp setting} 143 145 In the case of a linear free surface, the time derivative in \autoref{eq:wzv} disappears. 144 The upper boundary condition applies at a fixed level $z=0$. The top vertical velocity145 is thus equal to the divergence of the barotropic transport ($i.e.$ the first term in the 146 right-hand-side of \autoref{eq:dynspg_ssh}).147 148 Note also that whereas the vertical velocity has the same discrete 149 expression in $z$- and $s$-coordinates, its physical meaning is not the same: 150 in the second case, $w$ is the velocity normal to the $s$-surfaces. 151 Note also that the $k$-axis is re-orientated downwards in the \textsc{fortran} code compared 152 t o the indexing used in the semi-discrete equations such as \autoref{eq:wzv}146 The upper boundary condition applies at a fixed level $z=0$. 147 The top vertical velocity is thus equal to the divergence of the barotropic transport 148 ($i.e.$ the first term in the right-hand-side of \autoref{eq:dynspg_ssh}). 149 150 Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates, 151 its physical meaning is not the same: 152 in the second case, $w$ is the velocity normal to the $s$-surfaces. 153 Note also that the $k$-axis is re-orientated downwards in the \textsc{fortran} code compared to 154 the indexing used in the semi-discrete equations such as \autoref{eq:wzv} 153 155 (see \autoref{subsec:DOM_Num_Index_vertical}). 154 156 … … 164 166 %------------------------------------------------------------------------------------------------------------- 165 167 166 The vector invariant form of the momentum equations is the one most 167 often used in applications of the \NEMO ocean model. The flux form option 168 (see next section) has been present since version $2$. Options are defined 169 through the \ngn{namdyn\_adv} namelist variables 170 Coriolis and momentum advection terms are evaluated using a leapfrog 171 scheme, $i.e.$ the velocity appearing in these expressions is centred in 172 time (\textit{now} velocity). 173 At the lateral boundaries either free slip, no slip or partial slip boundary 174 conditions are applied following \autoref{chap:LBC}. 168 The vector invariant form of the momentum equations is the one most often used in 169 applications of the \NEMO ocean model. 170 The flux form option (see next section) has been present since version $2$. 171 Options are defined through the \ngn{namdyn\_adv} namelist variables Coriolis and 172 momentum advection terms are evaluated using a leapfrog scheme, 173 $i.e.$ the velocity appearing in these expressions is centred in time (\textit{now} velocity). 174 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied following 175 \autoref{chap:LBC}. 175 176 176 177 % ------------------------------------------------------------------------------------------------------------- … … 185 186 186 187 Options are defined through the \ngn{namdyn\_vor} namelist variables. 187 Four discretisations of the vorticity term (\np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 188 conserving potential enstrophy of horizontally non-divergent flow (ENS scheme) ;189 conserving horizontal kinetic energy (ENE scheme) ; conserving potential enstrophy for190 the relative vorticity term and horizontal kinetic energy for the planetary vorticity 191 term (MIX scheme) ; or conserving both the potential enstrophy of horizontally non-divergent 192 flow and horizontal kinetic energy (EEN scheme) (see \autoref{subsec:C_vorEEN}). In the 193 case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the 194 consistency of vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}). 195 The vorticity terms are all computed in dedicated routines that can be found in 196 the \mdl{dynvor} module.188 Four discretisations of the vorticity term (\np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 189 conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); 190 conserving horizontal kinetic energy (ENE scheme); 191 conserving potential enstrophy for the relative vorticity term and 192 horizontal kinetic energy for the planetary vorticity term (MIX scheme); 193 or conserving both the potential enstrophy of horizontally non-divergent flow and horizontal kinetic energy 194 (EEN scheme) (see \autoref{subsec:C_vorEEN}). 195 In the case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the consistency of 196 vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}). 197 The vorticity terms are all computed in dedicated routines that can be found in the \mdl{dynvor} module. 197 198 198 199 %------------------------------------------------------------- … … 202 203 \label{subsec:DYN_vor_ens} 203 204 204 In the enstrophy conserving case (ENS scheme), the discrete formulation of the 205 vorticity term provides a global conservation of the enstrophy 206 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent 207 flow ($i.e.$ $\chi$=$0$), but does not conserve the total kinetic energy. It is given by: 205 In the enstrophy conserving case (ENS scheme), 206 the discrete formulation of the vorticity term provides a global conservation of the enstrophy 207 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow ($i.e.$ $\chi$=$0$), 208 but does not conserve the total kinetic energy. 209 It is given by: 208 210 \begin{equation} \label{eq:dynvor_ens} 209 211 \left\{ … … 223 225 \label{subsec:DYN_vor_ene} 224 226 225 The kinetic energy conserving scheme (ENE scheme) conserves the global 226 kinetic energy but not the global enstrophy.It is given by:227 The kinetic energy conserving scheme (ENE scheme) conserves the global kinetic energy but not the global enstrophy. 228 It is given by: 227 229 \begin{equation} \label{eq:dynvor_ene} 228 230 \left\{ \begin{aligned} … … 240 242 \label{subsec:DYN_vor_mix} 241 243 242 For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the 243 two previous schemes is used. It consists of the ENS scheme (\autoref{eq:dynvor_ens}) 244 for the relative vorticity term, and of the ENE scheme (\autoref{eq:dynvor_ene}) applied 245 to the planetary vorticity term. 244 For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the two previous schemes is used. 245 It consists of the ENS scheme (\autoref{eq:dynvor_ens}) for the relative vorticity term, 246 and of the ENE scheme (\autoref{eq:dynvor_ene}) applied to the planetary vorticity term. 246 247 \begin{equation} \label{eq:dynvor_mix} 247 248 \left\{ { \begin{aligned} … … 263 264 \label{subsec:DYN_vor_een} 264 265 265 In both the ENS and ENE schemes, it is apparent that the combination of $i$ and $j$266 averages of the velocity allows for the presence of grid point oscillation structures 267 th at will be invisible to the operator. These structures are \textit{computational modes}268 that will be at least partly damped by the momentum diffusion operator ($i.e.$ the 269 subgrid-scale advection), but not by the resolved advection term. The ENS and ENE schemes 270 therefore do not contribute to dump any grid point noise in the horizontal velocity field.271 Such noise would result in more noise in the vertical velocity field, an undesirable feature. 272 This is a well-known characteristic of $C$-grid discretization where $u$ and $v$ are located273 at different grid points, a price worth paying to avoid a double averaging in the pressure 274 gradient term as in the $B$-grid. 266 In both the ENS and ENE schemes, 267 it is apparent that the combination of $i$ and $j$ averages of the velocity allows for 268 the presence of grid point oscillation structures that will be invisible to the operator. 269 These structures are \textit{computational modes} that will be at least partly damped by 270 the momentum diffusion operator ($i.e.$ the subgrid-scale advection), but not by the resolved advection term. 271 The ENS and ENE schemes therefore do not contribute to dump any grid point noise in the horizontal velocity field. 272 Such noise would result in more noise in the vertical velocity field, an undesirable feature. 273 This is a well-known characteristic of $C$-grid discretization where 274 $u$ and $v$ are located at different grid points, 275 a price worth paying to avoid a double averaging in the pressure gradient term as in the $B$-grid. 275 276 \gmcomment{ To circumvent this, Adcroft (ADD REF HERE) 276 277 Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....} 277 278 278 A very nice solution to the problem of double averaging was proposed by \citet{Arakawa_Hsu_MWR90}. 279 The idea is to get rid of the double averaging by considering triad combinations of vorticity. 279 A very nice solution to the problem of double averaging was proposed by \citet{Arakawa_Hsu_MWR90}. 280 The idea is to get rid of the double averaging by considering triad combinations of vorticity. 280 281 It is noteworthy that this solution is conceptually quite similar to the one proposed by 281 282 \citep{Griffies_al_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}). … … 287 288 q = \frac{\zeta +f} {e_{3f} } 288 289 \end{equation} 289 where the relative vorticity is defined by (\autoref{eq:divcur_cur}), the Coriolis parameter290 is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:290 where the relative vorticity is defined by (\autoref{eq:divcur_cur}), 291 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 291 292 \begin{equation} \label{eq:een_e3f} 292 293 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} … … 296 297 \begin{figure}[!ht] \begin{center} 297 298 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 298 \caption{ \protect\label{fig:DYN_een_triad} 299 Triads used in the energy and enstrophy conserving scheme (een) for 300 $u$-component (upper panel) and $v$-component (lower panel).}299 \caption{ \protect\label{fig:DYN_een_triad} 300 Triads used in the energy and enstrophy conserving scheme (een) for 301 $u$-component (upper panel) and $v$-component (lower panel).} 301 302 \end{center} \end{figure} 302 303 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 303 304 304 305 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 305 It uses the sum of masked t-point vertical scale factor divided either 306 by the sum of the four t-point masks (\np{nn\_een\_e3f}\forcode{ = 1}), 307 or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}). 308 The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ 309 tends to zero and extends by continuity the value of $e_{3f}$ into the land areas. 310 This case introduces a sub-grid-scale topography at f-points (with a systematic reduction of $e_{3f}$ 311 when a model level intercept the bathymetry) that tends to reinforce the topostrophy of the flow 306 It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks 307 (\np{nn\_een\_e3f}\forcode{ = 1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}). 308 The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and 309 extends by continuity the value of $e_{3f}$ into the land areas. 310 This case introduces a sub-grid-scale topography at f-points 311 (with a systematic reduction of $e_{3f}$ when a model level intercept the bathymetry) 312 that tends to reinforce the topostrophy of the flow 312 313 ($i.e.$ the tendency of the flow to follow the isobaths) \citep{Penduff_al_OS07}. 313 314 314 Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as 315 the following triad combinations of the neighbouring potential vorticities defined at f-points 315 Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as 316 the following triad combinations of the neighbouring potential vorticities defined at f-points 316 317 (\autoref{fig:DYN_een_triad}): 317 318 \begin{equation} \label{eq:Q_triads} … … 333 334 \end{equation} 334 335 335 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 336 It conserves both total energy and potential enstrophy in the limit of horizontally 337 nondivergent flow($i.e.$ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}).338 Applied to a realistic ocean configuration, it has been shown that it leads to a significant 339 reduction of the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}. 336 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 337 It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow 338 ($i.e.$ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 339 Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of 340 the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}. 340 341 Furthermore, used in combination with a partial steps representation of bottom topography, 341 it improves the interaction between current and topography, leading to a larger342 topostrophy of the flow\citep{Barnier_al_OD06, Penduff_al_OS07}.342 it improves the interaction between current and topography, 343 leading to a larger topostrophy of the flow \citep{Barnier_al_OD06, Penduff_al_OS07}. 343 344 344 345 %-------------------------------------------------------------------------------------------------------------- … … 348 349 \label{subsec:DYN_keg} 349 350 350 As demonstrated in \autoref{apdx:C}, there is a single discrete formulation 351 of the kinetic energy gradient term that, together with the formulation chosen for 352 the vertical advection (see below), conserves the total kinetic energy: 351 As demonstrated in \autoref{apdx:C}, 352 there is a single discrete formulation of the kinetic energy gradient term that, 353 together with the formulation chosen for the vertical advection (see below), 354 conserves the total kinetic energy: 353 355 \begin{equation} \label{eq:dynkeg} 354 356 \left\{ \begin{aligned} … … 364 366 \label{subsec:DYN_zad} 365 367 366 The discrete formulation of the vertical advection, together with the formulation 367 chosen for the gradient of kinetic energy (KE) term, conserves the total kinetic 368 energy. Indeed, the change of KE due to the vertical advection is exactly 369 balanced by the change of KE due to the gradient of KE (see \autoref{apdx:C}). 368 The discrete formulation of the vertical advection, t 369 ogether with the formulation chosen for the gradient of kinetic energy (KE) term, 370 conserves the total kinetic energy. 371 Indeed, the change of KE due to the vertical advection is exactly balanced by 372 the change of KE due to the gradient of KE (see \autoref{apdx:C}). 370 373 \begin{equation} \label{eq:dynzad} 371 374 \left\{ \begin{aligned} … … 374 377 \end{aligned} \right. 375 378 \end{equation} 376 When \np{ln\_dynzad\_zts}\forcode{ = .true.}, a split-explicit time stepping with 5 sub-timesteps is used377 on the vertical advection term.379 When \np{ln\_dynzad\_zts}\forcode{ = .true.}, 380 a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 378 381 This option can be useful when the value of the timestep is limited by vertical advection \citep{Lemarie_OM2015}. 379 Note that in this case, a similar split-explicit time stepping should be used on380 vertical advection of tracer to ensure a better stability, 382 Note that in this case, 383 a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, 381 384 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 382 385 … … 393 396 394 397 Options are defined through the \ngn{namdyn\_adv} namelist variables. 395 In the flux form (as in the vector invariant form), the Coriolis and momentum396 advection terms are evaluated using a leapfrog scheme, $i.e.$ the velocity 397 appearing in their expressions is centred in time (\textit{now} velocity). At the 398 lateral boundaries either free slip, no slip or partial slip boundary conditions 399 are applied following \autoref{chap:LBC}.398 In the flux form (as in the vector invariant form), 399 the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, 400 $i.e.$ the velocity appearing in their expressions is centred in time (\textit{now} velocity). 401 At the lateral boundaries either free slip, 402 no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}. 400 403 401 404 … … 406 409 \label{subsec:DYN_cor_flux} 407 410 408 In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis 409 parameter has been modified to account for the "metric" term. This altered 410 Coriolis parameter is thus discretised at $f$-points.It is given by:411 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. 412 This altered Coriolis parameter is thus discretised at $f$-points. 413 It is given by: 411 414 \begin{multline} \label{eq:dyncor_metric} 412 415 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ … … 415 418 \end{multline} 416 419 417 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) 418 schemes can be used to compute the product of the Coriolis parameter and the 419 vorticity. However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has 420 exclusively been used to date. This term is evaluated using a leapfrog scheme, 421 $i.e.$ the velocity is centred in time (\textit{now} velocity). 420 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to 421 compute the product of the Coriolis parameter and the vorticity. 422 However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has exclusively been used to date. 423 This term is evaluated using a leapfrog scheme, $i.e.$ the velocity is centred in time (\textit{now} velocity). 422 424 423 425 %-------------------------------------------------------------------------------------------------------------- … … 427 429 \label{subsec:DYN_adv_flux} 428 430 429 The discrete expression of the advection term is given by 431 The discrete expression of the advection term is given by: 430 432 \begin{equation} \label{eq:dynadv} 431 433 \left\{ … … 444 446 \end{equation} 445 447 446 Two advection schemes are available: a $2^{nd}$ order centered finite447 difference scheme, CEN2, or a $3^{rd}$ order upstream biased scheme, UBS. 448 The latter is described in \citet{Shchepetkin_McWilliams_OM05}. The schemes are 449 selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 450 In flux form, the schemes differ by the choice of a space and time interpolation to451 define the value of $u$ and $v$ at the centre of each face of $u$- and $v$-cells, 452 $ i.e.$ at the $T$-, $f$-, and $uw$-points for $u$ and at the $f$-, $T$- and453 $vw$-points for $v$.448 Two advection schemes are available: 449 a $2^{nd}$ order centered finite difference scheme, CEN2, 450 or a $3^{rd}$ order upstream biased scheme, UBS. 451 The latter is described in \citet{Shchepetkin_McWilliams_OM05}. 452 The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 453 In flux form, the schemes differ by the choice of a space and time interpolation to define the value of 454 $u$ and $v$ at the centre of each face of $u$- and $v$-cells, $i.e.$ at the $T$-, $f$-, 455 and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 454 456 455 457 %------------------------------------------------------------- … … 459 461 \label{subsec:DYN_adv_cen2} 460 462 461 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the 462 mean of the two neighbouring points : 463 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points: 463 464 \begin{equation} \label{eq:dynadv_cen2} 464 465 \left\{ \begin{aligned} … … 468 469 \end{equation} 469 470 470 The scheme is non diffusive (i.e. conserves the kinetic energy) but dispersive 471 ($i.e.$ it may create false extrema). It is therefore notoriously noisy and must be 472 used in conjunction with an explicit diffusion operator to produce a sensible solution. 473 The associated time-stepping is performed using a leapfrog scheme in conjunction 474 with an Asselin time-filter,so $u$ and $v$ are the \emph{now} velocities.471 The scheme is non diffusive (i.e. conserves the kinetic energy) but dispersive ($i.e.$ it may create false extrema). 472 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to 473 produce a sensible solution. 474 The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, 475 so $u$ and $v$ are the \emph{now} velocities. 475 476 476 477 %------------------------------------------------------------- … … 480 481 \label{subsec:DYN_adv_ubs} 481 482 482 The UBS advection scheme is an upstream biased third order scheme based on 483 an upstream-biased parabolic interpolation. For example, the evaluation of484 $u_T^{ubs} $ is done as follows:483 The UBS advection scheme is an upstream biased third order scheme based on 484 an upstream-biased parabolic interpolation. 485 For example, the evaluation of $u_T^{ubs} $ is done as follows: 485 486 \begin{equation} \label{eq:dynadv_ubs} 486 487 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} \begin{cases} … … 489 490 \end{cases} 490 491 \end{equation} 491 where $u"_{i+1/2} =\delta _{i+1/2} \left[ {\delta _i \left[ u \right]} \right]$. This results 492 in a dissipatively dominant ($i.e.$ hyper-diffusive) truncation error \citep{Shchepetkin_McWilliams_OM05}. 493 The overall performance of the advection scheme is similar to that reported in 494 \citet{Farrow1995}. It is a relatively good compromise between accuracy and 495 smoothness. It is not a \emph{positive} scheme, meaning that false extrema are 496 permitted. But the amplitudes of the false extrema are significantly reduced over 497 those in the centred second order method. As the scheme already includes 498 a diffusion component, it can be used without explicit lateral diffusion on momentum 499 ($i.e.$ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), and it is recommended to do so. 500 501 The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$ 502 order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and 503 $u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. UBS is diffusive and is 504 associated with vertical mixing of momentum. \gmcomment{ gm pursue the 492 where $u"_{i+1/2} =\delta _{i+1/2} \left[ {\delta _i \left[ u \right]} \right]$. 493 This results in a dissipatively dominant ($i.e.$ hyper-diffusive) truncation error 494 \citep{Shchepetkin_McWilliams_OM05}. 495 The overall performance of the advection scheme is similar to that reported in \citet{Farrow1995}. 496 It is a relatively good compromise between accuracy and smoothness. 497 It is not a \emph{positive} scheme, meaning that false extrema are permitted. 498 But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. 499 As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 500 ($i.e.$ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), 501 and it is recommended to do so. 502 503 The UBS scheme is not used in all directions. 504 In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and 505 $u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. 506 UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm pursue the 505 507 sentence:Since vertical mixing of momentum is a source term of the TKE equation... } 506 508 507 For stability reasons, the first term in (\autoref{eq:dynadv_ubs}), which corresponds 508 to a second order centred scheme, is evaluated using the \textit{now} velocity 509 (centred in time), while the second term, which is the diffusion part of the scheme, 510 is evaluated using the \textit{before} velocity (forward in time). This is discussed 511 by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. 512 513 Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) 514 schemes only differ by one coefficient. Replacing $1/6$ by $1/8$ in 515 (\autoref{eq:dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 516 This option is not available through a namelist parameter, since the $1/6$ coefficient 517 is hard coded. Nevertheless it is quite easy to make the substitution in the 518 \mdl{dynadv\_ubs} module and obtain a QUICK scheme. 519 520 Note also that in the current version of \mdl{dynadv\_ubs}, there is also the 521 possibility of using a $4^{th}$ order evaluation of the advective velocity as in 522 ROMS. This is an error and should be suppressed soon. 509 For stability reasons, the first term in (\autoref{eq:dynadv_ubs}), 510 which corresponds to a second order centred scheme, is evaluated using the \textit{now} velocity (centred in time), 511 while the second term, which is the diffusion part of the scheme, 512 is evaluated using the \textit{before} velocity (forward in time). 513 This is discussed by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. 514 515 Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) schemes only differ by 516 one coefficient. 517 Replacing $1/6$ by $1/8$ in (\autoref{eq:dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 518 This option is not available through a namelist parameter, since the $1/6$ coefficient is hard coded. 519 Nevertheless it is quite easy to make the substitution in the \mdl{dynadv\_ubs} module and obtain a QUICK scheme. 520 521 Note also that in the current version of \mdl{dynadv\_ubs}, 522 there is also the possibility of using a $4^{th}$ order evaluation of the advective velocity as in ROMS. 523 This is an error and should be suppressed soon. 523 524 %%% 524 525 \gmcomment{action : this have to be done} … … 536 537 537 538 Options are defined through the \ngn{namdyn\_hpg} namelist variables. 538 The key distinction between the different algorithms used for the hydrostatic539 pressure gradient is the vertical coordinate used, since HPG is a \emph{horizontal} 540 pressure gradient, $i.e.$ computed along geopotential surfaces. As a result, any 541 tilt of the surface of the computational levels will require a specific treatment to 539 The key distinction between the different algorithms used for 540 the hydrostatic pressure gradient is the vertical coordinate used, 541 since HPG is a \emph{horizontal} pressure gradient, $i.e.$ computed along geopotential surfaces. 542 As a result, any tilt of the surface of the computational levels will require a specific treatment to 542 543 compute the hydrostatic pressure gradient. 543 544 544 The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme, 545 $i.e.$ the density appearing in its expression is centred in time (\emph{now} $\rho$), or546 a semi-implcit scheme. At the lateral boundaries either free slip, no slip or partial slip 547 boundary conditions are applied.545 The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme, 546 $i.e.$ the density appearing in its expression is centred in time (\emph{now} $\rho$), 547 or a semi-implcit scheme. 548 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied. 548 549 549 550 %-------------------------------------------------------------------------------------------------------------- … … 553 554 \label{subsec:DYN_hpg_zco} 554 555 555 The hydrostatic pressure can be obtained by integrating the hydrostatic equation 556 vertically from the surface. However, the pressure is large at great depth while its 557 horizontal gradient is several orders of magnitude smaller. This may lead to large 558 truncation errors in the pressure gradient terms. Thus, the two horizontal components 559 of the hydrostatic pressure gradient are computed directly as follows: 556 The hydrostatic pressure can be obtained by integrating the hydrostatic equation vertically from the surface. 557 However, the pressure is large at great depth while its horizontal gradient is several orders of magnitude smaller. 558 This may lead to large truncation errors in the pressure gradient terms. 559 Thus, the two horizontal components of the hydrostatic pressure gradient are computed directly as follows: 560 560 561 561 for $k=km$ (surface layer, $jk=1$ in the code) … … 581 581 \end{equation} 582 582 583 Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of 584 the definition of $e_{3w}$ as the vertical derivative of the scale factor at the surface585 level ($z=0$). Note also that in case of variable volume level (\key{vvl} defined), the 586 surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and \autoref{eq:dynhpg_zco} 587 through the space and time variations of the vertical scale factor $e_{3w}$.583 Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as 584 the vertical derivative of the scale factor at the surface level ($z=0$). 585 Note also that in case of variable volume level (\key{vvl} defined), 586 the surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and 587 \autoref{eq:dynhpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. 588 588 589 589 %-------------------------------------------------------------------------------------------------------------- … … 593 593 \label{subsec:DYN_hpg_zps} 594 594 595 With partial bottom cells, tracers in horizontally adjacent cells generally live at 596 different depths. Before taking horizontal gradients between these tracer points, 597 a linear interpolation is used to approximate the deeper tracer as if it actually lived 598 at the depth of the shallower tracer point. 599 600 Apart from this modification, the horizontal hydrostatic pressure gradient evaluated 601 in the $z$-coordinate with partial step is exactly as in the pure $z$-coordinate case. 602 As explained in detail in section \autoref{sec:TRA_zpshde}, the nonlinearity of pressure 603 effects in the equation of state is such that it is better to interpolate temperature and 604 salinity vertically before computing the density. Horizontal gradients of temperature 605 and salinity are needed for the TRA modules, which is the reason why the horizontal 606 gradients of density at the deepest model level are computed in module \mdl{zpsdhe} 607 located in the TRA directory and described in \autoref{sec:TRA_zpshde}. 595 With partial bottom cells, tracers in horizontally adjacent cells generally live at different depths. 596 Before taking horizontal gradients between these tracer points, 597 a linear interpolation is used to approximate the deeper tracer as if 598 it actually lived at the depth of the shallower tracer point. 599 600 Apart from this modification, 601 the horizontal hydrostatic pressure gradient evaluated in the $z$-coordinate with partial step is exactly as in 602 the pure $z$-coordinate case. 603 As explained in detail in section \autoref{sec:TRA_zpshde}, 604 the nonlinearity of pressure effects in the equation of state is such that 605 it is better to interpolate temperature and salinity vertically before computing the density. 606 Horizontal gradients of temperature and salinity are needed for the TRA modules, 607 which is the reason why the horizontal gradients of density at the deepest model level are computed in 608 module \mdl{zpsdhe} located in the TRA directory and described in \autoref{sec:TRA_zpshde}. 608 609 609 610 %-------------------------------------------------------------------------------------------------------------- … … 613 614 \label{subsec:DYN_hpg_sco} 614 615 615 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast 616 number of papers($e.g.$, \citet{Song1998, Shchepetkin_McWilliams_OM05}).617 A number of different pressure gradient options are coded but the ROMS-like, density Jacobian with618 cubic polynomial method is currently disabled whilst known bugs are under investigation.616 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers 617 ($e.g.$, \citet{Song1998, Shchepetkin_McWilliams_OM05}). 618 A number of different pressure gradient options are coded but the ROMS-like, 619 density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. 619 620 620 621 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) … … 628 629 \end{equation} 629 630 630 Where the first term is the pressure gradient along coordinates, computed as in631 \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, and $z_T$ is the depth of 632 the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point631 Where the first term is the pressure gradient along coordinates, 632 computed as in \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, 633 and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 633 634 ($e_{3w}$). 634 635 … … 641 642 (\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 642 643 643 Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is 644 activated (\key{vvl}) because in that case, even with a flat bottom, the coordinate surfaces are not 645 horizontal but follow the free surface \citep{Levier2007}. The pressure jacobian scheme 646 (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when 647 \key{vvl} is active. The pressure Jacobian scheme uses a constrained cubic spline to reconstruct 648 the density profile across the water column. This method maintains the monotonicity between the 649 density nodes The pressure can be calculated by analytical integration of the density profile and a 650 pressure Jacobian method is used to solve the horizontal pressure gradient. This method can provide 651 a more accurate calculation of the horizontal pressure gradient than the standard scheme. 644 Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is activated 645 (\key{vvl}) because in that case, even with a flat bottom, 646 the coordinate surfaces are not horizontal but follow the free surface \citep{Levier2007}. 647 The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as 648 an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \key{vvl} is active. 649 The pressure Jacobian scheme uses a constrained cubic spline to 650 reconstruct the density profile across the water column. 651 This method maintains the monotonicity between the density nodes. 652 The pressure can be calculated by analytical integration of the density profile and 653 a pressure Jacobian method is used to solve the horizontal pressure gradient. 654 This method can provide a more accurate calculation of the horizontal pressure gradient than the standard scheme. 652 655 653 656 \subsection{Ice shelf cavity} 654 657 \label{subsec:DYN_hpg_isf} 655 658 Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 656 the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be 657 calculated by setting \np{ln\_dynhpg\_isf}\forcode{ = .true.}. No other scheme are working with the ice shelf.\\ 659 the pressure gradient due to the ocean load. 660 If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be calculated by 661 setting \np{ln\_dynhpg\_isf}\forcode{ = .true.}. 662 No other scheme are working with the ice shelf.\\ 658 663 659 664 $\bullet$ The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 660 The top pressure is computed integrating from surface to the base of the ice shelf a reference density profile 661 (prescribed as density of a water at 34.4 PSU and -1.9\degC) and corresponds to the water replaced by the ice shelf. 662 This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\ 663 664 $\bullet$ The ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in \autoref{subsec:DYN_hpg_sco}. 665 The top pressure is computed integrating from surface to the base of the ice shelf a reference density profile 666 (prescribed as density of a water at 34.4 PSU and -1.9\degC) and 667 corresponds to the water replaced by the ice shelf. 668 This top pressure is constant over time. 669 A detailed description of this method is described in \citet{Losch2008}.\\ 670 671 $\bullet$ The ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in 672 \autoref{subsec:DYN_hpg_sco}. 665 673 666 674 %-------------------------------------------------------------------------------------------------------------- … … 670 678 \label{subsec:DYN_hpg_imp} 671 679 672 The default time differencing scheme used for the horizontal pressure gradient is 673 a leapfrog scheme and therefore the density used in all discrete expressions given 674 above is the \textit{now} density, computed from the \textit{now} temperature and 675 salinity. In some specific cases (usually high resolution simulations over an ocean 676 domain which includes weakly stratified regions) the physical phenomenon that 677 controls the time-step is internal gravity waves (IGWs). A semi-implicit scheme for 678 doubling the stability limit associated with IGWs can be used \citep{Brown_Campana_MWR78, 679 Maltrud1998}. It involves the evaluation of the hydrostatic pressure gradient as an 680 average over the three time levels $t-\rdt$, $t$, and $t+\rdt$ ($i.e.$ 681 \textit{before}, \textit{now} and \textit{after} time-steps), rather than at the central 682 time level $t$ only, as in the standard leapfrog scheme. 680 The default time differencing scheme used for the horizontal pressure gradient is a leapfrog scheme and 681 therefore the density used in all discrete expressions given above is the \textit{now} density, 682 computed from the \textit{now} temperature and salinity. 683 In some specific cases 684 (usually high resolution simulations over an ocean domain which includes weakly stratified regions) 685 the physical phenomenon that controls the time-step is internal gravity waves (IGWs). 686 A semi-implicit scheme for doubling the stability limit associated with IGWs can be used 687 \citep{Brown_Campana_MWR78, Maltrud1998}. 688 It involves the evaluation of the hydrostatic pressure gradient as 689 an average over the three time levels $t-\rdt$, $t$, and $t+\rdt$ 690 ($i.e.$ \textit{before}, \textit{now} and \textit{after} time-steps), 691 rather than at the central time level $t$ only, as in the standard leapfrog scheme. 683 692 684 693 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): … … 695 704 \end{equation} 696 705 697 The semi-implicit time scheme \autoref{eq:dynhpg_imp} is made possible without 698 significant additional computation since the density can be updated to time level 699 $t+\rdt$ before computing the horizontal hydrostatic pressure gradient. It can 700 be easily shown that the stability limit associated with the hydrostatic pressure 701 gradient doubles using \autoref{eq:dynhpg_imp} compared to that using the 702 standard leapfrog scheme \autoref{eq:dynhpg_lf}. Note that \autoref{eq:dynhpg_imp} 703 is equivalent to applying a time filter to the pressure gradient to eliminate high 704 frequency IGWs. Obviously, when using \autoref{eq:dynhpg_imp}, the doubling of 705 the time-step is achievable only if no other factors control the time-step, such as 706 the stability limits associated with advection or diffusion. 707 708 In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{ = .true.}. 709 In this case, we choose to apply the time filter to temperature and salinity used in 710 the equation of state, instead of applying it to the hydrostatic pressure or to the 711 density, so that no additional storage array has to be defined. The density used to 712 compute the hydrostatic pressure gradient (whatever the formulation) is evaluated 713 as follows: 706 The semi-implicit time scheme \autoref{eq:dynhpg_imp} is made possible without 707 significant additional computation since the density can be updated to time level $t+\rdt$ before 708 computing the horizontal hydrostatic pressure gradient. 709 It can be easily shown that the stability limit associated with the hydrostatic pressure gradient doubles using 710 \autoref{eq:dynhpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:dynhpg_lf}. 711 Note that \autoref{eq:dynhpg_imp} is equivalent to applying a time filter to the pressure gradient to 712 eliminate high frequency IGWs. 713 Obviously, when using \autoref{eq:dynhpg_imp}, 714 the doubling of the time-step is achievable only if no other factors control the time-step, 715 such as the stability limits associated with advection or diffusion. 716 717 In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{ = .true.}. 718 In this case, we choose to apply the time filter to temperature and salinity used in the equation of state, 719 instead of applying it to the hydrostatic pressure or to the density, 720 so that no additional storage array has to be defined. 721 The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows: 714 722 \begin{equation} \label{eq:rho_flt} 715 723 \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) … … 718 726 \end{equation} 719 727 720 Note that in the semi-implicit case, it is necessary to save the filtered density, an721 extra three-dimensional field, in the restart file to restart the model with exact 722 reproducibility.This option is controlled by \np{nn\_dynhpg\_rst}, a namelist parameter.728 Note that in the semi-implicit case, it is necessary to save the filtered density, 729 an extra three-dimensional field, in the restart file to restart the model with exact reproducibility. 730 This option is controlled by \np{nn\_dynhpg\_rst}, a namelist parameter. 723 731 724 732 % ================================================================ … … 735 743 736 744 Options are defined through the \ngn{namdyn\_spg} namelist variables. 737 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 738 The main distinction is between the fixed volume case (linear free surface) and the variable volume case 739 (nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\autoref{subsec:PE_free_surface}) 740 the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case 741 (\autoref{subsec:PE_free_surface}). 745 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 746 The main distinction is between the fixed volume case (linear free surface) and 747 the variable volume case (nonlinear free surface, \key{vvl} is defined). 748 In the linear free surface case (\autoref{subsec:PE_free_surface}) 749 the vertical scale factors $e_{3}$ are fixed in time, 750 while they are time-dependent in the nonlinear case (\autoref{subsec:PE_free_surface}). 742 751 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 743 which imposes a very small time step when an explicit time stepping is used. 752 which imposes a very small time step when an explicit time stepping is used. 744 753 Two methods are proposed to allow a longer time step for the three-dimensional equations: 745 754 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}), 746 and the split-explicit free surface described below. 755 and the split-explicit free surface described below. 747 756 The extra term introduced in the filtered method is calculated implicitly, 748 757 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 749 758 750 759 751 The form of the surface pressure gradient term depends on how the user wants to handle752 the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}). 760 The form of the surface pressure gradient term depends on how the user wants to 761 handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}). 753 762 Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx): 754 an explicit formulation which requires a small time step 755 a filtered free surface formulation which allows a larger time step by adding a filtering756 term into the momentum equation;763 an explicit formulation which requires a small time step; 764 a filtered free surface formulation which allows a larger time step by 765 adding a filtering term into the momentum equation; 757 766 and a split-explicit free surface formulation, described below, which also allows a larger time step. 758 767 759 The extra term introduced in the filtered method is calculated 760 implicitly, so that a solver is used to compute it. As a consequence the update of the $next$ 761 velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 768 The extra term introduced in the filtered method is calculated implicitly, so that a solver is used to compute it. 769 As a consequence the update of the $next$ velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 762 770 763 771 … … 768 776 \label{subsec:DYN_spg_exp} 769 777 770 In the explicit free surface formulation (\key{dynspg\_exp} defined), the model time step 771 is chosen to be small enough to resolve the external gravity waves (typically a few tens of seconds). 778 In the explicit free surface formulation (\key{dynspg\_exp} defined), 779 the model time step is chosen to be small enough to resolve the external gravity waves 780 (typically a few tens of seconds). 772 781 The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time), 773 782 is thus simply given by : … … 779 788 \end{equation} 780 789 781 Note that in the non-linear free surface case ($i.e.$ \key{vvl} defined), the surface pressure 782 gradient is already included in the momentum tendency through the level thickness variation 783 allowed in the computation of the hydrostatic pressure gradient. Thus, nothing is done in the \mdl{dynspg\_exp} module. 790 Note that in the non-linear free surface case ($i.e.$ \key{vvl} defined), 791 the surface pressure gradient is already included in the momentum tendency through 792 the level thickness variation allowed in the computation of the hydrostatic pressure gradient. 793 Thus, nothing is done in the \mdl{dynspg\_exp} module. 784 794 785 795 %-------------------------------------------------------------------------------------------------------------- … … 794 804 795 805 The split-explicit free surface formulation used in \NEMO (\key{dynspg\_ts} defined), 796 also called the time-splitting formulation, follows the one 797 proposed by \citet{Shchepetkin_McWilliams_OM05}. The general idea is to solve the free surface 798 equation and the associated barotropic velocity equations with a smaller time 799 step than $\rdt$, the time step used for the three dimensional prognostic 800 variables (\autoref{fig:DYN_dynspg_ts}). 801 The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) 802 is provided through the \np{nn\_baro} namelist parameter as: 803 $\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{ = .true.}) 804 considering that the stability of the barotropic system is essentially controled by external waves propagation. 806 also called the time-splitting formulation, follows the one proposed by \citet{Shchepetkin_McWilliams_OM05}. 807 The general idea is to solve the free surface equation and the associated barotropic velocity equations with 808 a smaller time step than $\rdt$, the time step used for the three dimensional prognostic variables 809 (\autoref{fig:DYN_dynspg_ts}). 810 The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) is provided through 811 the \np{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$. 812 This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{ = .true.}) considering that 813 the stability of the barotropic system is essentially controled by external waves propagation. 805 814 Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 806 815 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. … … 819 828 \end{equation} 820 829 \end{subequations} 821 where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. The third term on the right hand side of \autoref{eq:BT_dyn} represents the bottom stress (see section \autoref{sec:ZDF_bfr}), explicitly accounted for at each barotropic iteration. Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm detailed in \citet{Shchepetkin_McWilliams_OM05}. AB3-AM4 coefficients used in \NEMO follow the second-order accurate, "multi-purpose" stability compromise as defined in \citet{Shchepetkin_McWilliams_Bk08} (see their figure 12, lower left). 830 where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, 831 surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. 832 The third term on the right hand side of \autoref{eq:BT_dyn} represents the bottom stress 833 (see section \autoref{sec:ZDF_bfr}), explicitly accounted for at each barotropic iteration. 834 Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm 835 detailed in \citet{Shchepetkin_McWilliams_OM05}. 836 AB3-AM4 coefficients used in \NEMO follow the second-order accurate, 837 "multi-purpose" stability compromise as defined in \citet{Shchepetkin_McWilliams_Bk08} 838 (see their figure 12, lower left). 822 839 823 840 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > … … 825 842 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 826 843 \caption{ \protect\label{fig:DYN_dynspg_ts} 827 Schematic of the split-explicit time stepping scheme for the external 828 and internal modes. Time increases to the right. In this particular exemple, 829 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 830 Internal mode time steps (which are also the model time steps) are denoted 831 by $t-\rdt$, $t$ and $t+\rdt$. Variables with $k$ superscript refer to instantaneous barotropic variables, 832 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and secondary weights (blue vertical bars). 833 The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged 834 transports to advect tracers. 835 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .true.}. 836 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, \protect\np{ln\_bt\_av}\forcode{ = .true.}. 837 c) Forward time integration with no time filtering (POM-like scheme): \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 844 Schematic of the split-explicit time stepping scheme for the external and internal modes. 845 Time increases to the right. In this particular exemple, 846 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 847 Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 848 Variables with $k$ superscript refer to instantaneous barotropic variables, 849 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 850 secondary weights (blue vertical bars). 851 The former are used to obtain time filtered quantities at $t+\rdt$ while 852 the latter are used to obtain time averaged transports to advect tracers. 853 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 854 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 855 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 856 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 857 c) Forward time integration with no time filtering (POM-like scheme): 858 \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 838 859 \end{center} \end{figure} 839 860 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 840 861 841 In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), the external mode is integrated 842 between \textit{now} and \textit{after} baroclinic time-steps (\autoref{fig:DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic 843 quantities (\np{ln\_bt\_av}\forcode{ = .true.}). In that case, the integration is extended slightly beyond \textit{after} time step to provide time filtered quantities. 844 These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. 862 In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), 863 the external mode is integrated between \textit{now} and \textit{after} baroclinic time-steps 864 (\autoref{fig:DYN_dynspg_ts}a). 865 To avoid aliasing of fast barotropic motions into three dimensional equations, 866 time filtering is eventually applied on barotropic quantities (\np{ln\_bt\_av}\forcode{ = .true.}). 867 In that case, the integration is extended slightly beyond \textit{after} time step to 868 provide time filtered quantities. 869 These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. 845 870 Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, 846 asselin filtering is not applied to barotropic quantities. \\ 847 Alternatively, one can choose to integrate barotropic equations starting 848 from \textit{before} time step (\np{ln\_bt\_fw}\forcode{ = .false.}). Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), the baroclinic to barotropic forcing term given at \textit{now} time step 849 become centred in the middle of the integration window. It can easily be shown that this property 850 removes part of splitting errors between modes, which increases the overall numerical robustness. 871 asselin filtering is not applied to barotropic quantities.\\ 872 Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step 873 (\np{ln\_bt\_fw}\forcode{ = .false.}). 874 Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), 875 the baroclinic to barotropic forcing term given at \textit{now} time step become centred in 876 the middle of the integration window. 877 It can easily be shown that this property removes part of splitting errors between modes, 878 which increases the overall numerical robustness. 851 879 %references to Patrick Marsaleix' work here. Also work done by SHOM group. 852 880 853 881 %%% 854 882 855 As far as tracer conservation is concerned, barotropic velocities used to advect tracers must also be updated 856 at \textit{now} time step. This implies to change the traditional order of computations in \NEMO: most of momentum 857 trends (including the barotropic mode calculation) updated first, tracers' after. This \textit{de facto} makes semi-implicit hydrostatic 858 pressure gradient (see section \autoref{subsec:DYN_hpg_imp}) and time splitting not compatible. 859 Advective barotropic velocities are obtained by using a secondary set of filtering weights, uniquely defined from the filter 860 coefficients used for the time averaging (\citet{Shchepetkin_McWilliams_OM05}). Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to obtain exact conservation. 883 As far as tracer conservation is concerned, 884 barotropic velocities used to advect tracers must also be updated at \textit{now} time step. 885 This implies to change the traditional order of computations in \NEMO: 886 most of momentum trends (including the barotropic mode calculation) updated first, tracers' after. 887 This \textit{de facto} makes semi-implicit hydrostatic pressure gradient 888 (see section \autoref{subsec:DYN_hpg_imp}) 889 and time splitting not compatible. 890 Advective barotropic velocities are obtained by using a secondary set of filtering weights, 891 uniquely defined from the filter coefficients used for the time averaging (\citet{Shchepetkin_McWilliams_OM05}). 892 Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to 893 obtain exact conservation. 861 894 862 895 %%% 863 896 864 One can eventually choose to feedback instantaneous values by not using any time filter (\np{ln\_bt\_av}\forcode{ = .false.}). 865 In that case, external mode equations are continuous in time, ie they are not re-initialized when starting a new 866 sub-stepping sequence. This is the method used so far in the POM model, the stability being maintained by refreshing at (almost) 867 each barotropic time step advection and horizontal diffusion terms. Since the latter terms have not been added in \NEMO for 868 computational efficiency, removing time filtering is not recommended except for debugging purposes. 869 This may be used for instance to appreciate the damping effect of the standard formulation on external gravity waves in idealized or weakly non-linear cases. Although the damping is lower than for the filtered free surface, it is still significant as shown by \citet{Levier2007} in the case of an analytical barotropic Kelvin wave. 897 One can eventually choose to feedback instantaneous values by not using any time filter 898 (\np{ln\_bt\_av}\forcode{ = .false.}). 899 In that case, external mode equations are continuous in time, 900 $i.e.$ they are not re-initialized when starting a new sub-stepping sequence. 901 This is the method used so far in the POM model, the stability being maintained by 902 refreshing at (almost) each barotropic time step advection and horizontal diffusion terms. 903 Since the latter terms have not been added in \NEMO for computational efficiency, 904 removing time filtering is not recommended except for debugging purposes. 905 This may be used for instance to appreciate the damping effect of the standard formulation on 906 external gravity waves in idealized or weakly non-linear cases. 907 Although the damping is lower than for the filtered free surface, 908 it is still significant as shown by \citet{Levier2007} in the case of an analytical barotropic Kelvin wave. 870 909 871 910 %>>>>>=============== … … 874 913 \textbf{title: Time stepping the barotropic system } 875 914 876 Assume knowledge of the full velocity and tracer fields at baroclinic time $\tau$. Hence, 877 we can update the surface height and vertically integrated velocity with a leap-frog 878 scheme using the small barotropic time step $\rdt$. We have 915 Assume knowledge of the full velocity and tracer fields at baroclinic time $\tau$. 916 Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using 917 the small barotropic time step $\rdt$. 918 We have 879 919 880 920 \begin{equation} \label{eq:DYN_spg_ts_eta} … … 889 929 \ 890 930 891 In these equations, araised (b) denotes values of surface height and vertically integrated velocity updated with the barotropic time steps. The $\tau$ time label on $\eta^{(b)}$ 892 and $U^{(b)}$ denotes the baroclinic time at which the vertically integrated forcing $\textbf{M}(\tau)$ (note that this forcing includes the surface freshwater forcing), the tracer fields, the freshwater flux $\text{EMP}_w(\tau)$, and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over a single cycle. This is also the time 893 that sets the barotropic time steps via 931 In these equations, araised (b) denotes values of surface height and vertically integrated velocity updated with 932 the barotropic time steps. 933 The $\tau$ time label on $\eta^{(b)}$ and $U^{(b)}$ denotes the baroclinic time at which 934 the vertically integrated forcing $\textbf{M}(\tau)$ 935 (note that this forcing includes the surface freshwater forcing), 936 the tracer fields, the freshwater flux $\text{EMP}_w(\tau)$, 937 and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over 938 a single cycle. 939 This is also the time that sets the barotropic time steps via 894 940 \begin{equation} \label{eq:DYN_spg_ts_t} 895 941 t_n=\tau+n\rdt 896 942 \end{equation} 897 with $n$ an integer. The density scaled surface pressure is evaluated via 943 with $n$ an integer. 944 The density scaled surface pressure is evaluated via 898 945 \begin{equation} \label{eq:DYN_spg_ts_ps} 899 946 p_s^{(b)}(\tau,t_{n}) = \begin{cases} … … 914 961 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 915 962 \end{equation} 916 the time averaged surface height taken from the previous barotropic cycle. Likewise, 963 the time averaged surface height taken from the previous barotropic cycle. 964 Likewise, 917 965 \begin{equation} \label{eq:DYN_spg_ts_u} 918 966 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ … … 925 973 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) 926 974 \end{equation} 927 the time averaged vertically integrated transport. Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 928 929 Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at baroclinic time $\tau + \rdt \tau$ 975 the time averaged vertically integrated transport. 976 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 977 978 Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , 979 the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at 980 baroclinic time $\tau + \rdt \tau$ 930 981 \begin{equation} \label{eq:DYN_spg_ts_u} 931 982 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} 932 983 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 933 984 \end{equation} 934 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form 985 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using 986 the following form 935 987 936 988 \begin{equation} \label{eq:DYN_spg_ts_ssh} … … 938 990 \end{equation} 939 991 940 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between the mass/volume budgets and the tracer budgets. More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 992 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between 993 the mass/volume budgets and the tracer budgets. 994 More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 941 995 942 In general, some form of time filter is needed to maintain integrity of the surface 943 height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We 944 have tried various forms of such filtering, with the following method discussed in 945 \cite{Griffies_al_MWR01} chosen due to its stability and reasonably good maintenance of 946 tracer conservation properties (see ??) 996 In general, some form of time filter is needed to maintain integrity of the surface height field due to 997 the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. 998 We have tried various forms of such filtering, 999 with the following method discussed in \cite{Griffies_al_MWR01} chosen due to 1000 its stability and reasonably good maintenance of tracer conservation properties (see ??). 947 1001 948 1002 \begin{equation} \label{eq:DYN_spg_ts_sshf} … … 957 1011 \end{equation} 958 1012 959 which is useful since it isolates all the time filtering aspects into the term multiplied 960 by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when 961 eliminating tracer and surface height time filtering (see ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 1013 which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. 1014 This isolation allows for an easy check that tracer conservation is exact when 1015 eliminating tracer and surface height time filtering (see ?? for more complete discussion). 1016 However, in the general case with a non-zero $\alpha$, 1017 the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 962 1018 963 1019 } %%end gm comment (copy of griffies book) … … 984 1040 \end{equation} 985 1041 where $T_c$, is a parameter with dimensions of time which characterizes the force, 986 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, and $\rm {\bf M}$987 represents the collected contributions of the Coriolis, hydrostatic pressure gradient,1042 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 1043 and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 988 1044 non-linear and viscous terms in \autoref{eq:PE_dyn}. 989 1045 } %end gmcomment 990 1046 991 Note that in the linear free surface formulation (\key{vvl} not defined), the ocean depth 992 is time-independent and so is the matrix to be inverted. It is computed once and for all and applies to all ocean time steps. 1047 Note that in the linear free surface formulation (\key{vvl} not defined), 1048 the ocean depth is time-independent and so is the matrix to be inverted. 1049 It is computed once and for all and applies to all ocean time steps. 993 1050 994 1051 % ================================================================ … … 1003 1060 1004 1061 Options are defined through the \ngn{namdyn\_ldf} namelist variables. 1005 The options available for lateral diffusion are to use either laplacian 1006 (rotated or not) or biharmonic operators. The coefficients may be constant 1007 or spatially variable; the description of the coefficients is found in the chapter 1008 on lateral physics (\autoref{chap:LDF}). The lateral diffusion of momentum is 1009 evaluated using a forward scheme, $i.e.$ the velocity appearing in its expression 1010 is the \textit{before} velocity in time, except for the pure vertical component 1011 that appears when a tensor of rotation is used. This latter term is solved 1012 implicitly together with the vertical diffusion term (see \autoref{chap:STP}) 1013 1014 At the lateral boundaries either free slip, no slip or partial slip boundary 1015 conditions are applied according to the user's choice (see \autoref{chap:LBC}). 1062 The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. 1063 The coefficients may be constant or spatially variable; 1064 the description of the coefficients is found in the chapter on lateral physics (\autoref{chap:LDF}). 1065 The lateral diffusion of momentum is evaluated using a forward scheme, 1066 $i.e.$ the velocity appearing in its expression is the \textit{before} velocity in time, 1067 except for the pure vertical component that appears when a tensor of rotation is used. 1068 This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). 1069 1070 At the lateral boundaries either free slip, 1071 no slip or partial slip boundary conditions are applied according to the user's choice (see \autoref{chap:LBC}). 1016 1072 1017 1073 \gmcomment{ 1018 Hyperviscous operators are frequently used in the simulation of turbulent flows to control 1019 the dissipation of unresolved small scale features. 1020 Their primary role is to provide strong dissipation at the smallest scale supported by the grid 1021 while minimizing the impact on the larger scale features. 1022 Hyperviscous operators are thus designed to be more scale selective than the traditional, 1023 physically motivated Laplace operator. 1024 In finite difference methods, the biharmonic operator is frequently the method of choice to achieve 1025 this scale selective dissipation since its damping time ($i.e.$ its spin down time) 1026 scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 1027 (so that short waves damped more rapidelly than long ones), 1028 whereas the Laplace operator damping time scales only like $\lambda^{-2}$.1074 Hyperviscous operators are frequently used in the simulation of turbulent flows to 1075 control the dissipation of unresolved small scale features. 1076 Their primary role is to provide strong dissipation at the smallest scale supported by 1077 the grid while minimizing the impact on the larger scale features. 1078 Hyperviscous operators are thus designed to be more scale selective than the traditional, 1079 physically motivated Laplace operator. 1080 In finite difference methods, 1081 the biharmonic operator is frequently the method of choice to achieve this scale selective dissipation since 1082 its damping time ($i.e.$ its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 1083 (so that short waves damped more rapidelly than long ones), 1084 whereas the Laplace operator damping time scales only like $\lambda^{-2}$. 1029 1085 } 1030 1086 … … 1047 1103 \end{equation} 1048 1104 1049 As explained in \autoref{subsec:PE_ldf}, this formulation (as the gradient of a divergence1050 and curl of the vorticity) preserves symmetry and ensures a complete 1051 separation between the vorticity and divergence parts of the momentum diffusion.1105 As explained in \autoref{subsec:PE_ldf}, 1106 this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and 1107 ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 1052 1108 1053 1109 %-------------------------------------------------------------------------------------------------------------- … … 1058 1114 \label{subsec:DYN_ldf_iso} 1059 1115 1060 A rotation of the lateral momentum diffusion operator is needed in several cases: 1061 for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{ = .true.}) and for1062 either iso-neutral (\np{ln\_dynldf\_iso}\forcode{ = .true.}) or geopotential 1063 (\np{ln\_dynldf\_hor}\forcode{ = .true.}) diffusion in the $s$-coordinate. In the partial step 1064 case, coordinates are horizontal except at the deepest level and no 1065 rotation is performed when \np{ln\_dynldf\_hor}\forcode{ = .true.}. The diffusion operator 1066 is defined simply as the divergence of down gradient momentum fluxes on each 1067 momentum component. It must be emphasized that this formulation ignores 1068 constraints on the stress tensor such as symmetry. The resulting discrete 1069 representation is:1116 A rotation of the lateral momentum diffusion operator is needed in several cases: 1117 for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{ = .true.}) and 1118 for either iso-neutral (\np{ln\_dynldf\_iso}\forcode{ = .true.}) or 1119 geopotential (\np{ln\_dynldf\_hor}\forcode{ = .true.}) diffusion in the $s$-coordinate. 1120 In the partial step case, coordinates are horizontal except at the deepest level and 1121 no rotation is performed when \np{ln\_dynldf\_hor}\forcode{ = .true.}. 1122 The diffusion operator is defined simply as the divergence of down gradient momentum fluxes on 1123 each momentum component. 1124 It must be emphasized that this formulation ignores constraints on the stress tensor such as symmetry. 1125 The resulting discrete representation is: 1070 1126 \begin{equation} \label{eq:dyn_ldf_iso} 1071 1127 \begin{split} … … 1115 1171 \end{split} 1116 1172 \end{equation} 1117 where $r_1$ and $r_2$ are the slopes between the surface along which the 1118 diffusion operator acts and the surface of computation ($z$- or $s$-surfaces). 1119 The way these slopes are evaluated is given in the lateral physics chapter 1120 (\autoref{chap:LDF}). 1173 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and 1174 the surface of computation ($z$- or $s$-surfaces). 1175 The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}). 1121 1176 1122 1177 %-------------------------------------------------------------------------------------------------------------- … … 1127 1182 \label{subsec:DYN_ldf_bilap} 1128 1183 1129 The lateral fourth order operator formulation on momentum is obtained by 1130 applying \autoref{eq:dynldf_lap} twice. It requires an additional assumption on 1131 boundary conditions: the first derivative term normal to the coast depends on 1132 the free or no-slip lateral boundary conditions chosen, while the third 1133 derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). 1184 The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq:dynldf_lap} twice. 1185 It requires an additional assumption on boundary conditions: 1186 the first derivative term normal to the coast depends on the free or no-slip lateral boundary conditions chosen, 1187 while the third derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). 1134 1188 %%% 1135 1189 \gmcomment{add a remark on the the change in the position of the coefficient} … … 1147 1201 1148 1202 Options are defined through the \ngn{namzdf} namelist variables. 1149 The large vertical diffusion coefficient found in the surface mixed layer together 1150 with high vertical resolution implies that in the case of explicit time stepping there 1151 would be too restrictive a constraint on the time step. Two time stepping schemes 1152 can be used for the vertical diffusion term : $(a)$ a forward time differencing 1153 scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique 1154 (\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme 1155 (\np{ln\_zdfexp}\forcode{ = .false.}) (see \autoref{chap:STP}). Note that namelist variables 1156 \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 1157 1158 The formulation of the vertical subgrid scale physics is the same whatever 1159 the vertical coordinate is. The vertical diffusion operators given by 1160 \autoref{eq:PE_zdf} take the following semi-discrete space form: 1203 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. 1204 Two time stepping schemes can be used for the vertical diffusion term: 1205 $(a)$ a forward time differencing scheme 1206 (\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique (\np{nn\_zdfexp} $>$ 1) or 1207 $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}) 1208 (see \autoref{chap:STP}). 1209 Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 1210 1211 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 1212 The vertical diffusion operators given by \autoref{eq:PE_zdf} take the following semi-discrete space form: 1161 1213 \begin{equation} \label{eq:dynzdf} 1162 1214 \left\{ \begin{aligned} … … 1168 1220 \end{aligned} \right. 1169 1221 \end{equation} 1170 where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and 1171 diffusivity coefficients. The way these coefficients are evaluated 1172 depends on the vertical physics used (see \autoref{chap:ZDF}). 1173 1174 The surface boundary condition on momentum is the stress exerted by 1175 the wind. At the surface, the momentum fluxes are prescribed as the boundary 1176 condition on the vertical turbulent momentum fluxes, 1222 where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and diffusivity coefficients. 1223 The way these coefficients are evaluated depends on the vertical physics used (see \autoref{chap:ZDF}). 1224 1225 The surface boundary condition on momentum is the stress exerted by the wind. 1226 At the surface, the momentum fluxes are prescribed as the boundary condition on 1227 the vertical turbulent momentum fluxes, 1177 1228 \begin{equation} \label{eq:dynzdf_sbc} 1178 1229 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 1179 1230 = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v } 1180 1231 \end{equation} 1181 where $\left( \tau _u ,\tau _v \right)$ are the two components of the wind stress 1182 vector in the (\textbf{i},\textbf{j}) coordinate system. The high mixing coefficients 1183 in the surface mixed layer ensure that the surface wind stress is distributed in1184 the vertical over the mixed layer depth. If the vertical mixing coefficient1185 is small (when no mixed layer scheme is used) the surface stress enters only 1186 the top model level, as a body force. The surface wind stress is calculated1187 in the surface module routines (SBC, see \autoref{chap:SBC}) 1188 1189 The turbulent flux of momentum at the bottom of the ocean is specified through 1190 a bottom friction parameterisation(see \autoref{sec:ZDF_bfr})1232 where $\left( \tau _u ,\tau _v \right)$ are the two components of the wind stress vector in 1233 the (\textbf{i},\textbf{j}) coordinate system. 1234 The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in 1235 the vertical over the mixed layer depth. 1236 If the vertical mixing coefficient is small (when no mixed layer scheme is used) 1237 the surface stress enters only the top model level, as a body force. 1238 The surface wind stress is calculated in the surface module routines (SBC, see \autoref{chap:SBC}). 1239 1240 The turbulent flux of momentum at the bottom of the ocean is specified through a bottom friction parameterisation 1241 (see \autoref{sec:ZDF_bfr}) 1191 1242 1192 1243 % ================================================================ … … 1196 1247 \label{sec:DYN_forcing} 1197 1248 1198 Besides the surface and bottom stresses (see the above section) which are1199 introduced as boundary conditions on the vertical mixing, three other forcings 1200 may enter the dynamical equations by affecting the surface pressure gradient.1201 1202 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), the atmospheric pressure is taken1203 into account when computing the surface pressure gradient.1204 1205 (2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}), 1249 Besides the surface and bottom stresses (see the above section) 1250 which are introduced as boundary conditions on the vertical mixing, 1251 three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 1252 1253 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), 1254 the atmospheric pressure is taken into account when computing the surface pressure gradient. 1255 1256 (2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}), 1206 1257 the tidal potential is taken into account when computing the surface pressure gradient. 1207 1258 1208 (3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean), 1259 (3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used 1260 ($i.e.$ when the sea-ice is embedded in the ocean), 1209 1261 the snow-ice mass is taken into account when computing the surface pressure gradient. 1210 1262 … … 1225 1277 1226 1278 Options are defined through the \ngn{namdom} namelist variables. 1227 The general framework for dynamics time stepping is a leap-frog scheme, 1228 $i.e.$ a three level centred time scheme associated with an Asselin time filter 1229 (cf. \autoref{chap:STP}). The scheme is applied to the velocity, except when using 1230 the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) in the variable 1231 volume case (\key{vvl} defined), where it has to be applied to the thickness 1232 weighted velocity (see \autoref{sec:A_momentum}) 1233 1234 $\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 1279 The general framework for dynamics time stepping is a leap-frog scheme, 1280 $i.e.$ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}). 1281 The scheme is applied to the velocity, except when 1282 using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) 1283 in the variable volume case (\key{vvl} defined), 1284 where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum}) 1285 1286 $\bullet$ vector invariant form or linear free surface 1287 (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 1235 1288 \begin{equation} \label{eq:dynnxt_vec} 1236 1289 \left\{ \begin{aligned} … … 1240 1293 \end{equation} 1241 1294 1242 $\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 1295 $\bullet$ flux form and nonlinear free surface 1296 (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 1243 1297 \begin{equation} \label{eq:dynnxt_flux} 1244 1298 \left\{ \begin{aligned} … … 1248 1302 \end{aligned} \right. 1249 1303 \end{equation} 1250 where RHS is the right hand side of the momentum equation, the subscript $f$ 1251 denotes filtered values and $\gamma$ is the Asselin coefficient. $\gamma$ is 1252 initialized as \np{nn\_atfp} (namelist parameter). Its default value is \np{nn\_atfp}\forcode{ = 10.e-3}. 1253 In both cases, the modified Asselin filter is not applied since perfect conservation 1254 is not an issue for the momentum equations. 1255 1256 Note that with the filtered free surface, the update of the \textit{after} velocities 1257 is done in the \mdl{dynsp\_flt} module, and only array swapping 1258 and Asselin filtering is done in \mdl{dynnxt}. 1304 where RHS is the right hand side of the momentum equation, 1305 the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. 1306 $\gamma$ is initialized as \np{nn\_atfp} (namelist parameter). 1307 Its default value is \np{nn\_atfp}\forcode{ = 10.e-3}. 1308 In both cases, the modified Asselin filter is not applied since perfect conservation is not an issue for 1309 the momentum equations. 1310 1311 Note that with the filtered free surface, 1312 the update of the \textit{after} velocities is done in the \mdl{dynsp\_flt} module, 1313 and only array swapping and Asselin filtering is done in \mdl{dynnxt}. 1259 1314 1260 1315 % ================================================================ -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex
r10146 r10354 29 29 30 30 Options are defined through the \ngn{namlbc} namelist variables. 31 The discrete representation of a domain with complex boundaries (coastlines and 32 bottom topography) leads to arrays that include large portions where a computation 33 is not required as the model variables remain at zero. Nevertheless, vectorial 34 supercomputers are far more efficient when computing over a whole array, and the 35 readability of a code is greatly improved when boundary conditions are applied in 36 an automatic way rather than by a specific computation before or after each 37 computational loop. An efficient way to work over the whole domain while specifying 38 the boundary conditions, is to use multiplication by mask arrays in the computation. 39 A mask array is a matrix whose elements are $1$ in the ocean domain and $0$ 40 elsewhere. A simple multiplication of a variable by its own mask ensures that it will 41 remain zero over land areas. Since most of the boundary conditions consist of a 42 zero flux across the solid boundaries, they can be simply applied by multiplying 43 variables by the correct mask arrays, $i.e.$ the mask array of the grid point where 44 the flux is evaluated. For example, the heat flux in the \textbf{i}-direction is evaluated 45 at $u$-points. Evaluating this quantity as, 31 The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 32 arrays that include large portions where a computation is not required as the model variables remain at zero. 33 Nevertheless, vectorial supercomputers are far more efficient when computing over a whole array, 34 and the readability of a code is greatly improved when boundary conditions are applied in 35 an automatic way rather than by a specific computation before or after each computational loop. 36 An efficient way to work over the whole domain while specifying the boundary conditions, 37 is to use multiplication by mask arrays in the computation. 38 A mask array is a matrix whose elements are $1$ in the ocean domain and $0$ elsewhere. 39 A simple multiplication of a variable by its own mask ensures that it will remain zero over land areas. 40 Since most of the boundary conditions consist of a zero flux across the solid boundaries, 41 they can be simply applied by multiplying variables by the correct mask arrays, 42 $i.e.$ the mask array of the grid point where the flux is evaluated. 43 For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points. 44 Evaluating this quantity as, 46 45 47 46 \begin{equation} \label{eq:lbc_aaaa} … … 49 48 }{e_{1u} } \; \delta _{i+1 / 2} \left[ T \right]\;\;mask_u 50 49 \end{equation} 51 (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is 52 zero inside land and at the boundaries, since mask$_{u}$ is zero at solid boundaries 53 which in this case are defined at $u$-points (normal velocity $u$ remains zero at 54 the coast) (\autoref{fig:LBC_uv}). 50 (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and 51 at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points 52 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 55 53 56 54 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 58 56 \includegraphics[width=0.90\textwidth]{Fig_LBC_uv} 59 57 \caption{ \protect\label{fig:LBC_uv} 60 Lateral boundary (thick line) at T-level. The velocity normal to the boundary is set to zero.} 58 Lateral boundary (thick line) at T-level. 59 The velocity normal to the boundary is set to zero.} 61 60 \end{center} \end{figure} 62 61 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 63 62 64 For momentum the situation is a bit more complex as two boundary conditions 65 must be provided along the coast (one each for the normal and tangential velocities). 66 The boundary of the ocean in the C-grid is defined by the velocity-faces. 67 For example, at a given $T$-level, the lateral boundary (a coastline or an intersection 68 with the bottom topography) is made of segments joining $f$-points, and normal 69 velocity points are located between two $f-$points (\autoref{fig:LBC_uv}). 70 The boundary condition on the normal velocity (no flux through solid boundaries) 71 can thus be easily implemented using the mask system. The boundary condition 72 on the tangential velocity requires a more specific treatment. This boundary 73 condition influences the relative vorticity and momentum diffusive trends, and is 74 required in order to compute the vorticity at the coast. Four different types of 75 lateral boundary condition are available, controlled by the value of the \np{rn\_shlat} 76 namelist parameter. (The value of the mask$_{f}$ array along the coastline is set 77 equal to this parameter.) These are: 63 For momentum the situation is a bit more complex as two boundary conditions must be provided along the coast 64 (one each for the normal and tangential velocities). 65 The boundary of the ocean in the C-grid is defined by the velocity-faces. 66 For example, at a given $T$-level, 67 the lateral boundary (a coastline or an intersection with the bottom topography) is made of 68 segments joining $f$-points, and normal velocity points are located between two $f-$points (\autoref{fig:LBC_uv}). 69 The boundary condition on the normal velocity (no flux through solid boundaries) 70 can thus be easily implemented using the mask system. 71 The boundary condition on the tangential velocity requires a more specific treatment. 72 This boundary condition influences the relative vorticity and momentum diffusive trends, 73 and is required in order to compute the vorticity at the coast. 74 Four different types of lateral boundary condition are available, 75 controlled by the value of the \np{rn\_shlat} namelist parameter 76 (The value of the mask$_{f}$ array along the coastline is set equal to this parameter). 77 These are: 78 78 79 79 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 81 81 \includegraphics[width=0.90\textwidth]{Fig_LBC_shlat} 82 82 \caption{ \protect\label{fig:LBC_shlat} 83 lateral boundary condition (a) free-slip ($rn\_shlat=0$) ; (b) no-slip ($rn\_shlat=2$) 84 ; (c) "partial" free-slip ($0<rn\_shlat<2$) and (d) "strong" no-slip ($2<rn\_shlat$). 85 Implied "ghost" velocity inside land area is display in grey. } 83 lateral boundary condition 84 (a) free-slip ($rn\_shlat=0$); 85 (b) no-slip ($rn\_shlat=2$); 86 (c) "partial" free-slip ($0<rn\_shlat<2$) and 87 (d) "strong" no-slip ($2<rn\_shlat$). 88 Implied "ghost" velocity inside land area is display in grey. } 86 89 \end{center} \end{figure} 87 90 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 89 92 \begin{description} 90 93 91 \item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}): ] the tangential velocity at the 92 coastline is equal to the offshore velocity, $i.e.$ the normal derivative of the 93 tangential velocity is zero at the coast, so the vorticity: mask$_{f}$ array is set 94 to zero inside the land and just at the coast (\autoref{fig:LBC_shlat}-a). 95 96 \item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}): ] the tangential velocity vanishes 97 at the coastline. Assuming that the tangential velocity decreases linearly from 98 the closest ocean velocity grid point to the coastline, the normal derivative is 99 evaluated as if the velocities at the closest land velocity gridpoint and the closest 100 ocean velocity gridpoint were of the same magnitude but in the opposite direction 101 (\autoref{fig:LBC_shlat}-b). Therefore, the vorticity along the coastlines is given by: 94 \item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at 95 the coastline is equal to the offshore velocity, 96 $i.e.$ the normal derivative of the tangential velocity is zero at the coast, 97 so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast 98 (\autoref{fig:LBC_shlat}-a). 99 100 \item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}):] the tangential velocity vanishes at the coastline. 101 Assuming that the tangential velocity decreases linearly from 102 the closest ocean velocity grid point to the coastline, 103 the normal derivative is evaluated as if the velocities at the closest land velocity gridpoint and 104 the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction 105 (\autoref{fig:LBC_shlat}-b). 106 Therefore, the vorticity along the coastlines is given by: 102 107 103 108 \begin{equation*} 104 109 \zeta \equiv 2 \left(\delta_{i+1/2} \left[e_{2v} v \right] - \delta_{j+1/2} \left[e_{1u} u \right] \right) / \left(e_{1f} e_{2f} \right) \ , 105 110 \end{equation*} 106 where $u$ and $v$ are masked fields. Setting the mask$_{f}$ array to $2$ along107 the coastline provides a vorticity field computed with the no-slip boundary condition, 108 simply by multiplying it by the mask$_{f}$ :111 where $u$ and $v$ are masked fields. 112 Setting the mask$_{f}$ array to $2$ along the coastline provides a vorticity field computed with 113 the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 109 114 \begin{equation} \label{eq:lbc_bbbb} 110 115 \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta _{i+1/2} … … 113 118 \end{equation} 114 119 115 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2): ] the tangential 116 velocity at the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral 117 friction but not strong enough to make the tangential velocity at the coast vanish 118 (\autoref{fig:LBC_shlat}-c). This can be selected by providing a value of mask$_{f}$ 119 strictly inbetween $0$ and $2$. 120 121 \item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}): ] the viscous boundary 122 layer is assumed to be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). 123 The friction is thus larger than in the no-slip case. 120 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at 121 the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral friction but 122 not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 123 This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 124 125 \item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}):] the viscous boundary layer is assumed to 126 be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). 127 The friction is thus larger than in the no-slip case. 124 128 125 129 \end{description} 126 130 127 Note that when the bottom topography is entirely represented by the $s$-coor-dinates 128 (pure $s$-coordinate), the lateral boundary condition on tangential velocity is of much 129 less importance as it is only applied next to the coast where the minimum water depth 130 can be quite shallow. 131 Note that when the bottom topography is entirely represented by the $s$-coor-dinates (pure $s$-coordinate), 132 the lateral boundary condition on tangential velocity is of much less importance as 133 it is only applied next to the coast where the minimum water depth can be quite shallow. 131 134 132 135 … … 137 140 \label{sec:LBC_jperio} 138 141 139 At the model domain boundaries several choices are offered: closed, cyclic east-west, 140 cyclic north-south, a north-fold, and combination closed-north fold 141 or bi-cyclic east-west and north-fold. The north-fold boundary condition is associated with the 3-pole ORCA mesh. 142 At the model domain boundaries several choices are offered: 143 closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or 144 bi-cyclic east-west and north-fold. 145 The north-fold boundary condition is associated with the 3-pole ORCA mesh. 142 146 143 147 % ------------------------------------------------------------------------------------------------------------- … … 147 151 \label{subsec:LBC_jperio012} 148 152 149 The choice of closed or cyclic model domain boundary condition is made 150 by setting \np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}. Each time such a boundary 151 condition is needed, it is set by a call to routine \mdl{lbclnk}. The computation of 152 momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to 153 $j=jpj-1$, $i.e.$ in the model interior. To choose a lateral model boundary condition 154 is to specify the first and last rows and columns of the model variables. 153 The choice of closed or cyclic model domain boundary condition is made by 154 setting \np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}. 155 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 156 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 157 $i.e.$ in the model interior. 158 To choose a lateral model boundary condition is to specify the first and last rows and columns of 159 the model variables. 155 160 156 161 \begin{description} 157 162 158 \item[For closed boundary (\np{jperio}\forcode{ = 0})], solid walls are imposed at all model 159 boundaries: first and last rows and columns are set to zero. 160 161 \item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], first and last rows are set 162 to zero (closed) whilst the first column is set to the value of the last-but-one column 163 and the last column to the value of the second one (\autoref{fig:LBC_jperio}-a). 164 Whatever flows out of the eastern (western) end of the basin enters the western 165 (eastern) end. 166 167 \item[For cyclic north-south boundary (\np{jperio}\forcode{ = 2})], first and last columns are set 168 to zero (closed) whilst the first row is set to the value of the last-but-one row 169 and the last row to the value of the second one (\autoref{fig:LBC_jperio}-a). 170 Whatever flows out of the northern (southern) end of the basin enters the southern 171 (northern) end. 163 \item[For closed boundary (\np{jperio}\forcode{ = 0})], 164 solid walls are imposed at all model boundaries: 165 first and last rows and columns are set to zero. 166 167 \item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], 168 first and last rows are set to zero (closed) whilst the first column is set to 169 the value of the last-but-one column and the last column to the value of the second one 170 (\autoref{fig:LBC_jperio}-a). 171 Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 172 173 \item[For cyclic north-south boundary (\np{jperio}\forcode{ = 2})], 174 first and last columns are set to zero (closed) whilst the first row is set to 175 the value of the last-but-one row and the last row to the value of the second one 176 (\autoref{fig:LBC_jperio}-a). 177 Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 172 178 173 179 \item[Bi-cyclic east-west and north-south boundary (\np{jperio}\forcode{ = 7})] combines cases 1 and 2. … … 179 185 \includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 180 186 \caption{ \protect\label{fig:LBC_jperio} 181 setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions.}187 setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions.} 182 188 \end{center} \end{figure} 183 189 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 189 195 \label{subsec:LBC_north_fold} 190 196 191 The north fold boundary condition has been introduced in order to handle the north 192 boundary of a three-polar ORCA grid. Such a grid has two poles in the northern hemisphere 193 (\autoref{fig:MISC_ORCA_msh}, and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 197 The north fold boundary condition has been introduced in order to handle the north boundary of 198 a three-polar ORCA grid. 199 Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, 200 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 194 201 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 195 202 … … 197 204 \begin{figure}[!t] \begin{center} 198 205 \includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 199 \caption{ \protect\label{fig:North_Fold_T} 200 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition 201 ($jperio=4$), as used in ORCA 2, 1/4, and 1/12. Pink shaded area corresponds 202 to the inner domain mask (see text). }206 \caption{ \protect\label{fig:North_Fold_T} 207 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 208 as used in ORCA 2, 1/4, and 1/12. 209 Pink shaded area corresponds to the inner domain mask (see text). } 203 210 \end{center} \end{figure} 204 211 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 210 217 \label{sec:LBC_mpp} 211 218 212 For massively parallel processing (mpp), a domain decomposition method is used. 213 The basic idea of the method is to split the large computation domain of a numerical 214 experiment into several smaller domains and solve the set of equations by addressing 215 independent local problems. Each processor has its own local memory and computes 216 the model equation over a subdomain of the whole model domain. The subdomain 217 boundary conditions are specified through communications between processors 218 which are organized by explicit statements (message passing method). 219 220 A big advantage is that the method does not need many modifications of the initial 221 FORTRAN code. From the modeller's point of view, each sub domain running on 222 a processor is identical to the "mono-domain" code. In addition, the programmer 223 manages the communications between subdomains, and the code is faster when 224 the number of processors is increased. The porting of OPA code on an iPSC860 225 was achieved during Guyon's PhD [Guyon et al. 1994, 1995] in collaboration with 226 CETIIS and ONERA. The implementation in the operational context and the studies 227 of performance on a T3D and T3E Cray computers have been made in collaboration 228 with IDRIS and CNRS. The present implementation is largely inspired by Guyon's 229 work [Guyon 1995]. 230 231 The parallelization strategy is defined by the physical characteristics of the 232 ocean model. Second order finite difference schemes lead to local discrete 233 operators that depend at the very most on one neighbouring point. The only 234 non-local computations concern the vertical physics (implicit diffusion, 235 turbulent closure scheme, ...) (delocalization over the whole water column), 236 and the solving of the elliptic equation associated with the surface pressure 237 gradient computation (delocalization over the whole horizontal domain). 238 Therefore, a pencil strategy is used for the data sub-structuration 239 : the 3D initial domain is laid out on local processor 240 memories following a 2D horizontal topological splitting. Each sub-domain 241 computes its own surface and bottom boundary conditions and has a side 242 wall overlapping interface which defines the lateral boundary conditions for 243 computations in the inner sub-domain. The overlapping area consists of the 244 two rows at each edge of the sub-domain. After a computation, a communication 245 phase starts: each processor sends to its neighbouring processors the update 246 values of the points corresponding to the interior overlapping area to its 247 neighbouring sub-domain ($i.e.$ the innermost of the two overlapping rows). 248 The communication is done through the Message Passing Interface (MPI). 249 The data exchanges between processors are required at the very 250 place where lateral domain boundary conditions are set in the mono-domain 251 computation : the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) 252 which manages such conditions is interfaced with routines found in \mdl{lib\_mpp} module 253 when running on an MPP computer ($i.e.$ when \key{mpp\_mpi} defined). 254 It has to be pointed out that when using the MPP version of the model, 255 the east-west cyclic boundary condition is done implicitly, 219 For massively parallel processing (mpp), a domain decomposition method is used. 220 The basic idea of the method is to split the large computation domain of a numerical experiment into 221 several smaller domains and solve the set of equations by addressing independent local problems. 222 Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. 223 The subdomain boundary conditions are specified through communications between processors which 224 are organized by explicit statements (message passing method). 225 226 A big advantage is that the method does not need many modifications of the initial FORTRAN code. 227 From the modeller's point of view, each sub domain running on a processor is identical to the "mono-domain" code. 228 In addition, the programmer manages the communications between subdomains, 229 and the code is faster when the number of processors is increased. 230 The porting of OPA code on an iPSC860 was achieved during Guyon's PhD [Guyon et al. 1994, 1995] 231 in collaboration with CETIIS and ONERA. 232 The implementation in the operational context and the studies of performance on 233 a T3D and T3E Cray computers have been made in collaboration with IDRIS and CNRS. 234 The present implementation is largely inspired by Guyon's work [Guyon 1995]. 235 236 The parallelization strategy is defined by the physical characteristics of the ocean model. 237 Second order finite difference schemes lead to local discrete operators that 238 depend at the very most on one neighbouring point. 239 The only non-local computations concern the vertical physics 240 (implicit diffusion, turbulent closure scheme, ...) (delocalization over the whole water column), 241 and the solving of the elliptic equation associated with the surface pressure gradient computation 242 (delocalization over the whole horizontal domain). 243 Therefore, a pencil strategy is used for the data sub-structuration: 244 the 3D initial domain is laid out on local processor memories following a 2D horizontal topological splitting. 245 Each sub-domain computes its own surface and bottom boundary conditions and 246 has a side wall overlapping interface which defines the lateral boundary conditions for 247 computations in the inner sub-domain. 248 The overlapping area consists of the two rows at each edge of the sub-domain. 249 After a computation, a communication phase starts: 250 each processor sends to its neighbouring processors the update values of the points corresponding to 251 the interior overlapping area to its neighbouring sub-domain ($i.e.$ the innermost of the two overlapping rows). 252 The communication is done through the Message Passing Interface (MPI). 253 The data exchanges between processors are required at the very place where 254 lateral domain boundary conditions are set in the mono-domain computation: 255 the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with 256 routines found in \mdl{lib\_mpp} module when running on an MPP computer ($i.e.$ when \key{mpp\_mpi} defined). 257 It has to be pointed out that when using the MPP version of the model, 258 the east-west cyclic boundary condition is done implicitly, 256 259 whilst the south-symmetric boundary condition option is not available. 257 260 … … 259 262 \begin{figure}[!t] \begin{center} 260 263 \includegraphics[width=0.90\textwidth]{Fig_mpp} 261 \caption{ \protect\label{fig:mpp} 262 Positioning of a sub-domain when massively parallel processing is used. }264 \caption{ \protect\label{fig:mpp} 265 Positioning of a sub-domain when massively parallel processing is used. } 263 266 \end{center} \end{figure} 264 267 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 265 268 266 269 In the standard version of \NEMO, the splitting is regular and arithmetic. 267 The i-axis is divided by \jp{jpni} and the j-axis by \jp{jpnj} for a number of processors 268 \jp{jpnij} most often equal to $jpni \times jpnj$ (parameters set in 269 \ngn{nammpp} namelist). Each processor is independent and without message passing 270 or synchronous process, programs run alone and access just its own local memory. 271 For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) 272 that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. These dimensions include the internal 273 domain and the overlapping rows. The number of rows to exchange (known as 274 the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). The whole domain 275 dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}. The relationship between 276 the whole domain and a sub-domain is: 270 The i-axis is divided by \jp{jpni} and 271 the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ 272 (parameters set in \ngn{nammpp} namelist). 273 Each processor is independent and without message passing or synchronous process, 274 programs run alone and access just its own local memory. 275 For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that 276 are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 277 These dimensions include the internal domain and the overlapping rows. 278 The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). 279 The whole domain dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}. 280 The relationship between the whole domain and a sub-domain is: 277 281 \begin{eqnarray} 278 282 jpi & = & ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci \nonumber \\ … … 283 287 One also defines variables nldi and nlei which correspond to the internal domain bounds, 284 288 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 285 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 289 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 286 290 a global array (whole domain) by the relationship: 287 291 \begin{equation} \label{eq:lbc_nimpp} … … 290 294 with $1 \leq i \leq jpi$, $1 \leq j \leq jpj $ , and $1 \leq k \leq jpk$. 291 295 292 Processors are numbered from 0 to $jpnij-1$, the number is saved in the variable 293 nproc. In the standard version, a processor has no more than four neighbouring 294 processors named nono (for north), noea (east), noso (south) and nowe (west) 295 and two variables, nbondi and nbondj, indicate the relative position of the processor:296 Processors are numbered from 0 to $jpnij-1$, the number is saved in the variable nproc. 297 In the standard version, a processor has no more than 298 four neighbouring processors named nono (for north), noea (east), noso (south) and nowe (west) and 299 two variables, nbondi and nbondj, indicate the relative position of the processor: 296 300 \begin{itemize} 297 301 \item nbondi = -1 an east neighbour, no west processor, … … 300 304 \item nbondi = 2 no splitting following the i-axis. 301 305 \end{itemize} 302 During the simulation, processors exchange data with their neighbours. 303 If there is effectively a neighbour, the processor receives variables from this 304 processor on its overlapping row, and sends the data issued from internal 305 domain corresponding to the overlapping row of the other processor. 306 307 308 The \NEMO model computes equation terms with the help of mask arrays (0 on land 309 points and 1 on sea points). It is easily readable and very efficient in the context of 310 a computer with vectorial architecture. However, in the case of a scalar processor, 311 computations over the land regions become more expensive in terms of CPU time. 312 It is worse when we use a complex configuration with a realistic bathymetry like the 313 global ocean where more than 50 \% of points are land points. For this reason, a 314 pre-processing tool can be used to choose the mpp domain decomposition with a 315 maximum number of only land points processors, which can then be eliminated (\autoref{fig:mppini2}) 316 (For example, the mpp\_optimiz tools, available from the DRAKKAR web site). 317 This optimisation is dependent on the specific bathymetry employed. The user 318 then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with 319 $jpnij < jpni \times jpnj$, leading to the elimination of $jpni \times jpnj - jpnij$ 320 land processors. When those parameters are specified in \ngn{nammpp} namelist, 321 the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, 322 nono, noea,...) so that the land-only processors are not taken into account. 306 During the simulation, processors exchange data with their neighbours. 307 If there is effectively a neighbour, the processor receives variables from this processor on its overlapping row, 308 and sends the data issued from internal domain corresponding to the overlapping row of the other processor. 309 310 311 The \NEMO model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 312 It is easily readable and very efficient in the context of a computer with vectorial architecture. 313 However, in the case of a scalar processor, computations over the land regions become more expensive in 314 terms of CPU time. 315 It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where 316 more than 50 \% of points are land points. 317 For this reason, a pre-processing tool can be used to choose the mpp domain decomposition with a maximum number of 318 only land points processors, which can then be eliminated (\autoref{fig:mppini2}) 319 (For example, the mpp\_optimiz tools, available from the DRAKKAR web site). 320 This optimisation is dependent on the specific bathymetry employed. 321 The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, 322 leading to the elimination of $jpni \times jpnj - jpnij$ land processors. 323 When those parameters are specified in \ngn{nammpp} namelist, 324 the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that 325 the land-only processors are not taken into account. 323 326 324 327 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp 325 328 routine should be suppressed from the code.} 326 329 327 When land processors are eliminated, the value corresponding to these locations in 328 the model output files is undefined. Note that this is a problem for the meshmask file 329 which requires to be defined over the whole domain. Therefore, user should not eliminate 330 land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn\_msh}). 330 When land processors are eliminated, 331 the value corresponding to these locations in the model output files is undefined. 332 Note that this is a problem for the meshmask file which requires to be defined over the whole domain. 333 Therefore, user should not eliminate land processors when creating a meshmask file 334 ($i.e.$ when setting a non-zero value to \np{nn\_msh}). 331 335 332 336 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 334 338 \includegraphics[width=0.90\textwidth]{Fig_mppini2} 335 339 \caption { \protect\label{fig:mppini2} 336 Example of Atlantic domain defined for the CLIPPER projet. Initial grid is 337 composed of 773 x 1236 horizontal points. 338 (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). 339 52 subdomains are land areas. 340 (b) 52 subdomains are eliminated (white rectangles) and the resulting number 341 of processors really used during the computation is jpnij=128.}340 Example of Atlantic domain defined for the CLIPPER projet. 341 Initial grid is composed of 773 x 1236 horizontal points. 342 (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). 343 52 subdomains are land areas. 344 (b) 52 subdomains are eliminated (white rectangles) and 345 the resulting number of processors really used during the computation is jpnij=128.} 342 346 \end{center} \end{figure} 343 347 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 354 358 \nlst{nambdy} 355 359 %----------------------------------------------------------------------------------------------- 356 %-----------------------------------------nambdy_index--------------------------------------------357 %358 %\nlst{nambdy_index}359 %-----------------------------------------------------------------------------------------------360 360 %-----------------------------------------nambdy_dta-------------------------------------------- 361 361 362 362 \nlst{nambdy_dta} 363 363 %----------------------------------------------------------------------------------------------- 364 %-----------------------------------------nambdy_dta-------------------------------------------- 365 % 366 %\nlst{nambdy_dta2} 367 %----------------------------------------------------------------------------------------------- 368 369 Options are defined through the \ngn{nambdy} \ngn{nambdy\_index} 370 \ngn{nambdy\_dta} \ngn{nambdy\_dta2} namelist variables. 371 The BDY module is the core implementation of open boundary 372 conditions for regional configurations. It implements the Flow 373 Relaxation Scheme algorithm for temperature, salinity, velocities and 374 ice fields, and the Flather radiation condition for the depth-mean 375 transports. The specification of the location of the open boundary is 376 completely flexible and allows for example the open boundary to follow 377 an isobath or other irregular contour. 378 379 The BDY module was modelled on the OBC module (see NEMO 3.4) and shares many 380 features and a similar coding structure \citep{Chanut2005}. 381 382 Boundary data files used with earlier versions of NEMO may need 383 to be re-ordered to work with this version. See the 384 section on the Input Boundary Data Files for details. 364 365 Options are defined through the \ngn{nambdy} \ngn{nambdy\_dta} namelist variables. 366 The BDY module is the core implementation of open boundary conditions for regional configurations. 367 It implements the Flow Relaxation Scheme algorithm for temperature, salinity, velocities and ice fields, and 368 the Flather radiation condition for the depth-mean transports. 369 The specification of the location of the open boundary is completely flexible and 370 allows for example the open boundary to follow an isobath or other irregular contour. 371 372 The BDY module was modelled on the OBC module (see NEMO 3.4) and shares many features and 373 a similar coding structure \citep{Chanut2005}. 374 375 Boundary data files used with earlier versions of NEMO may need to be re-ordered to work with this version. 376 See the section on the Input Boundary Data Files for details. 385 377 386 378 %---------------------------------------------- … … 389 381 390 382 The BDY module is activated by setting \np{ln\_bdy} to true. 391 It is possible to define more than one boundary ``set'' and apply 392 different boundary conditions to each set. The number of boundary 393 sets is defined by \np{nb\_bdy}. Each boundary set may be defined 394 as a set of straight line segments in a namelist 395 (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file 396 (\np{ln\_coords\_file}\forcode{ = .true.}). If the set is defined in a namelist, 397 then the namelists nambdy\_index must be included separately, one for 398 each set. If the set is defined by a file, then a 399 ``\ifile{coordinates.bdy}'' file must be provided. The coordinates.bdy file 400 is analagous to the usual NEMO ``\ifile{coordinates}'' file. In the example 401 above, there are two boundary sets, the first of which is defined via 402 a file and the second is defined in a namelist. For more details of 403 the definition of the boundary geometry see section 404 \autoref{subsec:BDY_geometry}. 405 406 For each boundary set a boundary 407 condition has to be chosen for the barotropic solution (``u2d'': 408 sea-surface height and barotropic velocities), for the baroclinic 409 velocities (``u3d''), and for the active tracers\footnote{The BDY 410 module does not deal with passive tracers at this version} 411 (``tra''). For each set of variables there is a choice of algorithm 412 and a choice for the data, eg. for the active tracers the algorithm is 413 set by \np{nn\_tra} and the choice of data is set by 414 \np{nn\_tra\_dta}. 383 It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set. 384 The number of boundary sets is defined by \np{nb\_bdy}. 385 Each boundary set may be defined as a set of straight line segments in a namelist 386 (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). 387 If the set is defined in a namelist, then the namelists nambdy\_index must be included separately, one for each set. 388 If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. 389 The coordinates.bdy file is analagous to the usual NEMO ``\ifile{coordinates}'' file. 390 In the example above, there are two boundary sets, the first of which is defined via a file and 391 the second is defined in a namelist. 392 For more details of the definition of the boundary geometry see section \autoref{subsec:BDY_geometry}. 393 394 For each boundary set a boundary condition has to be chosen for the barotropic solution 395 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), and 396 for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''). 397 For each set of variables there is a choice of algorithm and a choice for the data, 398 eg. for the active tracers the algorithm is set by \np{nn\_tra} and the choice of data is set by \np{nn\_tra\_dta}. 415 399 416 400 The choice of algorithm is currently as follows: … … 419 403 420 404 \begin{itemize} 421 \item[0.] No boundary condition applied. So the solution will ``see''422 the land points around the edge of the edge of the domain.423 \item[1.] Flow Relaxation Scheme (FRS) available for all variables. 424 \item[2.] Flather radiation scheme for the barotropic variables. The425 Flather scheme is not compatible with the filtered free surface405 \item[0.] No boundary condition applied. 406 So the solution will ``see'' the land points around the edge of the edge of the domain. 407 \item[1.] Flow Relaxation Scheme (FRS) available for all variables. 408 \item[2.] Flather radiation scheme for the barotropic variables. 409 The Flather scheme is not compatible with the filtered free surface 426 410 ({\it dynspg\_ts}). 427 411 \end{itemize} … … 429 413 \mbox{} 430 414 431 The main choice for the boundary data is 432 to use initial conditions as boundary data (\np{nn\_tra\_dta}\forcode{ = 0}) or to 433 use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). For the 434 barotropic solution there is also the option to use tidal 435 harmonic forcing either by itself or in addition to other external 436 data. 437 438 If external boundary data is required then the nambdy\_dta namelist 439 must be defined. One nambdy\_dta namelist is required for each boundary 440 set in the order in which the boundary sets are defined in nambdy. In 441 the example given, two boundary sets have been defined and so there 442 are two nambdy\_dta namelists. The boundary data is read in using the 443 fldread module, so the nambdy\_dta namelist is in the format required 444 for fldread. For each variable required, the filename, the frequency 445 of the files and the frequency of the data in the files is given. Also 446 whether or not time-interpolation is required and whether the data is 447 climatological (time-cyclic) data. Note that on-the-fly spatial 448 interpolation of boundary data is not available at this version. 449 450 In the example namelists given, two boundary sets are defined. The 451 first set is defined via a file and applies FRS conditions to 452 temperature and salinity and Flather conditions to the barotropic 453 variables. External data is provided in daily files (from a 454 large-scale model). Tidal harmonic forcing is also used. The second 455 set is defined in a namelist. FRS conditions are applied on 456 temperature and salinity and climatological data is read from external 457 files. 415 The main choice for the boundary data is to use initial conditions as boundary data 416 (\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). 417 For the barotropic solution there is also the option to use tidal harmonic forcing either by 418 itself or in addition to other external data. 419 420 If external boundary data is required then the nambdy\_dta namelist must be defined. 421 One nambdy\_dta namelist is required for each boundary set in the order in which 422 the boundary sets are defined in nambdy. 423 In the example given, two boundary sets have been defined and so there are two nambdy\_dta namelists. 424 The boundary data is read in using the fldread module, 425 so the nambdy\_dta namelist is in the format required for fldread. 426 For each variable required, the filename, the frequency of the files and 427 the frequency of the data in the files is given. 428 Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data. 429 Note that on-the-fly spatial interpolation of boundary data is not available at this version. 430 431 In the example namelists given, two boundary sets are defined. 432 The first set is defined via a file and applies FRS conditions to temperature and salinity and 433 Flather conditions to the barotropic variables. 434 External data is provided in daily files (from a large-scale model). 435 Tidal harmonic forcing is also used. 436 The second set is defined in a namelist. 437 FRS conditions are applied on temperature and salinity and climatological data is read from external files. 458 438 459 439 %---------------------------------------------- … … 462 442 463 443 The Flow Relaxation Scheme (FRS) \citep{Davies_QJRMS76,Engerdahl_Tel95}, 464 applies a simple relaxation of the model fields to 465 externally-specified values over a zone next to the edge of the model 466 domain. Given a model prognostic variable $\Phi$ 444 applies a simple relaxation of the model fields to externally-specified values over 445 a zone next to the edge of the model domain. 446 Given a model prognostic variable $\Phi$ 467 447 \begin{equation} \label{eq:bdy_frs1} 468 448 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 469 449 \end{equation} 470 where $\Phi_{m}$ is the model solution and $\Phi_{e}$ is the specified 471 external field, $d$ gives the discrete distance from the model 472 boundary and $\alpha$ is a parameter that varies from $1$ at $d=1$ to 473 a small value at $d=N$. It can be shown that this scheme is equivalent 474 to adding a relaxation term to the prognostic equation for $\Phi$ of 475 the form: 450 where $\Phi_{m}$ is the model solution and $\Phi_{e}$ is the specified external field, 451 $d$ gives the discrete distance from the model boundary and 452 $\alpha$ is a parameter that varies from $1$ at $d=1$ to a small value at $d=N$. 453 It can be shown that this scheme is equivalent to adding a relaxation term to 454 the prognostic equation for $\Phi$ of the form: 476 455 \begin{equation} \label{eq:bdy_frs2} 477 456 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 478 457 \end{equation} 479 where the relaxation time scale $\tau$ is given by a function of 480 $\alpha$ and the model time step $\Delta t$: 458 where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: 481 459 \begin{equation} \label{eq:bdy_frs3} 482 460 \tau = \frac{1-\alpha}{\alpha} \,\rdt 483 461 \end{equation} 484 Thus the model solution is completely prescribed by the external 485 conditions at the edge of the model domain and is relaxed towards the 486 external conditions over the rest of the FRS zone. The application of 487 a relaxation zone helps to prevent spurious reflection of outgoing 488 signals from the model boundary. 462 Thus the model solution is completely prescribed by the external conditions at the edge of the model domain and 463 is relaxed towards the external conditions over the rest of the FRS zone. 464 The application of a relaxation zone helps to prevent spurious reflection of 465 outgoing signals from the model boundary. 489 466 490 467 The function $\alpha$ is specified as a $tanh$ function: … … 492 469 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N 493 470 \end{equation} 494 The width of the FRS zone is specified in the namelist as 495 \np{nn\_rimwidth}. This is typically set to a value between 8 and 10. 471 The width of the FRS zone is specified in the namelist as \np{nn\_rimwidth}. 472 This is typically set to a value between 8 and 10. 496 473 497 474 %---------------------------------------------- … … 499 476 \label{subsec:BDY_flather_scheme} 500 477 501 The \citet{Flather_JPO94} scheme is a radiation condition on the normal, depth-mean 502 transport across the open boundary. It takes the form 478 The \citet{Flather_JPO94} scheme is a radiation condition on the normal, 479 depth-mean transport across the open boundary. 480 It takes the form 503 481 \begin{equation} \label{eq:bdy_fla1} 504 482 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 505 483 \end{equation} 506 where $U$ is the depth-mean velocity normal to the boundary and $\eta$ 507 is the sea surface height, both from the model. The subscript $e$ 508 indicates the same fields from external sources. The speed of external 509 gravity waves is given by $c = \sqrt{gh}$, and $h$ is the depth of the 510 water column. The depth-mean normal velocity along the edge of the 511 model domain is set equal to the 512 external depth-mean normal velocity, plus a correction term that 513 allows gravity waves generated internally to exit the model boundary. 514 Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} 515 is a spatial gradient across the model boundary, so that $\eta_{e}$ is 516 defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the 517 $T$ points with $nbr=2$. $U$ and $U_{e}$ are defined on the $U$ or 518 $V$ points with $nbr=1$, $i.e.$ between the two $T$ grid points. 484 where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height, 485 both from the model. 486 The subscript $e$ indicates the same fields from external sources. 487 The speed of external gravity waves is given by $c = \sqrt{gh}$, and $h$ is the depth of the water column. 488 The depth-mean normal velocity along the edge of the model domain is set equal to 489 the external depth-mean normal velocity, 490 plus a correction term that allows gravity waves generated internally to exit the model boundary. 491 Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, 492 so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 493 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, $i.e.$ between the two $T$ grid points. 519 494 520 495 %---------------------------------------------- … … 522 497 \label{subsec:BDY_geometry} 523 498 524 Each open boundary set is defined as a list of points. The information 525 is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ 526 structure. The $nbi$ and $nbj$ arrays 527 define the local $(i,j)$ indices of each point in the boundary zone 528 and the $nbr$ array defines the discrete distance from the boundary 529 with $nbr=1$ meaning that the point is next to the edge of the 530 model domain and $nbr>1$ showing that the point is increasingly 531 further away from the edge of the model domain. A set of $nbi$, $nbj$, 532 and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ 533 grids. Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular 534 boundary. 535 536 The boundary geometry for each set may be defined in a namelist 537 nambdy\_index or by reading in a ``\ifile{coordinates.bdy}'' file. The 538 nambdy\_index namelist defines a series of straight-line segments for 539 north, east, south and west boundaries. For the northern boundary, 540 \np{nbdysegn} gives the number of segments, \np{jpjnob} gives the $j$ 541 index for each segment and \np{jpindt} and \np{jpinft} give the start 542 and end $i$ indices for each segment with similar for the other 543 boundaries. These segments define a list of $T$ grid points along the 544 outermost row of the boundary ($nbr\,=\, 1$). The code deduces the $U$ and 545 $V$ points and also the points for $nbr\,>\, 1$ if 546 $nn\_rimwidth\,>\,1$. 547 548 The boundary geometry may also be defined from a 549 ``\ifile{coordinates.bdy}'' file. Figure \autoref{fig:LBC_nc_header} 550 gives an example of the header information from such a file. The file 551 should contain the index arrays for each of the $T$, $U$ and $V$ 552 grids. The arrays must be in order of increasing $nbr$. Note that the 553 $nbi$, $nbj$ values in the file are global values and are converted to 554 local values in the code. Typically this file will be used to generate 555 external boundary data via interpolation and so will also contain the 556 latitudes and longitudes of each point as shown. However, this is not 557 necessary to run the model. 558 559 For some choices of irregular boundary the model domain may contain 560 areas of ocean which are not part of the computational domain. For 561 example if an open boundary is defined along an isobath, say at the 562 shelf break, then the areas of ocean outside of this boundary will 563 need to be masked out. This can be done by reading a mask file defined 564 as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 565 used even if multiple boundary sets are defined. 499 Each open boundary set is defined as a list of points. 500 The information is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ structure. 501 The $nbi$ and $nbj$ arrays define the local $(i,j)$ indices of each point in the boundary zone and 502 the $nbr$ array defines the discrete distance from the boundary with $nbr=1$ meaning that 503 the point is next to the edge of the model domain and $nbr>1$ showing that 504 the point is increasingly further away from the edge of the model domain. 505 A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. 506 Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 507 508 The boundary geometry for each set may be defined in a namelist nambdy\_index or 509 by reading in a ``\ifile{coordinates.bdy}'' file. 510 The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries. 511 For the northern boundary, \np{nbdysegn} gives the number of segments, 512 \np{jpjnob} gives the $j$ index for each segment and \np{jpindt} and 513 \np{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 514 These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 515 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if $nn\_rimwidth\,>\,1$. 516 517 The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 518 Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file. 519 The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. 520 The arrays must be in order of increasing $nbr$. 521 Note that the $nbi$, $nbj$ values in the file are global values and are converted to local values in the code. 522 Typically this file will be used to generate external boundary data via interpolation and so 523 will also contain the latitudes and longitudes of each point as shown. 524 However, this is not necessary to run the model. 525 526 For some choices of irregular boundary the model domain may contain areas of ocean which 527 are not part of the computational domain. 528 For example if an open boundary is defined along an isobath, say at the shelf break, 529 then the areas of ocean outside of this boundary will need to be masked out. 530 This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist. 531 Only one mask file is used even if multiple boundary sets are defined. 566 532 567 533 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 569 535 \includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 570 536 \caption { \protect\label{fig:LBC_bdy_geom} 571 Example of geometry of unstructured open boundary}537 Example of geometry of unstructured open boundary} 572 538 \end{center} \end{figure} 573 539 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 577 543 \label{subsec:BDY_data} 578 544 579 The data files contain the data arrays 580 in the order in which the points are defined in the $nbi$ and $nbj$ 581 a rrays. The data arrays are dimensioned on: atime dimension;545 The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays. 546 The data arrays are dimensioned on: 547 a time dimension; 582 548 $xb$ which is the index of the boundary data point in the horizontal; 583 and $yb$ which is a degenerate dimension of 1 to enable the file to be 584 read by the standard NEMO I/O routines. The 3D fields also have a 585 depth dimension. 586 587 At Version 3.4 there are new restrictions on the order in which the 588 boundary points are defined (and therefore restrictions on the order 589 of the data in the file). In particular: 549 and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard NEMO I/O routines. 550 The 3D fields also have a depth dimension. 551 552 At Version 3.4 there are new restrictions on the order in which the boundary points are defined 553 (and therefore restrictions on the order of the data in the file). 554 In particular: 590 555 591 556 \mbox{} 592 557 593 558 \begin{enumerate} 594 \item The data points must be in order of increasing $nbr$, ie. all595 the $nbr=1$ points, then all the $nbr=2$ points etc.596 \item All the data for a particular boundary set must be in the same 597 order. (Prior to 3.4 it was possible to define barotropic data in a598 different order tothe data for tracers and baroclinic velocities).559 \item The data points must be in order of increasing $nbr$, 560 ie. all the $nbr=1$ points, then all the $nbr=2$ points etc. 561 \item All the data for a particular boundary set must be in the same order. 562 (Prior to 3.4 it was possible to define barotropic data in a different order to 563 the data for tracers and baroclinic velocities). 599 564 \end{enumerate} 600 565 601 566 \mbox{} 602 567 603 These restrictions mean that data files used with previous versions of 604 the model may not work with version 3.4. A fortran utility 605 {\it bdy\_reorder} exists in the TOOLS directory which will re-order the 606 data in old BDY data files. 568 These restrictions mean that data files used with previous versions of the model may not work with version 3.4. 569 A fortran utility {\it bdy\_reorder} exists in the TOOLS directory which 570 will re-order the data in old BDY data files. 607 571 608 572 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 609 573 \begin{figure}[!t] \begin{center} 610 574 \includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 611 \caption { \protect\label{fig:LBC_nc_header} 612 Example of the header for a \protect\ifile{coordinates.bdy} file}575 \caption { \protect\label{fig:LBC_nc_header} 576 Example of the header for a \protect\ifile{coordinates.bdy} file} 613 577 \end{center} \end{figure} 614 578 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 618 582 \label{subsec:BDY_vol_corr} 619 583 620 There is an option to force the total volume in the regional model to be constant, 621 similar to the option in the OBC module. This is controlled by the \np{nn\_volctl} 622 parameter in the namelist. A value of \np{nn\_volctl}\forcode{ = 0} indicates that this option is not used. 623 If \np{nn\_volctl}\forcode{ = 1} then a correction is applied to the normal velocities 624 around the boundary at each timestep to ensure that the integrated volume flow 625 through the boundary is zero. If \np{nn\_volctl}\forcode{ = 2} then the calculation of 626 the volume change on the timestep includes the change due to the freshwater 627 flux across the surface and the correction velocity corrects for this as well. 584 There is an option to force the total volume in the regional model to be constant, 585 similar to the option in the OBC module. 586 This is controlled by the \np{nn\_volctl} parameter in the namelist. 587 A value of \np{nn\_volctl}\forcode{ = 0} indicates that this option is not used. 588 If \np{nn\_volctl}\forcode{ = 1} then a correction is applied to the normal velocities around the boundary at 589 each timestep to ensure that the integrated volume flow through the boundary is zero. 590 If \np{nn\_volctl}\forcode{ = 2} then the calculation of the volume change on 591 the timestep includes the change due to the freshwater flux across the surface and 592 the correction velocity corrects for this as well. 628 593 629 594 If more than one boundary set is used then volume correction is -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex
r10146 r10354 14 14 15 15 16 The lateral physics terms in the momentum and tracer equations have been 17 described in \autoref{eq:PE_zdf} and their discrete formulation in \autoref{sec:TRA_ldf} 18 and \autoref{sec:DYN_ldf}). In this section we further discuss each lateral physics option. 19 Choosing one lateral physics scheme means for the user defining, 20 (1) the type of operator used (laplacian or bilaplacian operators, or no lateral mixing term) ; 21 (2) the direction along which the lateral diffusive fluxes are evaluated (model level, geopotential or isopycnal surfaces) ; and 22 (3) the space and time variations of the eddy coefficients. 23 These three aspects of the lateral diffusion are set through namelist parameters 24 (see the \textit{\ngn{nam\_traldf}} and \textit{\ngn{nam\_dynldf}} below). 25 Note that this chapter describes the standard implementation of iso-neutral 26 tracer mixing, and Griffies's implementation, which is used if 27 \np{traldf\_grif}\forcode{ = .true.}, is described in Appdx\autoref{apdx:triad} 16 The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:PE_zdf} and 17 their discrete formulation in \autoref{sec:TRA_ldf} and \autoref{sec:DYN_ldf}). 18 In this section we further discuss each lateral physics option. 19 Choosing one lateral physics scheme means for the user defining, 20 (1) the type of operator used (laplacian or bilaplacian operators, or no lateral mixing term); 21 (2) the direction along which the lateral diffusive fluxes are evaluated 22 (model level, geopotential or isopycnal surfaces); and 23 (3) the space and time variations of the eddy coefficients. 24 These three aspects of the lateral diffusion are set through namelist parameters 25 (see the \textit{\ngn{nam\_traldf}} and \textit{\ngn{nam\_dynldf}} below). 26 Note that this chapter describes the standard implementation of iso-neutral tracer mixing, 27 and Griffies's implementation, which is used if \np{traldf\_grif}\forcode{ = .true.}, 28 is described in Appdx\autoref{apdx:triad} 28 29 29 30 %-----------------------------------nam_traldf - nam_dynldf-------------------------------------------- … … 45 46 Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme. } 46 47 47 A direction for lateral mixing has to be defined when the desired operator does 48 not act along the model levels. This occurs when $(a)$ horizontal mixing is 49 required on tracer or momentum (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor}) 50 in $s$- or mixed $s$-$z$- coordinates, and $(b)$ isoneutral mixing is required 51 whatever the vertical coordinate is. This direction of mixing is defined by its 52 slopes in the \textbf{i}- and \textbf{j}-directions at the face of the cell of the 53 quantity to be diffused. For a tracer, this leads to the following four slopes : 54 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:tra_ldf_iso}), while55 for momentum the slopes are $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for 56 $ u$ and $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$.48 A direction for lateral mixing has to be defined when the desired operator does not act along the model levels. 49 This occurs when $(a)$ horizontal mixing is required on tracer or momentum 50 (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates, 51 and $(b)$ isoneutral mixing is required whatever the vertical coordinate is. 52 This direction of mixing is defined by its slopes in the \textbf{i}- and \textbf{j}-directions at the face of 53 the cell of the quantity to be diffused. 54 For a tracer, this leads to the following four slopes: 55 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:tra_ldf_iso}), 56 while for momentum the slopes are $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for $u$ and 57 $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$. 57 58 58 59 %gm% add here afigure of the slope in i-direction … … 60 61 \subsection{Slopes for tracer geopotential mixing in the $s$-coordinate} 61 62 62 In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and 63 $r_2$ are the slopes between the geopotential and computational surfaces. 64 Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} 65 when the diffusive fluxes in the three directions are set to zero and $T$ is 66 assumed to be horizontally uniform, $i.e.$ a linear function of $z_T$, the 67 depth of a $T$-point. 63 In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and $r_2$ are the slopes between 64 the geopotential and computational surfaces. 65 Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} when 66 the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform, 67 $i.e.$ a linear function of $z_T$, the depth of a $T$-point. 68 68 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 69 69 … … 89 89 %gm% caution I'm not sure the simplification was a good idea! 90 90 91 These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}\forcode{ = .true.}rue, 92 and either \np{ln\_traldf\_hor}\forcode{ = .true.} rue or \np{ln\_dynldf\_hor}\forcode{ = .true.}rue.91 These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}\forcode{ = .true.}rue, 92 and either \np{ln\_traldf\_hor}\forcode{ = .true.} or \np{ln\_dynldf\_hor}\forcode{ = .true.}. 93 93 94 94 \subsection{Slopes for tracer iso-neutral mixing} 95 95 \label{subsec:LDF_slp_iso} 96 In iso-neutral mixing $r_1$ and $r_2$ are the slopes between the iso-neutral 97 and computational surfaces. Their formulation does not depend on the vertical 98 coordinate used. Their discrete formulation is found using the fact that the 99 diffusive fluxes of locally referenced potential density ($i.e.$ $in situ$ density) 100 vanish. So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the 101 diffusive fluxes in the three directions to zero leads to the following definition for 102 the neutral slopes: 96 In iso-neutral mixing $r_1$ and $r_2$ are the slopes between the iso-neutral and computational surfaces. 97 Their formulation does not depend on the vertical coordinate used. 98 Their discrete formulation is found using the fact that the diffusive fluxes of 99 locally referenced potential density ($i.e.$ $in situ$ density) vanish. 100 So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in 101 the three directions to zero leads to the following definition for the neutral slopes: 103 102 104 103 \begin{equation} \label{eq:ldfslp_iso} … … 128 127 %In the $z$-coordinate, the derivative of the \autoref{eq:ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so the $in situ$ density can be used for its evaluation. 129 128 130 As the mixing is performed along neutral surfaces, the gradient of $\rho$ in 131 \autoref{eq:ldfslp_iso} has to be evaluated at the same local pressure (which, 132 in decibars, is approximated by the depth in meters in the model). Therefore 133 \autoref{eq:ldfslp_iso} cannot be used as such, but further transformation is 134 needed depending on the vertical coordinate used:129 As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:ldfslp_iso} has to 130 be evaluated at the same local pressure 131 (which, in decibars, is approximated by the depth in meters in the model). 132 Therefore \autoref{eq:ldfslp_iso} cannot be used as such, 133 but further transformation is needed depending on the vertical coordinate used: 135 134 136 135 \begin{description} 137 136 138 \item[$z$-coordinate with full step : ] in \autoref{eq:ldfslp_iso} the densities139 appearing in the $i$ and $j$ derivatives are taken at the same depth, thus 140 the $in situ$ density can be used. This is not the case for the vertical 141 derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, where $N^2$ 142 is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following 143 \citet{McDougall1987}(see \autoref{subsec:TRA_bn2}).144 145 \item[$z$-coordinate with partial step : ] this case is identical to the full step146 case except that at partial step level, the \emph{horizontal} density gradient 147 is evaluated as described in \autoref{sec:TRA_zpshde}.148 149 \item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,150 iso-neutral mixing is only employed for $s$-coordinates if the 151 Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; see Appdx \autoref{apdx:triad}). 152 In other words, iso-neutral mixing will only be accurately represented with a 153 linear equation of state (\np{nn\_eos}\forcode{ = 1..2}). In the case of a "true" equation 154 of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso} 155 will include a pressure dependent part, leading to the wrong evaluation of 156 the neutral slopes.137 \item[$z$-coordinate with full step: ] 138 in \autoref{eq:ldfslp_iso} the densities appearing in the $i$ and $j$ derivatives are taken at the same depth, 139 thus the $in situ$ density can be used. 140 This is not the case for the vertical derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, 141 where $N^2$ is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following \citet{McDougall1987} 142 (see \autoref{subsec:TRA_bn2}). 143 144 \item[$z$-coordinate with partial step: ] 145 this case is identical to the full step case except that at partial step level, 146 the \emph{horizontal} density gradient is evaluated as described in \autoref{sec:TRA_zpshde}. 147 148 \item[$s$- or hybrid $s$-$z$- coordinate: ] 149 in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 150 the Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; 151 see Appdx \autoref{apdx:triad}). 152 In other words, iso-neutral mixing will only be accurately represented with a linear equation of state 153 (\np{nn\_eos}\forcode{ = 1..2}). 154 In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso} 155 will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. 157 156 158 157 %gm% 159 Note: The solution for $s$-coordinate passes trough the use of different 160 (and better) expression for the constraint on iso-neutral fluxes. Following 161 \citet{Griffies_Bk04}, instead of specifying directly that there is a zero neutral 162 diffusive flux of locally referenced potential density, we stay in the $T$-$S$ 163 plane and consider the balance between the neutral direction diffusive fluxes 164 of potential temperature and salinity: 158 Note: The solution for $s$-coordinate passes trough the use of different (and better) expression for 159 the constraint on iso-neutral fluxes. 160 Following \citet{Griffies_Bk04}, instead of specifying directly that there is a zero neutral diffusive flux of 161 locally referenced potential density, we stay in the $T$-$S$ plane and consider the balance between 162 the neutral direction diffusive fluxes of potential temperature and salinity: 165 163 \begin{equation} 166 164 \alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S) … … 194 192 \end{split} 195 193 \end{equation} 196 where $\alpha$ and $\beta$, the thermal expansion and saline contraction 197 coefficients introduced in \autoref{subsec:TRA_bn2}, have to be evaluated at the three 198 velocity points. In order to save computation time, they should be approximated 199 by the mean of their values at $T$-points (for example in the case of $\alpha$: 200 $\alpha_u=\overline{\alpha_T}^{i+1/2}$, $\alpha_v=\overline{\alpha_T}^{j+1/2}$ 201 and $\alpha_w=\overline{\alpha_T}^{k+1/2}$). 202 203 Note that such a formulation could be also used in the $z$-coordinate and 204 $z$-coordinate with partial steps cases. 194 where $\alpha$ and $\beta$, the thermal expansion and saline contraction coefficients introduced in 195 \autoref{subsec:TRA_bn2}, have to be evaluated at the three velocity points. 196 In order to save computation time, they should be approximated by the mean of their values at $T$-points 197 (for example in the case of $\alpha$: 198 $\alpha_u=\overline{\alpha_T}^{i+1/2}$, $\alpha_v=\overline{\alpha_T}^{j+1/2}$ and 199 $\alpha_w=\overline{\alpha_T}^{k+1/2}$). 200 201 Note that such a formulation could be also used in the $z$-coordinate and $z$-coordinate with partial steps cases. 205 202 206 203 \end{description} 207 204 208 This implementation is a rather old one. It is similar to the one 209 proposed by Cox [1987], except for the background horizontal 210 diffusion. Indeed, the Cox implementation of isopycnal diffusion in 211 GFDL-type models requires a minimum background horizontal diffusion 212 for numerical stability reasons. To overcome this problem, several 213 techniques have been proposed in which the numerical schemes of the 214 ocean model are modified \citep{Weaver_Eby_JPO97, 215 Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 216 \np{traldf\_grif\_iso} is set true; see Appdx \autoref{apdx:triad}. Here, 217 another strategy is presented \citep{Lazar_PhD97}: a local 218 filtering of the iso-neutral slopes (made on 9 grid-points) prevents 219 the development of grid point noise generated by the iso-neutral 220 diffusion operator (\autoref{fig:LDF_ZDF1}). This allows an 221 iso-neutral diffusion scheme without additional background horizontal 222 mixing. This technique can be viewed as a diffusion operator that acts 223 along large-scale (2~$\Delta$x) \gmcomment{2deltax doesnt seem very 224 large scale} iso-neutral surfaces. The diapycnal diffusion required 225 for numerical stability is thus minimized and its net effect on the 226 flow is quite small when compared to the effect of an horizontal 227 background mixing. 228 229 Nevertheless, this iso-neutral operator does not ensure that variance cannot increase, 205 This implementation is a rather old one. 206 It is similar to the one proposed by Cox [1987], except for the background horizontal diffusion. 207 Indeed, the Cox implementation of isopycnal diffusion in GFDL-type models requires 208 a minimum background horizontal diffusion for numerical stability reasons. 209 To overcome this problem, several techniques have been proposed in which the numerical schemes of 210 the ocean model are modified \citep{Weaver_Eby_JPO97, Griffies_al_JPO98}. 211 Griffies's scheme is now available in \NEMO if \np{traldf\_grif\_iso} is set true; see Appdx \autoref{apdx:triad}. 212 Here, another strategy is presented \citep{Lazar_PhD97}: 213 a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of 214 grid point noise generated by the iso-neutral diffusion operator (\autoref{fig:LDF_ZDF1}). 215 This allows an iso-neutral diffusion scheme without additional background horizontal mixing. 216 This technique can be viewed as a diffusion operator that acts along large-scale 217 (2~$\Delta$x) \gmcomment{2deltax doesnt seem very large scale} iso-neutral surfaces. 218 The diapycnal diffusion required for numerical stability is thus minimized and its net effect on the flow is quite small when compared to the effect of an horizontal background mixing. 219 220 Nevertheless, this iso-neutral operator does not ensure that variance cannot increase, 230 221 contrary to the \citet{Griffies_al_JPO98} operator which has that property. 231 222 … … 234 225 \includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 235 226 \caption { \protect\label{fig:LDF_ZDF1} 236 averaging procedure for isopycnal slope computation.}227 averaging procedure for isopycnal slope computation.} 237 228 \end{center} \end{figure} 238 229 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 252 243 % surface motivates this flattening of isopycnals near the surface). 253 244 254 For numerical stability reasons \citep{Cox1987, Griffies_Bk04}, the slopes must also 255 be bounded by $1/100$ everywhere. This constraint is applied in a piecewise linear 256 fashion, increasing from zero at the surface to $1/100$ at $70$ metres and thereafter 257 decreasing to zero at the bottom of the ocean. (the fact that the eddies "feel" the 258 surface motivates this flattening of isopycnals near the surface).245 For numerical stability reasons \citep{Cox1987, Griffies_Bk04}, the slopes must also be bounded by 246 $1/100$ everywhere. 247 This constraint is applied in a piecewise linear fashion, increasing from zero at the surface to 248 $1/100$ at $70$ metres and thereafter decreasing to zero at the bottom of the ocean 249 (the fact that the eddies "feel" the surface motivates this flattening of isopycnals near the surface). 259 250 260 251 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 261 \begin{figure}[!ht] \begin{center} 262 \includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 263 \caption { \protect\label{fig:eiv_slp} 264 Vertical profile of the slope used for lateral mixing in the mixed layer : 265 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 266 which has to be adjusted at the surface boundary (i.e. it must tend to zero at the 267 surface since there is no mixing across the air-sea interface: wall boundary 268 condition). Nevertheless, the profile between the surface zero value and the interior 269 iso-neutral one is unknown, and especially the value at the base of the mixed layer ; 270 \textit{(b)} profile of slope using a linear tapering of the slope near the surface and 271 imposing a maximum slope of 1/100 ; \textit{(c)} profile of slope actually used in 272 \NEMO: a linear decrease of the slope from zero at the surface to its ocean interior 273 value computed just below the mixed layer. Note the huge change in the slope at the 274 base of the mixed layer between \textit{(b)} and \textit{(c)}.} 275 \end{center} \end{figure} 252 \begin{figure}[!ht] 253 \begin{center} 254 \includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 255 \caption { \protect\label{fig:eiv_slp} 256 Vertical profile of the slope used for lateral mixing in the mixed layer: 257 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 258 which has to be adjusted at the surface boundary 259 (i.e. it must tend to zero at the surface since there is no mixing across the air-sea interface: 260 wall boundary condition). 261 Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown, 262 and especially the value at the base of the mixed layer; 263 \textit{(b)} profile of slope using a linear tapering of the slope near the surface and 264 imposing a maximum slope of 1/100; 265 \textit{(c)} profile of slope actually used in \NEMO: a linear decrease of the slope from 266 zero at the surface to its ocean interior value computed just below the mixed layer. 267 Note the huge change in the slope at the base of the mixed layer between \textit{(b)} and \textit{(c)}.} 268 \end{center} 269 \end{figure} 276 270 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 277 271 278 \colorbox{yellow}{add here a discussion about the flattening of the slopes, vs 272 \colorbox{yellow}{add here a discussion about the flattening of the slopes, vs tapering the coefficient.} 279 273 280 274 \subsection{Slopes for momentum iso-neutral mixing} 281 275 282 The iso-neutral diffusion operator on momentum is the same as the one used on 283 tracers but applied to each component of the velocity separately (see 284 \autoref{eq:dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). The slopes between the 285 surface along which the diffusion operator acts and the surface of computation 286 ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the 287 $u$-component, and $T$-, $f$- and \textit{vw}- points for the $v$-component. 288 They are computed from the slopes used for tracer diffusion, $i.e.$289 \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso} :276 The iso-neutral diffusion operator on momentum is the same as the one used on tracers but 277 applied to each component of the velocity separately 278 (see \autoref{eq:dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). 279 The slopes between the surface along which the diffusion operator acts and the surface of computation 280 ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the $u$-component, and $T$-, $f$- and 281 \textit{vw}- points for the $v$-component. 282 They are computed from the slopes used for tracer diffusion, 283 $i.e.$ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso} : 290 284 291 285 \begin{equation} \label{eq:ldfslp_dyn} … … 298 292 \end{equation} 299 293 300 The major issue remaining is in the specification of the boundary conditions. 301 The same boundary conditions are chosen as those used for lateral 302 diffusion along model level surfaces, i.e. using the shear computed along 303 the model levels and with no additional friction at the ocean bottom (see 304 \autoref{sec:LBC_coast}). 294 The major issue remaining is in the specification of the boundary conditions. 295 The same boundary conditions are chosen as those used for lateral diffusion along model level surfaces, 296 $i.e.$ using the shear computed along the model levels and with no additional friction at the ocean bottom 297 (see \autoref{sec:LBC_coast}). 305 298 306 299 … … 319 312 \label{sec:LDF_coef} 320 313 321 Introducing a space variation in the lateral eddy mixing coefficients changes 322 the model core memory requirement, adding up to four extra three-dimensional323 arrays for the geopotential or isopycnal second order operator applied to 324 momentum. Six CPP keys control the space variation of eddy coefficients: 325 three for momentum and three for tracer. The three choices allow: 326 a space variation in the three space directions (\key{traldf\_c3d}, \key{dynldf\_c3d}), 327 in the horizontal plane (\key{traldf\_c2d}, \key{dynldf\_c2d}), 328 or in the vertical only (\key{traldf\_c1d}, \key{dynldf\_c1d}). 314 Introducing a space variation in the lateral eddy mixing coefficients changes the model core memory requirement, 315 adding up to four extra three-dimensional arrays for the geopotential or isopycnal second order operator applied to 316 momentum. 317 Six CPP keys control the space variation of eddy coefficients: three for momentum and three for tracer. 318 The three choices allow: 319 a space variation in the three space directions (\key{traldf\_c3d}, \key{dynldf\_c3d}), 320 in the horizontal plane (\key{traldf\_c2d}, \key{dynldf\_c2d}), 321 or in the vertical only (\key{traldf\_c1d}, \key{dynldf\_c1d}). 329 322 The default option is a constant value over the whole ocean on both momentum and tracers. 330 323 331 The number of additional arrays that have to be defined and the gridpoint 332 position at which they are defined depend on both the space variation chosen 333 and the type of operator used. The resulting eddy viscosity and diffusivity 334 coefficients can be a function of more than one variable. Changes in the 335 computer code when switching from one option to another have been 336 minimized by introducing the eddy coefficients as statement functions 337 (include file \hf{ldftra\_substitute} and \hf{ldfdyn\_substitute}). The functions 338 are replaced by their actual meaning during the preprocessing step (CPP). 339 The specification of the space variation of the coefficient is made in 340 \mdl{ldftra} and \mdl{ldfdyn}, or more precisely in include files 341 \hf{traldf\_cNd} and \hf{dynldf\_cNd}, with N=1, 2 or 3. 342 The user can modify these include files as he/she wishes. The way the 343 mixing coefficient are set in the reference version can be briefly described 344 as follows: 324 The number of additional arrays that have to be defined and the gridpoint position at which 325 they are defined depend on both the space variation chosen and the type of operator used. 326 The resulting eddy viscosity and diffusivity coefficients can be a function of more than one variable. 327 Changes in the computer code when switching from one option to another have been minimized by 328 introducing the eddy coefficients as statement functions 329 (include file \hf{ldftra\_substitute} and \hf{ldfdyn\_substitute}). 330 The functions are replaced by their actual meaning during the preprocessing step (CPP). 331 The specification of the space variation of the coefficient is made in \mdl{ldftra} and \mdl{ldfdyn}, 332 or more precisely in include files \hf{traldf\_cNd} and \hf{dynldf\_cNd}, with N=1, 2 or 3. 333 The user can modify these include files as he/she wishes. 334 The way the mixing coefficient are set in the reference version can be briefly described as follows: 345 335 346 336 \subsubsection{Constant mixing coefficients (default option)} 347 When none of the \key{dynldf\_...} and \key{traldf\_...} keys are 348 defined, a constant value is used over the whole ocean for momentum and 349 tracers, which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist 350 parameters. 337 When none of the \key{dynldf\_...} and \key{traldf\_...} keys are defined, 338 a constant value is used over the whole ocean for momentum and tracers, 339 which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist parameters. 351 340 352 341 \subsubsection{Vertically varying mixing coefficients (\protect\key{traldf\_c1d} and \key{dynldf\_c1d})} 353 The 1D option is only available when using the $z$-coordinate with full step. 354 Indeed in all the other types of vertical coordinate, the depth is a 3D function355 of (\textbf{i},\textbf{j},\textbf{k}) and therefore, introducing depth-dependent 356 mixing coefficients will require 3D arrays. In the 1D option, a hyperbolic variation 357 of the lateral mixing coefficient is introduced in which the surface value is 358 \np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value, 359 and the transition takes place around z=300~m with a width of 300~m 360 ($i.e.$ both the depth and the width of the inflection point are set to 300~m). 342 The 1D option is only available when using the $z$-coordinate with full step. 343 Indeed in all the other types of vertical coordinate, 344 the depth is a 3D function of (\textbf{i},\textbf{j},\textbf{k}) and therefore, 345 introducing depth-dependent mixing coefficients will require 3D arrays. 346 In the 1D option, a hyperbolic variation of the lateral mixing coefficient is introduced in which 347 the surface value is \np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value, 348 and the transition takes place around z=300~m with a width of 300~m 349 ($i.e.$ both the depth and the width of the inflection point are set to 300~m). 361 350 This profile is hard coded in file \hf{traldf\_c1d}, but can be easily modified by users. 362 351 363 352 \subsubsection{Horizontally varying mixing coefficients (\protect\key{traldf\_c2d} and \protect\key{dynldf\_c2d})} 364 By default the horizontal variation of the eddy coefficient depends on the local mesh 365 size andthe type of operator used:353 By default the horizontal variation of the eddy coefficient depends on the local mesh size and 354 the type of operator used: 366 355 \begin{equation} \label{eq:title} 367 356 A_l = \left\{ … … 371 360 \end{aligned} \right. 372 361 \end{equation} 373 where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked 374 ocean domain, and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer) 375 namelist parameter. This variation is intended to reflect the lesser need for subgrid 376 scale eddy mixing where the grid size is smaller in the domain. It was introduced in 377 the context of the DYNAMO modelling project \citep{Willebrand_al_PO01}. 378 Note that such a grid scale dependance of mixing coefficients significantly increase 379 the range of stability of model configurations presenting large changes in grid pacing 380 such as global ocean models. Indeed, in such a case, a constant mixing coefficient 381 can lead to a blow up of the model due to large coefficient compare to the smallest 382 grid size (see \autoref{sec:STP_forward_imp}), especially when using a bilaplacian operator. 383 384 Other formulations can be introduced by the user for a given configuration. 385 For example, in the ORCA2 global ocean model (see Configurations), the laplacian 386 viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ 387 north and south and decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s 388 at the equator \citep{Madec_al_JPO96, Delecluse_Madec_Bk00}. This modification 389 can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}. 390 Similar modified horizontal variations can be found with the Antarctic or Arctic 391 sub-domain options of ORCA2 and ORCA05 (see \&namcfg namelist). 362 where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked ocean domain, 363 and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer) namelist parameter. 364 This variation is intended to reflect the lesser need for subgrid scale eddy mixing where 365 the grid size is smaller in the domain. 366 It was introduced in the context of the DYNAMO modelling project \citep{Willebrand_al_PO01}. 367 Note that such a grid scale dependance of mixing coefficients significantly increase the range of stability of 368 model configurations presenting large changes in grid pacing such as global ocean models. 369 Indeed, in such a case, a constant mixing coefficient can lead to a blow up of the model due to 370 large coefficient compare to the smallest grid size (see \autoref{sec:STP_forward_imp}), 371 especially when using a bilaplacian operator. 372 373 Other formulations can be introduced by the user for a given configuration. 374 For example, in the ORCA2 global ocean model (see Configurations), 375 the laplacian viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ north and south and 376 decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s at the equator \citep{Madec_al_JPO96, Delecluse_Madec_Bk00}. 377 This modification can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}. 378 Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of 379 ORCA2 and ORCA05 (see \&namcfg namelist). 392 380 393 381 \subsubsection{Space varying mixing coefficients (\protect\key{traldf\_c3d} and \key{dynldf\_c3d})} 394 382 395 The 3D space variation of the mixing coefficient is simply the combination of the 396 1D and 2D cases, $i.e.$ a hyperbolic tangent variation with depth associated with 397 a grid size dependence ofthe magnitude of the coefficient.383 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases, 384 $i.e.$ a hyperbolic tangent variation with depth associated with a grid size dependence of 385 the magnitude of the coefficient. 398 386 399 387 \subsubsection{Space and time varying mixing coefficients} 400 388 401 389 There is no default specification of space and time varying mixing coefficient. 402 The only case available is specific to the ORCA2 and ORCA05 global ocean 403 configurations. It provides only a tracer 404 mixing coefficient for eddy induced velocity (ORCA2) or both iso-neutral and 405 eddy induced velocity (ORCA05) that depends on the local growth rate of 406 baroclinic instability. This specification is actually used when an ORCA key 407 and both \key{traldf\_eiv} and \key{traldf\_c2d} are defined. 390 The only case available is specific to the ORCA2 and ORCA05 global ocean configurations. 391 It provides only a tracer mixing coefficient for eddy induced velocity (ORCA2) or both iso-neutral and 392 eddy induced velocity (ORCA05) that depends on the local growth rate of baroclinic instability. 393 This specification is actually used when an ORCA key and both \key{traldf\_eiv} and \key{traldf\_c2d} are defined. 408 394 409 395 $\ $\newline % force a new ligne … … 411 397 The following points are relevant when the eddy coefficient varies spatially: 412 398 413 (1) the momentum diffusion operator acting along model level surfaces is 414 written in terms of curl and divergent components of the horizontal current 415 (see \autoref{subsec:PE_ldf}). Although the eddy coefficient could be set to different values 416 in these two terms, this option is not currently available. 417 418 (2) with an horizontally varying viscosity, the quadratic integral constraints 419 on enstrophy and on the square of the horizontal divergence for operators 420 acting along model-surfaces are no longer satisfied 399 (1) the momentum diffusion operator acting along model level surfaces is written in terms of curl and 400 divergent components of the horizontal current (see \autoref{subsec:PE_ldf}). 401 Although the eddy coefficient could be set to different values in these two terms, 402 this option is not currently available. 403 404 (2) with an horizontally varying viscosity, the quadratic integral constraints on enstrophy and on the square of 405 the horizontal divergence for operators acting along model-surfaces are no longer satisfied 421 406 (\autoref{sec:dynldf_properties}). 422 407 423 (3) for isopycnal diffusion on momentum or tracers, an additional purely 424 horizontal background diffusion with uniform coefficient can be added by 425 setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0}, a background horizontal 426 eddy viscosity or diffusivity coefficient (namelist parameters whose default 427 values are $0$). However, the technique used to compute the isopycnal 428 slopes is intended to get rid of such a background diffusion, since it introduces 429 spurious diapycnal diffusion (see \autoref{sec:LDF_slp}). 430 431 (4) when an eddy induced advection term is used (\key{traldf\_eiv}), $A^{eiv}$, 432 the eddy induced coefficient has to be defined. Its space variations are controlled 433 by the same CPP variable as for the eddy diffusivity coefficient ($i.e.$ 434 \key{traldf\_cNd}). 408 (3) for isopycnal diffusion on momentum or tracers, an additional purely horizontal background diffusion with 409 uniform coefficient can be added by setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0}, 410 a background horizontal eddy viscosity or diffusivity coefficient 411 (namelist parameters whose default values are $0$). 412 However, the technique used to compute the isopycnal slopes is intended to get rid of such a background diffusion, 413 since it introduces spurious diapycnal diffusion (see \autoref{sec:LDF_slp}). 414 415 (4) when an eddy induced advection term is used (\key{traldf\_eiv}), 416 $A^{eiv}$, the eddy induced coefficient has to be defined. 417 Its space variations are controlled by the same CPP variable as for the eddy diffusivity coefficient 418 ($i.e.$ \key{traldf\_cNd}). 435 419 436 420 (5) the eddy coefficient associated with a biharmonic operator must be set to a \emph{negative} value. … … 438 422 (6) it is possible to use both the laplacian and biharmonic operators concurrently. 439 423 440 (7) it is possible to run without explicit lateral diffusion on momentum (\np{ln\_dynldf\_lap}\forcode{ =441 }\np{ln\_dynldf\_bilap}\forcode{ = .false.}). This is recommended when using the UBS advection 442 scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, see \autoref{subsec:DYN_adv_ubs}) 443 and can be useful for testing purposes.424 (7) it is possible to run without explicit lateral diffusion on momentum 425 (\np{ln\_dynldf\_lap}\forcode{ = .?.}\np{ln\_dynldf\_bilap}\forcode{ = .false.}). 426 This is recommended when using the UBS advection scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, 427 see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes. 444 428 445 429 % ================================================================ … … 451 435 %%gm from Triad appendix : to be incorporated.... 452 436 \gmcomment{ 453 Values of iso-neutral diffusivity and GM coefficient are set as 454 described in \autoref{sec:LDF_coef}. If none of the keys \key{traldf\_cNd}, 455 N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 456 GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 457 \np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 458 \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 459 scale factor according to \autoref{eq:title} \footnote{Except in global ORCA 460 $0.5^{\circ}$ runs with \key{traldf\_eiv}, where 461 $A_l$ is set like $A_e$ but with a minimum vale of 462 $100\;\mathrm{m}^2\;\mathrm{s}^{-1}$}. In idealised setups with 463 \key{traldf\_c2d}, $A_e$ is reduced similarly, but if \key{traldf\_eiv} 464 is set in the global configurations with \key{traldf\_c2d}, a horizontally varying $A_e$ is 465 instead set from the Held-Larichev parameterisation\footnote{In this 466 case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further 467 reduced by a factor $|f/f_{20}|$, where $f_{20}$ is the value of $f$ 468 at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored 469 unless it is zero. 437 Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 438 If none of the keys \key{traldf\_cNd}, N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 439 GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and \np{rn\_aeiv\_0}. 440 If 2D-varying coefficients are set with \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 441 scale factor according to \autoref{eq:title} \footnote{ 442 Except in global ORCA $0.5^{\circ}$ runs with \key{traldf\_eiv}, 443 where $A_l$ is set like $A_e$ but with a minimum vale of $100\;\mathrm{m}^2\;\mathrm{s}^{-1}$ 444 }. 445 In idealised setups with \key{traldf\_c2d}, $A_e$ is reduced similarly, but if \key{traldf\_eiv} is set in 446 the global configurations with \key{traldf\_c2d}, a horizontally varying $A_e$ is instead set from 447 the Held-Larichev parameterisation \footnote{ 448 In this case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further reduced by a factor $|f/f_{20}|$, 449 where $f_{20}$ is the value of $f$ at $20^{\circ}$~N 450 } (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored unless it is zero. 470 451 } 471 452 472 When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined), 473 an eddy induced tracer advection term is added, the formulation of which 474 depends on the slopes of iso-neutral surfaces. Contrary to the case of iso-neutral 475 mixing, the slopes used here are referenced to the geopotential surfaces, $i.e.$ 476 \autoref{eq:ldfslp_geo} is used in $z$-coordinates, and the sum \autoref{eq:ldfslp_geo} 477 + \autoref{eq:ldfslp_iso} in $s$-coordinates. The eddy induced velocity is given by: 453 When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined), 454 an eddy induced tracer advection term is added, 455 the formulation of which depends on the slopes of iso-neutral surfaces. 456 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 457 $i.e.$ \autoref{eq:ldfslp_geo} is used in $z$-coordinates, 458 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. 459 The eddy induced velocity is given by: 478 460 \begin{equation} \label{eq:ldfeiv} 479 461 \begin{split} … … 483 465 \end{split} 484 466 \end{equation} 485 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set 486 through \np{rn\_aeiv}, a \textit{nam\_traldf} namelist parameter. 487 The three components of the eddy induced velocity are computed and add488 to the eulerian velocity in \mdl{traadv\_eiv}. This has been preferred to a 489 separate computation of the advective trends associated with the eiv velocity, 490 since it allows us to take advantage of all the advection schemes offered for 491 the tracers (see \autoref{sec:TRA_adv}) and not just the $2^{nd}$ order advection 492 scheme as in previous releases of OPA \citep{Madec1998}. This is particularly 493 useful for passive tracers where \emph{positivity} of the advection scheme is 494 ofparamount importance.495 496 At the surface, lateral and bottom boundaries, the eddy induced velocity, 467 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{rn\_aeiv}, 468 a \textit{nam\_traldf} namelist parameter. 469 The three components of the eddy induced velocity are computed and 470 add to the eulerian velocity in \mdl{traadv\_eiv}. 471 This has been preferred to a separate computation of the advective trends associated with the eiv velocity, 472 since it allows us to take advantage of all the advection schemes offered for the tracers 473 (see \autoref{sec:TRA_adv}) and not just the $2^{nd}$ order advection scheme as in 474 previous releases of OPA \citep{Madec1998}. 475 This is particularly useful for passive tracers where \emph{positivity} of the advection scheme is of 476 paramount importance. 477 478 At the surface, lateral and bottom boundaries, the eddy induced velocity, 497 479 and thus the advective eddy fluxes of heat and salt, are set to zero. 498 480 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex
r10146 r10354 15 15 $\ $\newline % force a new line 16 16 17 The observation and model comparison code (OBS) reads in observation files (profile 18 temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, 19 and velocity) and calculates an interpolated model equivalent value at the observation 20 location and nearest model timestep. The resulting data are saved in a ``feedback'' file (or 21 files). The code was originally developed for use with the NEMOVAR data assimilation code, but 22 can be used for validation or verification of the model or with any other data assimilation system. 23 24 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model 25 equivalent values for observations on the 0th timestep. The code is then called again after 26 each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln\_diaobs} 27 is set to true. 28 29 For all data types a 2D horizontal interpolator or averager is needed to interpolate/average the model fields to 30 the observation location. For {\em in situ} profiles, a 1D vertical interpolator is needed in 31 addition to provide model fields at the observation depths. This now works in a generalised vertical 32 coordinate system. 17 The observation and model comparison code (OBS) reads in observation files 18 (profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model timestep. 19 The resulting data are saved in a ``feedback'' file (or files). 20 The code was originally developed for use with the NEMOVAR data assimilation code, 21 but can be used for validation or verification of the model or with any other data assimilation system. 22 23 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th timestep. 24 The code is then called again after each timestep from \mdl{step}. 25 The code is only activated if the namelist logical \np{ln\_diaobs} is set to true. 26 27 For all data types a 2D horizontal interpolator or averager is needed to 28 interpolate/average the model fields to the observation location. 29 For {\em in situ} profiles, a 1D vertical interpolator is needed in addition to 30 provide model fields at the observation depths. 31 This now works in a generalised vertical coordinate system. 33 32 34 33 Some profile observation types (e.g. tropical moored buoys) are made available as daily averaged quantities. 35 The observation operator code can be set-up to calculate the equivalent daily average model temperature fields 36 using the \np{nn\_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 37 average value and the observation operator code can calculate equivalent night-time average model SST fields by 38 setting the namelist value \np{ln\_sstnight} to true. Otherwise the model value from the nearest timestep to the 39 observation time is used. 40 41 The code is controlled by the namelist \textit{namobs}. See the following sections for more 42 details on setting up the namelist. 34 The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 35 the \np{nn\_profdavtypes} namelist array. 36 Some SST observations are equivalent to a night-time average value and 37 the observation operator code can calculate equivalent night-time average model SST fields by 38 setting the namelist value \np{ln\_sstnight} to true. 39 Otherwise the model value from the nearest timestep to the observation time is used. 40 41 The code is controlled by the namelist \textit{namobs}. 42 See the following sections for more details on setting up the namelist. 43 43 44 44 \autoref{sec:OBS_example} introduces a test example of the observation operator code including 45 where to obtain data and how to setup the namelist. \autoref{sec:OBS_details} introduces some 46 more technical details of the different observation types used and also shows a more complete 47 namelist. \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation 48 operator including interpolation methods and running on multiple processors. 45 where to obtain data and how to setup the namelist. 46 \autoref{sec:OBS_details} introduces some more technical details of the different observation types used and 47 also shows a more complete namelist. 48 \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation operator including 49 interpolation methods and running on multiple processors. 49 50 \autoref{sec:OBS_ooo} describes the offline observation operator code. 50 \autoref{sec:OBS_obsutils} introduces some utilities to help working with the files 51 produced by the OBS code. 51 \autoref{sec:OBS_obsutils} introduces some utilities to help working with the files produced by the OBS code. 52 52 53 53 % ================================================================ … … 58 58 59 59 This section describes an example of running the observation operator code using 60 profile data which can be freely downloaded. It shows how to adapt an61 existing run and build of NEMO to run the observation operator.60 profile data which can be freely downloaded. 61 It shows how to adapt an existing run and build of NEMO to run the observation operator. 62 62 63 63 \begin{enumerate} 64 64 \item Compile NEMO. 65 65 66 \item Download some EN4 data from 67 \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. Choose observations which are 68 valid for the period of your test run because the observation operator compares 69 the model and observations for a matching date and time. 66 \item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. 67 Choose observations which are valid for the period of your test run because 68 the observation operator compares the model and observations for a matching date and time. 70 69 71 70 \item Compile the OBSTOOLS code using: … … 79 78 \end{cmds} 80 79 81 \item Include the following in the NEMO namelist to run the observation 82 operator on this data: 80 \item Include the following in the NEMO namelist to run the observation operator on this data: 83 81 \end{enumerate} 84 82 85 %------------------------------------------namobs_example----------------------------------------------------- 86 % 87 %\nlst{namobs_example} 88 %------------------------------------------------------------------------------------------------------------- 89 90 Options are defined through the \ngn{namobs} namelist variables. 91 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 92 profile observation operator code. The filename or array of filenames are 93 specified using the \np{cn\_profbfiles} variable. The model grid points for a 94 particular observation latitude and longitude are found using the grid 95 searching part of the code. This can be expensive, particularly for large 96 numbers of observations, setting \np{ln\_grid\_search\_lookup} allows the use of 97 a lookup table which is saved into an ``xypos`` file (or files). This will need 98 to be generated the first time if it does not exist in the run directory. 83 Options are defined through the \ngn{namobs} namelist variables. 84 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code. 85 The filename or array of filenames are specified using the \np{cn\_profbfiles} variable. 86 The model grid points for a particular observation latitude and longitude are found using 87 the grid searching part of the code. 88 This can be expensive, particularly for large numbers of observations, 89 setting \np{ln\_grid\_search\_lookup} allows the use of a lookup table which 90 is saved into an ``xypos`` file (or files). 91 This will need to be generated the first time if it does not exist in the run directory. 99 92 However, once produced it will significantly speed up future grid searches. 100 Setting \np{ln\_grid\_global} means that the code distributes the observations 101 evenly between processors. Alternatively each processor will work with 102 observations located within the model subdomain(see section~\autoref{subsec:OBS_parallel}).103 104 A number of utilities are now provided to plot the feedback files, convert and 105 recombine the files.These are explained in more detail in section~\autoref{sec:OBS_obsutils}.106 Utilites to convert other input data formats into the feedback format are also 107 described insection~\autoref{sec:OBS_obsutils}.93 Setting \np{ln\_grid\_global} means that the code distributes the observations evenly between processors. 94 Alternatively each processor will work with observations located within the model subdomain 95 (see section~\autoref{subsec:OBS_parallel}). 96 97 A number of utilities are now provided to plot the feedback files, convert and recombine the files. 98 These are explained in more detail in section~\autoref{sec:OBS_obsutils}. 99 Utilites to convert other input data formats into the feedback format are also described in 100 section~\autoref{sec:OBS_obsutils}. 108 101 109 102 \section{Technical details (feedback type observation file headers)} 110 103 \label{sec:OBS_details} 111 104 112 Here we show a more complete example namelist \ngn{namobs} and also show the NetCDF headers 113 of the observation 114 files that may be used with the observation operator 105 Here we show a more complete example namelist \ngn{namobs} and also show the NetCDF headers of 106 the observation files that may be used with the observation operator. 115 107 116 108 %------------------------------------------namobs-------------------------------------------------------- … … 119 111 %------------------------------------------------------------------------------------------------------------- 120 112 121 The observation operator code uses the "feedback" observation file format for 122 all data types. All the 123 observation files must be in NetCDF format. Some example headers (produced using 124 \mbox{\textit{ncdump~-h}}) for profile 125 data, sea level anomaly and sea surface temperature are in the following 126 subsections. 113 The observation operator code uses the "feedback" observation file format for all data types. 114 All the observation files must be in NetCDF format. 115 Some example headers (produced using \mbox{\textit{ncdump~-h}}) for profile data, sea level anomaly and 116 sea surface temperature are in the following subsections. 127 117 128 118 \subsection{Profile feedback} … … 406 396 \end{clines} 407 397 408 The mean dynamic 409 topography (MDT) must be provided in a separate file defined on the model grid 410 called \ifile{slaReferenceLevel}. The MDT is required in 411 order to produce the model equivalent sea level anomaly from the model sea 412 surface height. Below is an example header for this file (on the ORCA025 grid). 398 The mean dynamic topography (MDT) must be provided in a separate file defined on 399 the model grid called \ifile{slaReferenceLevel}. 400 The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height. 401 Below is an example header for this file (on the ORCA025 grid). 413 402 414 403 \begin{clines} … … 551 540 \subsection{Horizontal interpolation and averaging methods} 552 541 553 For most observation types, the horizontal extent of the observation is small compared to the model grid size 554 and so the model equivalent of the observation is calculated by interpolating from the four surrounding grid 555 points to the observation location. Some satellite observations (e.g. microwave satellite SST data, or satellite SSS data) 556 have a footprint which is similar in size or larger than the model grid size (particularly when the grid size is small). 557 In those cases the model counterpart should be calculated by averaging the model grid points over the same size as the footprint. 558 NEMO therefore has the capability to specify either an interpolation or an averaging (for surface observation types only). 559 560 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. This default option can be set to values from 0 to 6. 542 For most observation types, the horizontal extent of the observation is small compared to the model grid size and so 543 the model equivalent of the observation is calculated by interpolating from 544 the four surrounding grid points to the observation location. 545 Some satellite observations (e.g. microwave satellite SST data, or satellite SSS data) have a footprint which 546 is similar in size or larger than the model grid size (particularly when the grid size is small). 547 In those cases the model counterpart should be calculated by averaging the model grid points over 548 the same size as the footprint. 549 NEMO therefore has the capability to specify either an interpolation or an averaging 550 (for surface observation types only). 551 552 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. 553 This default option can be set to values from 0 to 6. 561 554 Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 562 555 \begin{itemize} … … 566 559 \item \np{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid) 567 560 \item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 568 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 569 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 561 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 562 \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 563 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 564 the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres 565 (set using \np{ln\_???\_fp\_indegs}) 570 566 \end{itemize} 571 The ??? in the last two options indicate these options should be specified for each observation type for which the averaging is to be performed (see namelist example above). 572 The \np{nn\_2dint} default option can be overridden for surface observation types using namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 567 The ??? in the last two options indicate these options should be specified for each observation type for 568 which the averaging is to be performed (see namelist example above). 569 The \np{nn\_2dint} default option can be overridden for surface observation types using 570 namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 573 571 574 572 Below is some more detail on the various options for interpolation and averaging available in NEMO. 575 573 576 574 \subsubsection{Horizontal interpolation} 577 Consider an observation point ${\rm P}$ with 578 with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and the 579 four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ 580 and ${\rm D}$ with longitude and latitude ($\lambda_{\rm A}$, $\phi_{\rm A}$), 581 ($\lambda_{\rm B}$, $\phi_{\rm B}$) etc. 582 All horizontal interpolation methods implemented in NEMO 583 estimate the value of a model variable $x$ at point $P$ as 584 a weighted linear combination of the values of the model 585 variables at the grid points ${\rm A}$, ${\rm B}$ etc.: 575 Consider an observation point ${\rm P}$ with with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and 576 the four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ and ${\rm D}$ with 577 longitude and latitude ($\lambda_{\rm A}$, $\phi_{\rm A}$),($\lambda_{\rm B}$, $\phi_{\rm B}$) etc. 578 All horizontal interpolation methods implemented in NEMO estimate the value of a model variable $x$ at point $P$ as 579 a weighted linear combination of the values of the model variables at the grid points ${\rm A}$, ${\rm B}$ etc.: 586 580 \begin{eqnarray} 587 581 {x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & … … 591 585 {w_{}}_{\rm D} {x_{}}_{\rm D} \right) 592 586 \end{eqnarray} 593 where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the 594 model field at points ${\rm A}$, ${\rm B}$ etc., and 595 $w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$. 587 where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the model field at 588 points ${\rm A}$, ${\rm B}$ etc., and $w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$. 596 589 597 590 Four different possibilities are available for computing the weights. … … 599 592 \begin{enumerate} 600 593 601 \item[1.] {\bf Great-Circle distance-weighted interpolation.} The weights602 are computed as a function of the great-circle distance $s(P, \cdot)$603 between $P$ and the model grid points $A$, $B$ etc. For example,604 the weight given to the field ${x_{}}_{\rm A}$ is specified as the605 product of the distancesfrom ${\rm P}$ to the other points:594 \item[1.] {\bf Great-Circle distance-weighted interpolation.} 595 The weights are computed as a function of the great-circle distance $s(P, \cdot)$ between $P$ and 596 the model grid points $A$, $B$ etc. 597 For example, the weight given to the field ${x_{}}_{\rm A}$ is specified as the product of the distances 598 from ${\rm P}$ to the other points: 606 599 \begin{eqnarray} 607 600 {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D}) … … 619 612 \end{eqnarray} 620 613 and $M$ corresponds to $B$, $C$ or $D$. 621 A more stable form of the great-circle distance formula for 622 small distances ($x$ near 1) involves the arcsine function 623 ($e.g.$ see p.~101 of \citet{Daley_Barker_Bk01}: 614 A more stable form of the great-circle distance formula for small distances ($x$ near 1) 615 involves the arcsine function ($e.g.$ see p.~101 of \citet{Daley_Barker_Bk01}: 624 616 \begin{eqnarray} 625 617 s\left( {\rm P}, {\rm M} \right) … … 651 643 \end{eqnarray} 652 644 653 \item[2.] {\bf Great-Circle distance-weighted interpolation with small angle 654 approximation.} Similar to the previous interpolation but with the 655 distance $s$ computed as 645 \item[2.] {\bf Great-Circle distance-weighted interpolation with small angle approximation.} 646 Similar to the previous interpolation but with the distance $s$ computed as 656 647 \begin{eqnarray} 657 648 s\left( {\rm P}, {\rm M} \right) … … 663 654 where $M$ corresponds to $A$, $B$, $C$ or $D$. 664 655 665 \item[3.] {\bf Bilinear interpolation for a regular spaced grid.} The 666 interpolation is split into two 1D interpolations in the longitude 667 and latitude directions, respectively. 668 669 \item[4.] {\bf Bilinear remapping interpolation for a general grid.} An 670 iterative scheme that involves first mapping a quadrilateral cell 671 into a cell with coordinates (0,0), (1,0), (0,1) and (1,1). This 672 method is based on the SCRIP interpolation package \citep{Jones_1998}. 656 \item[3.] {\bf Bilinear interpolation for a regular spaced grid.} 657 The interpolation is split into two 1D interpolations in the longitude and latitude directions, respectively. 658 659 \item[4.] {\bf Bilinear remapping interpolation for a general grid.} 660 An iterative scheme that involves first mapping a quadrilateral cell into 661 a cell with coordinates (0,0), (1,0), (0,1) and (1,1). 662 This method is based on the SCRIP interpolation package \citep{Jones_1998}. 673 663 674 664 \end{enumerate} … … 678 668 For each surface observation type: 679 669 \begin{itemize} 680 \item The standard grid-searching code is used to find the nearest model grid point to the observation location (see next subsection). 681 \item The maximum number of grid points is calculated in the local grid domain for which the averaging is likely need to cover. 682 \item The lats/longs of the grid points surrounding the nearest model grid box are extracted using existing mpi routines. 683 \item The weights for each grid point associated with each observation are calculated, either for radial or rectangular footprints. For grid points completely within the footprint, the weight is one; for grid points completely outside the footprint, the weight is zero. For grid points which are partly within the footprint the ratio between the area of the footprint within the grid box and the total area of the grid box is used as the weight. 684 \item The weighted average of the model grid points associated with each observation is calculated, and this is then given as the model counterpart of the observation. 670 \item The standard grid-searching code is used to find the nearest model grid point to the observation location 671 (see next subsection). 672 \item The maximum number of grid points is calculated in the local grid domain for which 673 the averaging is likely need to cover. 674 \item The lats/longs of the grid points surrounding the nearest model grid box are extracted using 675 existing mpi routines. 676 \item The weights for each grid point associated with each observation are calculated, 677 either for radial or rectangular footprints. 678 For grid points completely within the footprint, the weight is one; 679 for grid points completely outside the footprint, the weight is zero. 680 For grid points which are partly within the footprint the ratio between the area of the footprint within 681 the grid box and the total area of the grid box is used as the weight. 682 \item The weighted average of the model grid points associated with each observation is calculated, 683 and this is then given as the model counterpart of the observation. 685 684 \end{itemize} 686 685 687 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 686 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in 687 Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 688 688 689 689 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 691 691 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rec} 692 692 \caption{ \protect\label{fig:obsavgrec} 693 Weights associated with each model grid box (blue lines and numbers) for an observation at -170.5E, 56.0N with a rectangular footprint of 1\deg x 1\deg.} 693 Weights associated with each model grid box (blue lines and numbers) 694 for an observation at -170.5E, 56.0N with a rectangular footprint of 1\deg x 1\deg.} 694 695 \end{center} \end{figure} 695 696 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 699 700 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rad} 700 701 \caption{ \protect\label{fig:obsavgrad} 701 Weights associated with each model grid box (blue lines and numbers) for an observation at -170.5E, 56.0N with a radial footprint with diameter 1\deg.} 702 Weights associated with each model grid box (blue lines and numbers) 703 for an observation at -170.5E, 56.0N with a radial footprint with diameter 1\deg.} 702 704 \end{center} \end{figure} 703 705 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 706 708 \subsection{Grid search} 707 709 708 For many grids used by the NEMO model, such as the ORCA family, 709 the horizontal grid coordinates $i$ and $j$ are not simple functions 710 of latitude and longitude. Therefore, it is not always straightforward 711 to determine the grid points surrounding any given observational position. 712 Before the interpolation can be performed, a search 713 algorithm is then required to determine the corner points of 710 For many grids used by the NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 711 Therefore, it is not always straightforward to determine the grid points surrounding any given observational position. 712 Before the interpolation can be performed, a search algorithm is then required to determine the corner points of 714 713 the quadrilateral cell in which the observation is located. 715 This is the most difficult and time consuming part of the 716 2D interpolation procedure. 717 A robust test for determining if an observation falls 718 within a given quadrilateral cell is as follows. Let 719 ${\rm P}({\lambda_{}}_{\rm P} ,{\phi_{}}_{\rm P} )$ denote the observation point, 720 and let ${\rm A}({\lambda_{}}_{\rm A} ,{\phi_{}}_{\rm A} )$, 721 ${\rm B}({\lambda_{}}_{\rm B} ,{\phi_{}}_{\rm B} )$, 722 ${\rm C}({\lambda_{}}_{\rm C} ,{\phi_{}}_{\rm C} )$ 723 and 724 ${\rm D}({\lambda_{}}_{\rm D} ,{\phi_{}}_{\rm D} )$ denote 725 the bottom left, bottom right, top left and top right 726 corner points of the cell, respectively. 727 To determine if P is inside 728 the cell, we verify that the cross-products 714 This is the most difficult and time consuming part of the 2D interpolation procedure. 715 A robust test for determining if an observation falls within a given quadrilateral cell is as follows. 716 Let ${\rm P}({\lambda_{}}_{\rm P} ,{\phi_{}}_{\rm P} )$ denote the observation point, 717 and let ${\rm A}({\lambda_{}}_{\rm A} ,{\phi_{}}_{\rm A} )$, ${\rm B}({\lambda_{}}_{\rm B} ,{\phi_{}}_{\rm B} )$, 718 ${\rm C}({\lambda_{}}_{\rm C} ,{\phi_{}}_{\rm C} )$ and ${\rm D}({\lambda_{}}_{\rm D} ,{\phi_{}}_{\rm D} )$ 719 denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 720 To determine if P is inside the cell, we verify that the cross-products 729 721 \begin{eqnarray} 730 722 \begin{array}{lllll} … … 752 744 \label{eq:cross} 753 745 \end{eqnarray} 754 point in the opposite direction to the unit normal 755 $\widehat{\bf k}$ (i.e., that the coefficients of 756 $\widehat{\bf k}$ are negative), 757 where ${{\bf r}_{}}_{\rm PA}$, ${{\bf r}_{}}_{\rm PB}$, 758 etc. correspond to the vectors between points P and A, 759 P and B, etc.. The method used is 760 similar to the method used in 761 the SCRIP interpolation package \citep{Jones_1998}. 762 763 In order to speed up the grid search, there is the possibility to construct 764 a lookup table for a user specified resolution. This lookup 765 table contains the lower and upper bounds on the $i$ and $j$ indices 766 to be searched for on a regular grid. For each observation position, 767 the closest point on the regular grid of this position is computed and 768 the $i$ and $j$ ranges of this point searched to determine the precise 769 four points surrounding the observation. 746 point in the opposite direction to the unit normal $\widehat{\bf k}$ 747 (i.e., that the coefficients of $\widehat{\bf k}$ are negative), 748 where ${{\bf r}_{}}_{\rm PA}$, ${{\bf r}_{}}_{\rm PB}$, etc. correspond to 749 the vectors between points P and A, P and B, etc.. 750 The method used is similar to the method used in the SCRIP interpolation package \citep{Jones_1998}. 751 752 In order to speed up the grid search, there is the possibility to construct a lookup table for a user specified resolution. 753 This lookup table contains the lower and upper bounds on the $i$ and $j$ indices to 754 be searched for on a regular grid. 755 For each observation position, the closest point on the regular grid of this position is computed and 756 the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 770 757 771 758 \subsection{Parallel aspects of horizontal interpolation} 772 759 \label{subsec:OBS_parallel} 773 760 774 For horizontal interpolation, there is the basic problem that the 775 observations are unevenly distributed on the globe. In numerical 776 models, it is common to divide the model grid into subgrids (or 777 domains) where each subgrid is executed on a single processing element 778 with explicit message passing for exchange of information along the 779 domain boundaries when running on a massively parallel processor (MPP) 780 system. This approach is used by \NEMO. 781 782 For observations there is no natural distribution since the 783 observations are not equally distributed on the globe. 784 Two options have been made available: 1) geographical distribution; 761 For horizontal interpolation, there is the basic problem that 762 the observations are unevenly distributed on the globe. 763 In numerical models, it is common to divide the model grid into subgrids (or domains) where 764 each subgrid is executed on a single processing element with explicit message passing for 765 exchange of information along the domain boundaries when running on a massively parallel processor (MPP) system. 766 This approach is used by \NEMO. 767 768 For observations there is no natural distribution since the observations are not equally distributed on the globe. 769 Two options have been made available: 770 1) geographical distribution; 785 771 and 2) round-robin. 786 772 … … 791 777 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local} 792 778 \caption{ \protect\label{fig:obslocal} 793 Example of the distribution of observations with the geographical distribution of observational data.}779 Example of the distribution of observations with the geographical distribution of observational data.} 794 780 \end{center} \end{figure} 795 781 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 796 782 797 This is the simplest option in which the observations are distributed according 798 to the domain of the grid-point parallelization. \autoref{fig:obslocal} 799 shows an example of the distribution of the {\em in situ} data on processors 800 with a different colour for each observation 801 on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 783 This is the simplest option in which the observations are distributed according to 784 the domain of the grid-point parallelization. 785 \autoref{fig:obslocal} shows an example of the distribution of the {\em in situ} data on processors with 786 a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 802 787 The grid-point domain decomposition is clearly visible on the plot. 803 788 804 The advantage of this approach is that all 805 information needed for horizontal interpolation is available without 806 any MPP communication. Of course, this is under the assumption that 807 we are only using a $2 \times 2$ grid-point stencil for the interpolation 808 (e.g., bilinear interpolation). For higher order interpolation schemes this 809 is no longer valid. A disadvantage with the above scheme is that the number of 810 observations on each processor can be very different. If the cost of 811 the actual interpolation is expensive relative to the communication of 812 data needed for interpolation, this could lead to load imbalance. 789 The advantage of this approach is that all information needed for horizontal interpolation is available without 790 any MPP communication. 791 Of course, this is under the assumption that we are only using a $2 \times 2$ grid-point stencil for 792 the interpolation (e.g., bilinear interpolation). 793 For higher order interpolation schemes this is no longer valid. 794 A disadvantage with the above scheme is that the number of observations on each processor can be very different. 795 If the cost of the actual interpolation is expensive relative to the communication of data needed for interpolation, 796 this could lead to load imbalance. 813 797 814 798 \subsubsection{Round-robin distribution of observations among processors} … … 818 802 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global} 819 803 \caption{ \protect\label{fig:obsglobal} 820 Example of the distribution of observations with the round-robin distribution of observational data.}804 Example of the distribution of observations with the round-robin distribution of observational data.} 821 805 \end{center} \end{figure} 822 806 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 823 807 824 An alternative approach is to distribute the observations equally 825 among processors and use message passing in order to retrieve 826 the stencil for interpolation. The simplest distribution of the observations 827 is to distribute them using a round-robin scheme. \autoref{fig:obsglobal} 828 shows the distribution of the {\em in situ} data on processors for the 829 round-robin distribution of observations with a different colour for 830 each observation on a given processor for a 4 $\times$ 2 decomposition 831 with ORCA2 for the same input data as in \autoref{fig:obslocal}. 808 An alternative approach is to distribute the observations equally among processors and 809 use message passing in order to retrieve the stencil for interpolation. 810 The simplest distribution of the observations is to distribute them using a round-robin scheme. 811 \autoref{fig:obsglobal} shows the distribution of the {\em in situ} data on processors for 812 the round-robin distribution of observations with a different colour for each observation on a given processor for 813 a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:obslocal}. 832 814 The observations are now clearly randomly distributed on the globe. 833 In order to be able to perform horizontal interpolation in this case, 834 a subroutine has been developed that retrieves any grid points in the 835 global space. 815 In order to be able to perform horizontal interpolation in this case, 816 a subroutine has been developed that retrieves any grid points in the global space. 836 817 837 818 \subsection{Vertical interpolation operator} 838 819 839 Vertical interpolation is achieved using either a cubic spline or 840 linear interpolation. For the cubic spline, the top and 841 bottom boundary conditions for the second derivative of the 842 interpolating polynomial in the spline are set to zero. 820 Vertical interpolation is achieved using either a cubic spline or linear interpolation. 821 For the cubic spline, the top and bottom boundary conditions for the second derivative of 822 the interpolating polynomial in the spline are set to zero. 843 823 At the bottom boundary, this is done using the land-ocean mask. 844 824 … … 856 836 \subsection{Concept} 857 837 858 The obs oper maps model variables to observation space. It is possible to apply this mapping 859 without running the model. The software which performs this functionality is known as the 860 \textbf{offline obs oper}. The obs oper is divided into three stages. An initialisation phase, 861 an interpolation phase and an output phase. The implementation of which is outlined in the 862 previous sections. During the interpolation phase the offline obs oper populates the model 863 arrays by reading saved model fields from disk. 864 865 There are two ways of exploiting this offline capacity. The first is to mimic the behaviour of 866 the online system by supplying model fields at regular intervals between the start and the end 867 of the run. This approach results in a single model counterpart per observation. This kind of 868 usage produces feedback files the same file format as the online obs oper. 869 The second is to take advantage of the offline setting in which multiple model counterparts can 870 be calculated per observation. In this case it is possible to consider all forecasts verifying 871 at the same time. By forecast, I mean any method which produces an estimate of physical reality 872 which is not an observed value. In the case of class 4 files this means forecasts, analyses, persisted 873 analyses and climatological values verifying at the same time. Although the class 4 file format 874 doesn't account for multiple ensemble members or multiple experiments per observation, it is possible 875 to include these components in the same or multiple files. 838 The obs oper maps model variables to observation space. 839 It is possible to apply this mapping without running the model. 840 The software which performs this functionality is known as the \textbf{offline obs oper}. 841 The obs oper is divided into three stages. 842 An initialisation phase, an interpolation phase and an output phase. 843 The implementation of which is outlined in the previous sections. 844 During the interpolation phase the offline obs oper populates the model arrays by 845 reading saved model fields from disk. 846 847 There are two ways of exploiting this offline capacity. 848 The first is to mimic the behaviour of the online system by supplying model fields at 849 regular intervals between the start and the end of the run. 850 This approach results in a single model counterpart per observation. 851 This kind of usage produces feedback files the same file format as the online obs oper. 852 The second is to take advantage of the offline setting in which 853 multiple model counterparts can be calculated per observation. 854 In this case it is possible to consider all forecasts verifying at the same time. 855 By forecast, I mean any method which produces an estimate of physical reality which is not an observed value. 856 In the case of class 4 files this means forecasts, analyses, persisted analyses and 857 climatological values verifying at the same time. 858 Although the class 4 file format doesn't account for multiple ensemble members or 859 multiple experiments per observation, it is possible to include these components in the same or multiple files. 876 860 877 861 %-------------------------------------------------------------------------------------------------------- … … 883 867 \subsubsection{Building} 884 868 885 In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion 886 of the \emph{OOO\_SRC} directory. \emph{OOO\_SRC} contains a replacement \mdl{nemo} and 887 \mdl{nemogcm} which overwrites the resultant \textbf{nemo.exe}. This is the approach taken 888 by \emph{SAS\_SRC} and \emph{OFF\_SRC}.869 In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion of the \emph{OOO\_SRC} directory. 870 \emph{OOO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which 871 overwrites the resultant \textbf{nemo.exe}. 872 This is the approach taken by \emph{SAS\_SRC} and \emph{OFF\_SRC}. 889 873 890 874 %-------------------------------------------------------------------------------------------------------- … … 898 882 \subsubsection{Quick script} 899 883 900 A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. The901 functions which locate model fields and observation files can be manually specified. The package 902 can be installed by appropriate use of the included setup.py script.884 A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. 885 The functions which locate model fields and observation files can be manually specified. 886 The package can be installed by appropriate use of the included setup.py script. 903 887 904 888 Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory. … … 908 892 %-------------------------------------------------------------------------------------------------------- 909 893 \subsection{Configuring the offline observation operator} 910 The observation files and settings understood by \textbf{namobs} have been outlined in the online 911 obs oper section. In addition there are two further namelists wich control the operation of the offline 912 obs oper. \textbf{namooo} which controls the input model fields and \textbf{namcl4} which controls the 913 production of class 4 files.894 The observation files and settings understood by \textbf{namobs} have been outlined in the online obs oper section. 895 In addition there are two further namelists wich control the operation of the offline obs oper. 896 \textbf{namooo} which controls the input model fields and \textbf{namcl4} which 897 controls the production of class 4 files. 914 898 915 899 \subsubsection{Single field} … … 917 901 In offline mode model arrays are populated at appropriate time steps via input files. 918 902 At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 919 These routines will be expanded upon in future versions to allow the specification of any 920 model variable.As such, input files must be global versions of the model domain with903 These routines will be expanded upon in future versions to allow the specification of any model variable. 904 As such, input files must be global versions of the model domain with 921 905 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 922 906 923 For each field read there must be an entry in the \textbf{namooo} namelist specifying the924 name of the file to read and the index along the \emph{time\_counter}. For example, to 925 read the second time counter from a single file the namelist would be.907 For each field read there must be an entry in the \textbf{namooo} namelist specifying 908 the name of the file to read and the index along the \emph{time\_counter}. 909 For example, to read the second time counter from a single file the namelist would be. 926 910 927 911 \begin{forlines} … … 939 923 \subsubsection{Multiple fields per run} 940 924 941 Model field iteration is controlled via \textbf{nn\_ooo\_freq} which specifies942 the number of model steps at which the next field gets read. For example, if 943 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours.925 Model field iteration is controlled via \textbf{nn\_ooo\_freq} which 926 specifies the number of model steps at which the next field gets read. 927 For example, if 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours. 944 928 945 929 \begin{forlines} … … 957 941 \end{forlines} 958 942 959 The above namelist will result in feedback files whose first 12 hours contain 960 the first field of foo.nc and thesecond 12 hours contain the second field.943 The above namelist will result in feedback files whose first 12 hours contain the first field of foo.nc and 944 the second 12 hours contain the second field. 961 945 962 946 %\begin{framed} … … 964 948 %\end{framed} 965 949 966 It is easy to see how a collection of fields taken fron a number of files 967 at different indices can be combined at a particular frequency in time to 968 generate a pseudo model evolution. As long as all that is needed is a single 969 model counterpart at a regular interval then namooo is all that needs to 970 be edited. However, a far more interesting approach can be taken in which 971 multiple forecasts, analyses, persisted analyses and climatologies are 972 considered against the same set of observations. For this a slightly more 973 complicated approach is needed. It is referred to as \emph{Class 4} since 974 it is the fourth metric defined by the GODAE intercomparison project. 950 It is easy to see how a collection of fields taken fron a number of files at different indices can be combined at 951 a particular frequency in time to generate a pseudo model evolution. 952 As long as all that is needed is a single model counterpart at a regular interval then 953 namooo is all that needs to be edited. 954 However, a far more interesting approach can be taken in which multiple forecasts, analyses, persisted analyses and 955 climatologies are considered against the same set of observations. 956 For this a slightly more complicated approach is needed. 957 It is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. 975 958 976 959 %-------------------------------------------------------------------------------------------------------- … … 979 962 \subsubsection{Multiple model counterparts per observation a.k.a Class 4} 980 963 981 A generalisation of feedback files to allow multiple model components per observation. For a single 982 observation, as well as previous forecasts verifying at the same time there are also analyses, persisted 983 analyses and climatologies. 984 985 986 The above namelist performs two basic functions. It organises the fields 987 given in \textbf{namooo} into groups so that observations can be matched 988 up multiple times. It also controls the metadata and the output variable 989 of the class 4 file when a write routine is called. 964 A generalisation of feedback files to allow multiple model components per observation. 965 For a single observation, as well as previous forecasts verifying at the same time 966 there are also analyses, persisted analyses and climatologies. 967 968 969 The above namelist performs two basic functions. 970 It organises the fields given in \textbf{namooo} into groups so that observations can be matched up multiple times. 971 It also controls the metadata and the output variable of the class 4 file when a write routine is called. 990 972 991 973 %\begin{framed} 992 \textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs} 993 to use class 4 outputs. 974 \textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs} to use class 4 outputs. 994 975 %\end{framed} 995 976 … … 1004 985 \noindent 1005 986 \linebreak 1006 Much of the namelist is devoted to specifying this convention. The1007 following namelist settings control the elements of the output 1008 file names.Each should be specified as a single string of character data.987 Much of the namelist is devoted to specifying this convention. 988 The following namelist settings control the elements of the output file names. 989 Each should be specified as a single string of character data. 1009 990 1010 991 \begin{description} 1011 992 \item[cl4\_prefix] 1012 Prefix for class 4 files e.g. class4993 Prefix for class 4 files e.g. class4 1013 994 \item[cl4\_date] 1014 YYYYMMDD validity date995 YYYYMMDD validity date 1015 996 \item[cl4\_sys] 1016 The name of the class 4 model system e.g. FOAM997 The name of the class 4 model system e.g. FOAM 1017 998 \item[cl4\_cfg] 1018 The name of the class 4 model configuration e.g. orca025999 The name of the class 4 model configuration e.g. orca025 1019 1000 \item[cl4\_vn] 1020 The name of the class 4 model version e.g. 12.01001 The name of the class 4 model version e.g. 12.0 1021 1002 \end{description} 1022 1003 1023 1004 \noindent 1024 The kind is specified by the observation type internally to the obs oper. The processor1025 number is specified internally in NEMO.1005 The kind is specified by the observation type internally to the obs oper. 1006 The processor number is specified internally in NEMO. 1026 1007 1027 1008 \subsubsection{Class 4 file global attributes} 1028 1009 1029 Global attributes necessary to fulfill the class 4 file definition. These 1030 are also useful pieces of information when collaborating with external 1031 partners. 1010 Global attributes necessary to fulfill the class 4 file definition. 1011 These are also useful pieces of information when collaborating with external partners. 1032 1012 1033 1013 \begin{description} 1034 1014 \item[cl4\_contact] 1035 Contact email for class 4 files.1015 Contact email for class 4 files. 1036 1016 \item[cl4\_inst] 1037 The name of the producers institution.1017 The name of the producers institution. 1038 1018 \item[cl4\_cfg] 1039 The name of the class 4 model configuration e.g. orca0251019 The name of the class 4 model configuration e.g. orca025 1040 1020 \item[cl4\_vn] 1041 The name of the class 4 model version e.g. 12.01021 The name of the class 4 model version e.g. 12.0 1042 1022 \end{description} 1043 1023 1044 1024 \noindent 1045 The obs\_type, 1046 creation date and validity time are specified internally to the obs oper. 1025 The obs\_type, creation date and validity time are specified internally to the obs oper. 1047 1026 1048 1027 \subsubsection{Class 4 model counterpart configuration} 1049 1028 1050 As seen previously it is possible to perform a single sweep of the 1051 obs oper and specify a collection of model fields equally spaced 1052 along that sweep. In the class 4 case the single sweep is replaced 1053 with multiple sweeps and a certain ammount of book keeping is 1054 needed to ensure each model counterpart makes its way to the 1055 correct piece of memory in the output files. 1029 As seen previously it is possible to perform a single sweep of the obs oper and 1030 specify a collection of model fields equally spaced along that sweep. 1031 In the class 4 case the single sweep is replaced with multiple sweeps and 1032 a certain ammount of book keeping is needed to ensure each model counterpart makes its way to 1033 the correct piece of memory in the output files. 1056 1034 1057 1035 \noindent 1058 1036 \linebreak 1059 In terms of book keeping, the offline obs oper needs to know how many 1060 full sweeps need to be performed. This is specified via the 1061 \textbf{cl4\_match\_len} variable and is the total number of model 1062 counterparts per observation. For example, a 3 forecasts plus 3 persistence 1063 fields plus an analysis field would be 7 counterparts per observation. 1037 In terms of book keeping, the offline obs oper needs to know how many full sweeps need to be performed. 1038 This is specified via the \textbf{cl4\_match\_len} variable and 1039 is the total number of model counterparts per observation. 1040 For example, a 3 forecasts plus 3 persistence fields plus an analysis field would be 7 counterparts per observation. 1064 1041 1065 1042 \begin{forlines} … … 1067 1044 \end{forlines} 1068 1045 1069 Then to correctly allocate a class 4 file the forecast axis must be defined. This1070 is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3.1046 Then to correctly allocate a class 4 file the forecast axis must be defined. 1047 This is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3. 1071 1048 1072 1049 \begin{forlines} … … 1074 1051 \end{forlines} 1075 1052 1076 Then for each model field it is necessary to designate what class 4 variable and 1077 index along the forecast dimension the model counterpart should be stored in the 1078 output file. As well as a value for that lead time in hours, this will be useful 1079 when interpreting the data afterwards. 1053 Then for each model field it is necessary to designate what class 4 variable and index along 1054 the forecast dimension the model counterpart should be stored in the output file. 1055 As well as a value for that lead time in hours, this will be useful when interpreting the data afterwards. 1080 1056 1081 1057 \begin{forlines} … … 1086 1062 \end{forlines} 1087 1063 1088 In terms of files and indices of fields inside each file the class 4 approach 1089 makes use of the \textbf{namooo} namelist. If our fields are in separate files 1090 with a single field per file our example inputs will be specified.1064 In terms of files and indices of fields inside each file the class 4 approach makes use of 1065 the \textbf{namooo} namelist. 1066 If our fields are in separate files with a single field per file our example inputs will be specified. 1091 1067 1092 1068 \begin{forlines} … … 1095 1071 \end{forlines} 1096 1072 1097 When we combine all of the naming conventions, global attributes and i/o instructions 1098 the class 4 namelist becomes. 1073 When we combine all of the naming conventions, global attributes and i/o instructions the class 4 namelist becomes. 1099 1074 1100 1075 \begin{forlines} … … 1150 1125 \subsubsection{Climatology interpolation} 1151 1126 1152 The climatological counterpart is generated at the start of the run by restarting1153 the model from climatology through appropriate use of \textbf{namtsd}. To override 1154 the offline observation operator read routine and to take advantage of the restart 1155 s ettings, specify the first entry in \textbf{cl4\_vars} as "climatology". This will then1156 pipe the restart from climatology into the output class 4 file. As in every other 1157 class 4 matchup the input file, input index and output index must be specified.1158 These can be replaced with dummy data since they are not used but they must be1159 present to cycle through the matchups correctly.1127 The climatological counterpart is generated at the start of the run by 1128 restarting the model from climatology through appropriate use of \textbf{namtsd}. 1129 To override the offline observation operator read routine and to take advantage of the restart settings, 1130 specify the first entry in \textbf{cl4\_vars} as "climatology". 1131 This will then pipe the restart from climatology into the output class 4 file. 1132 As in every other class 4 matchup the input file, input index and output index must be specified. 1133 These can be replaced with dummy data since they are not used but 1134 they must be present to cycle through the matchups correctly. 1160 1135 1161 1136 \subsection{Advanced usage} 1162 1137 1163 In certain cases it may be desirable to include both multiple model fields per 1164 observation window with multiple match ups per observation. This can be achieved 1165 by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. Care must 1166 be taken in generating the ooo\_files list such that the files are arranged into1167 consecutive blocks of single match ups. For example, 2 forecast fields1168 of 12 hourly data would result in 4 separate read operations but only 2 write 1169 o perations, 1 per forecast.1138 In certain cases it may be desirable to include both multiple model fields per observation window with 1139 multiple match ups per observation. 1140 This can be achieved by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. 1141 Care must be taken in generating the ooo\_files list such that the files are arranged into 1142 consecutive blocks of single match ups. 1143 For example, 2 forecast fields of 12 hourly data would result in 4 separate read operations but 1144 only 2 write operations, 1 per forecast. 1170 1145 1171 1146 \begin{forlines} … … 1175 1150 \end{forlines} 1176 1151 1177 The above notation reveals the internal split between match up iterators and file 1178 iterators. This technique has not been used before so experimentation is needed 1179 before results can be trusted. 1152 The above notation reveals the internal split between match up iterators and file iterators. 1153 This technique has not been used before so experimentation is needed before results can be trusted. 1180 1154 1181 1155 … … 1187 1161 \label{sec:OBS_obsutils} 1188 1162 1189 Some tools for viewing and processing of observation and feedback files are provided in the 1190 NEMO repository for convenience. These include OBSTOOLS which are a collection of Fortran 1191 programs which are helpful to deal with feedback files. They do such tasks as observation file 1192 conversion, printing of file contents, some basic statistical analysis of feedback files. The 1193 other tool is an IDL program called dataplot which uses a graphical interface to visualise 1194 observations and feedback files. OBSTOOLS and dataplot are described in more detail below. 1163 Some tools for viewing and processing of observation and feedback files are provided in 1164 the NEMO repository for convenience. 1165 These include OBSTOOLS which are a collection of Fortran programs which are helpful to deal with feedback files. 1166 They do such tasks as observation file conversion, printing of file contents, 1167 some basic statistical analysis of feedback files. 1168 The other tool is an IDL program called dataplot which uses a graphical interface to 1169 visualise observations and feedback files. 1170 OBSTOOLS and dataplot are described in more detail below. 1195 1171 1196 1172 \subsection{Obstools} 1197 1173 1198 A series of Fortran utilities is provided with NEMO called OBSTOOLS. This are helpful in1199 handling observation files and the feedback file output from the NEMO observation operator.1174 A series of Fortran utilities is provided with NEMO called OBSTOOLS. 1175 This are helpful in handling observation files and the feedback file output from the NEMO observation operator. 1200 1176 The utilities are as follows 1201 1177 1202 1178 \subsubsection{c4comb} 1203 1179 1204 The program c4comb combines multiple class 4 files produced by individual processors in an 1205 MPI run of NEMO offline obs\_oper into a single class 4 file. The program is called in the following way: 1180 The program c4comb combines multiple class 4 files produced by individual processors in 1181 an MPI run of NEMO offline obs\_oper into a single class 4 file. 1182 The program is called in the following way: 1206 1183 1207 1184 … … 1213 1190 \subsubsection{corio2fb} 1214 1191 1215 The program corio2fb converts profile observation files from the Coriolis format to the 1216 standard feedback format.The program is called in the following way:1192 The program corio2fb converts profile observation files from the Coriolis format to the standard feedback format. 1193 The program is called in the following way: 1217 1194 1218 1195 \footnotesize … … 1223 1200 \subsubsection{enact2fb} 1224 1201 1225 The program enact2fb converts profile observation files from the ENACT format to the standard 1226 feedback format.The program is called in the following way:1202 The program enact2fb converts profile observation files from the ENACT format to the standard feedback format. 1203 The program is called in the following way: 1227 1204 1228 1205 \footnotesize … … 1233 1210 \subsubsection{fbcomb} 1234 1211 1235 The program fbcomb combines multiple feedback files produced by individual processors in an 1236 MPI run of NEMO into a single feedback file. The program is called in the following way: 1212 The program fbcomb combines multiple feedback files produced by individual processors in 1213 an MPI run of NEMO into a single feedback file. 1214 The program is called in the following way: 1237 1215 1238 1216 \footnotesize … … 1243 1221 \subsubsection{fbmatchup} 1244 1222 1245 The program fbmatchup will match observations from two feedback files. The program is called1246 in the following way:1223 The program fbmatchup will match observations from two feedback files. 1224 The program is called in the following way: 1247 1225 1248 1226 \footnotesize … … 1254 1232 1255 1233 The program fbprint will print the contents of a feedback file or files to standard output. 1256 Selected information can be output using optional arguments. The program is called in the1257 following way:1234 Selected information can be output using optional arguments. 1235 The program is called in the following way: 1258 1236 1259 1237 \footnotesize … … 1282 1260 \subsubsection{fbsel} 1283 1261 1284 The program fbsel will select or subsample observations. The program is called in the1285 following way:1262 The program fbsel will select or subsample observations. 1263 The program is called in the following way: 1286 1264 1287 1265 \footnotesize … … 1292 1270 \subsubsection{fbstat} 1293 1271 1294 The program fbstat will output summary statistics in different global areas into a number of 1295 files.The program is called in the following way:1272 The program fbstat will output summary statistics in different global areas into a number of files. 1273 The program is called in the following way: 1296 1274 1297 1275 \footnotesize … … 1302 1280 \subsubsection{fbthin} 1303 1281 1304 The program fbthin will thin the data to 1 degree resolution. The code could easily be 1305 modified to thin to a different resolution. The program is called in the following way: 1282 The program fbthin will thin the data to 1 degree resolution. 1283 The code could easily be modified to thin to a different resolution. 1284 The program is called in the following way: 1306 1285 1307 1286 \footnotesize … … 1312 1291 \subsubsection{sla2fb} 1313 1292 1314 The program sla2fb will convert an AVISO SLA format file to feedback format. The program is1315 called in the following way:1293 The program sla2fb will convert an AVISO SLA format file to feedback format. 1294 The program is called in the following way: 1316 1295 1317 1296 \footnotesize … … 1325 1304 \subsubsection{vel2fb} 1326 1305 1327 The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. The program1328 is called in the following way:1306 The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. 1307 The program is called in the following way: 1329 1308 1330 1309 \footnotesize … … 1339 1318 \subsection{Dataplot} 1340 1319 1341 An IDL program called dataplot is included which uses a graphical interface to visualise 1342 observations and feedback files. It is possible to zoom in, plot individual profiles and 1343 calculate some basic statistics. To plot some data run IDL and then: 1320 An IDL program called dataplot is included which uses a graphical interface to 1321 visualise observations and feedback files. 1322 It is possible to zoom in, plot individual profiles and calculate some basic statistics. 1323 To plot some data run IDL and then: 1344 1324 \footnotesize 1345 1325 \begin{minted}{idl} … … 1347 1327 \end{minted} 1348 1328 1349 To read multiple files into dataplot, for example multiple feedback files from different1350 processors or from different days, the easiest method is to use the spawn command to generate 1351 a list of files which can then be passed to dataplot.1329 To read multiple files into dataplot, 1330 for example multiple feedback files from different processors or from different days, 1331 the easiest method is to use the spawn command to generate a list of files which can then be passed to dataplot. 1352 1332 \footnotesize 1353 1333 \begin{minted}{idl} … … 1357 1337 1358 1338 \autoref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. 1359 This is split into three parts. At the top there is a menu bar which contains a variety of 1360 drop down menus. Areas - zooms into prespecified regions; plot - plots the data as a 1361 timeseries or a T-S diagram if appropriate; Find - allows data to be searched; Config - sets 1362 various configuration options. 1363 1364 The middle part is a plot of the geographical location of the observations. This will plot the 1365 observation value, the model background value or observation minus background value depending 1366 on the option selected in the radio button at the bottom of the window. The plotting colour 1367 range can be changed by clicking on the colour bar. The title of the plot gives some basic 1368 information about the date range and depth range shown, the extreme values, and the mean and 1369 rms values. It is possible to zoom in using a drag-box. You may also zoom in or out using the 1370 mouse wheel. 1371 1372 The bottom part of the window controls what is visible in the plot above. There are two bars 1373 which select the level range plotted (for profile data). The other bars below select the date 1374 range shown. The bottom of the figure allows the option to plot the mean, root mean square, 1375 standard deviation or mean square values. As mentioned above you can choose to plot the 1376 observation value, the model background value or observation minus background value. The next 1377 group of radio buttons selects the map projection. This can either be regular latitude 1378 longitude grid, or north or south polar stereographic. The next group of radio buttons will 1379 plot bad observations, switch to salinity and plot density for profile observations. The 1380 rightmost group of buttons will print the plot window as a postscript, save it as png, or exit 1381 from dataplot. 1339 This is split into three parts. 1340 At the top there is a menu bar which contains a variety of drop down menus. 1341 Areas - zooms into prespecified regions; 1342 plot - plots the data as a timeseries or a T-S diagram if appropriate; 1343 Find - allows data to be searched; 1344 Config - sets various configuration options. 1345 1346 The middle part is a plot of the geographical location of the observations. 1347 This will plot the observation value, the model background value or observation minus background value depending on 1348 the option selected in the radio button at the bottom of the window. 1349 The plotting colour range can be changed by clicking on the colour bar. 1350 The title of the plot gives some basic information about the date range and depth range shown, 1351 the extreme values, and the mean and rms values. 1352 It is possible to zoom in using a drag-box. 1353 You may also zoom in or out using the mouse wheel. 1354 1355 The bottom part of the window controls what is visible in the plot above. 1356 There are two bars which select the level range plotted (for profile data). 1357 The other bars below select the date range shown. 1358 The bottom of the figure allows the option to plot the mean, root mean square, standard deviation or 1359 mean square values. 1360 As mentioned above you can choose to plot the observation value, the model background value or 1361 observation minus background value. 1362 The next group of radio buttons selects the map projection. 1363 This can either be regular latitude longitude grid, or north or south polar stereographic. 1364 The next group of radio buttons will plot bad observations, switch to salinity and 1365 plot density for profile observations. 1366 The rightmost group of buttons will print the plot window as a postscript, save it as png, or exit from dataplot. 1382 1367 1383 1368 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 1386 1371 \includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main} 1387 1372 \caption{ \protect\label{fig:obsdataplotmain} 1388 Main window of dataplot.}1373 Main window of dataplot.} 1389 1374 \end{center} \end{figure} 1390 1375 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1391 1376 1392 If a profile point is clicked with the mouse button a plot of the observation and background 1393 values asa function of depth (\autoref{fig:obsdataplotprofile}).1377 If a profile point is clicked with the mouse button a plot of the observation and background values as 1378 a function of depth (\autoref{fig:obsdataplotprofile}). 1394 1379 1395 1380 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 1398 1383 \includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof} 1399 1384 \caption{ \protect\label{fig:obsdataplotprofile} 1400 Profile plot from dataplot produced by right clicking on a point in the main window.}1385 Profile plot from dataplot produced by right clicking on a point in the main window.} 1401 1386 \end{center} \end{figure} 1402 1387 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex
r10146 r10354 18 18 The ocean needs six fields as surface boundary condition: 19 19 \begin{itemize} 20 \item the two components of the surface ocean stress $\left( {\tau _u \;,\;\tau _v} \right)$ 21 \item the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ 22 \item the surface freshwater budget $\left( {\textit{emp}} \right)$ 23 \item the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$ 20 \item 21 the two components of the surface ocean stress $\left( {\tau _u \;,\;\tau _v} \right)$ 22 \item 23 the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ 24 \item 25 the surface freshwater budget $\left( {\textit{emp}} \right)$ 26 \item 27 the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$ 24 28 \end{itemize} 25 29 plus an optional field: … … 28 32 \end{itemize} 29 33 30 Five different ways to provide the first six fields to the ocean are available which 31 are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln\_ana}\forcode{ = .true.}), 32 a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a bulk formulae formulation (CORE 33 (\np{ln\_blk\_core}\forcode{ = .true.}), CLIO (\np{ln\_blk\_clio}\forcode{ = .true.}) or MFS 34 \footnote { Note that MFS bulk formulae compute fluxes only for the ocean component} 35 (\np{ln\_blk\_mfs}\forcode{ = .true.}) bulk formulae) and a coupled or mixed forced/coupled formulation 36 (exchanges with a atmospheric model via the OASIS coupler) (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}). 37 When used ($i.e.$ \np{ln\_apr\_dyn}\forcode{ = .true.}), the atmospheric pressure forces both ocean and ice dynamics. 38 39 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter. 40 When the fields are supplied from data files (flux and bulk formulations), the input fields 41 need not be supplied on the model grid. Instead a file of coordinates and weights can 42 be supplied which maps the data from the supplied grid to the model points 43 (so called "Interpolation on the Fly", see \autoref{subsec:SBC_iof}). 34 Five different ways to provide the first six fields to the ocean are available which are controlled by 35 namelist \ngn{namsbc} variables: 36 an analytical formulation (\np{ln\_ana}\forcode{ = .true.}), 37 a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 38 a bulk formulae formulation (CORE (\np{ln\_blk\_core}\forcode{ = .true.}), 39 CLIO (\np{ln\_blk\_clio}\forcode{ = .true.}) or 40 MFS \footnote { Note that MFS bulk formulae compute fluxes only for the ocean component} 41 (\np{ln\_blk\_mfs}\forcode{ = .true.}) bulk formulae) and 42 a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler) 43 (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}). 44 When used ($i.e.$ \np{ln\_apr\_dyn}\forcode{ = .true.}), 45 the atmospheric pressure forces both ocean and ice dynamics. 46 47 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter. 48 When the fields are supplied from data files (flux and bulk formulations), 49 the input fields need not be supplied on the model grid. 50 Instead a file of coordinates and weights can be supplied which maps the data from the supplied grid to 51 the model points (so called "Interpolation on the Fly", see \autoref{subsec:SBC_iof}). 44 52 If the Interpolation on the Fly option is used, input data belonging to land points (in the native grid), 45 can be masked to avoid spurious results in proximity of the coasts as large sea-land gradients characterize46 most of the atmospheric variables.47 48 In addition, the resulting fields can be further modified using several namelist options. 53 can be masked to avoid spurious results in proximity of the coasts as 54 large sea-land gradients characterize most of the atmospheric variables. 55 56 In addition, the resulting fields can be further modified using several namelist options. 49 57 These options control 50 58 \begin{itemize} 51 \item the rotation of vector components supplied relative to an east-north 52 coordinate system onto the local grid directions in the model ; 53 \item the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}) ; 54 \item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn\_ice}\forcode{ = 0..3}) ; 55 \item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}) ; 56 \item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ; 57 \item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}\forcode{ = 0..2}) ; 58 \item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln\_dm2dc}\forcode{ = .true.}) ; 59 and a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}). 59 \item 60 the rotation of vector components supplied relative to an east-north coordinate system onto 61 the local grid directions in the model; 62 \item 63 the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}); 64 \item 65 the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) 66 (\np{nn\_ice}\forcode{ = 0..3}); 67 \item 68 the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}); 69 \item 70 the addition of isf melting as lateral inflow (parameterisation) or 71 as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ; 72 \item 73 the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 74 (\np{nn\_fwb}\forcode{ = 0..2}); 75 \item 76 the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle 77 (\np{ln\_dm2dc}\forcode{ = .true.}); 78 and a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}). 60 79 \end{itemize} 61 80 The latter option is possible only in case core or mfs bulk formulas are selected. 62 81 63 In this chapter, we first discuss where the surface boundary condition appears in the 64 model equations.Then we present the five ways of providing the surface boundary condition,82 In this chapter, we first discuss where the surface boundary condition appears in the model equations. 83 Then we present the five ways of providing the surface boundary condition, 65 84 followed by the description of the atmospheric pressure and the river runoff. 66 85 Next the scheme for interpolation on the fly is described. 67 86 Finally, the different options that further modify the fluxes applied to the ocean are discussed. 68 One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), which act as drifting sources of fresh water. 87 One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), 88 which act as drifting sources of fresh water. 69 89 Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 70 90 which provides additional sources of fresh water. … … 77 97 \label{sec:SBC_general} 78 98 79 The surface ocean stress is the stress exerted by the wind and the sea-ice 80 on the ocean. It is applied in \mdl{dynzdf} module as a surface boundary condition of the 81 computation of the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}). 82 As such, it has to be provided as a 2D vector interpolated 83 onto the horizontal velocity ocean mesh, $i.e.$ resolved onto the model 84 (\textbf{i},\textbf{j}) direction at $u$- and $v$-points. 85 86 The surface heat flux is decomposed into two parts, a non solar and a solar heat 87 flux, $Q_{ns}$ and $Q_{sr}$, respectively. The former is the non penetrative part 88 of the heat flux ($i.e.$ the sum of sensible, latent and long wave heat fluxes 89 plus the heat content of the mass exchange with the atmosphere and sea-ice). 90 It is applied in \mdl{trasbc} module as a surface boundary condition trend of 91 the first level temperature time evolution equation (see \autoref{eq:tra_sbc} 92 and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}). 93 The latter is the penetrative part of the heat flux. It is applied as a 3D 94 trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}\forcode{ = .true.}. 95 The way the light penetrates inside the water column is generally a sum of decreasing 96 exponentials (see \autoref{subsec:TRA_qsr}). 99 The surface ocean stress is the stress exerted by the wind and the sea-ice on the ocean. 100 It is applied in \mdl{dynzdf} module as a surface boundary condition of the computation of 101 the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}). 102 As such, it has to be provided as a 2D vector interpolated onto the horizontal velocity ocean mesh, 103 $i.e.$ resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points. 104 105 The surface heat flux is decomposed into two parts, a non solar and a solar heat flux, 106 $Q_{ns}$ and $Q_{sr}$, respectively. 107 The former is the non penetrative part of the heat flux 108 ($i.e.$ the sum of sensible, latent and long wave heat fluxes plus 109 the heat content of the mass exchange with the atmosphere and sea-ice). 110 It is applied in \mdl{trasbc} module as a surface boundary condition trend of 111 the first level temperature time evolution equation 112 (see \autoref{eq:tra_sbc} and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}). 113 The latter is the penetrative part of the heat flux. 114 It is applied as a 3D trends of the temperature equation (\mdl{traqsr} module) when 115 \np{ln\_traqsr}\forcode{ = .true.}. 116 The way the light penetrates inside the water column is generally a sum of decreasing exponentials 117 (see \autoref{subsec:TRA_qsr}). 97 118 98 119 The surface freshwater budget is provided by the \textit{emp} field. 99 It represents the mass flux exchanged with the atmosphere (evaporation minus precipitation) 100 and possibly with the sea-ice and ice shelves (freezing minus melting of ice). 101 It affects both the ocean in two different ways: 102 $(i)$ it changes the volume of the ocean and therefore appears in the sea surface height103 equation asa volume flux, and104 $(ii)$ it changes the surface temperature and salinity through the heat and salt contents105 ofthe mass exchanged with the atmosphere, the sea-ice and the ice shelves.120 It represents the mass flux exchanged with the atmosphere (evaporation minus precipitation) and 121 possibly with the sea-ice and ice shelves (freezing minus melting of ice). 122 It affects both the ocean in two different ways: 123 $(i)$ it changes the volume of the ocean and therefore appears in the sea surface height equation as 124 a volume flux, and 125 $(ii)$ it changes the surface temperature and salinity through the heat and salt contents of 126 the mass exchanged with the atmosphere, the sea-ice and the ice shelves. 106 127 107 128 … … 129 150 %\colorbox{yellow}{End Miss } 130 151 131 The ocean model provides, at each time step, to the surface module (\mdl{sbcmod}) 152 The ocean model provides, at each time step, to the surface module (\mdl{sbcmod}) 132 153 the surface currents, temperature and salinity. 133 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), 134 and it is these averaged fields which are used to computes the surface fluxes 135 at a frequency of \np{nn\_fsbc} time-step. 154 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and 155 it is these averaged fields which are used to computes the surface fluxes at a frequency of \np{nn\_fsbc} time-step. 136 156 137 157 … … 145 165 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 146 166 \end{tabular} 147 \caption{ \protect\label{tab:ssm} 148 Ocean variables provided by the ocean to the surface module (SBC). 149 The variable are averaged over nn{\_}fsbc time step, 150 $i.e.$ the frequency of computation of surface fluxes.}167 \caption{ \protect\label{tab:ssm} 168 Ocean variables provided by the ocean to the surface module (SBC). 169 The variable are averaged over nn{\_}fsbc time step, 170 $i.e.$ the frequency of computation of surface fluxes.} 151 171 \end{center} \end{table} 152 172 %-------------------------------------------------------------------------------------------------------------- … … 161 181 \label{sec:SBC_input} 162 182 163 A generic interface has been introduced to manage the way input data (2D or 3D fields, 164 like surface forcing or ocean T and S) are specify in \NEMO. This task is archieved by \mdl{fldread}. 183 A generic interface has been introduced to manage the way input data 184 (2D or 3D fields, like surface forcing or ocean T and S) are specify in \NEMO. 185 This task is archieved by \mdl{fldread}. 165 186 The module was design with four main objectives in mind: 166 \begin{enumerate} 167 \item optionally provide a time interpolation of the input data at model time-step, 168 whatever their input frequency is, and according to the different calendars available in the model. 169 \item optionally provide an on-the-fly space interpolation from the native input data grid to the model grid. 170 \item make the run duration independent from the period cover by the input files. 171 \item provide a simple user interface and a rather simple developer interface by limiting the 172 number of prerequisite information. 187 \begin{enumerate} 188 \item 189 optionally provide a time interpolation of the input data at model time-step, whatever their input frequency is, 190 and according to the different calendars available in the model. 191 \item 192 optionally provide an on-the-fly space interpolation from the native input data grid to the model grid. 193 \item 194 make the run duration independent from the period cover by the input files. 195 \item 196 provide a simple user interface and a rather simple developer interface by 197 limiting the number of prerequisite information. 173 198 \end{enumerate} 174 199 175 As a results the user have only to fill in for each variable a structure in the namelist file 176 to defined the input data file and variable names, the frequency of the data (in hours or months), 177 whether its is climatological data or not, the period covered by the input file (one year, month, week or day), 178 and three additional parameters for on-the-fly interpolation. When adding a new input variable,179 the developer has to add the associated structure in the namelist, read this information 180 by mirroring the namelist read in \rou{sbc\_blk\_init} for example, and simply call \rou{fld\_read} 181 to obtain the desired input field at the model time-step and grid points.200 As a results the user have only to fill in for each variable a structure in the namelist file to 201 define the input data file and variable names, the frequency of the data (in hours or months), 202 whether its is climatological data or not, the period covered by the input file (one year, month, week or day), 203 and three additional parameters for on-the-fly interpolation. 204 When adding a new input variable, the developer has to add the associated structure in the namelist, 205 read this information by mirroring the namelist read in \rou{sbc\_blk\_init} for example, 206 and simply call \rou{fld\_read} to obtain the desired input field at the model time-step and grid points. 182 207 183 208 The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature 184 (see \autoref{subsec:SBC_fldread}), the period it cover is one year, month, week or day, and, if on-the-fly 185 interpolation is used, a file of weights must be supplied (see \autoref{subsec:SBC_iof}). 186 187 Note that when an input data is archived on a disc which is accessible directly 188 from the workspace where the code is executed, then the use can set the \np{cn\_dir} 189 to the pathway leading to the data. By default, the data are assumed to have been 190 copied so that cn\_dir='./'. 209 (see \autoref{subsec:SBC_fldread}), the period it cover is one year, month, week or day, and, 210 if on-the-fly interpolation is used, a file of weights must be supplied (see \autoref{subsec:SBC_iof}). 211 212 Note that when an input data is archived on a disc which is accessible directly from the workspace where 213 the code is executed, then the use can set the \np{cn\_dir} to the pathway leading to the data. 214 By default, the data are assumed to have been copied so that cn\_dir='./'. 191 215 192 216 % ------------------------------------------------------------------------------------------------------------- … … 203 227 where 204 228 \begin{description} 205 \item[File name]: the stem name of the NetCDF file to be open. 206 This stem will be completed automatically by the model, with the addition of a '.nc' at its end 207 and by date information and possibly a prefix (when using AGRIF). 208 Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to whether 209 it is a climatological file or not, and to the open/close frequency (see below for definition). 229 \item[File name]: 230 the stem name of the NetCDF file to be open. 231 This stem will be completed automatically by the model, with the addition of a '.nc' at its end and 232 by date information and possibly a prefix (when using AGRIF). 233 Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to 234 whether it is a climatological file or not, and to the open/close frequency (see below for definition). 210 235 211 236 %--------------------------------------------------TABLE-------------------------------------------------- … … 219 244 \end{tabular} 220 245 \end{center} 221 \caption{ \protect\label{tab:fldread} naming nomenclature for climatological or interannual input file, 222 as a function of the Open/close frequency. The stem name is assumed to be 'fn'. 223 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week ($i.e.$ 'sun','sat','fri','thu','wed','tue','mon'). The 'YYYY', 'MM' and 'DD' should be replaced by the 224 actual year/month/day, always coded with 4 or 2 digits. Note that (1) in mpp, if the file is split 225 over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', where 'PPPP' is the 226 process number coded with 4 digits; (2) when using AGRIF, the prefix 227 '\_N' is added to files, 228 where 'N' is the child grid number.} 246 \caption{ \protect\label{tab:fldread} 247 naming nomenclature for climatological or interannual input file, as a function of the Open/close frequency. 248 The stem name is assumed to be 'fn'. 249 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week 250 ($i.e.$ 'sun','sat','fri','thu','wed','tue','mon'). 251 The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits. 252 Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 253 where 'PPPP' is the process number coded with 4 digits; 254 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number.} 229 255 \end{table} 230 256 %-------------------------------------------------------------------------------------------------------------- 231 257 232 258 233 \item[Record frequency]: the frequency of the records contained in the input file. 234 Its unit is in hours if it is positive (for example 24 for daily forcing) or in months if negative 235 (for example -1 for monthly forcing or -12 for annual forcing). 236 Note that this frequency must really be an integer and not a real. 237 On some computers, seting it to '24.' can be interpreted as 240! 238 239 \item[Variable name]: the name of the variable to be read in the input NetCDF file. 240 241 \item[Time interpolation]: a logical to activate, or not, the time interpolation. If set to 'false', 242 the forcing will have a steplike shape remaining constant during each forcing period. 243 For example, when using a daily forcing without time interpolation, the forcing remaining 244 constant from 00h00'00'' to 23h59'59". If set to 'true', the forcing will have a broken line shape. 245 Records are assumed to be dated the middle of the forcing period. 246 For example, when using a daily forcing with time interpolation, linear interpolation will 247 be performed between mid-day of two consecutive days. 248 249 \item[Climatological forcing]: a logical to specify if a input file contains climatological forcing 250 which can be cycle in time, or an interannual forcing which will requires additional files 251 if the period covered by the simulation exceed the one of the file. See the above the file 252 naming strategy which impacts the expected name of the file to be opened. 253 254 \item[Open/close frequency]: the frequency at which forcing files must be opened/closed. 255 Four cases are coded: 'daily', 'weekLLL' (with 'LLL' the first 3 letters of the first day of the week), 256 'monthly' and 'yearly' which means the forcing files will contain data for one day, one week, 257 one month or one year. Files are assumed to contain data from the beginning of the open/close period. 258 For example, the first record of a yearly file containing daily data is Jan 1st even if the experiment 259 is not starting at the beginning of the year. 260 261 \item[Others]: 'weights filename', 'pairing rotation' and 'land/sea mask' are associted with on-the-fly interpolation 262 which is described in \autoref{subsec:SBC_iof}. 259 \item[Record frequency]: 260 the frequency of the records contained in the input file. 261 Its unit is in hours if it is positive (for example 24 for daily forcing) or in months if negative 262 (for example -1 for monthly forcing or -12 for annual forcing). 263 Note that this frequency must really be an integer and not a real. 264 On some computers, seting it to '24.' can be interpreted as 240! 265 266 \item[Variable name]: 267 the name of the variable to be read in the input NetCDF file. 268 269 \item[Time interpolation]: 270 a logical to activate, or not, the time interpolation. 271 If set to 'false', the forcing will have a steplike shape remaining constant during each forcing period. 272 For example, when using a daily forcing without time interpolation, the forcing remaining constant from 273 00h00'00'' to 23h59'59". 274 If set to 'true', the forcing will have a broken line shape. 275 Records are assumed to be dated the middle of the forcing period. 276 For example, when using a daily forcing with time interpolation, 277 linear interpolation will be performed between mid-day of two consecutive days. 278 279 \item[Climatological forcing]: 280 a logical to specify if a input file contains climatological forcing which can be cycle in time, 281 or an interannual forcing which will requires additional files if 282 the period covered by the simulation exceed the one of the file. 283 See the above the file naming strategy which impacts the expected name of the file to be opened. 284 285 \item[Open/close frequency]: 286 the frequency at which forcing files must be opened/closed. 287 Four cases are coded: 288 'daily', 'weekLLL' (with 'LLL' the first 3 letters of the first day of the week), 'monthly' and 'yearly' which 289 means the forcing files will contain data for one day, one week, one month or one year. 290 Files are assumed to contain data from the beginning of the open/close period. 291 For example, the first record of a yearly file containing daily data is Jan 1st even if 292 the experiment is not starting at the beginning of the year. 293 294 \item[Others]: 295 'weights filename', 'pairing rotation' and 'land/sea mask' are associated with 296 on-the-fly interpolation which is described in \autoref{subsec:SBC_iof}. 263 297 264 298 \end{description} 265 299 266 300 Additional remarks:\\ 267 (1) The time interpolation is a simple linear interpolation between two consecutive records of 268 the input data. The only tricky point is therefore to specify the date at which we need to do 269 the interpolation and the date of the records read in the input files.270 Following \citet{Leclair_Madec_OM09}, the date of a time step is set at the middle of the 271 time step. For example, for an experiment starting at 0h00'00" with a one hour time-step, 301 (1) The time interpolation is a simple linear interpolation between two consecutive records of the input data. 302 The only tricky point is therefore to specify the date at which we need to do the interpolation and 303 the date of the records read in the input files. 304 Following \citet{Leclair_Madec_OM09}, the date of a time step is set at the middle of the time step. 305 For example, for an experiment starting at 0h00'00" with a one hour time-step, 272 306 a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 273 However, for forcing data related to the surface module, values are not needed at every274 time-step but at every \np{nn\_fsbc} time-step. For example with \np{nn\_fsbc}\forcode{ = 3}, 275 the surface module will be called at time-steps 1, 4, 7, etc. The date used for the time interpolation 276 is thus redefined to be at the middle of \np{nn\_fsbc} time-step period. In the previous example, 277 this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\278 (2) For code readablility and maintenance issues, we don't take into account the NetCDF input file 279 calendar. The calendar associated with the forcing field is build according to the information 280 provided by user in the record frequency, the open/close frequency and the type of temporal interpolation. 281 For example, the first record of a yearly file containing daily data that will be interpolated in time 282 is assumed tobe start Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\283 (3) If a time interpolation is requested, the code will pick up the needed data in the previous (next) file 284 when interpolating data with the first (last) record of the open/close period. 307 However, for forcing data related to the surface module, 308 values are not needed at every time-step but at every \np{nn\_fsbc} time-step. 309 For example with \np{nn\_fsbc}\forcode{ = 3}, the surface module will be called at time-steps 1, 4, 7, etc. 310 The date used for the time interpolation is thus redefined to be at the middle of \np{nn\_fsbc} time-step period. 311 In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 312 (2) For code readablility and maintenance issues, we don't take into account the NetCDF input file calendar. 313 The calendar associated with the forcing field is build according to the information provided by 314 user in the record frequency, the open/close frequency and the type of temporal interpolation. 315 For example, the first record of a yearly file containing daily data that will be interpolated in time is assumed to 316 be start Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\ 317 (3) If a time interpolation is requested, the code will pick up the needed data in the previous (next) file when 318 interpolating data with the first (last) record of the open/close period. 285 319 For example, if the input file specifications are ''yearly, containing daily data to be interpolated in time'', 286 the values given by the code between 00h00'00" and 11h59'59" on Jan 1st will be interpolated values 287 between Dec 31st 12h00'00" and Jan 1st 12h00'00". If the forcing is climatological, Dec and Jan will 288 be keep-up from the same year. However, if the forcing is not climatological, at the end of the 289 open/close period the code will automatically close the current file and open the next one. 290 Note that, if the experiment is starting (ending) at the beginning (end) of an open/close period 291 we do accept that the previous (next) file is not existing. In this case, the time interpolation 292 will be performed between two identical values. For example, when starting an experiment on 293 Jan 1st of year Y with yearly files and daily data to be interpolated, we do accept that the file 294 related to year Y-1 is not existing. The value of Jan 1st will be used as the missing one for 295 Dec 31st of year Y-1. If the file of year Y-1 exists, the code will read its last record. 296 Therefore, this file can contain only one record corresponding to Dec 31st, a useful feature for 297 user considering that it is too heavy to manipulate the complete file for year Y-1. 320 the values given by the code between 00h00'00" and 11h59'59" on Jan 1st will be interpolated values between 321 Dec 31st 12h00'00" and Jan 1st 12h00'00". 322 If the forcing is climatological, Dec and Jan will be keep-up from the same year. 323 However, if the forcing is not climatological, at the end of 324 the open/close period the code will automatically close the current file and open the next one. 325 Note that, if the experiment is starting (ending) at the beginning (end) of 326 an open/close period we do accept that the previous (next) file is not existing. 327 In this case, the time interpolation will be performed between two identical values. 328 For example, when starting an experiment on Jan 1st of year Y with yearly files and daily data to be interpolated, 329 we do accept that the file related to year Y-1 is not existing. 330 The value of Jan 1st will be used as the missing one for Dec 31st of year Y-1. 331 If the file of year Y-1 exists, the code will read its last record. 332 Therefore, this file can contain only one record corresponding to Dec 31st, 333 a useful feature for user considering that it is too heavy to manipulate the complete file for year Y-1. 298 334 299 335 … … 304 340 \label{subsec:SBC_iof} 305 341 306 Interpolation on the Fly allows the user to supply input files required 307 for the surface forcing on grids other than the model grid. 308 To do this he or she must supply, in addition to the source data file, 309 a file of weights to be used to interpolate from the data grid to the model grid. 310 The original development of this code used the SCRIP package (freely available 311 \href{http://climate.lanl.gov/Software/SCRIP}{here} under a copyright agreement). 312 In principle, any package can be used to generate the weights, but the 313 variables in the input weights file must have the same names and meanings as 314 assumed by the model. 342 Interpolation on the Fly allows the user to supply input files required for the surface forcing on 343 grids other than the model grid. 344 To do this he or she must supply, in addition to the source data file, a file of weights to be used to 345 interpolate from the data grid to the model grid. 346 The original development of this code used the SCRIP package 347 (freely available \href{http://climate.lanl.gov/Software/SCRIP}{here} under a copyright agreement). 348 In principle, any package can be used to generate the weights, but the variables in 349 the input weights file must have the same names and meanings as assumed by the model. 315 350 Two methods are currently available: bilinear and bicubic interpolation. 316 Prior to the interpolation, providing a land/sea mask file, the user can decide to 317 remove land points from the input file and substitute the corresponding values 318 with the average of the 8 neighbouring points in the native external grid. 319 Only "sea points" are considered for the averaging. The land/sea mask file must 320 be provided in the structure associated with the input variable. 321 The netcdf land/sea mask variable name must be 'LSM' it must have the same 322 horizontal and vertical dimensions of the associated variable and should 323 be equal to 1 over land and 0 elsewhere. 324 The procedure can be recursively applied setting nn\_lsm > 1 in namsbc namelist. 351 Prior to the interpolation, providing a land/sea mask file, the user can decide to remove land points from 352 the input file and substitute the corresponding values with the average of the 8 neighbouring points in 353 the native external grid. 354 Only "sea points" are considered for the averaging. 355 The land/sea mask file must be provided in the structure associated with the input variable. 356 The netcdf land/sea mask variable name must be 'LSM' it must have the same horizontal and vertical dimensions of 357 the associated variable and should be equal to 1 over land and 0 elsewhere. 358 The procedure can be recursively applied setting nn\_lsm > 1 in namsbc namelist. 325 359 Note that nn\_lsm=0 forces the code to not apply the procedure even if a file for land/sea mask is supplied. 326 360 … … 328 362 \label{subsec:SBC_iof_bilinear} 329 363 330 The input weights file in this case has two sets of variables: src01, src02,331 src0 3, src04 and wgt01, wgt02, wgt03, wgt04.332 The "src" variables correspond to the point in the input grid to which the weight 333 "wgt" is to be applied. Each src value is an integer corresponding to the index of a 334 point in the input grid when written as a one dimensional array. For example, for an input grid 335 of size 5x10, point (3,2) is referenced as point 8, since (2-1)*5+3=8.364 The input weights file in this case has two sets of variables: 365 src01, src02, src03, src04 and wgt01, wgt02, wgt03, wgt04. 366 The "src" variables correspond to the point in the input grid to which the weight "wgt" is to be applied. 367 Each src value is an integer corresponding to the index of a point in the input grid when 368 written as a one dimensional array. 369 For example, for an input grid of size 5x10, point (3,2) is referenced as point 8, since (2-1)*5+3=8. 336 370 There are four of each variable because bilinear interpolation uses the four points defining 337 371 the grid box containing the point to be interpolated. 338 All of these arrays are on the model grid, so that values src01(i,j) and 339 wgt01(i,j) are used togenerate a value for point (i,j) in the model.372 All of these arrays are on the model grid, so that values src01(i,j) and wgt01(i,j) are used to 373 generate a value for point (i,j) in the model. 340 374 341 375 Symbolically, the algorithm used is: 342 343 376 \begin{equation} 344 377 f_{m}(i,j) = f_{m}(i,j) + \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))} … … 361 394 \end{split} 362 395 \end{equation*} 363 The gradients here are taken with respect to the horizontal indices and not distances since the spatial dependency has been absorbed into the weights. 396 The gradients here are taken with respect to the horizontal indices and not distances since 397 the spatial dependency has been absorbed into the weights. 364 398 365 399 \subsubsection{Implementation} 366 400 \label{subsec:SBC_iof_imp} 367 401 368 To activate this option, a non-empty string should be supplied in the weights filename column 369 of the relevant namelist; if this is left as an empty string no action is taken. 370 In the model, weights files are read in and stored in a structured type (WGT) in the fldread 371 module, as and when they are first required. 372 This initialisation procedure determines whether the input data grid should be treated 373 as cyclical or not by inspecting a global attribute stored in the weights input file. 402 To activate this option, a non-empty string should be supplied in 403 the weights filename column of the relevant namelist; 404 if this is left as an empty string no action is taken. 405 In the model, weights files are read in and stored in a structured type (WGT) in the fldread module, 406 as and when they are first required. 407 This initialisation procedure determines whether the input data grid should be treated as cyclical or not by 408 inspecting a global attribute stored in the weights input file. 374 409 This attribute must be called "ew\_wrap" and be of integer type. 375 410 If it is negative, the input non-model grid is assumed not to be cyclic. … … 378 413 if longitudes are 0.5, 2.5, .... , 358.5, 360.5, 362.5, ew\_wrap should be 2. 379 414 If the model does not find attribute ew\_wrap, then a value of -999 is assumed. 380 In this case the \rou{fld\_read} routine defaults ew\_wrap to value 0 and therefore the grid381 is assumed to be cyclic with no overlapping columns.415 In this case the \rou{fld\_read} routine defaults ew\_wrap to value 0 and 416 therefore the grid is assumed to be cyclic with no overlapping columns. 382 417 (In fact this only matters when bicubic interpolation is required.) 383 Note that no testing is done to check the validity in the model, since there is no way384 of knowing the name used for the longitude variable,418 Note that no testing is done to check the validity in the model, 419 since there is no way of knowing the name used for the longitude variable, 385 420 so it is up to the user to make sure his or her data is correctly represented. 386 421 387 422 Next the routine reads in the weights. 388 Bicubic interpolation is assumed if it finds a variable with name "src05", otherwise 389 bilinear interpolation is used. The WGT structure includes dynamic arrays both for 390 the storage of the weights (on the model grid), and when required, for reading in 391 the variable to be interpolated (on the input data grid). 392 The size of the input data array is determined by examining the values in the "src" 393 arrays to find the minimum and maximum i and j values required. 394 Since bicubic interpolation requires the calculation of gradients at each point on the grid, 423 Bicubic interpolation is assumed if it finds a variable with name "src05", otherwise bilinear interpolation is used. 424 The WGT structure includes dynamic arrays both for the storage of the weights (on the model grid), 425 and when required, for reading in the variable to be interpolated (on the input data grid). 426 The size of the input data array is determined by examining the values in the "src" arrays to 427 find the minimum and maximum i and j values required. 428 Since bicubic interpolation requires the calculation of gradients at each point on the grid, 395 429 the corresponding arrays are dimensioned with a halo of width one grid point all the way around. 396 When the array of points from the data file is adjacent to an edge of the data grid, 397 the halo is either a copy of the row/column next to it (non-cyclical case), or is a copy398 o f one from the first few columns on the opposite side of the grid (cyclical case).430 When the array of points from the data file is adjacent to an edge of the data grid, 431 the halo is either a copy of the row/column next to it (non-cyclical case), 432 or is a copy of one from the first few columns on the opposite side of the grid (cyclical case). 399 433 400 434 \subsubsection{Limitations} … … 402 436 403 437 \begin{enumerate} 404 \item The case where input data grids are not logically rectangular has not been tested. 405 \item This code is not guaranteed to produce positive definite answers from positive definite inputs 406 when a bicubic interpolation method is used. 407 \item The cyclic condition is only applied on left and right columns, and not to top and bottom rows. 408 \item The gradients across the ends of a cyclical grid assume that the grid spacing between 409 the two columns involved are consistent with the weights used. 410 \item Neither interpolation scheme is conservative. (There is a conservative scheme available 411 in SCRIP, but this has not been implemented.) 438 \item 439 The case where input data grids are not logically rectangular has not been tested. 440 \item 441 This code is not guaranteed to produce positive definite answers from positive definite inputs when 442 a bicubic interpolation method is used. 443 \item 444 The cyclic condition is only applied on left and right columns, and not to top and bottom rows. 445 \item 446 The gradients across the ends of a cyclical grid assume that the grid spacing between 447 the two columns involved are consistent with the weights used. 448 \item 449 Neither interpolation scheme is conservative. (There is a conservative scheme available in SCRIP, 450 but this has not been implemented.) 412 451 \end{enumerate} 413 452 … … 416 455 417 456 % to be completed 418 A set of utilities to create a weights file for a rectilinear input grid is available 457 A set of utilities to create a weights file for a rectilinear input grid is available 419 458 (see the directory NEMOGCM/TOOLS/WEIGHTS). 420 459 … … 430 469 %-------------------------------------------------------------------------------------------------------------- 431 470 432 In some circumstances it may be useful to avoid calculating the 3D temperature, salinity and velocity fields433 and simply read them in from a previous run or receive them from OASIS.471 In some circumstances it may be useful to avoid calculating the 3D temperature, 472 salinity and velocity fields and simply read them in from a previous run or receive them from OASIS. 434 473 For example: 435 474 436 475 \begin{itemize} 437 \item Multiple runs of the model are required in code development to see the effect of different algorithms in 438 the bulk formulae. 439 \item The effect of different parameter sets in the ice model is to be examined. 440 \item Development of sea-ice algorithms or parameterizations. 441 \item spinup of the iceberg floats 442 \item ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}\forcode{ = .true.}) 476 \item 477 Multiple runs of the model are required in code development to 478 see the effect of different algorithms in the bulk formulae. 479 \item 480 The effect of different parameter sets in the ice model is to be examined. 481 \item 482 Development of sea-ice algorithms or parameterizations. 483 \item 484 Spinup of the iceberg floats 485 \item 486 Ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}\forcode{ = .true.}) 443 487 \end{itemize} 444 488 … … 446 490 Its options are defined through the \ngn{namsbc\_sas} namelist variables. 447 491 A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM. 448 However no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0) 492 However no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0). 449 493 In this configuration, a few routines in the standard model are overriden by new versions. 450 494 Routines replaced are: 451 495 452 496 \begin{itemize} 453 \item \mdl{nemogcm} : This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}) 454 Since the ocean state is not calculated all associated initialisations have been removed. 455 \item \mdl{step} : The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 456 \item \mdl{sbcmod} : This has been cut down and now only calculates surface forcing and the ice model required. New surface modules 457 that can function when only the surface level of the ocean state is defined can also be added (e.g. icebergs). 458 \item \mdl{daymod} : No ocean restarts are read or written (though the ice model restarts are retained), so calls to restart functions 459 have been removed. This also means that the calendar cannot be controlled by time in a restart file, so the user 460 must make sure that nn{\_}date0 in the model namelist is correct for his or her purposes. 461 \item \mdl{stpctl} : Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 462 \item \mdl{diawri} : All 3D data have been removed from the output. The surface temperature, salinity and velocity components (which 463 have been read in) are written along with relevant forcing and ice data. 497 \item 498 \mdl{nemogcm}: 499 This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}). 500 Since the ocean state is not calculated all associated initialisations have been removed. 501 \item 502 \mdl{step}: 503 The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 504 \item 505 \mdl{sbcmod}: 506 This has been cut down and now only calculates surface forcing and the ice model required. 507 New surface modules that can function when only the surface level of the ocean state is defined can also be added 508 (e.g. icebergs). 509 \item 510 \mdl{daymod}: 511 No ocean restarts are read or written (though the ice model restarts are retained), 512 so calls to restart functions have been removed. 513 This also means that the calendar cannot be controlled by time in a restart file, 514 so the user must make sure that nn{\_}date0 in the model namelist is correct for his or her purposes. 515 \item 516 \mdl{stpctl}: 517 Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 518 \item 519 \mdl{diawri}: 520 All 3D data have been removed from the output. 521 The surface temperature, salinity and velocity components (which have been read in) are written along with 522 relevant forcing and ice data. 464 523 \end{itemize} 465 524 … … 467 526 468 527 \begin{itemize} 469 \item \mdl{sbcsas} : This module initialises the input files needed for reading temperature, salinity and velocity arrays at the surface. 470 These filenames are supplied in namelist namsbc{\_}sas. Unfortunately because of limitations with the \mdl{iom} module, 471 the full 3D fields from the mean files have to be read in and interpolated in time, before using just the top level. 472 Since fldread is used to read in the data, Interpolation on the Fly may be used to change input data resolution. 528 \item 529 \mdl{sbcsas}: 530 This module initialises the input files needed for reading temperature, salinity and 531 velocity arrays at the surface. 532 These filenames are supplied in namelist namsbc{\_}sas. 533 Unfortunately because of limitations with the \mdl{iom} module, 534 the full 3D fields from the mean files have to be read in and interpolated in time, 535 before using just the top level. 536 Since fldread is used to read in the data, Interpolation on the Fly may be used to change input data resolution. 473 537 \end{itemize} 474 538 … … 492 556 493 557 The analytical formulation of the surface boundary condition is the default scheme. 494 In this case, all the six fluxes needed by the ocean are assumed to 495 be uniform in space. They take constant values given in the namelist 496 \ngn{namsbc{\_}ana} by the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0}, 497 \np{rn\_qsr0}, and \np{rn\_emp0} ($\textit{emp}=\textit{emp}_S$). The runoff is set to zero. 498 In addition, the wind is allowed to reach its nominal value within a given number 499 of time steps (\np{nn\_tau000}).500 501 If a user wants to apply a different analytical forcing, the \mdl{sbcana}502 module can be modified to use another scheme. As an example, 503 the \mdl{sbc\_ana\_gyre} routine provides the analytical forcing for the 504 GYRE configuration(see GYRE configuration manual, in preparation).558 In this case, all the six fluxes needed by the ocean are assumed to be uniform in space. 559 They take constant values given in the namelist \ngn{namsbc{\_}ana} by 560 the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0}, \np{rn\_qsr0}, and \np{rn\_emp0} 561 ($\textit{emp}=\textit{emp}_S$). 562 The runoff is set to zero. 563 In addition, the wind is allowed to reach its nominal value within a given number of time steps (\np{nn\_tau000}). 564 565 If a user wants to apply a different analytical forcing, 566 the \mdl{sbcana} module can be modified to use another scheme. 567 As an example, the \mdl{sbc\_ana\_gyre} routine provides the analytical forcing for the GYRE configuration 568 (see GYRE configuration manual, in preparation). 505 569 506 570 … … 515 579 %------------------------------------------------------------------------------------------------------------- 516 580 517 In the flux formulation (\np{ln\_flx}\forcode{ = .true.}), the surface boundary 518 condition fields are directly read from input files. The user has to define 519 in the namelist \ngn{namsbc{\_}flx} the name of the file, the name of the variable 520 read in the file, the time frequency at which it is given (in hours), and a logical 521 setting whether a time interpolation to the model time step is required 522 for this field. See \autoref{subsec:SBC_fldread} for a more detailed description of the parameters. 523 524 Note that in general, a flux formulation is used in associated with a 525 restoring term to observed SST and/or SSS. See \autoref{subsec:SBC_ssr} for its 526 specification. 581 In the flux formulation (\np{ln\_flx}\forcode{ = .true.}), 582 the surface boundary condition fields are directly read from input files. 583 The user has to define in the namelist \ngn{namsbc{\_}flx} the name of the file, 584 the name of the variable read in the file, the time frequency at which it is given (in hours), 585 and a logical setting whether a time interpolation to the model time step is required for this field. 586 See \autoref{subsec:SBC_fldread} for a more detailed description of the parameters. 587 588 Note that in general, a flux formulation is used in associated with a restoring term to observed SST and/or SSS. 589 See \autoref{subsec:SBC_ssr} for its specification. 527 590 528 591 … … 534 597 \label{sec:SBC_blk} 535 598 536 In the bulk formulation, the surface boundary condition fields are computed 537 using bulk formulae and atmospheric fields and ocean (and ice) variables. 538 539 The atmospheric fields used depend on the bulk formulae used. Three bulk formulations 540 are available : the CORE, the CLIO and the MFS bulk formulea. The choice is made by setting to true 541 one of the following namelist variable : \np{ln\_core} ; \np{ln\_clio} or \np{ln\_mfs}. 542 543 Note : in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used. 544 Therefore the two bulk (CLIO and CORE) formulea include the computation of the fluxes over both 545 an ocean and an ice surface. 599 In the bulk formulation, the surface boundary condition fields are computed using bulk formulae and atmospheric fields and ocean (and ice) variables. 600 601 The atmospheric fields used depend on the bulk formulae used. 602 Three bulk formulations are available: 603 the CORE, the CLIO and the MFS bulk formulea. 604 The choice is made by setting to true one of the following namelist variable: 605 \np{ln\_core} ; \np{ln\_clio} or \np{ln\_mfs}. 606 607 Note: 608 in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used. 609 Therefore the two bulk (CLIO and CORE) formulea include the computation of the fluxes over 610 both an ocean and an ice surface. 546 611 547 612 % ------------------------------------------------------------------------------------------------------------- … … 555 620 %------------------------------------------------------------------------------------------------------------- 556 621 557 The CORE bulk formulae have been developed by \citet{Large_Yeager_Rep04}. 558 They have been designed to handle the CORE forcing, a mixture of NCEP 559 reanalysis and satellite data. They use an inertial dissipative method to compute 560 the turbulent transfer coefficients (momentum, sensible heat and evaporation) 561 from the 10 metre wind speed, air temperature and specific humidity. 562 This \citet{Large_Yeager_Rep04} dataset is available through the 563 \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 564 565 Note that substituting ERA40 to NCEP reanalysis fields 566 does not require changes in the bulk formulea themself. 567 This is the so-called DRAKKAR Forcing Set (DFS) \citep{Brodeau_al_OM09}. 622 The CORE bulk formulae have been developed by \citet{Large_Yeager_Rep04}. 623 They have been designed to handle the CORE forcing, a mixture of NCEP reanalysis and satellite data. 624 They use an inertial dissipative method to compute the turbulent transfer coefficients 625 (momentum, sensible heat and evaporation) from the 10 metre wind speed, air temperature and specific humidity. 626 This \citet{Large_Yeager_Rep04} dataset is available through 627 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 628 629 Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 630 This is the so-called DRAKKAR Forcing Set (DFS) \citep{Brodeau_al_OM09}. 568 631 569 632 Options are defined through the \ngn{namsbc\_core} namelist variables. … … 589 652 %-------------------------------------------------------------------------------------------------------------- 590 653 591 Note that the air velocity is provided at a tracer ocean point, not at a velocity ocean 592 point ($u$- and $v$-points). It is simpler and faster (less fields to be read), 593 but it is not the recommended method when the ocean grid size is the same 594 or larger than the one of the input atmospheric fields. 595 596 The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, 597 \np{sn\_prec}, \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields 598 and the way they have to be used (spatial and temporal interpolations). 654 Note that the air velocity is provided at a tracer ocean point, not at a velocity ocean point ($u$- and $v$-points). 655 It is simpler and faster (less fields to be read), but it is not the recommended method when 656 the ocean grid size is the same or larger than the one of the input atmospheric fields. 657 658 The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, \np{sn\_prec}, 659 \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields and the way they have to be used 660 (spatial and temporal interpolations). 599 661 600 662 \np{cn\_dir} is the directory of location of bulk files … … 603 665 \np{rn\_zu}: is the height of wind measurements (m) 604 666 605 Three multiplicative factors are availables 606 \np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget 607 byincreasing/reducing the precipitations (total and snow) and or evaporation, respectively.608 The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account 609 in the calculation of surface wind stress. Its range should be between zero and one, 610 and it is recommended to set it to 0.667 Three multiplicative factors are availables: 668 \np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget by 669 increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 670 The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in 671 the calculation of surface wind stress. 672 Its range should be between zero and one, and it is recommended to set it to 0. 611 673 612 674 % ------------------------------------------------------------------------------------------------------------- … … 620 682 %------------------------------------------------------------------------------------------------------------- 621 683 622 The CLIO bulk formulae were developed several years ago for the 623 Louvain-la-neuve coupled ice-ocean model(CLIO, \cite{Goosse_al_JGR99}).624 They are simpler bulk formulae. They assume the stress to be known and625 compute the radiative fluxes from a climatological cloud cover.684 The CLIO bulk formulae were developed several years ago for the Louvain-la-neuve coupled ice-ocean model 685 (CLIO, \cite{Goosse_al_JGR99}). 686 They are simpler bulk formulae. 687 They assume the stress to be known and compute the radiative fluxes from a climatological cloud cover. 626 688 627 689 Options are defined through the \ngn{namsbc\_clio} namelist variables. … … 647 709 %-------------------------------------------------------------------------------------------------------------- 648 710 649 As for the flux formulation, information about the input data required by the 650 model is provided in the namsbc\_blk\_core or namsbc\_blk\_clio 651 namelist (see \autoref{subsec:SBC_fldread}). 711 As for the flux formulation, information about the input data required by the model is provided in 712 the namsbc\_blk\_core or namsbc\_blk\_clio namelist (see \autoref{subsec:SBC_fldread}). 652 713 653 714 % ------------------------------------------------------------------------------------------------------------- … … 661 722 %---------------------------------------------------------------------------------------------------------- 662 723 663 The MFS (Mediterranean Forecasting System) bulk formulae have been developed by 664 \citet{Castellari_al_JMS1998}. 665 They have been designed to handle the ECMWF operational data and are currently 666 in use in the MFS operational system \citep{Tonani_al_OS08}, \citep{Oddo_al_OS09}. 724 The MFS (Mediterranean Forecasting System) bulk formulae have been developed by \citet{Castellari_al_JMS1998}. 725 They have been designed to handle the ECMWF operational data and are currently in use in 726 the MFS operational system \citep{Tonani_al_OS08}, \citep{Oddo_al_OS09}. 667 727 The wind stress computation uses a drag coefficient computed according to \citet{Hellerman_Rosenstein_JPO83}. 668 The surface boundary condition for temperature involves the balance between surface solar radiation, 669 net long-wave radiation, the latent and sensible heat fluxes. 670 Solar radiation is dependent on cloud cover and is computed by means of 671 an astronomical formula \citep{Reed_JPO77}. Albedo monthly values are from \citet{Payne_JAS72} 672 as means of the values at $40^{o}N$ and $30^{o}N$ for the Atlantic Ocean (hence the same latitudinal 673 band of the Mediterranean Sea). The net long-wave radiation flux 674 \citep{Bignami_al_JGR95} is a function of 728 The surface boundary condition for temperature involves the balance between 729 surface solar radiation, net long-wave radiation, the latent and sensible heat fluxes. 730 Solar radiation is dependent on cloud cover and is computed by means of an astronomical formula \citep{Reed_JPO77}. 731 Albedo monthly values are from \citet{Payne_JAS72} as means of the values at $40^{o}N$ and $30^{o}N$ for 732 the Atlantic Ocean (hence the same latitudinal band of the Mediterranean Sea). 733 The net long-wave radiation flux \citep{Bignami_al_JGR95} is a function of 675 734 air temperature, sea-surface temperature, cloud cover and relative humidity. 676 Sensible heat and latent heat fluxes are computed by classical 677 bulk formulae parameterised according to\citet{Kondo1975}.735 Sensible heat and latent heat fluxes are computed by classical bulk formulae parameterised according to 736 \citet{Kondo1975}. 678 737 Details on the bulk formulae used can be found in \citet{Maggiore_al_PCE98} and \citet{Castellari_al_JMS1998}. 679 738 680 Options are defined through the 681 The required 7 input fields must be provided on the model Grid-T and 739 Options are defined through the \ngn{namsbc\_mfs} namelist variables. 740 The required 7 input fields must be provided on the model Grid-T and are: 682 741 \begin{itemize} 683 742 \item Zonal Component of the 10m wind ($ms^{-1}$) (\np{sn\_windi}) … … 700 759 %------------------------------------------------------------------------------------------------------------- 701 760 702 In the coupled formulation of the surface boundary condition, the fluxes are703 provided by the OASIS coupler at a frequency which is defined in the OASIS coupler, 704 while sea and ice surface temperature, ocean and ice albedo, and ocean currents 705 are sent tothe atmospheric component.706 707 A generalised coupled interface has been developed. 708 It is currently interfaced with OASIS-3-MCT (\key{oasis3}). 709 It has been successfully used to interface \NEMO to most of the European atmospheric 710 GCM (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz), 711 as well as to \href{http://wrf-model.org/}{WRF}(Weather Research and Forecasting Model).712 713 Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined. 714 The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are 715 actually recieved bythe ice-ocean system (no calculation of ice sublimation in coupled mode).761 In the coupled formulation of the surface boundary condition, 762 the fluxes are provided by the OASIS coupler at a frequency which is defined in the OASIS coupler, 763 while sea and ice surface temperature, ocean and ice albedo, and ocean currents are sent to 764 the atmospheric component. 765 766 A generalised coupled interface has been developed. 767 It is currently interfaced with OASIS-3-MCT (\key{oasis3}). 768 It has been successfully used to interface \NEMO to most of the European atmospheric GCM 769 (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz), as well as to \href{http://wrf-model.org/}{WRF} 770 (Weather Research and Forecasting Model). 771 772 Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined. 773 The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are actually received by 774 the ice-ocean system (no calculation of ice sublimation in coupled mode). 716 775 When PISCES biogeochemical model (\key{top} and \key{pisces}) is also used in the coupled system, 717 the whole carbon cycle is computed by defining \key{cpl\_carbon\_cycle}. In this case, 718 CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system (and need to be activated in \ngn{namsbc{\_}cpl} ). 719 720 The namelist above allows control of various aspects of the coupling fields (particularly for 721 vectors) and now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 722 and CICE). When indicating a multi-category coupling field in namsbc{\_}cpl the number of categories will be 723 determined by the number used in the sea ice model. In some limited cases it may be possible to specify 724 single category coupling fields even when the sea ice model is running with multiple categories - in this 725 case the user should examine the code to be sure the assumptions made are satisfactory. In cases where 726 this is definitely not possible the model should abort with an error message. The new code has been tested using 727 ECHAM with LIM2, and HadGAM3 with CICE but although it will compile with \key{lim3} additional minor code changes 728 may be required to run using LIM3. 776 the whole carbon cycle is computed by defining \key{cpl\_carbon\_cycle}. 777 In this case, CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system 778 (and need to be activated in \ngn{namsbc{\_}cpl} ). 779 780 The namelist above allows control of various aspects of the coupling fields (particularly for vectors) and 781 now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 and CICE). 782 When indicating a multi-category coupling field in namsbc{\_}cpl the number of categories will be determined by 783 the number used in the sea ice model. 784 In some limited cases it may be possible to specify single category coupling fields even when 785 the sea ice model is running with multiple categories - 786 in this case the user should examine the code to be sure the assumptions made are satisfactory. 787 In cases where this is definitely not possible the model should abort with an error message. 788 The new code has been tested using ECHAM with LIM2, and HadGAM3 with CICE but 789 although it will compile with \key{lim3} additional minor code changes may be required to run using LIM3. 729 790 730 791 … … 739 800 %------------------------------------------------------------------------------------------------------------- 740 801 741 The optional atmospheric pressure can be used to force ocean and ice dynamics 742 (\np{ln\_apr\_dyn}\forcode{ = .true.}, \textit{\ngn{namsbc}} namelist ). 743 The input atmospheric forcing defined via \np{sn\_apr} structure (\textit{namsbc\_apr} namelist) 744 can be interpolated in time to the model time step, and even in space when the 745 interpolation on-the-fly is used. When used to force the dynamics, the atmospheric 746 pressure is further transformed into an equivalent inverse barometer sea surface height, 747 $\eta_{ib}$, using: 802 The optional atmospheric pressure can be used to force ocean and ice dynamics 803 (\np{ln\_apr\_dyn}\forcode{ = .true.}, \textit{\ngn{namsbc}} namelist). 804 The input atmospheric forcing defined via \np{sn\_apr} structure (\textit{namsbc\_apr} namelist) 805 can be interpolated in time to the model time step, and even in space when the interpolation on-the-fly is used. 806 When used to force the dynamics, the atmospheric pressure is further transformed into 807 an equivalent inverse barometer sea surface height, $\eta_{ib}$, using: 748 808 \begin{equation} \label{eq:SBC_ssh_ib} 749 809 \eta_{ib} = - \frac{1}{g\,\rho_o} \left( P_{atm} - P_o \right) 750 810 \end{equation} 751 811 where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 752 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. In this case $P_o$ 753 is set to the value of $P_{atm}$ averaged over the ocean domain, $i.e.$ the mean value of 754 $\eta_{ib}$ is kept to zero at all time step. 755 756 The gradient of $\eta_{ib}$ is added to the RHS of the ocean momentum equation 757 (see \mdl{dynspg} for the ocean). For sea-ice, the sea surface height, $\eta_m$, 758 which is provided to the sea ice model is set to $\eta - \eta_{ib}$ (see \mdl{sbcssr} module). 759 $\eta_{ib}$ can be set in the output. This can simplify altimetry data and model comparison 760 as inverse barometer sea surface height is usually removed from these date prior to their distribution. 761 762 When using time-splitting and BDY package for open boundaries conditions, the equivalent 763 inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 812 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. 813 In this case $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain, 814 $i.e.$ the mean value of $\eta_{ib}$ is kept to zero at all time step. 815 816 The gradient of $\eta_{ib}$ is added to the RHS of the ocean momentum equation (see \mdl{dynspg} for the ocean). 817 For sea-ice, the sea surface height, $\eta_m$, which is provided to the sea ice model is set to $\eta - \eta_{ib}$ 818 (see \mdl{sbcssr} module). 819 $\eta_{ib}$ can be set in the output. 820 This can simplify altimetry data and model comparison as 821 inverse barometer sea surface height is usually removed from these date prior to their distribution. 822 823 When using time-splitting and BDY package for open boundaries conditions, 824 the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 764 825 \np{ln\_apr\_obc} might be set to true. 765 826 … … 775 836 %----------------------------------------------------------------------------------------- 776 837 777 The tidal forcing, generated by the gravity forces of the Earth-Moon and Earth-Sun sytems, is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \np{.true.} in \ngn{nam\_tide}. This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that: 838 The tidal forcing, generated by the gravity forces of the Earth-Moon and Earth-Sun sytems, 839 is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \np{.true.} in \ngn{nam\_tide}. 840 This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that: 778 841 \begin{equation} \label{eq:PE_dyn_tides} 779 842 \frac{\partial {\rm {\bf U}}_h }{\partial t}= ... … … 782 845 where $\Pi_{eq}$ stands for the equilibrium tidal forcing and $\Pi_{sal}$ a self-attraction and loading term (SAL). 783 846 784 The equilibrium tidal forcing is expressed as a sum over the chosen constituents $l$ in \ngn{nam\_tide}. The constituents are defined such that \np{clname(1) = 'M2', clname(2)='S2', etc...}. For the three types of tidal frequencies it reads : \\ 847 The equilibrium tidal forcing is expressed as a sum over the chosen constituents $l$ in \ngn{nam\_tide}. 848 The constituents are defined such that \np{clname(1) = 'M2', clname(2)='S2', etc...}. 849 For the three types of tidal frequencies it reads: \\ 785 850 Long period tides : 786 851 \begin{equation} … … 795 860 \Pi_{eq}(l)=A_{l}(1+k-h)(cos^{2}\phi)cos(\omega_{l}t+2\lambda+V_{l}) 796 861 \end{equation} 797 Here $A_{l}$ is the amplitude, $\omega_{l}$ is the frequency, $\phi$ the latitude, $\lambda$ the longitude, $V_{0l}$ a phase shift with respect to Greenwich meridian and $t$ the time. The Love number factor $(1+k-h)$ is here taken as a constant (0.7). 798 799 The SAL term should in principle be computed online as it depends on the model tidal prediction itself (see \citet{Arbic2004} for a discussion about the practical implementation of this term). Nevertheless, the complex calculations involved would make this computationally too expensive. Here, practical solutions are whether to read complex estimates $\Pi_{sal}(l)$ from an external model (\np{ln\_read\_load=.true.}) or use a ``scalar approximation'' (\np{ln\_scal\_load=.true.}). In the latter case, it reads:\\ 862 Here $A_{l}$ is the amplitude, $\omega_{l}$ is the frequency, $\phi$ the latitude, $\lambda$ the longitude, 863 $V_{0l}$ a phase shift with respect to Greenwich meridian and $t$ the time. 864 The Love number factor $(1+k-h)$ is here taken as a constant (0.7). 865 866 The SAL term should in principle be computed online as it depends on the model tidal prediction itself 867 (see \citet{Arbic2004} for a discussion about the practical implementation of this term). 868 Nevertheless, the complex calculations involved would make this computationally too expensive. 869 Here, practical solutions are whether to read complex estimates $\Pi_{sal}(l)$ from an external model 870 (\np{ln\_read\_load=.true.}) or use a ``scalar approximation'' (\np{ln\_scal\_load=.true.}). 871 In the latter case, it reads:\\ 800 872 \begin{equation} 801 873 \Pi_{sal} = \beta \eta 802 874 \end{equation} 803 where $\beta$ (\np{rn\_scal\_load}, $\approx0.09$) is a spatially constant scalar, often chosen to minimize tidal prediction errors. Setting both \np{ln\_read\_load} and \np{ln\_scal\_load} to false removes the SAL contribution. 875 where $\beta$ (\np{rn\_scal\_load}, $\approx0.09$) is a spatially constant scalar, 876 often chosen to minimize tidal prediction errors. 877 Setting both \np{ln\_read\_load} and \np{ln\_scal\_load} to false removes the SAL contribution. 804 878 805 879 % ================================================================ … … 834 908 River runoff generally enters the ocean at a nonzero depth rather than through the surface. 835 909 Many models, however, have traditionally inserted river runoff to the top model cell. 836 This was the case in \NEMO prior to the version 3.3, and was combined with an option 837 to increase vertical mixing near the river mouth. 838 839 However, with this method numerical and physical problems arise when the top grid cells are 840 of the order of one meter. This situation is common in coastal modelling and is becoming 841 more common in open ocean and climate modelling 842 \footnote{At least a top cells thickness of 1~meter and a 3 hours forcing frequency are 843 required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \autoref{fig:SBC_dcy}.}. 844 845 As such from V~3.3 onwards it is possible to add river runoff through a non-zero depth, and for the 846 temperature and salinity of the river to effect the surrounding ocean. 847 The user is able to specify, in a NetCDF input file, the temperature and salinity of the river, along with the 848 depth (in metres) which the river should be added to. 849 850 Namelist variables in \ngn{namsbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and \np{ln\_rnf\_temp} control whether 851 the river attributes (depth, salinity and temperature) are read in and used. If these are set 852 as false the river is added to the surface box only, assumed to be fresh (0~psu), and/or 853 taken as surface temperature respectively. 910 This was the case in \NEMO prior to the version 3.3, 911 and was combined with an option to increase vertical mixing near the river mouth. 912 913 However, with this method numerical and physical problems arise when the top grid cells are of the order of one meter. 914 This situation is common in coastal modelling and is becoming more common in open ocean and climate modelling 915 \footnote{ 916 At least a top cells thickness of 1~meter and a 3 hours forcing frequency are required to 917 properly represent the diurnal cycle \citep{Bernie_al_JC05}. 918 see also \autoref{fig:SBC_dcy}.}. 919 920 As such from V~3.3 onwards it is possible to add river runoff through a non-zero depth, 921 and for the temperature and salinity of the river to effect the surrounding ocean. 922 The user is able to specify, in a NetCDF input file, the temperature and salinity of the river, 923 along with the depth (in metres) which the river should be added to. 924 925 Namelist variables in \ngn{namsbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and 926 \np{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used. 927 If these are set as false the river is added to the surface box only, assumed to be fresh (0~psu), 928 and/or taken as surface temperature respectively. 854 929 855 930 The runoff value and attributes are read in in sbcrnf. 856 For temperature -999 is taken as missing data and the river temperature is taken to be the857 surface temperatue at the river point.931 For temperature -999 is taken as missing data and the river temperature is taken to 932 be the surface temperatue at the river point. 858 933 For the depth parameter a value of -1 means the river is added to the surface box only, 859 934 and a value of -999 means the river is added through the entire water column. 860 After being read in the temperature and salinity variables are multiplied by the amount of runoff (converted into m/s) 861 to give the heat and salt content of the river runoff. 862 After the user specified depth is read ini, the number of grid boxes this corresponds to is 863 calculated and stored in the variable \np{nz\_rnf}. 864 The variable \textit{h\_dep} is then calculated to be the depth (in metres) of the bottom of the 865 lowest box the river water is being added to (i.e. the total depth that river water is being added to in the model). 866 867 The mass/volume addition due to the river runoff is, at each relevant depth level, added to the horizontal divergence 868 (\textit{hdivn}) in the subroutine \rou{sbc\_rnf\_div} (called from \mdl{divcur}). 935 After being read in the temperature and salinity variables are multiplied by the amount of runoff 936 (converted into m/s) to give the heat and salt content of the river runoff. 937 After the user specified depth is read ini, 938 the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz\_rnf}. 939 The variable \textit{h\_dep} is then calculated to be the depth (in metres) of 940 the bottom of the lowest box the river water is being added to 941 (i.e. the total depth that river water is being added to in the model). 942 943 The mass/volume addition due to the river runoff is, at each relevant depth level, added to 944 the horizontal divergence (\textit{hdivn}) in the subroutine \rou{sbc\_rnf\_div} (called from \mdl{divcur}). 869 945 This increases the diffusion term in the vicinity of the river, thereby simulating a momentum flux. 870 The sea surface height is calculated using the sum of the horizontal divergence terms, and so the871 river runoff indirectly forces an increase in sea surface height.946 The sea surface height is calculated using the sum of the horizontal divergence terms, 947 and so the river runoff indirectly forces an increase in sea surface height. 872 948 873 949 The \textit{hdivn} terms are used in the tracer advection modules to force vertical velocities. 874 This causes a mass of water, equal to the amount of runoff, to be moved into the box above. 875 The heat and salt content of the river runoff is not included in this step, and so the tracer 876 concentrations are diluted as water of ocean temperature and salinity is moved upward out of the box 877 and replaced by the same volume of river water with no corresponding heat and salt addition. 878 879 For the linear free surface case, at the surface box the tracer advection causes a flux of water 880 (of equal volume to the runoff) through the sea surface out of the domain, which causes a salt and heat flux out of the model. 950 This causes a mass of water, equal to the amount of runoff, to be moved into the box above. 951 The heat and salt content of the river runoff is not included in this step, 952 and so the tracer concentrations are diluted as water of ocean temperature and salinity is moved upward out of 953 the box and replaced by the same volume of river water with no corresponding heat and salt addition. 954 955 For the linear free surface case, at the surface box the tracer advection causes a flux of water 956 (of equal volume to the runoff) through the sea surface out of the domain, 957 which causes a salt and heat flux out of the model. 881 958 As such the volume of water does not change, but the water is diluted. 882 959 883 960 For the non-linear free surface case (\key{vvl}), no flux is allowed through the surface. 884 Instead in the surface box (as well as water moving up from the boxes below) a volume of runoff water 885 is added withno corresponding heat and salt addition and so as happens in the lower boxes there is a dilution effect.886 (The runoff addition to the top box along with the water being moved up through boxes below means the surface box has a large887 increase in volume, whilst all other boxes remain the same size)961 Instead in the surface box (as well as water moving up from the boxes below) a volume of runoff water is added with 962 no corresponding heat and salt addition and so as happens in the lower boxes there is a dilution effect. 963 (The runoff addition to the top box along with the water being moved up through 964 boxes below means the surface box has a large increase in volume, whilst all other boxes remain the same size) 888 965 889 966 In trasbc the addition of heat and salt due to the river runoff is added. 890 967 This is done in the same way for both vvl and non-vvl. 891 The temperature and salinity are increased through the specified depth according to the heat and salt content of the river. 892 893 In the non-linear free surface case (vvl), near the end of the time step the change in sea surface height is redistrubuted 894 through the grid boxes, so that the original ratios of grid box heights are restored. 895 In doing this water is moved into boxes below, throughout the water column, so the large volume addition to the surface box is spread between all the grid boxes. 896 897 It is also possible for runnoff to be specified as a negative value for modelling flow through straits, i.e. modelling the Baltic flow in and out of the North Sea. 898 When the flow is out of the domain there is no change in temperature and salinity, regardless of the namelist options used, as the ocean water leaving the domain removes heat and salt (at the same concentration) with it. 968 The temperature and salinity are increased through the specified depth according to 969 the heat and salt content of the river. 970 971 In the non-linear free surface case (vvl), 972 near the end of the time step the change in sea surface height is redistrubuted through the grid boxes, 973 so that the original ratios of grid box heights are restored. 974 In doing this water is moved into boxes below, throughout the water column, 975 so the large volume addition to the surface box is spread between all the grid boxes. 976 977 It is also possible for runnoff to be specified as a negative value for modelling flow through straits, 978 i.e. modelling the Baltic flow in and out of the North Sea. 979 When the flow is out of the domain there is no change in temperature and salinity, 980 regardless of the namelist options used, 981 as the ocean water leaving the domain removes heat and salt (at the same concentration) with it. 899 982 900 983 … … 931 1014 \begin{description} 932 1015 \item[\np{nn\_isf}\forcode{ = 1}] 933 The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed). The fwf and heat flux are computed. 934 Two different bulk formula are available: 1016 The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed). 1017 The fwf and heat flux are computed. 1018 Two different bulk formula are available: 935 1019 \begin{description} 936 1020 \item[\np{nn\_isfblk}\forcode{ = 1}] 937 938 This formulation is based on a balance between the upward ocean heat flux and the latent heat flux at the ice shelf base.939 940 \item[\np{nn\_isfblk}\forcode{ = 2}] 941 942 This formulation is based on a 3 equations formulation (a heat flux budget, a salt flux budget943 1021 The bulk formula used to compute the melt is based the one described in \citet{Hunter2006}. 1022 This formulation is based on a balance between the upward ocean heat flux and 1023 the latent heat flux at the ice shelf base. 1024 \item[\np{nn\_isfblk}\forcode{ = 2}] 1025 The bulk formula used to compute the melt is based the one described in \citet{Jenkins1991}. 1026 This formulation is based on a 3 equations formulation 1027 (a heat flux budget, a salt flux budget and a linearised freezing point temperature equation). 944 1028 \end{description} 945 946 For this 2 bulk formulations, there are 3 different ways to compute the exchange coeficient: 1029 For this 2 bulk formulations, there are 3 different ways to compute the exchange coeficient: 947 1030 \begin{description} 948 \item[\np{nn\_gammablk}\forcode{ = 0}] 949 The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0} 950 1031 \item[\np{nn\_gammablk}\forcode{ = 0}] 1032 The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0} 951 1033 \item[\np{nn\_gammablk}\forcode{ = 1}] 952 The salt and heat exchange coefficients are velocity dependent and defined as \np{rn\_gammas0}$ \times u_{*}$ and \np{rn\_gammat0}$ \times u_{*}$ 953 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters).954 See \citet{Jenkins2010} for all the details on this formulation.955 1034 The salt and heat exchange coefficients are velocity dependent and defined as 1035 \np{rn\_gammas0}$ \times u_{*}$ and \np{rn\_gammat0}$ \times u_{*}$ where 1036 $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 1037 See \citet{Jenkins2010} for all the details on this formulation. 956 1038 \item[\np{nn\_gammablk}\forcode{ = 2}] 957 The salt and heat exchange coefficients are velocity and stability dependent and defined as 958 $\gamma_{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}$959 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters),960 $\Gamma_{Turb}$ the contribution of the ocean stability and961 962 963 964 965 \item[\np{nn\_isf}\forcode{ = 2}] 966 A parameterisation of isf is used. The ice shelf cavity is not represented. 967 The fwf is distributed along the ice shelf edge between the depth of the average grounding line (GL) 968 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}). 969 Furthermore the fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting. 970 The effective melting length (\np{sn\_Leff\_isf}) is read from a file.971 972 \item[\np{nn\_isf}\forcode{ = 3}] 973 A simple parameterisation of isf is used. The ice shelf cavity is not represented. 974 The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 975 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 976 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.977 978 \item[\np{nn\_isf}\forcode{ = 4}] 979 The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed). However, the fwf is not computed but specified from file \np{sn\_fwfisf}). 980 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.\\1039 The salt and heat exchange coefficients are velocity and stability dependent and defined as 1040 $\gamma_{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}$ where 1041 $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters), 1042 $\Gamma_{Turb}$ the contribution of the ocean stability and 1043 $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 1044 See \citet{Holland1999} for all the details on this formulation. 1045 \end{description} 1046 \item[\np{nn\_isf}\forcode{ = 2}] 1047 A parameterisation of isf is used. The ice shelf cavity is not represented. 1048 The fwf is distributed along the ice shelf edge between the depth of the average grounding line (GL) 1049 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 1050 (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}). 1051 Furthermore the fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting. 1052 The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 1053 \item[\np{nn\_isf}\forcode{ = 3}] 1054 A simple parameterisation of isf is used. The ice shelf cavity is not represented. 1055 The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 1056 the depth of the average grounding line (GL) (\np{sn\_depmax\_isf}) and 1057 the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 1058 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 1059 \item[\np{nn\_isf}\forcode{ = 4}] 1060 The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed). 1061 However, the fwf is not computed but specified from file \np{sn\_fwfisf}). 1062 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.\\ 981 1063 \end{description} 982 1064 983 984 $\bullet$ \np{nn\_isf}\forcode{ = 1} and \np{nn\_isf}\forcode{ = 2} compute a melt rate based on the water mass properties, ocean velocities and depth. 985 This flux is thus highly dependent of the model resolution (horizontal and vertical), realism of the water masses onto the shelf ...\\ 986 987 988 $\bullet$ \np{nn\_isf}\forcode{ = 3} and \np{nn\_isf}\forcode{ = 4} read the melt rate from a file. You have total control of the fwf forcing. 989 This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too 990 coarse to have realistic melting or for studies where you need to control your heat and fw input.\\ 991 992 A namelist parameters control over how many meters the heat and fw fluxes are spread. 993 \np{rn\_hisf\_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}. 994 This parameter is only used if \np{nn\_isf}\forcode{ = 1} or \np{nn\_isf}\forcode{ = 4} 1065 $\bullet$ \np{nn\_isf}\forcode{ = 1} and \np{nn\_isf}\forcode{ = 2} compute a melt rate based on 1066 the water mass properties, ocean velocities and depth. 1067 This flux is thus highly dependent of the model resolution (horizontal and vertical), 1068 realism of the water masses onto the shelf ...\\ 1069 1070 $\bullet$ \np{nn\_isf}\forcode{ = 3} and \np{nn\_isf}\forcode{ = 4} read the melt rate from a file. 1071 You have total control of the fwf forcing. 1072 This can be useful if the water masses on the shelf are not realistic or 1073 the resolution (horizontal/vertical) are too coarse to have realistic melting or 1074 for studies where you need to control your heat and fw input.\\ 1075 1076 A namelist parameters control over how many meters the heat and fw fluxes are spread. 1077 \np{rn\_hisf\_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}. 1078 This parameter is only used if \np{nn\_isf}\forcode{ = 1} or \np{nn\_isf}\forcode{ = 4}. 995 1079 996 1080 If \np{rn\_hisf\_tbl}\forcode{ = 0}., the fluxes are put in the top level whatever is its tickness. 997 1081 998 If \np{rn\_hisf\_tbl} $>$ 0., the fluxes are spread over the first \np{rn\_hisf\_tbl} m (ie over one or several cells).\\ 1082 If \np{rn\_hisf\_tbl} $>$ 0., the fluxes are spread over the first \np{rn\_hisf\_tbl} m 1083 (ie over one or several cells).\\ 999 1084 1000 1085 The ice shelf melt is implemented as a volume flux with in the same way as for the runoff. 1001 The fw addition due to the ice shelf melting is, at each relevant depth level, added to the horizontal divergence1002 (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divcur}. 1003 See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction. 1086 The fw addition due to the ice shelf melting is, at each relevant depth level, added to 1087 the horizontal divergence (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divcur}. 1088 See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction. 1004 1089 1005 1090 … … 1010 1095 \nlst{namsbc_iscpl} 1011 1096 %-------------------------------------------------------------------------------------------------------- 1012 Ice sheet/ocean coupling is done through file exchange at the restart step. NEMO, at each restart step,1013 read the bathymetry and ice shelf draft variable in a netcdf file. 1014 If \np{ln\_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step 1015 withpotentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics.1097 Ice sheet/ocean coupling is done through file exchange at the restart step. 1098 NEMO, at each restart step, read the bathymetry and ice shelf draft variable in a netcdf file. 1099 If \np{ln\_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step with 1100 potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 1016 1101 The wetting and drying scheme applied on the restart is very simple and described below for the 6 different cases: 1017 1102 \begin{description} 1018 1103 \item[Thin a cell down:] 1019 T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant ($bt_b=bt_n$). 1104 T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant 1105 ($bt_b=bt_n$). 1020 1106 \item[Enlarge a cell:] 1021 1107 See case "Thin a cell down" 1022 1108 \item[Dry a cell:] 1023 mask, T/S, U/V and ssh are set to 0. Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$). 1109 mask, T/S, U/V and ssh are set to 0. 1110 Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$). 1024 1111 \item[Wet a cell:] 1025 mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. If no neighbours along i,j and k, T/S/U/V and mask are set to 0. 1112 mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. 1113 If no neighbours along i,j and k, T/S/U/V and mask are set to 0. 1026 1114 \item[Dry a column:] 1027 1115 mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0. 1028 1116 \item[Wet a column:] 1029 set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. If no neighbour, T/S/U/V and mask set to 0. 1117 set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. 1118 If no neighbour, T/S/U/V and mask set to 0. 1030 1119 \end{description} 1031 The extrapolation is call \np{nn\_drown} times. It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 1032 the code will be unable to fill all the new wet cells properly. The default number is set up for the MISOMIP idealised experiments.\\ 1033 This coupling procedure is able to take into account grounding line and calving front migration. However, it is a non-conservative processe. 1034 This could lead to a trend in heat/salt content and volume. In order to remove the trend and keep the conservation level as close to 0 as possible, 1035 a simple conservation scheme is available with \np{ln\_hsb}\forcode{ = .true.}. The heat/salt/vol. gain/loss is diagnose, as well as the location. 1036 Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., the heat/salt/vol. gain/loss is removed/added, 1037 over a period of \np{rn\_fiscpl} time step, into the system. 1120 The extrapolation is call \np{nn\_drown} times. 1121 It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 1122 the code will be unable to fill all the new wet cells properly. 1123 The default number is set up for the MISOMIP idealised experiments.\\ 1124 This coupling procedure is able to take into account grounding line and calving front migration. 1125 However, it is a non-conservative processe. 1126 This could lead to a trend in heat/salt content and volume. 1127 In order to remove the trend and keep the conservation level as close to 0 as possible, 1128 a simple conservation scheme is available with \np{ln\_hsb}\forcode{ = .true.}. 1129 The heat/salt/vol. gain/loss is diagnose, as well as the location. 1130 Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., 1131 the heat/salt/vol. gain/loss is removed/added, over a period of \np{rn\_fiscpl} time step, into the system. 1038 1132 So after \np{rn\_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 1039 1133 1040 As the before and now fields are not compatible (modification of the geometry), the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$. 1134 As the before and now fields are not compatible (modification of the geometry), 1135 the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$. 1041 1136 % 1042 1137 % ================================================================ … … 1053 1148 Their physical behaviour is controlled by equations as described in \citet{Martin_Adcroft_OM10} ). 1054 1149 (Note that the authors kindly provided a copy of their code to act as a basis for implementation in NEMO). 1055 Icebergs are initially spawned into one of ten classes which have specific mass and thickness as described1056 in the \ngn{namberg} namelist: 1057 \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 1058 Each class has an associated scaling (\np{rn\_mass\_scaling}), which is an integer representing how many icebergs 1059 of this class are being described as one lagrangian point(this reduces the numerical problem of tracking every single iceberg).1150 Icebergs are initially spawned into one of ten classes which have specific mass and thickness as 1151 described in the \ngn{namberg} namelist: \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 1152 Each class has an associated scaling (\np{rn\_mass\_scaling}), 1153 which is an integer representing how many icebergs of this class are being described as one lagrangian point 1154 (this reduces the numerical problem of tracking every single iceberg). 1060 1155 They are enabled by setting \np{ln\_icebergs}\forcode{ = .true.}. 1061 1156 … … 1063 1158 \begin{description} 1064 1159 \item[\np{nn\_test\_icebergs}~$>$~0] 1065 In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate 1066 (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each 1067 grid point of which an iceberg is generated at the beginning of the run. 1068 (Note that this happens each time the timestep equals \np{nn\_nit000}.)1069 \np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners 1070 ofthe geographical box: lonmin,lonmax,latmin,latmax1160 In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate 1161 (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of 1162 which an iceberg is generated at the beginning of the run. 1163 (Note that this happens each time the timestep equals \np{nn\_nit000}.) 1164 \np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners of 1165 the geographical box: lonmin,lonmax,latmin,latmax 1071 1166 \item[\np{nn\_test\_icebergs}\forcode{ = -1}] 1072 In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter. 1073 This should be a file with a field on the configuration grid (typically ORCA) representing ice accumulation rate at each model point. 1074 These should be ocean points adjacent to land where icebergs are known to calve. 1075 Most points in this input grid are going to have value zero. 1076 When the model runs, ice is accumulated at each grid point which has a non-zero source term. 1077 At each time step, a test is performed to see if there is enough ice mass to calve an iceberg of each class in order (1 to 10). 1078 Note that this is the initial mass multiplied by the number each particle represents ($i.e.$ the scaling). 1079 If there is enough ice, a new iceberg is spawned and the total available ice reduced accordingly. 1167 In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter. 1168 This should be a file with a field on the configuration grid (typically ORCA) 1169 representing ice accumulation rate at each model point. 1170 These should be ocean points adjacent to land where icebergs are known to calve. 1171 Most points in this input grid are going to have value zero. 1172 When the model runs, ice is accumulated at each grid point which has a non-zero source term. 1173 At each time step, a test is performed to see if there is enough ice mass to 1174 calve an iceberg of each class in order (1 to 10). 1175 Note that this is the initial mass multiplied by the number each particle represents ($i.e.$ the scaling). 1176 If there is enough ice, a new iceberg is spawned and the total available ice reduced accordingly. 1080 1177 \end{description} 1081 1178 1082 1179 Icebergs are influenced by wind, waves and currents, bottom melt and erosion. 1083 The latter act to disintegrate the iceberg. This is either all melted freshwater, or 1084 (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 1180 The latter act to disintegrate the iceberg. 1181 This is either all melted freshwater, 1182 or (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 1085 1183 which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 1086 1184 Melt water (and other variables on the configuration grid) are written into the main NEMO model output files. … … 1091 1189 The amount of information is controlled by two integer parameters: 1092 1190 \begin{description} 1093 \item[\np{nn\_verbose\_level}] takes a value between one and four and represents1094 an increasing number of points in the code at which variables are written, and an 1095 increasing level of obscurity.1191 \item[\np{nn\_verbose\_level}] takes a value between one and four and 1192 represents an increasing number of points in the code at which variables are written, 1193 and an increasing level of obscurity. 1096 1194 \item[\np{nn\_verbose\_write}] is the number of timesteps between writes 1097 1195 \end{description} … … 1102 1200 When \key{mpp\_mpi} is defined, each output file contains only those icebergs in the corresponding processor. 1103 1201 Trajectory points are written out in the order of their parent iceberg in the model's "linked list" of icebergs. 1104 So care is needed to recreate data for individual icebergs, since its trajectory data may be spread across1105 multiple files.1202 So care is needed to recreate data for individual icebergs, 1203 since its trajectory data may be spread across multiple files. 1106 1204 1107 1205 … … 1125 1223 \begin{figure}[!t] \begin{center} 1126 1224 \includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 1127 \caption{ \protect\label{fig:SBC_diurnal} 1128 Example of recontruction of the diurnal cycle variation of short wave flux 1129 from daily mean values. The reconstructed diurnal cycle (black line) is chosen 1130 as the mean value of the analytical cycle (blue line) over a time step, not 1131 as the mid time step value of the analytically cycle (red square). From \citet{Bernie_al_CD07}.} 1225 \caption{ \protect\label{fig:SBC_diurnal} 1226 Example of recontruction of the diurnal cycle variation of short wave flux from daily mean values. 1227 The reconstructed diurnal cycle (black line) is chosen as 1228 the mean value of the analytical cycle (blue line) over a time step, 1229 not as the mid time step value of the analytically cycle (red square). 1230 From \citet{Bernie_al_CD07}.} 1132 1231 \end{center} \end{figure} 1133 1232 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1134 1233 1135 \cite{Bernie_al_JC05} have shown that to capture 90$\%$ of the diurnal variability of 1136 SST requires a vertical resolution in upper ocean of 1~m or better and a temporal resolution 1137 of the surface fluxes of 3~h or less. Unfortunately high frequency forcing fields are rare, 1138 not to say inexistent. Nevertheless, it is possible to obtain a reasonable diurnal cycle 1139 of the SST knowning only short wave flux (SWF) at high frequency \citep{Bernie_al_CD07}. 1140 Furthermore, only the knowledge of daily mean value of SWF is needed, 1141 as higher frequency variations can be reconstructed from them, assuming that1142 the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle 1143 of incident SWF. The \cite{Bernie_al_CD07} reconstruction algorithm is available 1144 in \NEMO by setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when using 1145 CORE bulk formulea (\np{ln\_blk\_core}\forcode{ = .true.}) or the flux formulation (\np{ln\_flx}\forcode{ = .true.}). 1146 The reconstruction is performed in the \mdl{sbcdcy} module. The detail of the algoritm used1147 can be found in the appendix~A of \cite{Bernie_al_CD07}. The algorithm preserve the daily 1148 mean incomming SWF as the reconstructed SWF at a given time step is the mean value 1149 of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}). 1150 The use of diurnal cycle reconstruction requires the input SWF to be daily 1234 \cite{Bernie_al_JC05} have shown that to capture 90$\%$ of the diurnal variability of SST requires a vertical resolution in upper ocean of 1~m or better and a temporal resolution of the surface fluxes of 3~h or less. 1235 Unfortunately high frequency forcing fields are rare, not to say inexistent. 1236 Nevertheless, it is possible to obtain a reasonable diurnal cycle of the SST knowning only short wave flux (SWF) at 1237 high frequency \citep{Bernie_al_CD07}. 1238 Furthermore, only the knowledge of daily mean value of SWF is needed, 1239 as higher frequency variations can be reconstructed from them, 1240 assuming that the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle of incident SWF. 1241 The \cite{Bernie_al_CD07} reconstruction algorithm is available in \NEMO by 1242 setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when 1243 using CORE bulk formulea (\np{ln\_blk\_core}\forcode{ = .true.}) or 1244 the flux formulation (\np{ln\_flx}\forcode{ = .true.}). 1245 The reconstruction is performed in the \mdl{sbcdcy} module. 1246 The detail of the algoritm used can be found in the appendix~A of \cite{Bernie_al_CD07}. 1247 The algorithm preserve the daily mean incoming SWF as the reconstructed SWF at 1248 a given time step is the mean value of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}). 1249 The use of diurnal cycle reconstruction requires the input SWF to be daily 1151 1250 ($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 1152 1251 Furthermore, it is recommended to have a least 8 surface module time step per day, 1153 that is $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF1154 is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours 1155 (from 1am to 11pm).1252 that is $\rdt \ nn\_fsbc < 10,800~s = 3~h$. 1253 An example of recontructed SWF is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle, 1254 one every 2~hours (from 1am to 11pm). 1156 1255 1157 1256 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1158 1257 \begin{figure}[!t] \begin{center} 1159 1258 \includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 1160 \caption{ \protect\label{fig:SBC_dcy} 1161 Example of recontruction of the diurnal cycle variation of short wave flux 1162 from daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1163 The display is on (i,j) plane. }1259 \caption{ \protect\label{fig:SBC_dcy} 1260 Example of recontruction of the diurnal cycle variation of short wave flux from 1261 daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1262 The display is on (i,j) plane. } 1164 1263 \end{center} \end{figure} 1165 1264 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1166 1265 1167 Note also that the setting a diurnal cycle in SWF is highly recommended when 1168 the top layer thickness approach 1~m or less, otherwise large error in SST can 1169 appear due to an inconsistency between the scale of the vertical resolution 1170 and the forcing acting on that scale. 1266 Note also that the setting a diurnal cycle in SWF is highly recommended when 1267 the top layer thickness approach 1~m or less, otherwise large error in SST can appear due to 1268 an inconsistency between the scale of the vertical resolution and the forcing acting on that scale. 1171 1269 1172 1270 % ------------------------------------------------------------------------------------------------------------- … … 1176 1274 \label{subsec:SBC_rotation} 1177 1275 1178 When using a flux (\np{ln\_flx}\forcode{ = .true.}) or bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation, 1179 pairs of vector components can be rotated from east-north directions onto the local grid directions. 1180 This is particularly useful when interpolation on the fly is used since here any vectors are likely to be defined 1181 relative to a rectilinear grid. 1276 When using a flux (\np{ln\_flx}\forcode{ = .true.}) or 1277 bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation, 1278 pairs of vector components can be rotated from east-north directions onto the local grid directions. 1279 This is particularly useful when interpolation on the fly is used since here any vectors are likely to 1280 be defined relative to a rectilinear grid. 1182 1281 To activate this option a non-empty string is supplied in the rotation pair column of the relevant namelist. 1183 1282 The eastward component must start with "U" and the northward component with "V". 1184 1283 The remaining characters in the strings are used to identify which pair of components go together. 1185 So for example, strings "U1" and "V1" next to "utau" and "vtau" would pair the wind stress components together 1186 and rotate them on to the model grid directions; "U2" and "V2" could be used against a second pair of components, 1187 and so on.1284 So for example, strings "U1" and "V1" next to "utau" and "vtau" would pair the wind stress components together and 1285 rotate them on to the model grid directions; 1286 "U2" and "V2" could be used against a second pair of components, and so on. 1188 1287 The extra characters used in the strings are arbitrary. 1189 1288 The rot\_rep routine from the \mdl{geo2ocean} module is used to perform the rotation. … … 1199 1298 %------------------------------------------------------------------------------------------------------------- 1200 1299 1201 IOptions are defined through the 1202 n forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a 1203 feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$:1300 IOptions are defined through the \ngn{namsbc\_ssr} namelist variables. 1301 On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 1302 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 1204 1303 \begin{equation} \label{eq:sbc_dmp_q} 1205 1304 Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right) 1206 1305 \end{equation} 1207 where SST is a sea surface temperature field (observed or climatological), $T$ is 1208 the model surface layer temperature and $\frac{dQ}{dT}$ is a negative feedback 1209 coefficient usually taken equal to $-40~W/m^2/K$. For a $50~m$ 1210 mixed-layer depth, this value corresponds to a relaxation time scale of two months. 1211 This term ensures that if $T$ perfectly matches the supplied SST, then $Q$ is 1212 equal to $Q_o$. 1213 1214 In the fresh water budget, a feedback term can also be added. Converted into an 1215 equivalent freshwater flux, it takes the following expression : 1306 where SST is a sea surface temperature field (observed or climatological), 1307 $T$ is the model surface layer temperature and 1308 $\frac{dQ}{dT}$ is a negative feedback coefficient usually taken equal to $-40~W/m^2/K$. 1309 For a $50~m$ mixed-layer depth, this value corresponds to a relaxation time scale of two months. 1310 This term ensures that if $T$ perfectly matches the supplied SST, then $Q$ is equal to $Q_o$. 1311 1312 In the fresh water budget, a feedback term can also be added. 1313 Converted into an equivalent freshwater flux, it takes the following expression : 1216 1314 1217 1315 \begin{equation} \label{eq:sbc_dmp_emp} … … 1220 1318 \end{equation} 1221 1319 1222 where $\textit{emp}_{o }$ is a net surface fresh water flux (observed, climatological or an 1223 atmospheric model product), \textit{SSS}$_{Obs}$ is a sea surface salinity (usually a time 1224 interpolation of the monthly mean Polar Hydrographic Climatology \citep{Steele2001}), 1225 $\left.S\right|_{k=1}$ is the model surface layer salinity and $\gamma_s$ is a negative 1226 feedback coefficient which is provided as a namelist parameter. Unlike heat flux, there is no 1227 physical justification for the feedback term in \autoref{eq:sbc_dmp_emp} as the atmosphere 1228 does not care about ocean surface salinity \citep{Madec1997}. The SSS restoring 1229 term should be viewed as a flux correction on freshwater fluxes to reduce the 1230 uncertainties we have on the observed freshwater budget. 1320 where $\textit{emp}_{o }$ is a net surface fresh water flux 1321 (observed, climatological or an atmospheric model product), 1322 \textit{SSS}$_{Obs}$ is a sea surface salinity 1323 (usually a time interpolation of the monthly mean Polar Hydrographic Climatology \citep{Steele2001}), 1324 $\left.S\right|_{k=1}$ is the model surface layer salinity and 1325 $\gamma_s$ is a negative feedback coefficient which is provided as a namelist parameter. 1326 Unlike heat flux, there is no physical justification for the feedback term in \autoref{eq:sbc_dmp_emp} as 1327 the atmosphere does not care about ocean surface salinity \citep{Madec1997}. 1328 The SSS restoring term should be viewed as a flux correction on freshwater fluxes to 1329 reduce the uncertainties we have on the observed freshwater budget. 1231 1330 1232 1331 % ------------------------------------------------------------------------------------------------------------- … … 1236 1335 \label{subsec:SBC_ice-cover} 1237 1336 1238 The presence at the sea surface of an ice covered area modifies all the fluxes 1239 transmitted to the ocean. There are several way to handle sea-ice in the system 1240 depending on the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist. 1337 The presence at the sea surface of an ice covered area modifies all the fluxes transmitted to the ocean. 1338 There are several way to handle sea-ice in the system depending on 1339 the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist. 1241 1340 \begin{description} 1242 \item[nn{\_}ice = 0] there will never be sea-ice in the computational domain. 1243 This is a typical namelist value used for tropical ocean domain. The surface fluxes 1244 are simply specified for an ice-free ocean. No specific things is done for sea-ice. 1245 \item[nn{\_}ice = 1] sea-ice can exist in the computational domain, but no sea-ice model 1246 is used. An observed ice covered area is read in a file. Below this area, the SST is 1247 restored to the freezing point and the heat fluxes are set to $-4~W/m^2$ ($-2~W/m^2$) 1248 in the northern (southern) hemisphere. The associated modification of the freshwater 1249 fluxes are done in such a way that the change in buoyancy fluxes remains zero. 1250 This prevents deep convection to occur when trying to reach the freezing point 1251 (and so ice covered area condition) while the SSS is too large. This manner of 1252 managing sea-ice area, just by using si IF case, is usually referred as the \textit{ice-if} 1253 model. It can be found in the \mdl{sbcice{\_}if} module. 1254 \item[nn{\_}ice = 2 or more] A full sea ice model is used. This model computes the 1255 ice-ocean fluxes, that are combined with the air-sea fluxes using the ice fraction of 1256 each model cell to provide the surface ocean fluxes. Note that the activation of a 1257 sea-ice model is is done by defining a CPP key (\key{lim3} or \key{cice}). 1258 The activation automatically overwrites the read value of nn{\_}ice to its appropriate 1259 value ($i.e.$ $2$ for LIM-3 or $3$ for CICE). 1341 \item[nn{\_}ice = 0] 1342 there will never be sea-ice in the computational domain. 1343 This is a typical namelist value used for tropical ocean domain. 1344 The surface fluxes are simply specified for an ice-free ocean. 1345 No specific things is done for sea-ice. 1346 \item[nn{\_}ice = 1] 1347 sea-ice can exist in the computational domain, but no sea-ice model is used. 1348 An observed ice covered area is read in a file. 1349 Below this area, the SST is restored to the freezing point and 1350 the heat fluxes are set to $-4~W/m^2$ ($-2~W/m^2$) in the northern (southern) hemisphere. 1351 The associated modification of the freshwater fluxes are done in such a way that 1352 the change in buoyancy fluxes remains zero. 1353 This prevents deep convection to occur when trying to reach the freezing point 1354 (and so ice covered area condition) while the SSS is too large. 1355 This manner of managing sea-ice area, just by using si IF case, 1356 is usually referred as the \textit{ice-if} model. 1357 It can be found in the \mdl{sbcice{\_}if} module. 1358 \item[nn{\_}ice = 2 or more] 1359 A full sea ice model is used. 1360 This model computes the ice-ocean fluxes, 1361 that are combined with the air-sea fluxes using the ice fraction of each model cell to 1362 provide the surface ocean fluxes. 1363 Note that the activation of a sea-ice model is is done by defining a CPP key (\key{lim3} or \key{cice}). 1364 The activation automatically overwrites the read value of nn{\_}ice to its appropriate value 1365 ($i.e.$ $2$ for LIM-3 or $3$ for CICE). 1260 1366 \end{description} 1261 1367 … … 1265 1371 \label{subsec:SBC_cice} 1266 1372 1267 It is now possible to couple a regional or global NEMO configuration (without AGRIF) to the CICE sea-ice 1268 model by using \key{cice}. The CICE code can be obtained from 1269 \href{http://oceans11.lanl.gov/trac/CICE/}{LANL} and the additional 'hadgem3' drivers will be required, 1270 even with the latest code release. Input grid files consistent with those used in NEMO will also be needed, 1271 and CICE CPP keys \textbf{ORCA\_GRID}, \textbf{CICE\_IN\_NEMO} and \textbf{coupled} should be used (seek advice from UKMO 1272 if necessary). Currently the code is only designed to work when using the CORE forcing option for NEMO (with 1273 \textit{calc\_strair}\forcode{ = .true.} and \textit{calc\_Tsfc}\forcode{ = .true.} in the CICE name-list), or alternatively when NEMO 1274 is coupled to the HadGAM3 atmosphere model (with \textit{calc\_strair}\forcode{ = .false.} and \textit{calc\_Tsfc}\forcode{ = false}). 1275 The code is intended to be used with \np{nn\_fsbc} set to 1 (although coupling ocean and ice less frequently 1276 should work, it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - the 1277 user should check that results are not significantly different to the standard case). 1278 1279 There are two options for the technical coupling between NEMO and CICE. The standard version allows 1280 complete flexibility for the domain decompositions in the individual models, but this is at the expense of global 1281 gather and scatter operations in the coupling which become very expensive on larger numbers of processors. The 1282 alternative option (using \key{nemocice\_decomp} for both NEMO and CICE) ensures that the domain decomposition is 1283 identical in both models (provided domain parameters are set appropriately, and 1284 \textit{processor\_shape~=~square-ice} and \textit{distribution\_wght~=~block} in the CICE name-list) and allows 1285 much more efficient direct coupling on individual processors. This solution scales much better although it is at 1286 the expense of having more idle CICE processors in areas where there is no sea ice. 1373 It is now possible to couple a regional or global NEMO configuration (without AGRIF) 1374 to the CICE sea-ice model by using \key{cice}. 1375 The CICE code can be obtained from \href{http://oceans11.lanl.gov/trac/CICE/}{LANL} and 1376 the additional 'hadgem3' drivers will be required, even with the latest code release. 1377 Input grid files consistent with those used in NEMO will also be needed, 1378 and CICE CPP keys \textbf{ORCA\_GRID}, \textbf{CICE\_IN\_NEMO} and \textbf{coupled} should be used 1379 (seek advice from UKMO if necessary). 1380 Currently the code is only designed to work when using the CORE forcing option for NEMO 1381 (with \textit{calc\_strair}\forcode{ = .true.} and \textit{calc\_Tsfc}\forcode{ = .true.} in the CICE name-list), 1382 or alternatively when NEMO is coupled to the HadGAM3 atmosphere model 1383 (with \textit{calc\_strair}\forcode{ = .false.} and \textit{calc\_Tsfc}\forcode{ = false}). 1384 The code is intended to be used with \np{nn\_fsbc} set to 1 1385 (although coupling ocean and ice less frequently should work, 1386 it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - 1387 the user should check that results are not significantly different to the standard case). 1388 1389 There are two options for the technical coupling between NEMO and CICE. 1390 The standard version allows complete flexibility for the domain decompositions in the individual models, 1391 but this is at the expense of global gather and scatter operations in the coupling which 1392 become very expensive on larger numbers of processors. 1393 The alternative option (using \key{nemocice\_decomp} for both NEMO and CICE) ensures that 1394 the domain decomposition is identical in both models (provided domain parameters are set appropriately, 1395 and \textit{processor\_shape~=~square-ice} and \textit{distribution\_wght~=~block} in the CICE name-list) and 1396 allows much more efficient direct coupling on individual processors. 1397 This solution scales much better although it is at the expense of having more idle CICE processors in areas where 1398 there is no sea ice. 1287 1399 1288 1400 % ------------------------------------------------------------------------------------------------------------- … … 1292 1404 \label{subsec:SBC_fwb} 1293 1405 1294 For global ocean simulation it can be useful to introduce a control of the mean sea 1295 level in order to prevent unrealistic drift of the sea surface height due to inaccuracy 1296 in the freshwater fluxes.In \NEMO, two way of controlling the the freshwater budget.1406 For global ocean simulation it can be useful to introduce a control of the mean sea level in order to 1407 prevent unrealistic drift of the sea surface height due to inaccuracy in the freshwater fluxes. 1408 In \NEMO, two way of controlling the the freshwater budget. 1297 1409 \begin{description} 1298 \item[\np{nn\_fwb}\forcode{ = 0}] no control at all. The mean sea level is free to drift, and will 1299 certainly do so. 1300 \item[\np{nn\_fwb}\forcode{ = 1}] global mean \textit{emp} set to zero at each model time step. 1410 \item[\np{nn\_fwb}\forcode{ = 0}] 1411 no control at all. 1412 The mean sea level is free to drift, and will certainly do so. 1413 \item[\np{nn\_fwb}\forcode{ = 1}] 1414 global mean \textit{emp} set to zero at each model time step. 1301 1415 %Note that with a sea-ice model, this technique only control the mean sea level with linear free surface (\key{vvl} not defined) and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 1302 \item[\np{nn\_fwb}\forcode{ = 2}] freshwater budget is adjusted from the previous year annual1303 mean budget which is read in the \textit{EMPave\_old.dat} file. As the model uses the 1304 Boussinesq approximation, the annual mean fresh water budget is simply evaluated 1305 from the change in the mean sea level at January the first and saved in the 1306 \textit{EMPav.dat} file.1416 \item[\np{nn\_fwb}\forcode{ = 2}] 1417 freshwater budget is adjusted from the previous year annual mean budget which 1418 is read in the \textit{EMPave\_old.dat} file. 1419 As the model uses the Boussinesq approximation, the annual mean fresh water budget is simply evaluated from 1420 the change in the mean sea level at January the first and saved in the \textit{EMPav.dat} file. 1307 1421 \end{description} 1308 1422 … … 1318 1432 %------------------------------------------------------------------------------------------------------------- 1319 1433 1320 In order to read a neutral drag coefficient, from an external data source ($i.e.$ a wave model), the1321 logical variable \np{ln\_cdgw} in \ngn{namsbc} namelist must be set to \forcode{.true.}. 1322 The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the 1323 namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all 1324 the miscellanous options allowed by Input Data generic Interface see \autoref{sec:SBC_input}) 1325 a nd a 2D field of neutral drag coefficient.1434 In order to read a neutral drag coefficient, from an external data source ($i.e.$ a wave model), 1435 the logical variable \np{ln\_cdgw} in \ngn{namsbc} namelist must be set to \forcode{.true.}. 1436 The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the namelist \ngn{namsbc\_wave} 1437 (for external data names, locations, frequency, interpolation and all the miscellanous options allowed by 1438 Input Data generic Interface see \autoref{sec:SBC_input}) and 1439 a 2D field of neutral drag coefficient. 1326 1440 Then using the routine TURB\_CORE\_1Z or TURB\_CORE\_2Z, and starting from the neutral drag coefficent provided, 1327 the drag coefficient is computed according to stable/unstable conditions of the air-sea interface following \citet{Large_Yeager_Rep04}. 1441 the drag coefficient is computed according to stable/unstable conditions of the air-sea interface following 1442 \citet{Large_Yeager_Rep04}. 1328 1443 1329 1444 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex
r10146 r10354 14 14 15 15 16 The stochastic parametrization module aims to explicitly simulate uncertainties in the model. 17 More particularly, \cite{Brankart_OM2013} has shown that, 18 because of the nonlinearity of the seawater equation of state, unresolved scales represent 19 a major source of uncertainties in the computation of the large scale horizontal density gradient 20 (from T/S large scale fields), and that the impact of these uncertainties can be simulated 21 byrandom processes representing unresolved T/S fluctuations.16 The stochastic parametrization module aims to explicitly simulate uncertainties in the model. 17 More particularly, \cite{Brankart_OM2013} has shown that, 18 because of the nonlinearity of the seawater equation of state, unresolved scales represent a major source of 19 uncertainties in the computation of the large scale horizontal density gradient (from T/S large scale fields), 20 and that the impact of these uncertainties can be simulated by 21 random processes representing unresolved T/S fluctuations. 22 22 23 23 The stochastic formulation of the equation of state can be written as: … … 26 26 \rho = \frac{1}{2} \sum_{i=1}^m\{ \rho[T+\Delta T_i,S+\Delta S_i,p_o(z)] + \rho[T-\Delta T_i,S-\Delta S_i,p_o(z)] \} 27 27 \end{equation} 28 where $p_o(z)$ is the reference pressure depending on the depth and, 29 $\Delta T_i$ and $\Delta S_i$ are a set of T/S perturbations defined as the scalar product30 of the respective local T/S gradients with random walks $\mathbf{\xi}$:28 where $p_o(z)$ is the reference pressure depending on the depth and, 29 $\Delta T_i$ and $\Delta S_i$ are a set of T/S perturbations defined as 30 the scalar product of the respective local T/S gradients with random walks $\mathbf{\xi}$: 31 31 \begin{equation} 32 32 \label{eq:sto_pert} 33 33 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S 34 34 \end{equation} 35 $\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with 36 a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$. 35 $\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with 36 a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$. 37 37 $\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical. 38 38 … … 41 41 \label{sec:STO_the_details} 42 42 43 The starting point of our implementation of stochastic parameterizations 44 in NEMO is to observe that many existing parameterizations are based 45 on autoregressive processes, which are used as a basic source of randomness 46 to transform a deterministic model into a probabilistic model. 43 The starting point of our implementation of stochastic parameterizations in NEMO is to observe that 44 many existing parameterizations are based on autoregressive processes, 45 which are used as a basic source of randomness to transform a deterministic model into a probabilistic model. 47 46 A generic approach is thus to add one single new module in NEMO, 48 generating processes with appropriate statistics 49 to simulate each kind of uncertainty in the model 47 generating processes with appropriate statistics to simulate each kind of uncertainty in the model 50 48 (see \cite{Brankart_al_GMD2015} for more details). 51 49 52 In practice, at every model grid point, independent Gaussian autoregressive53 processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated 54 usingthe same basic equation:50 In practice, at every model grid point, 51 independent Gaussian autoregressive processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated using 52 the same basic equation: 55 53 56 54 \begin{equation} … … 60 58 61 59 \noindent 62 where $k$ is the index of the model timestep; and 63 $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are parameters defining 64 the mean ($\mu^{(i)}$) standard deviation ($\sigma^{(i)}$) 65 and correlation timescale ($\tau^{(i)}$) of each process: 60 where $k$ is the index of the model timestep and 61 $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are parameters defining the mean ($\mu^{(i)}$) standard deviation ($\sigma^{(i)}$) and 62 correlation timescale ($\tau^{(i)}$) of each process: 66 63 67 64 \begin{itemize} 68 \item for order~1 processes, $w^{(i)}$ is a Gaussian white noise,69 with zero mean and standard deviation equal to~1, and the parameters 70 $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by:65 \item 66 for order~1 processes, $w^{(i)}$ is a Gaussian white noise, with zero mean and standard deviation equal to~1, 67 and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 71 68 72 69 \begin{equation} … … 83 80 \end{equation} 84 81 85 \item for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, 86 with zero mean, standard deviation equal to~$\sigma^{(i)}$; correlation timescale 87 equal to~$\tau^{(i)}$; and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 82 \item 83 for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, with zero mean, 84 standard deviation equal to~$\sigma^{(i)}$; 85 correlation timescale equal to~$\tau^{(i)}$; 86 and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 88 87 89 88 \begin{equation} … … 103 102 104 103 \noindent 105 In this way, higher order processes can be easily generated recursively using 106 the same piece of code implementing (\autoref{eq:autoreg}), 107 and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$. 108 The parameters in (\autoref{eq:ord2}) are computed so that this recursive application 109 of (\autoref{eq:autoreg}) leads to processes with the required standard deviation 110 and correlation timescale, with the additional condition that 111 the $n-1$ first derivatives of the autocorrelation function 112 are equal to zero at~$t=0$, so that the resulting processes 113 become smoother and smoother as $n$ is increased. 104 In this way, higher order processes can be easily generated recursively using the same piece of code implementing 105 (\autoref{eq:autoreg}), and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$. 106 The parameters in (\autoref{eq:ord2}) are computed so that this recursive application of 107 (\autoref{eq:autoreg}) leads to processes with the required standard deviation and correlation timescale, 108 with the additional condition that the $n-1$ first derivatives of the autocorrelation function are equal to 109 zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ is increased. 114 110 115 Overall, this method provides quite a simple and generic way of generating 116 a wide class of stochastic processes. 117 However, this also means that new model parameters are needed to specify each of 118 these stochastic processes. As in any parameterization of lacking physics, 119 a very important issues then to tune these new parameters using either first principles, 120 model simulations, or real-world observations. 111 Overall, this method provides quite a simple and generic way of generating a wide class of stochastic processes. 112 However, this also means that new model parameters are needed to specify each of these stochastic processes. 113 As in any parameterization of lacking physics, a very important issues then to tune these new parameters using 114 either first principles, model simulations, or real-world observations. 121 115 122 116 \section{Implementation details} … … 131 125 It involves three modules : 132 126 \begin{description} 133 \item[\mdl{stopar}] : define the Stochastic parameters and their time evolution. 134 \item[\mdl{storng}] : a random number generator based on (and includes) the 64-bit KISS 135 (Keep It Simple Stupid) random number generator distributed by George Marsaglia 136 (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here}) 137 \item[\mdl{stopts}] : stochastic parametrisation associated with the non-linearity of the equation of seawater, 138 implementing \autoref{eq:sto_pert} and specific piece of code in the equation of state implementing \autoref{eq:eos_sto}. 127 \item[\mdl{stopar}:] 128 define the Stochastic parameters and their time evolution. 129 \item[\mdl{storng}:] 130 a random number generator based on (and includes) the 64-bit KISS (Keep It Simple Stupid) random number generator 131 distributed by George Marsaglia 132 (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here}) 133 \item[\mdl{stopts}:] 134 stochastic parametrisation associated with the non-linearity of the equation of seawater, 135 implementing \autoref{eq:sto_pert} and specific piece of code in 136 the equation of state implementing \autoref{eq:eos_sto}. 139 137 \end{description} 140 138 … … 142 140 143 141 The first routine (\rou{sto\_par}) is a direct implementation of (\autoref{eq:autoreg}), 144 applied at each model grid point (in 2D or 3D), 145 and called at each model time step ($k$) to update 146 every autoregressive process ($i=1,\ldots,m$). 142 applied at each model grid point (in 2D or 3D), and called at each model time step ($k$) to 143 update every autoregressive process ($i=1,\ldots,m$). 147 144 This routine also includes a filtering operator, applied to $w^{(i)}$, 148 145 to introduce a spatial correlation between the stochastic processes. 149 146 150 The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated 151 to the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ 152 for each autoregressive process, as a function of the statistical properties 153 required by the model user (mean, standard deviation, time correlation, 154 order of the process,\ldots). 147 The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated to 148 the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ for each autoregressive process, 149 as a function of the statistical properties required by the model user 150 (mean, standard deviation, time correlation, order of the process,\ldots). 155 151 156 152 Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters: 157 153 \begin{description} 158 \item[\np{nn\_sto\_eos}] : number of independent random walks 159 \item[\np{rn\_eos\_stdxy}] :random walk horz. standard deviation (in grid points)160 \item[\np{rn\_eos\_stdz}] :random walk vert. standard deviation (in grid points)161 \item[\np{rn\_eos\_tcor}] :random walk time correlation (in timesteps)162 \item[\np{nn\_eos\_ord}] :order of autoregressive processes163 \item[\np{nn\_eos\_flt}] :passes of Laplacian filter164 \item[\np{rn\_eos\_lim}] :limitation factor (default = 3.0)154 \item[\np{nn\_sto\_eos}:] number of independent random walks 155 \item[\np{rn\_eos\_stdxy}:] random walk horz. standard deviation (in grid points) 156 \item[\np{rn\_eos\_stdz}:] random walk vert. standard deviation (in grid points) 157 \item[\np{rn\_eos\_tcor}:] random walk time correlation (in timesteps) 158 \item[\np{nn\_eos\_ord}:] order of autoregressive processes 159 \item[\np{nn\_eos\_flt}:] passes of Laplacian filter 160 \item[\np{rn\_eos\_lim}:] limitation factor (default = 3.0) 165 161 \end{description} 166 162 This routine also includes the initialization (seeding) of the random number generator. 167 163 168 The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is169 given by \np{cn\_storst\_out} namelist parameter) containing the current value of 164 The third routine (\rou{sto\_rst\_write}) writes a restart file 165 (which suffix name is given by \np{cn\_storst\_out} namelist parameter) containing the current value of 170 166 all autoregressive processes to allow restarting a simulation from where it has been interrupted. 171 167 This file also contains the current state of the random number generator. 172 When \np{ln\_rststo} is set to \forcode{.true.}), the restart file (which suffix name is 173 given by \np{cn\_storst\_in} namelist parameter) is read by the initialization routine 174 (\rou{sto\_par\_init}). The simulation will continue exactly as if it was not interrupted 175 only when \np{ln\_rstseed} is set to \forcode{.true.}, $i.e.$ when the state of 176 the random number generator is read in the restart file. 168 When \np{ln\_rststo} is set to \forcode{.true.}), 169 the restart file (which suffix name is given by \np{cn\_storst\_in} namelist parameter) is read by 170 the initialization routine (\rou{sto\_par\_init}). 171 The simulation will continue exactly as if it was not interrupted only 172 when \np{ln\_rstseed} is set to \forcode{.true.}, 173 $i.e.$ when the state of the random number generator is read in the restart file. 177 174 178 175 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex
r10146 r10354 17 17 %$\ $\newline % force a new ligne 18 18 19 Using the representation described in \autoref{chap:DOM}, several semi-discrete 20 space forms of the tracer equations are available depending on the vertical 21 coordinate used and on the physics used. In all the equations presented 22 here, the masking has been omitted for simplicity. One must be aware that 23 all the quantities are masked fields and that each time a mean or difference 24 operator is used, the resulting field is multiplied by a mask. 25 26 The two active tracers are potential temperature and salinity. Their prognostic 27 equations can be summarized as follows: 19 Using the representation described in \autoref{chap:DOM}, 20 several semi-discrete space forms of the tracer equations are available depending on 21 the vertical coordinate used and on the physics used. 22 In all the equations presented here, the masking has been omitted for simplicity. 23 One must be aware that all the quantities are masked fields and 24 that each time a mean or difference operator is used, 25 the resulting field is multiplied by a mask. 26 27 The two active tracers are potential temperature and salinity. 28 Their prognostic equations can be summarized as follows: 28 29 \begin{equation*} 29 30 \text{NXT} = \text{ADV}+\text{LDF}+\text{ZDF}+\text{SBC} … … 31 32 \end{equation*} 32 33 33 NXT stands for next, referring to the time-stepping. From left to right, the terms 34 on the rhs of the tracer equations are the advection (ADV), the lateral diffusion 35 (LDF), the vertical diffusion (ZDF), the contributions from the external forcings 36 (SBC: Surface Boundary Condition, QSR: penetrative Solar Radiation, and BBC: 37 Bottom Boundary Condition), the contribution from the bottom boundary Layer 38 (BBL) parametrisation, and an internal damping (DMP) term. The terms QSR, 39 BBC, BBL and DMP are optional. The external forcings and parameterisations 40 require complex inputs and complex calculations ($e.g.$ bulk formulae, estimation 41 of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and 42 described in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 43 Note that \mdl{tranpc}, the non-penetrative convection module, although 44 located in the NEMO/OPA/TRA directory as it directly modifies the tracer fields, 45 is described with the model vertical physics (ZDF) together with other available 46 parameterization of convection. 47 48 In the present chapter we also describe the diagnostic equations used to compute 49 the sea-water properties (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and 50 freezing point with associated modules \mdl{eosbn2} and \mdl{phycst}). 51 52 The different options available to the user are managed by namelist logicals or CPP keys. 53 For each equation term \textit{TTT}, the namelist logicals are \textit{ln\_traTTT\_xxx}, 54 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 55 The CPP key (when it exists) is \key{traTTT}. The equivalent code can be 56 found in the \textit{traTTT} or \textit{traTTT\_xxx} module, in the NEMO/OPA/TRA directory. 57 58 The user has the option of extracting each tendency term on the RHS of the tracer 59 equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}. 34 NXT stands for next, referring to the time-stepping. 35 From left to right, the terms on the rhs of the tracer equations are the advection (ADV), 36 the lateral diffusion (LDF), the vertical diffusion (ZDF), the contributions from the external forcings 37 (SBC: Surface Boundary Condition, QSR: penetrative Solar Radiation, and BBC: Bottom Boundary Condition), 38 the contribution from the bottom boundary Layer (BBL) parametrisation, and an internal damping (DMP) term. 39 The terms QSR, BBC, BBL and DMP are optional. 40 The external forcings and parameterisations require complex inputs and complex calculations 41 ($e.g.$ bulk formulae, estimation of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and 42 described in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 43 Note that \mdl{tranpc}, the non-penetrative convection module, although located in the NEMO/OPA/TRA directory as 44 it directly modifies the tracer fields, is described with the model vertical physics (ZDF) together with 45 other available parameterization of convection. 46 47 In the present chapter we also describe the diagnostic equations used to compute the sea-water properties 48 (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and freezing point with 49 associated modules \mdl{eosbn2} and \mdl{phycst}). 50 51 The different options available to the user are managed by namelist logicals or CPP keys. 52 For each equation term \textit{TTT}, the namelist logicals are \textit{ln\_traTTT\_xxx}, 53 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 54 The CPP key (when it exists) is \key{traTTT}. 55 The equivalent code can be found in the \textit{traTTT} or \textit{traTTT\_xxx} module, 56 in the NEMO/OPA/TRA directory. 57 58 The user has the option of extracting each tendency term on the RHS of the tracer equation for output 59 (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}. 60 60 61 61 $\ $\newline % force a new ligne … … 70 70 %------------------------------------------------------------------------------------------------------------- 71 71 72 When considered ($i.e.$ when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}), 73 the advection tendency of a tracer is expressed in flux form, 74 $i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by : 72 When considered ($i.e.$ when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}), 73 the advection tendency of a tracer is expressed in flux form, 74 $i.e.$ as the divergence of the advective fluxes. 75 Its discrete expression is given by : 75 76 \begin{equation} \label{eq:tra_adv} 76 77 ADV_\tau =-\frac{1}{b_t} \left( … … 79 80 -\frac{1}{e_{3t}} \;\delta _k \left[ w\; \tau _w \right] 80 81 \end{equation} 81 where $\tau$ is either T or S, and $b_t= e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells. 82 The flux form in \autoref{eq:tra_adv} 83 implicitly requires the use of the continuity equation. Indeed, it is obtained 84 by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$ 85 which results from the use of the continuity equation, $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ 86 (which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \np{ln\_linssh}\forcode{ = .true.}). 87 Therefore it is of paramount importance to design the discrete analogue of the 88 advection tendency so that it is consistent with the continuity equation in order to 89 enforce the conservation properties of the continuous equations. In other words, 90 by setting $\tau = 1$ in (\autoref{eq:tra_adv}) we recover the discrete form of 82 where $\tau$ is either T or S, and $b_t= e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells. 83 The flux form in \autoref{eq:tra_adv} implicitly requires the use of the continuity equation. 84 Indeed, it is obtained by using the following equality: 85 $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$ which 86 results from the use of the continuity equation, $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ 87 (which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \np{ln\_linssh}\forcode{ = .true.}). 88 Therefore it is of paramount importance to design the discrete analogue of the advection tendency so that 89 it is consistent with the continuity equation in order to enforce the conservation properties of 90 the continuous equations. 91 In other words, by setting $\tau = 1$ in (\autoref{eq:tra_adv}) we recover the discrete form of 91 92 the continuity equation which is used to calculate the vertical velocity. 92 93 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 93 \begin{figure}[!t] \begin{center} 94 \includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 95 \caption{ \protect\label{fig:adv_scheme} 96 Schematic representation of some ways used to evaluate the tracer value 97 at $u$-point and the amount of tracer exchanged between two neighbouring grid 98 points. Upsteam biased scheme (ups): the upstream value is used and the black 99 area is exchanged. Piecewise parabolic method (ppm): a parabolic interpolation 100 is used and the black and dark grey areas are exchanged. Monotonic upstream 101 scheme for conservative laws (muscl): a parabolic interpolation is used and black, 102 dark grey and grey areas are exchanged. Second order scheme (cen2): the mean 103 value is used and black, dark grey, grey and light grey areas are exchanged. Note 104 that this illustration does not include the flux limiter used in ppm and muscl schemes.} 105 \end{center} \end{figure} 94 \begin{figure}[!t] 95 \begin{center} 96 \includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 97 \caption{ \protect\label{fig:adv_scheme} 98 Schematic representation of some ways used to evaluate the tracer value at $u$-point and 99 the amount of tracer exchanged between two neighbouring grid points. 100 Upsteam biased scheme (ups): 101 the upstream value is used and the black area is exchanged. 102 Piecewise parabolic method (ppm): 103 a parabolic interpolation is used and the black and dark grey areas are exchanged. 104 Monotonic upstream scheme for conservative laws (muscl): 105 a parabolic interpolation is used and black, dark grey and grey areas are exchanged. 106 Second order scheme (cen2): 107 the mean value is used and black, dark grey, grey and light grey areas are exchanged. 108 Note that this illustration does not include the flux limiter used in ppm and muscl schemes. 109 } 110 \end{center} 111 \end{figure} 106 112 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 107 113 108 The key difference between the advection schemes available in \NEMO is the choice 109 made in space and time interpolation to define the value of the tracer at the 110 velocity points (\autoref{fig:adv_scheme}). 111 112 Along solid lateral and bottom boundaries a zero tracer flux is automatically 113 s pecified, since the normal velocity is zero there. At the sea surface the114 boundary condition depends on the type of sea surface chosen: 114 The key difference between the advection schemes available in \NEMO is the choice made in space and 115 time interpolation to define the value of the tracer at the velocity points 116 (\autoref{fig:adv_scheme}). 117 118 Along solid lateral and bottom boundaries a zero tracer flux is automatically specified, 119 since the normal velocity is zero there. 120 At the sea surface the boundary condition depends on the type of sea surface chosen: 115 121 \begin{description} 116 \item [linear free surface:] (\np{ln\_linssh}\forcode{ = .true.}) the first level thickness is constant in time: 117 the vertical boundary condition is applied at the fixed surface $z=0$ 118 rather than on the moving surface $z=\eta$. There is a non-zero advective 119 flux which is set for all advection schemes as 120 $\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, $i.e.$ 121 the product of surface velocity (at $z=0$) by the first level tracer value. 122 \item [non-linear free surface:] (\np{ln\_linssh}\forcode{ = .false.}) 123 convergence/divergence in the first ocean level moves the free surface 124 up/down. There is no tracer advection through it so that the advective 125 fluxes through the surface are also zero 122 \item[linear free surface:] 123 (\np{ln\_linssh}\forcode{ = .true.}) 124 the first level thickness is constant in time: 125 the vertical boundary condition is applied at the fixed surface $z=0$ rather than on the moving surface $z=\eta$. 126 There is a non-zero advective flux which is set for all advection schemes as 127 $\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, 128 $i.e.$ the product of surface velocity (at $z=0$) by the first level tracer value. 129 \item[non-linear free surface:] 130 (\np{ln\_linssh}\forcode{ = .false.}) 131 convergence/divergence in the first ocean level moves the free surface up/down. 132 There is no tracer advection through it so that the advective fluxes through the surface are also zero. 126 133 \end{description} 127 In all cases, this boundary condition retains local conservation of tracer. 128 Global conservation is obtained in non-linear free surface case, 129 but \textit{not} in the linear free surface case. Nevertheless, in the latter case, 130 it is achieved to a good approximation since the non-conservative 131 term is the product of the time derivative of the tracer and the free surface 132 height, two quantities that are not correlated \citep{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}. 133 134 The velocity field that appears in (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_zco}) 135 is the centred (\textit{now}) \textit{effective} ocean velocity, $i.e.$ the \textit{eulerian} velocity 136 (see \autoref{chap:DYN}) plus the eddy induced velocity (\textit{eiv}) 137 and/or the mixed layer eddy induced velocity (\textit{eiv}) 138 when those parameterisations are used (see \autoref{chap:LDF}). 139 140 Several tracer advection scheme are proposed, namely 141 a $2^{nd}$ or $4^{th}$ order centred schemes (CEN), 134 In all cases, this boundary condition retains local conservation of tracer. 135 Global conservation is obtained in non-linear free surface case, but \textit{not} in the linear free surface case. 136 Nevertheless, in the latter case, it is achieved to a good approximation since 137 the non-conservative term is the product of the time derivative of the tracer and the free surface height, 138 two quantities that are not correlated \citep{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}. 139 140 The velocity field that appears in (\autoref{eq:tra_adv} and \autoref{eq:tra_adv_zco}) 141 is the centred (\textit{now}) \textit{effective} ocean velocity, 142 $i.e.$ the \textit{eulerian} velocity (see \autoref{chap:DYN}) plus 143 the eddy induced velocity (\textit{eiv}) and/or 144 the mixed layer eddy induced velocity (\textit{eiv}) when 145 those parameterisations are used (see \autoref{chap:LDF}). 146 147 Several tracer advection scheme are proposed, namely a $2^{nd}$ or $4^{th}$ order centred schemes (CEN), 142 148 a $2^{nd}$ or $4^{th}$ order Flux Corrected Transport scheme (FCT), 143 149 a Monotone Upstream Scheme for Conservative Laws scheme (MUSCL), 144 a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3), and145 a Quadratic Upstream Interpolation for Convective Kinematics with150 a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3), 151 and a Quadratic Upstream Interpolation for Convective Kinematics with 146 152 Estimated Streaming Terms scheme (QUICKEST). 147 The choice is made in the \textit{\ngn{namtra\_adv}} namelist, by148 setting to \forcode{.true.} one of the logicals \textit{ln\_traadv\_xxx}. 149 The corresponding code can be found in the \mdl{traadv\_xxx} module, 150 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. 151 By default ($i.e.$ in the reference namelist, \ngn{namelist\_ref}), all the logicals 152 are set to \forcode{.false.}. If the user does not select an advection scheme 153 in the configuration namelist (\ngn{namelist\_cfg}), the tracers will \textit{not} be advected!154 155 Details of the advection schemes are given below. The choosing an advection scheme156 is a complex matter which depends on the model physics, model resolution, 153 The choice is made in the \textit{\ngn{namtra\_adv}} namelist, 154 by setting to \forcode{.true.} one of the logicals \textit{ln\_traadv\_xxx}. 155 The corresponding code can be found in the \mdl{traadv\_xxx} module, 156 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. 157 By default ($i.e.$ in the reference namelist, \ngn{namelist\_ref}), all the logicals are set to \forcode{.false.}. 158 If the user does not select an advection scheme in the configuration namelist (\ngn{namelist\_cfg}), 159 the tracers will \textit{not} be advected! 160 161 Details of the advection schemes are given below. 162 The choosing an advection scheme is a complex matter which depends on the model physics, model resolution, 157 163 type of tracer, as well as the issue of numerical cost. In particular, we note that 158 (1) CEN and FCT schemes require an explicit diffusion operator 159 while the other schemes are diffusive enough so that they do not necessarily need additional diffusion ; 164 (1) CEN and FCT schemes require an explicit diffusion operator while the other schemes are diffusive enough so that 165 they do not necessarily need additional diffusion; 160 166 (2) CEN and UBS are not \textit{positive} schemes 161 \footnote{negative values can appear in an initially strictly positive tracer field 162 which is advected} 163 , implying that false extrema are permitted. Their use is not recommended on passive tracers ; 164 (3) It is recommended that the same advection-diffusion scheme is 165 used on both active and passive tracers. Indeed, if a source or sink of a 166 passive tracer depends on an active one, the difference of treatment of 167 a ctive and passive tracers can create very nice-looking frontal structures168 that are pure numerical artefacts. Nevertheless, most of our users set a different 169 t reatment on passive and active tracers, that's the reason why this possibility170 is offered. We strongly suggest them to perform a sensitivity experiment 171 using a same treatment toassess the robustness of their results.167 \footnote{negative values can appear in an initially strictly positive tracer field which is advected}, 168 implying that false extrema are permitted. 169 Their use is not recommended on passive tracers; 170 (3) It is recommended that the same advection-diffusion scheme is used on both active and passive tracers. 171 Indeed, if a source or sink of a passive tracer depends on an active one, 172 the difference of treatment of active and passive tracers can create very nice-looking frontal structures that 173 are pure numerical artefacts. 174 Nevertheless, most of our users set a different treatment on passive and active tracers, 175 that's the reason why this possibility is offered. 176 We strongly suggest them to perform a sensitivity experiment using a same treatment to 177 assess the robustness of their results. 172 178 173 179 % ------------------------------------------------------------------------------------------------------------- … … 179 185 % 2nd order centred scheme 180 186 181 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{ = .true.}. 182 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) 183 and vertical direction by setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$. 187 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{ = .true.}. 188 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 189 setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$. 184 190 CEN implementation can be found in the \mdl{traadv\_cen} module. 185 191 186 In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points 187 is evaluated as the mean of the two neighbouring $T$-point values. 192 In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points is evaluated as the mean of 193 the two neighbouring $T$-point values. 188 194 For example, in the $i$-direction : 189 195 \begin{equation} \label{eq:tra_adv_cen2} … … 191 197 \end{equation} 192 198 193 CEN2 is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$ 194 but dispersive ($i.e.$ it may create false extrema). It is therefore notoriously 195 noisy and must be used in conjunction with an explicit diffusion operator to 196 produce a sensible solution. The associated time-stepping is performed using 197 a leapfrog scheme in conjunction with an Asselin time-filter, so $T$ in 198 (\autoref{eq:tra_adv_cen2}) is the \textit{now} tracer value. 199 200 Note that using the CEN2, the overall tracer advection is of second 201 order accuracy since both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2}) 202 have this order of accuracy. 199 CEN2 is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$ but dispersive 200 ($i.e.$ it may create false extrema). 201 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to 202 produce a sensible solution. 203 The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, 204 so $T$ in (\autoref{eq:tra_adv_cen2}) is the \textit{now} tracer value. 205 206 Note that using the CEN2, the overall tracer advection is of second order accuracy since 207 both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2}) have this order of accuracy. 203 208 204 209 % 4nd order centred scheme 205 210 206 In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as 207 a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points. 211 In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as 212 a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points. 208 213 For example, in the $i$-direction: 209 214 \begin{equation} \label{eq:tra_adv_cen4} … … 211 216 =\overline{ T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2} 212 217 \end{equation} 213 In the vertical direction (\np{nn\_cen\_v}\forcode{ = 4}), a $4^{th}$ COMPACT interpolation 214 has been prefered \citep{Demange_PhD2014}. 215 In the COMPACT scheme, both the field and its derivative are interpolated, 216 which leads, after a matrix inversion, spectral characteristics 217 similar to schemes of higher order \citep{Lele_JCP1992}. 218 In the vertical direction (\np{nn\_cen\_v}\forcode{ = 4}), 219 a $4^{th}$ COMPACT interpolation has been prefered \citep{Demange_PhD2014}. 220 In the COMPACT scheme, both the field and its derivative are interpolated, which leads, after a matrix inversion, 221 spectral characteristics similar to schemes of higher order \citep{Lele_JCP1992}. 218 222 219 223 220 Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme 221 but a $4^{th}$ order evaluation of advective fluxes, since the divergence of 222 advective fluxes \autoref{eq:tra_adv} is kept at $2^{nd}$ order. 223 The expression \textit{$4^{th}$ order scheme} used in oceanographic literature 224 is usually associated with the scheme presented here. 225 Introducing a \forcode{.true.} $4^{th}$ order advection scheme is feasible but, 226 for consistency reasons, it requires changes in the discretisation of the tracer 227 advection together with changes in the continuity equation, 228 and the momentum advection and pressure terms. 229 230 A direct consequence of the pseudo-fourth order nature of the scheme is that 231 it is not non-diffusive, $i.e.$ the global variance of a tracer is not preserved using CEN4. 232 Furthermore, it must be used in conjunction with an explicit diffusion operator 233 to produce a sensible solution. 234 As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction 235 with an Asselin time-filter, so $T$ in (\autoref{eq:tra_adv_cen4}) is the \textit{now} tracer. 236 237 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), 238 an additional hypothesis must be made to evaluate $\tau _u^{cen4}$. 239 This hypothesis usually reduces the order of the scheme. 240 Here we choose to set the gradient of $T$ across the boundary to zero. 241 Alternative conditions can be specified, such as a reduction to a second order scheme 242 for these near boundary grid points. 224 Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme but 225 a $4^{th}$ order evaluation of advective fluxes, 226 since the divergence of advective fluxes \autoref{eq:tra_adv} is kept at $2^{nd}$ order. 227 The expression \textit{$4^{th}$ order scheme} used in oceanographic literature is usually associated with 228 the scheme presented here. 229 Introducing a \forcode{.true.} $4^{th}$ order advection scheme is feasible but, for consistency reasons, 230 it requires changes in the discretisation of the tracer advection together with changes in the continuity equation, 231 and the momentum advection and pressure terms. 232 233 A direct consequence of the pseudo-fourth order nature of the scheme is that it is not non-diffusive, 234 $i.e.$ the global variance of a tracer is not preserved using CEN4. 235 Furthermore, it must be used in conjunction with an explicit diffusion operator to produce a sensible solution. 236 As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, 237 so $T$ in (\autoref{eq:tra_adv_cen4}) is the \textit{now} tracer. 238 239 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), 240 an additional hypothesis must be made to evaluate $\tau _u^{cen4}$. 241 This hypothesis usually reduces the order of the scheme. 242 Here we choose to set the gradient of $T$ across the boundary to zero. 243 Alternative conditions can be specified, such as a reduction to a second order scheme for 244 these near boundary grid points. 243 245 244 246 % ------------------------------------------------------------------------------------------------------------- … … 248 250 \label{subsec:TRA_adv_tvd} 249 251 250 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}. 251 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) 252 and vertical direction bysetting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$.252 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}. 253 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 254 setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 253 255 FCT implementation can be found in the \mdl{traadv\_fct} module. 254 256 255 In FCT formulation, the tracer at velocity points is evaluated using a combination of 256 an upstream and a centred scheme. For example, in the $i$-direction : 257 In FCT formulation, the tracer at velocity points is evaluated using a combination of an upstream and 258 a centred scheme. 259 For example, in the $i$-direction : 257 260 \begin{equation} \label{eq:tra_adv_fct} 258 261 \begin{split} … … 265 268 \end{split} 266 269 \end{equation} 267 where $c_u$ is a flux limiter function taking values between 0 and 1. 268 The FCT order is the one of the centred scheme used ($i.e.$ it depends on the setting of 269 \np{nn\_fct\_h} and \np{nn\_fct\_v}. 270 There exist many ways to define $c_u$, each corresponding to a different 271 FCT scheme. The one chosen in \NEMO is described in \citet{Zalesak_JCP79}. 272 $c_u$ only departs from $1$ when the advective term produces a local extremum in the tracer field. 273 The resulting scheme is quite expensive but \emph{positive}. 274 It can be used on both active and passive tracers. 275 A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}. 276 277 An additional option has been added controlled by \np{nn\_fct\_zts}. By setting this integer to 278 a value larger than zero, a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction, 279 but on the latter, a split-explicit time stepping is used, with a number of sub-timestep equals 280 to \np{nn\_fct\_zts}. This option can be useful when the size of the timestep is limited 281 by vertical advection \citep{Lemarie_OM2015}. Note that in this case, a similar split-explicit 282 time stepping should be used on vertical advection of momentum to insure a better stability 283 (see \autoref{subsec:DYN_zad}). 284 285 For stability reasons (see \autoref{chap:STP}), $\tau _u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct}) 286 using the \textit{now} tracer while $\tau _u^{ups}$ is evaluated using the \textit{before} tracer. In other words, 287 the advective part of the scheme is time stepped with a leap-frog scheme 270 where $c_u$ is a flux limiter function taking values between 0 and 1. 271 The FCT order is the one of the centred scheme used 272 ($i.e.$ it depends on the setting of \np{nn\_fct\_h} and \np{nn\_fct\_v}). 273 There exist many ways to define $c_u$, each corresponding to a different FCT scheme. 274 The one chosen in \NEMO is described in \citet{Zalesak_JCP79}. 275 $c_u$ only departs from $1$ when the advective term produces a local extremum in the tracer field. 276 The resulting scheme is quite expensive but \emph{positive}. 277 It can be used on both active and passive tracers. 278 A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}. 279 280 An additional option has been added controlled by \np{nn\_fct\_zts}. 281 By setting this integer to a value larger than zero, 282 a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction, but on the latter, 283 a split-explicit time stepping is used, with a number of sub-timestep equals to \np{nn\_fct\_zts}. 284 This option can be useful when the size of the timestep is limited by vertical advection \citep{Lemarie_OM2015}. 285 Note that in this case, a similar split-explicit time stepping should be used on vertical advection of momentum to 286 insure a better stability (see \autoref{subsec:DYN_zad}). 287 288 For stability reasons (see \autoref{chap:STP}), 289 $\tau _u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct}) using the \textit{now} tracer while 290 $\tau _u^{ups}$ is evaluated using the \textit{before} tracer. 291 In other words, the advective part of the scheme is time stepped with a leap-frog scheme 288 292 while a forward scheme is used for the diffusive part. 289 293 … … 294 298 \label{subsec:TRA_adv_mus} 295 299 296 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}. 300 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}. 297 301 MUSCL implementation can be found in the \mdl{traadv\_mus} module. 298 302 299 MUSCL has been first implemented in \NEMO by \citet{Levy_al_GRL01}. In its formulation, the tracer at velocity points 300 is evaluated assuming a linear tracer variation between two $T$-points 301 (\autoref{fig:adv_scheme}). For example, in the $i$-direction : 303 MUSCL has been first implemented in \NEMO by \citet{Levy_al_GRL01}. 304 In its formulation, the tracer at velocity points is evaluated assuming a linear tracer variation between 305 two $T$-points (\autoref{fig:adv_scheme}). 306 For example, in the $i$-direction : 302 307 \begin{equation} \label{eq:tra_adv_mus} 303 308 \tau _u^{mus} = \left\{ \begin{aligned} … … 308 313 \end{aligned} \right. 309 314 \end{equation} 310 where $\widetilde{\partial _i \tau}$ is the slope of the tracer on which a limitation 311 is imposed toensure the \textit{positive} character of the scheme.312 313 The time stepping is performed using a forward scheme, that is the \textit{before}314 t racer field is used to evaluate $\tau _u^{mus}$.315 316 For an ocean grid point adjacent to land and where the ocean velocity is 317 directed toward land, an upstream flux is used. This choice ensure 318 the \textit{positive} character of the scheme. 319 In addition, fluxes round a grid-point where a runoff is applied can optionally be 320 computed using upstream fluxes(\np{ln\_mus\_ups}\forcode{ = .true.}).315 where $\widetilde{\partial _i \tau}$ is the slope of the tracer on which a limitation is imposed to 316 ensure the \textit{positive} character of the scheme. 317 318 The time stepping is performed using a forward scheme, 319 that is the \textit{before} tracer field is used to evaluate $\tau _u^{mus}$. 320 321 For an ocean grid point adjacent to land and where the ocean velocity is directed toward land, 322 an upstream flux is used. 323 This choice ensure the \textit{positive} character of the scheme. 324 In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using upstream fluxes 325 (\np{ln\_mus\_ups}\forcode{ = .true.}). 321 326 322 327 % ------------------------------------------------------------------------------------------------------------- … … 326 331 \label{subsec:TRA_adv_ubs} 327 332 328 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 333 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 329 334 UBS implementation can be found in the \mdl{traadv\_mus} module. 330 335 331 The UBS scheme, often called UP3, is also known as the Cell Averaged QUICK scheme 332 (Quadratic Upstream Interpolation for Convective Kinematics). It is an upstream-biased333 third order scheme based on an upstream-biased parabolic interpolation. 334 For example, in the $i$-direction 336 The UBS scheme, often called UP3, is also known as the Cell Averaged QUICK scheme 337 (Quadratic Upstream Interpolation for Convective Kinematics). 338 It is an upstream-biased third order scheme based on an upstream-biased parabolic interpolation. 339 For example, in the $i$-direction: 335 340 \begin{equation} \label{eq:tra_adv_ubs} 336 341 \tau _u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{ … … 342 347 where $\tau "_i =\delta _i \left[ {\delta _{i+1/2} \left[ \tau \right]} \right]$. 343 348 344 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation 345 error \citep{Shchepetkin_McWilliams_OM05}. The overall performance of 346 the advection scheme is similar to that reported in \cite{Farrow1995}. 347 It is a relatively good compromise between accuracy and smoothness. 348 Nevertheless the scheme is not \emph{positive}, meaning that false extrema are permitted, 349 but the amplitude of such are significantly reduced over the centred second 350 or fourth order method. therefore it is not recommended that it should be 351 applied to a passive tracer that requires positivity. 352 353 The intrinsic diffusion of UBS makes its use risky in the vertical direction 354 where the control of artificial diapycnal fluxes is of paramount importance \citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}. 355 Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme 356 or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}\forcode{ = 2 or 4}). 357 358 For stability reasons (see \autoref{chap:STP}), 359 the first term in \autoref{eq:tra_adv_ubs} (which corresponds to a second order 360 centred scheme) is evaluated using the \textit{now} tracer (centred in time) 361 while the second term (which is the diffusive part of the scheme), is 362 evaluated using the \textit{before} tracer (forward in time). 363 This choice is discussed by \citet{Webb_al_JAOT98} in the context of the 364 QUICK advection scheme. UBS and QUICK schemes only differ 365 by one coefficient. Replacing 1/6 with 1/8 in \autoref{eq:tra_adv_ubs} 366 leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 367 This option is not available through a namelist parameter, since the 368 1/6 coefficient is hard coded. Nevertheless it is quite easy to make the 369 substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 349 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error 350 \citep{Shchepetkin_McWilliams_OM05}. 351 The overall performance of the advection scheme is similar to that reported in \cite{Farrow1995}. 352 It is a relatively good compromise between accuracy and smoothness. 353 Nevertheless the scheme is not \emph{positive}, meaning that false extrema are permitted, 354 but the amplitude of such are significantly reduced over the centred second or fourth order method. 355 Therefore it is not recommended that it should be applied to a passive tracer that requires positivity. 356 357 The intrinsic diffusion of UBS makes its use risky in the vertical direction where 358 the control of artificial diapycnal fluxes is of paramount importance 359 \citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}. 360 Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or a $4^th$ order COMPACT scheme 361 (\np{nn\_cen\_v}\forcode{ = 2 or 4}). 362 363 For stability reasons (see \autoref{chap:STP}), the first term in \autoref{eq:tra_adv_ubs} 364 (which corresponds to a second order centred scheme) 365 is evaluated using the \textit{now} tracer (centred in time) while the second term 366 (which is the diffusive part of the scheme), 367 is evaluated using the \textit{before} tracer (forward in time). 368 This choice is discussed by \citet{Webb_al_JAOT98} in the context of the QUICK advection scheme. 369 UBS and QUICK schemes only differ by one coefficient. 370 Replacing 1/6 with 1/8 in \autoref{eq:tra_adv_ubs} leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 371 This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded. 372 Nevertheless it is quite easy to make the substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 370 373 371 374 Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows: … … 384 387 \end{equation} 385 388 386 \autoref{eq:traadv_ubs2} has several advantages. Firstly, it clearly reveals387 that the UBS scheme is based on the fourth order scheme to which an 388 upstream-biased diffusion term is added. Secondly, this emphasises that the 389 $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has 390 to be evaluated at the \emph{now} time step using \autoref{eq:tra_adv_ubs}. 391 Thirdly, the diffusion term is in fact a biharmonic operator with an eddy 392 coefficient whichis simply proportional to the velocity:393 $A_u^{lm}= \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note the current version of NEMO uses 394 the computationally more efficient formulation \autoref{eq:tra_adv_ubs}.389 \autoref{eq:traadv_ubs2} has several advantages. 390 Firstly, it clearly reveals that the UBS scheme is based on the fourth order scheme to which 391 an upstream-biased diffusion term is added. 392 Secondly, this emphasises that the $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has to 393 be evaluated at the \emph{now} time step using \autoref{eq:tra_adv_ubs}. 394 Thirdly, the diffusion term is in fact a biharmonic operator with an eddy coefficient which 395 is simply proportional to the velocity: 396 $A_u^{lm}= \frac{1}{12}\,{e_{1u}}^3\,|u|$. 397 Note the current version of NEMO uses the computationally more efficient formulation \autoref{eq:tra_adv_ubs}. 395 398 396 399 % ------------------------------------------------------------------------------------------------------------- … … 400 403 \label{subsec:TRA_adv_qck} 401 404 402 The Quadratic Upstream Interpolation for Convective Kinematics with 403 Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979} 404 is used when \np{ln\_traadv\_qck}\forcode{ = .true.}. 405 The Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms (QUICKEST) scheme 406 proposed by \citet{Leonard1979} is used when \np{ln\_traadv\_qck}\forcode{ = .true.}. 405 407 QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 406 408 407 QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST 408 limiter \citep{Leonard1991}. It has been implemented in NEMO by G. Reffray 409 (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module. 410 The resulting scheme is quite expensive but \emph{positive}. 411 It can be used on both active and passive tracers. 412 However, the intrinsic diffusion of QCK makes its use risky in the vertical 413 direction where the control of artificial diapycnal fluxes is of paramount importance. 414 Therefore the vertical flux is evaluated using the CEN2 scheme. 415 This no longer guarantees the positivity of the scheme. 416 The use of FCT in the vertical direction (as for the UBS case) should be implemented 417 to restore this property. 409 QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST limiter 410 \citep{Leonard1991}. 411 It has been implemented in NEMO by G. Reffray (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module. 412 The resulting scheme is quite expensive but \emph{positive}. 413 It can be used on both active and passive tracers. 414 However, the intrinsic diffusion of QCK makes its use risky in the vertical direction where 415 the control of artificial diapycnal fluxes is of paramount importance. 416 Therefore the vertical flux is evaluated using the CEN2 scheme. 417 This no longer guarantees the positivity of the scheme. 418 The use of FCT in the vertical direction (as for the UBS case) should be implemented to restore this property. 418 419 419 420 %%%gmcomment : Cross term are missing in the current implementation.... … … 432 433 Options are defined through the \ngn{namtra\_ldf} namelist variables. 433 434 They are regrouped in four items, allowing to specify 434 $(i)$ the type of operator used (none, laplacian, bilaplacian), 435 $(ii)$ the direction along which the operator acts (iso-level, horizontal, iso-neutral), 436 $(iii)$ some specific options related to the rotated operators ($i.e.$ non-iso-level operator), and 435 $(i)$ the type of operator used (none, laplacian, bilaplacian), 436 $(ii)$ the direction along which the operator acts (iso-level, horizontal, iso-neutral), 437 $(iii)$ some specific options related to the rotated operators ($i.e.$ non-iso-level operator), and 437 438 $(iv)$ the specification of eddy diffusivity coefficient (either constant or variable in space and time). 438 Item $(iv)$ will be described in \autoref{chap:LDF} . 439 The direction along which the operators act is defined through the slope between this direction and the iso-level surfaces. 440 The slope is computed in the \mdl{ldfslp} module and will also be described in \autoref{chap:LDF}. 441 442 The lateral diffusion of tracers is evaluated using a forward scheme, 443 $i.e.$ the tracers appearing in its expression are the \textit{before} tracers in time, 444 except for the pure vertical component that appears when a rotation tensor is used. 445 This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). 446 When \np{ln\_traldf\_msc}\forcode{ = .true.}, a Method of Stabilizing Correction is used in which 439 Item $(iv)$ will be described in \autoref{chap:LDF}. 440 The direction along which the operators act is defined through the slope between 441 this direction and the iso-level surfaces. 442 The slope is computed in the \mdl{ldfslp} module and will also be described in \autoref{chap:LDF}. 443 444 The lateral diffusion of tracers is evaluated using a forward scheme, 445 $i.e.$ the tracers appearing in its expression are the \textit{before} tracers in time, 446 except for the pure vertical component that appears when a rotation tensor is used. 447 This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). 448 When \np{ln\_traldf\_msc}\forcode{ = .true.}, a Method of Stabilizing Correction is used in which 447 449 the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}. 448 450 … … 456 458 Three operator options are proposed and, one and only one of them must be selected: 457 459 \begin{description} 458 \item [\np{ln\_traldf\_NONE}\forcode{ = .true.}]: no operator selected, the lateral diffusive tendency will not be 459 applied to the tracer equation. This option can be used when the selected advection scheme 460 is diffusive enough (MUSCL scheme for example). 461 \item [\np{ln\_traldf\_lap}\forcode{ = .true.}]: a laplacian operator is selected. This harmonic operator 462 takes the following expression: $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $, 463 where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}), 464 and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}). 465 \item [\np{ln\_traldf\_blp}\forcode{ = .true.}]: a bilaplacian operator is selected. This biharmonic operator 466 takes the following expression: 467 $\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$ 468 where the gradient operats along the selected direction, 469 and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$ (see \autoref{chap:LDF}). 470 In the code, the bilaplacian operator is obtained by calling the laplacian twice. 460 \item[\np{ln\_traldf\_NONE}\forcode{ = .true.}:] 461 no operator selected, the lateral diffusive tendency will not be applied to the tracer equation. 462 This option can be used when the selected advection scheme is diffusive enough (MUSCL scheme for example). 463 \item[\np{ln\_traldf\_lap}\forcode{ = .true.}:] 464 a laplacian operator is selected. 465 This harmonic operator takes the following expression: $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $, 466 where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}), 467 and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}). 468 \item[\np{ln\_traldf\_blp}\forcode{ = .true.}]: 469 a bilaplacian operator is selected. 470 This biharmonic operator takes the following expression: 471 $\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$ 472 where the gradient operats along the selected direction, 473 and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$ (see \autoref{chap:LDF}). 474 In the code, the bilaplacian operator is obtained by calling the laplacian twice. 471 475 \end{description} 472 476 473 Both laplacian and bilaplacian operators ensure the total tracer variance decrease. 474 Their primary role is to provide strong dissipation at the smallest scale supported 475 by the grid while minimizing the impact on the larger scale features. 476 The main difference between the two operators is the scale selectiveness. 477 The bilaplacian damping time ($i.e.$ its spin down time) scales like $\lambda^{-4}$ 478 for disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones), 477 Both laplacian and bilaplacian operators ensure the total tracer variance decrease. 478 Their primary role is to provide strong dissipation at the smallest scale supported by the grid while 479 minimizing the impact on the larger scale features. 480 The main difference between the two operators is the scale selectiveness. 481 The bilaplacian damping time ($i.e.$ its spin down time) scales like $\lambda^{-4}$ for 482 disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones), 479 483 whereas the laplacian damping time scales only like $\lambda^{-2}$. 480 484 … … 487 491 \label{subsec:TRA_ldf_dir} 488 492 489 The choice of a direction of action determines the form of operator used. 490 The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane 491 when iso-level option is used (\np{ln\_traldf\_lev}\forcode{ = .true.}) 492 or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{z}-coordinate 493 (\np{ln\_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}). 493 The choice of a direction of action determines the form of operator used. 494 The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane when 495 iso-level option is used (\np{ln\_traldf\_lev}\forcode{ = .true.}) or 496 when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{z}-coordinate 497 (\np{ln\_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}). 494 498 The associated code can be found in the \mdl{traldf\_lap\_blp} module. 495 The operator is a rotated (re-entrant) laplacian when the direction along which it acts 496 does not coincide with the iso-level surfaces, 497 that is when standard or triad iso-neutral option is used (\np{ln\_traldf\_iso} or 498 \np{ln\_traldf\_triad} equals \forcode{.true.}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.), 499 or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{s}-coordinate 499 The operator is a rotated (re-entrant) laplacian when 500 the direction along which it acts does not coincide with the iso-level surfaces, 501 that is when standard or triad iso-neutral option is used 502 (\np{ln\_traldf\_iso} or \np{ln\_traldf\_triad} equals \forcode{.true.}, 503 see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.), or 504 when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{s}-coordinate 500 505 (\np{ln\_traldf\_hor} and \np{ln\_sco} equal \forcode{.true.}) 501 \footnote{In this case, the standard iso-neutral operator will be automatically selected}. 502 In that case, a rotation is applied to the gradient(s) that appears in the operator 503 so thatdiffusive fluxes acts on the three spatial direction.504 505 The resulting discret form of the three operators (one iso-level and two rotated one) 506 is given inthe next two sub-sections.506 \footnote{In this case, the standard iso-neutral operator will be automatically selected}. 507 In that case, a rotation is applied to the gradient(s) that appears in the operator so that 508 diffusive fluxes acts on the three spatial direction. 509 510 The resulting discret form of the three operators (one iso-level and two rotated one) is given in 511 the next two sub-sections. 507 512 508 513 … … 519 524 + \delta _{j}\left[ A_v^{lT} \; \frac{e_{1v}\,e_{3v}}{e_{2v}} \;\delta _{j+1/2} [T] \right] \;\right) 520 525 \end{equation} 521 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells 522 and where zero diffusive fluxes is assumed across solid boundaries, 523 first (and third in bilaplacian case) horizontal tracer derivative are masked. 524 It is implemented in the \rou{traldf\_lap} subroutine found in the \mdl{traldf\_lap} module. 525 The module also contains \rou{traldf\_blp}, the subroutine calling twice \rou{traldf\_lap} 526 in order tocompute the iso-level bilaplacian operator.527 528 It is a \emph{horizontal} operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate529 with or without partial steps, but is simply an iso-level operator in the $s$-coordinate. 530 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{ = .true.}, 531 we have \np{ln\_traldf\_lev}\forcode{ = .true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}\forcode{ = .true.}. 532 In both cases, it significantly contributes to diapycnal mixing. 526 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells and 527 where zero diffusive fluxes is assumed across solid boundaries, 528 first (and third in bilaplacian case) horizontal tracer derivative are masked. 529 It is implemented in the \rou{traldf\_lap} subroutine found in the \mdl{traldf\_lap} module. 530 The module also contains \rou{traldf\_blp}, the subroutine calling twice \rou{traldf\_lap} in order to 531 compute the iso-level bilaplacian operator. 532 533 It is a \emph{horizontal} operator ($i.e.$ acting along geopotential surfaces) in 534 the $z$-coordinate with or without partial steps, but is simply an iso-level operator in the $s$-coordinate. 535 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{ = .true.}, 536 we have \np{ln\_traldf\_lev}\forcode{ = .true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}\forcode{ = .true.}. 537 In both cases, it significantly contributes to diapycnal mixing. 533 538 It is therefore never recommended, even when using it in the bilaplacian case. 534 539 535 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), tracers in horizontally 536 adjacent cells are located at different depths in the vicinity of the bottom. 537 In this case, horizontal derivatives in (\autoref{eq:tra_ldf_lap}) at the bottom level 538 require a specific treatment. They are calculated in the \mdl{zpshde} module, 539 described in \autoref{sec:TRA_zpshde}. 540 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), 541 tracers in horizontally adjacent cells are located at different depths in the vicinity of the bottom. 542 In this case, horizontal derivatives in (\autoref{eq:tra_ldf_lap}) at the bottom level require a specific treatment. 543 They are calculated in the \mdl{zpshde} module, described in \autoref{sec:TRA_zpshde}. 540 544 541 545 … … 550 554 \subsubsection{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 551 555 \label{subsec:TRA_ldf_iso} 552 The general form of the second order lateral tracer subgrid scale physics 553 (\autoref{eq:PE_zdf})takes the following semi-discrete space form in $z$- and $s$-coordinates:556 The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:PE_zdf}) 557 takes the following semi-discrete space form in $z$- and $s$-coordinates: 554 558 \begin{equation} \label{eq:tra_ldf_iso} 555 559 \begin{split} … … 569 573 & \left. {\left. { \qquad \qquad \ \ \ \left. { 570 574 +\;\frac{e_{1w}\,e_{2w}}{e_{3w}} \,\left( r_{1w}^2 + r_{2w}^2 \right) 571 \,\delta_{k+1/2} [T] } \right) } \right] \quad } \right\} 572 \end{split} 573 \end{equation} 574 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells, 575 $r_1$ and $r_2$ are the slopes between the surface of computation 576 ($z$- or $s$-surfaces) and the surface along which the diffusion operator 577 acts ($i.e.$ horizontal or iso-neutral surfaces). It is thus used when, 578 in addition to \np{ln\_traldf\_lap}\forcode{ = .true.}, we have \np{ln\_traldf\_iso}\forcode{ = .true.}, 579 or both \np{ln\_traldf\_hor}\forcode{ = .true.} and \np{ln\_zco}\forcode{ = .true.}. The way these 580 slopes are evaluated is given in \autoref{sec:LDF_slp}. At the surface, bottom 581 and lateral boundaries, the turbulent fluxes of heat and salt are set to zero 582 using the mask technique (see \autoref{sec:LBC_coast}). 583 584 The operator in \autoref{eq:tra_ldf_iso} involves both lateral and vertical 585 derivatives. For numerical stability, the vertical second derivative must 586 be solved using the same implicit time scheme as that used in the vertical 587 physics (see \autoref{sec:TRA_zdf}). For computer efficiency reasons, this term 588 is not computed in the \mdl{traldf\_iso} module, but in the \mdl{trazdf} module 589 where, if iso-neutral mixing is used, the vertical mixing coefficient is simply 590 increased by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$. 591 592 This formulation conserves the tracer but does not ensure the decrease 593 of the tracer variance. Nevertheless the treatment performed on the slopes 594 (see \autoref{chap:LDF}) allows the model to run safely without any additional 595 background horizontal diffusion \citep{Guilyardi_al_CD01}. 596 597 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), the horizontal derivatives 598 at the bottom level in \autoref{eq:tra_ldf_iso} require a specific treatment. 575 \,\delta_{k+1/2} [T] } \right) } \right] \quad } \right\} 576 \end{split} 577 \end{equation} 578 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells, 579 $r_1$ and $r_2$ are the slopes between the surface of computation ($z$- or $s$-surfaces) and 580 the surface along which the diffusion operator acts ($i.e.$ horizontal or iso-neutral surfaces). 581 It is thus used when, in addition to \np{ln\_traldf\_lap}\forcode{ = .true.}, 582 we have \np{ln\_traldf\_iso}\forcode{ = .true.}, 583 or both \np{ln\_traldf\_hor}\forcode{ = .true.} and \np{ln\_zco}\forcode{ = .true.}. 584 The way these slopes are evaluated is given in \autoref{sec:LDF_slp}. 585 At the surface, bottom and lateral boundaries, the turbulent fluxes of heat and salt are set to zero using 586 the mask technique (see \autoref{sec:LBC_coast}). 587 588 The operator in \autoref{eq:tra_ldf_iso} involves both lateral and vertical derivatives. 589 For numerical stability, the vertical second derivative must be solved using the same implicit time scheme as that 590 used in the vertical physics (see \autoref{sec:TRA_zdf}). 591 For computer efficiency reasons, this term is not computed in the \mdl{traldf\_iso} module, 592 but in the \mdl{trazdf} module where, if iso-neutral mixing is used, 593 the vertical mixing coefficient is simply increased by 594 $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$. 595 596 This formulation conserves the tracer but does not ensure the decrease of the tracer variance. 597 Nevertheless the treatment performed on the slopes (see \autoref{chap:LDF}) allows the model to run safely without 598 any additional background horizontal diffusion \citep{Guilyardi_al_CD01}. 599 600 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), 601 the horizontal derivatives at the bottom level in \autoref{eq:tra_ldf_iso} require a specific treatment. 599 602 They are calculated in module zpshde, described in \autoref{sec:TRA_zpshde}. 600 603 … … 604 607 \label{subsec:TRA_ldf_triad} 605 608 606 If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.} ; see \autoref{apdx:triad}) 607 608 An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases 609 is also available in \NEMO (\np{ln\_traldf\_grif}\forcode{ = .true.}). A complete description of 610 the algorithm is given in \autoref{apdx:triad}. 611 612 The lateral fourth order bilaplacian operator on tracers is obtained by 613 applying (\autoref{eq:tra_ldf_lap}) twice. The operator requires an additional assumption 614 on boundary conditions: both first and third derivative terms normal to the 615 coast are set to zero. 616 617 The lateral fourth order operator formulation on tracers is obtained by 618 applying (\autoref{eq:tra_ldf_iso}) twice. It requires an additional assumption 619 on boundary conditions: first and third derivative terms normal to the 620 coast, normal to the bottom and normal to the surface are set to zero. 609 If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:triad}) 610 611 An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases 612 is also available in \NEMO (\np{ln\_traldf\_grif}\forcode{ = .true.}). 613 A complete description of the algorithm is given in \autoref{apdx:triad}. 614 615 The lateral fourth order bilaplacian operator on tracers is obtained by applying (\autoref{eq:tra_ldf_lap}) twice. 616 The operator requires an additional assumption on boundary conditions: 617 both first and third derivative terms normal to the coast are set to zero. 618 619 The lateral fourth order operator formulation on tracers is obtained by applying (\autoref{eq:tra_ldf_iso}) twice. 620 It requires an additional assumption on boundary conditions: 621 first and third derivative terms normal to the coast, 622 normal to the bottom and normal to the surface are set to zero. 621 623 622 624 %&& Option for the rotated operators … … 631 633 \np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 632 634 633 \np{rn\_sw\_triad} =1 switching triad ; =0 all 4 triads used (triad only) 635 \np{rn\_sw\_triad} =1 switching triad; 636 =0 all 4 triads used (triad only) 634 637 635 638 \np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) … … 646 649 647 650 Options are defined through the \ngn{namzdf} namelist variables. 648 The formulation of the vertical subgrid scale tracer physics is the same 649 for all the vertical coordinates, and is based on a laplacian operator. 650 The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the 651 following semi-discrete space form: 651 The formulation of the vertical subgrid scale tracer physics is the same for all the vertical coordinates, 652 and is based on a laplacian operator. 653 The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the following semi-discrete space form: 652 654 \begin{equation} \label{eq:tra_zdf} 653 655 \begin{split} … … 657 659 \end{split} 658 660 \end{equation} 659 where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity 660 coefficients on temperature and salinity, respectively. Generally, 661 $A_w^{vT}=A_w^{vS}$ except when double diffusive mixing is 662 parameterised ($i.e.$ \key{zdfddm} is defined). The way these coefficients 663 are evaluated is given in \autoref{chap:ZDF} (ZDF). Furthermore, when 664 iso-neutral mixing is used, both mixing coefficients are increased 665 by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$ 666 to account for the vertical second derivative of \autoref{eq:tra_ldf_iso}. 667 668 At the surface and bottom boundaries, the turbulent fluxes of 669 heat and salt must be specified. At the surface they are prescribed 670 from the surface forcing and added in a dedicated routine (see \autoref{subsec:TRA_sbc}), 671 whilst at the bottom they are set to zero for heat and salt unless 672 a geothermal flux forcing is prescribed as a bottom boundary 673 condition (see \autoref{subsec:TRA_bbc}). 674 675 The large eddy coefficient found in the mixed layer together with high 676 vertical resolution implies that in the case of explicit time stepping 677 (\np{ln\_zdfexp}\forcode{ = .true.}) there would be too restrictive a constraint on 678 the time step. Therefore, the default implicit time stepping is preferred 679 for the vertical diffusion since it overcomes the stability constraint. 680 A forward time differencing scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time 681 splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative. 682 Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both 683 tracers and dynamics. 661 where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on temperature and salinity, 662 respectively. 663 Generally, $A_w^{vT}=A_w^{vS}$ except when double diffusive mixing is parameterised ($i.e.$ \key{zdfddm} is defined). 664 The way these coefficients are evaluated is given in \autoref{chap:ZDF} (ZDF). 665 Furthermore, when iso-neutral mixing is used, both mixing coefficients are increased by 666 $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$ to account for 667 the vertical second derivative of \autoref{eq:tra_ldf_iso}. 668 669 At the surface and bottom boundaries, the turbulent fluxes of heat and salt must be specified. 670 At the surface they are prescribed from the surface forcing and added in a dedicated routine 671 (see \autoref{subsec:TRA_sbc}), whilst at the bottom they are set to zero for heat and salt unless 672 a geothermal flux forcing is prescribed as a bottom boundary condition (see \autoref{subsec:TRA_bbc}). 673 674 The large eddy coefficient found in the mixed layer together with high vertical resolution implies that 675 in the case of explicit time stepping (\np{ln\_zdfexp}\forcode{ = .true.}) 676 there would be too restrictive a constraint on the time step. 677 Therefore, the default implicit time stepping is preferred for the vertical diffusion since 678 it overcomes the stability constraint. 679 A forward time differencing scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using 680 a time splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative. 681 Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 684 682 685 683 % ================================================================ … … 695 693 \label{subsec:TRA_sbc} 696 694 697 The surface boundary condition for tracers is implemented in a separate 698 module (\mdl{trasbc}) instead of entering as a boundary condition on the vertical 699 diffusion operator (as in the case of momentum). This has been found to 700 enhance readability of the code. The two formulations are completely 701 equivalent; the forcing terms in trasbc are the surface fluxes divided by702 the thickness of the top model layer. 703 704 Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components 705 ($i.e.$ atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer 706 of the ocean is due both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) 707 and to the heat and salt content of the mass exchange. They are both included directly in $Q_{ns}$, 708 the surface heat flux,and $F_{salt}$, the surface salt flux (see \autoref{chap:SBC} for further details).695 The surface boundary condition for tracers is implemented in a separate module (\mdl{trasbc}) instead of 696 entering as a boundary condition on the vertical diffusion operator (as in the case of momentum). 697 This has been found to enhance readability of the code. 698 The two formulations are completely equivalent; 699 the forcing terms in trasbc are the surface fluxes divided by the thickness of the top model layer. 700 701 Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components 702 ($i.e.$ atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer of the ocean is due 703 both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) and 704 to the heat and salt content of the mass exchange. 705 They are both included directly in $Q_{ns}$, the surface heat flux, 706 and $F_{salt}$, the surface salt flux (see \autoref{chap:SBC} for further details). 709 707 By doing this, the forcing formulation is the same for any tracer (including temperature and salinity). 710 708 711 The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following 712 forcing fields (used on tracers): 713 714 $\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface 709 The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following forcing fields (used on tracers): 710 711 $\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface 715 712 (i.e. the difference between the total surface heat flux and the fraction of the short wave flux that 716 penetrates into the water column, see \autoref{subsec:TRA_qsr}) plus the heat content associated with717 of the mass exchange with the atmosphere and lands.713 penetrates into the water column, see \autoref{subsec:TRA_qsr}) 714 plus the heat content associated with of the mass exchange with the atmosphere and lands. 718 715 719 716 $\bullet$ $\textit{sfx}$, the salt flux resulting from ice-ocean mass exchange (freezing, melting, ridging...) 720 717 721 $\bullet$ \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) 722 andpossibly with the sea-ice and ice-shelves.723 724 $\bullet$ \textit{rnf}, the mass flux associated with runoff 718 $\bullet$ \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) and 719 possibly with the sea-ice and ice-shelves. 720 721 $\bullet$ \textit{rnf}, the mass flux associated with runoff 725 722 (see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 726 723 727 $\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt, 724 $\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt, 728 725 (see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied). 729 726 … … 735 732 \end{aligned} 736 733 \end{equation} 737 where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps 738 ($t-\rdt/2$ and $t+\rdt/2$). Such time averaging prevents the 739 divergence of odd and even time step (see \autoref{chap:STP}). 740 741 In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}), 742 an additional term has to be added on both temperature and salinity. 743 On temperature, this term remove the heat content associated with mass exchange 744 that has been added to $Q_{ns}$. On salinity, this term mimics the concentration/dilution effect that 745 would have resulted from a change in the volume of the first level. 734 where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps ($t-\rdt/2$ and $t+\rdt/2$). 735 Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:STP}). 736 737 In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}), an additional term has to be added on 738 both temperature and salinity. 739 On temperature, this term remove the heat content associated with mass exchange that has been added to $Q_{ns}$. 740 On salinity, this term mimics the concentration/dilution effect that would have resulted from a change in 741 the volume of the first level. 746 742 The resulting surface boundary condition is applied as follows: 747 743 \begin{equation} \label{eq:tra_sbc_lin} … … 754 750 \end{aligned} 755 751 \end{equation} 756 Note that an exact conservation of heat and salt content is only achieved with non-linear free surface. 757 In the linear free surface case, there is a small imbalance. The imbalance is larger758 than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}. 752 Note that an exact conservation of heat and salt content is only achieved with non-linear free surface. 753 In the linear free surface case, there is a small imbalance. 754 The imbalance is larger than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}. 759 755 This is the reason why the modified filter is not applied in the linear free surface case (see \autoref{chap:STP}). 760 756 … … 770 766 771 767 Options are defined through the \ngn{namtra\_qsr} namelist variables. 772 When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}), 773 the solar radiation penetrates the top few tens of meters of the ocean. If it is not used 774 (\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level. 775 Thus, in the former case a term is added to the time evolution equation of 776 temperature \autoref{eq:PE_tra_T} and the surface boundary condition is 777 modified to take into account only the non-penetrative part of the surface 768 When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}), 769 the solar radiation penetrates the top few tens of meters of the ocean. 770 If it is not used (\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level. 771 Thus, in the former case a term is added to the time evolution equation of temperature \autoref{eq:PE_tra_T} and 772 the surface boundary condition is modified to take into account only the non-penetrative part of the surface 778 773 heat flux: 779 774 \begin{equation} \label{eq:PE_qsr} … … 783 778 \end{split} 784 779 \end{equation} 785 where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation) 786 and $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$). 780 where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation) and 781 $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$). 787 782 The additional term in \autoref{eq:PE_qsr} is discretized as follows: 788 783 \begin{equation} \label{eq:tra_qsr} … … 790 785 \end{equation} 791 786 792 The shortwave radiation, $Q_{sr}$, consists of energy distributed across a wide spectral range. 793 The ocean is strongly absorbing for wavelengths longer than 700~nm and these 794 wavelengths contribute to heating the upper few tens of centimetres. The fraction of $Q_{sr}$ 795 that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ (specified 796 through namelist parameter \np{rn\_abs}). It is assumed to penetrate the ocean 797 with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$, 787 The shortwave radiation, $Q_{sr}$, consists of energy distributed across a wide spectral range. 788 The ocean is strongly absorbing for wavelengths longer than 700~nm and these wavelengths contribute to 789 heating the upper few tens of centimetres. 790 The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ 791 (specified through namelist parameter \np{rn\_abs}). 792 It is assumed to penetrate the ocean with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$, 798 793 of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the \ngn{namtra\_qsr} namelist). 799 For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy 800 propagates to larger depths where it contributes to 801 local heating. 802 The way this second part of the solar energy penetrates into the ocean depends on 803 which formulation is chosen. In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{ = .true.}) 804 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 794 For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy propagates to 795 larger depths where it contributes to local heating. 796 The way this second part of the solar energy penetrates into the ocean depends on which formulation is chosen. 797 In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{ = .true.}) 798 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 805 799 leading to the following expression \citep{Paulson1977}: 806 800 \begin{equation} \label{eq:traqsr_iradiance} 807 801 I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right] 808 802 \end{equation} 809 where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths. 810 It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter. 811 The set of default values ($\xi_0$, $\xi_1$, $R$) corresponds to a Type I water in 812 Jerlov's (1968) classification (oligotrophic waters). 813 814 Such assumptions have been shown to provide a very crude and simplistic 815 representation of observed light penetration profiles (\cite{Morel_JGR88}, see also 816 \autoref{fig:traqsr_irradiance}). Light absorption in the ocean depends on 817 particle concentration and is spectrally selective. \cite{Morel_JGR88} has shown 818 that an accurate representation of light penetration can be provided by a 61 waveband 819 formulation. Unfortunately, such a model is very computationally expensive. 820 Thus, \cite{Lengaigne_al_CD07} have constructed a simplified version of this 821 formulation in which visible light is split into three wavebands: blue (400-500 nm), 822 green (500-600 nm) and red (600-700nm). For each wave-band, the chlorophyll-dependent 823 attenuation coefficient is fitted to the coefficients computed from the full spectral model 824 of \cite{Morel_JGR88} (as modified by \cite{Morel_Maritorena_JGR01}), assuming 825 the same power-law relationship. As shown in \autoref{fig:traqsr_irradiance}, 826 this formulation, called RGB (Red-Green-Blue), reproduces quite closely 827 the light penetration profiles predicted by the full spectal model, but with much greater 828 computational efficiency. The 2-bands formulation does not reproduce the full model very well. 829 830 The RGB formulation is used when \np{ln\_qsr\_rgb}\forcode{ = .true.}. The RGB attenuation coefficients 831 ($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform 832 chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb} 833 in \mdl{trc\_oce} module). Four types of chlorophyll can be chosen in the RGB formulation: 803 where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths. 804 It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter. 805 The set of default values ($\xi_0$, $\xi_1$, $R$) corresponds to a Type I water in Jerlov's (1968) classification 806 (oligotrophic waters). 807 808 Such assumptions have been shown to provide a very crude and simplistic representation of 809 observed light penetration profiles (\cite{Morel_JGR88}, see also \autoref{fig:traqsr_irradiance}). 810 Light absorption in the ocean depends on particle concentration and is spectrally selective. 811 \cite{Morel_JGR88} has shown that an accurate representation of light penetration can be provided by 812 a 61 waveband formulation. 813 Unfortunately, such a model is very computationally expensive. 814 Thus, \cite{Lengaigne_al_CD07} have constructed a simplified version of this formulation in which 815 visible light is split into three wavebands: blue (400-500 nm), green (500-600 nm) and red (600-700nm). 816 For each wave-band, the chlorophyll-dependent attenuation coefficient is fitted to the coefficients computed from 817 the full spectral model of \cite{Morel_JGR88} (as modified by \cite{Morel_Maritorena_JGR01}), 818 assuming the same power-law relationship. 819 As shown in \autoref{fig:traqsr_irradiance}, this formulation, called RGB (Red-Green-Blue), 820 reproduces quite closely the light penetration profiles predicted by the full spectal model, 821 but with much greater computational efficiency. 822 The 2-bands formulation does not reproduce the full model very well. 823 824 The RGB formulation is used when \np{ln\_qsr\_rgb}\forcode{ = .true.}. 825 The RGB attenuation coefficients ($i.e.$ the inverses of the extinction length scales) are tabulated over 826 61 nonuniform chlorophyll classes ranging from 0.01 to 10 g.Chl/L 827 (see the routine \rou{trc\_oce\_rgb} in \mdl{trc\_oce} module). 828 Four types of chlorophyll can be chosen in the RGB formulation: 834 829 \begin{description} 835 \item[\np{nn\_chdta}\forcode{ = 0}] 836 a constant 0.05 g.Chl/L value everywhere ;837 \item[\np{nn\_chdta}\forcode{ = 1}] 838 an observed time varying chlorophyll deduced from satellite surface ocean color measurement 839 spread uniformly in the vertical direction ; 840 \item[\np{nn\_chdta}\forcode{ = 2}] 841 same as previous case except that a vertical profile of chlorophyl is used. 842 Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value;843 \item[\np{ln\_qsr\_bio}\forcode{ = .true.}] 844 simulated time varying chlorophyll by TOP biogeochemical model. 845 In this case, the RGB formulation is used to calculate both the phytoplankton 846 light limitation inPISCES or LOBSTER and the oceanic heating rate.830 \item[\np{nn\_chdta}\forcode{ = 0}] 831 a constant 0.05 g.Chl/L value everywhere ; 832 \item[\np{nn\_chdta}\forcode{ = 1}] 833 an observed time varying chlorophyll deduced from satellite surface ocean color measurement spread uniformly in 834 the vertical direction; 835 \item[\np{nn\_chdta}\forcode{ = 2}] 836 same as previous case except that a vertical profile of chlorophyl is used. 837 Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value; 838 \item[\np{ln\_qsr\_bio}\forcode{ = .true.}] 839 simulated time varying chlorophyll by TOP biogeochemical model. 840 In this case, the RGB formulation is used to calculate both the phytoplankton light limitation in 841 PISCES or LOBSTER and the oceanic heating rate. 847 842 \end{description} 848 The trend in \autoref{eq:tra_qsr} associated with the penetration of the solar radiation 849 is added to the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}. 850 851 When the $z$-coordinate is preferred to the $s$-coordinate, the depth of $w-$levels does852 not significantly vary with location. The level at which the light has been totally 853 absorbed ($i.e.$ it is less than the computer precision) is computed once, 854 and the trend associated with the penetration of the solar radiation is only added down to that level. 855 Finally, note that when the ocean is shallow ($<$ 200~m), part of the 856 solar radiation can reach the ocean floor. In this case, we have 857 chosen that all remaining radiation is absorbed in the last ocean 858 level($i.e.$ $I$ is masked).843 The trend in \autoref{eq:tra_qsr} associated with the penetration of the solar radiation is added to 844 the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}. 845 846 When the $z$-coordinate is preferred to the $s$-coordinate, 847 the depth of $w-$levels does not significantly vary with location. 848 The level at which the light has been totally absorbed 849 ($i.e.$ it is less than the computer precision) is computed once, 850 and the trend associated with the penetration of the solar radiation is only added down to that level. 851 Finally, note that when the ocean is shallow ($<$ 200~m), part of the solar radiation can reach the ocean floor. 852 In this case, we have chosen that all remaining radiation is absorbed in the last ocean level 853 ($i.e.$ $I$ is masked). 859 854 860 855 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 861 \begin{figure}[!t] \begin{center} 862 \includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 863 \caption{ \protect\label{fig:traqsr_irradiance} 864 Penetration profile of the downward solar irradiance calculated by four models. 865 Two waveband chlorophyll-independent formulation (blue), a chlorophyll-dependent 866 monochromatic formulation (green), 4 waveband RGB formulation (red), 867 61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of 868 (a) Chl=0.05 mg/m$^3$ and (b) Chl=0.5 mg/m$^3$. From \citet{Lengaigne_al_CD07}.} 869 \end{center} \end{figure} 856 \begin{figure}[!t] 857 \begin{center} 858 \includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 859 \caption{ \protect\label{fig:traqsr_irradiance} 860 Penetration profile of the downward solar irradiance calculated by four models. 861 Two waveband chlorophyll-independent formulation (blue), 862 a chlorophyll-dependent monochromatic formulation (green), 863 4 waveband RGB formulation (red), 864 61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of 865 (a) Chl=0.05 mg/m$^3$ and (b) Chl=0.5 mg/m$^3$. 866 From \citet{Lengaigne_al_CD07}. 867 } 868 \end{center} 869 \end{figure} 870 870 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 871 871 … … 880 880 %-------------------------------------------------------------------------------------------------------------- 881 881 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 882 \begin{figure}[!t] \begin{center} 883 \includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 884 \caption{ \protect\label{fig:geothermal} 885 Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 886 It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}.} 887 \end{center} \end{figure} 882 \begin{figure}[!t] 883 \begin{center} 884 \includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 885 \caption{ \protect\label{fig:geothermal} 886 Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 887 It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}. 888 } 889 \end{center} 890 \end{figure} 888 891 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 889 892 890 Usually it is assumed that there is no exchange of heat or salt through 891 the ocean bottom, $i.e.$ a no flux boundary condition is applied on active 892 tracers at the bottom. This is the default option in \NEMO, and it is 893 implemented using the masking technique. However, there is a 894 non-zero heat flux across the seafloor that is associated with solid 895 earth cooling. This flux is weak compared to surface fluxes (a mean 896 global value of $\sim0.1\;W/m^2$ \citep{Stein_Stein_Nat92}), but it warms 897 systematically the ocean and acts on the densest water masses. 898 Taking this flux into account in a global ocean model increases 899 the deepest overturning cell ($i.e.$ the one associated with the Antarctic 900 Bottom Water) by a few Sverdrups \citep{Emile-Geay_Madec_OS09}. 893 Usually it is assumed that there is no exchange of heat or salt through the ocean bottom, 894 $i.e.$ a no flux boundary condition is applied on active tracers at the bottom. 895 This is the default option in \NEMO, and it is implemented using the masking technique. 896 However, there is a non-zero heat flux across the seafloor that is associated with solid earth cooling. 897 This flux is weak compared to surface fluxes (a mean global value of $\sim0.1\;W/m^2$ \citep{Stein_Stein_Nat92}), 898 but it warms systematically the ocean and acts on the densest water masses. 899 Taking this flux into account in a global ocean model increases the deepest overturning cell 900 ($i.e.$ the one associated with the Antarctic Bottom Water) by a few Sverdrups \citep{Emile-Geay_Madec_OS09}. 901 901 902 902 Options are defined through the \ngn{namtra\_bbc} namelist variables. 903 The presence of geothermal heating is controlled by setting the namelist 904 parameter \np{ln\_trabbc} to true. Then, when \np{nn\_geoflx} is set to 1, 905 a constant geothermal heating is introduced whose value is given by the 906 \np{nn\_geoflx\_cst}, which is also a namelist parameter. 907 When \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is 908 introduced which is provided in the \ifile{geothermal\_heating} NetCDF file 909 (\autoref{fig:geothermal}) \citep{Emile-Geay_Madec_OS09}. 903 The presence of geothermal heating is controlled by setting the namelist parameter \np{ln\_trabbc} to true. 904 Then, when \np{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose value is given by 905 the \np{nn\_geoflx\_cst}, which is also a namelist parameter. 906 When \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is introduced which is provided in 907 the \ifile{geothermal\_heating} NetCDF file (\autoref{fig:geothermal}) \citep{Emile-Geay_Madec_OS09}. 910 908 911 909 % ================================================================ … … 920 918 921 919 Options are defined through the \ngn{nambbl} namelist variables. 922 In a $z$-coordinate configuration, the bottom topography is represented by a 923 series of discrete steps. This is not adequate to represent gravity driven 924 downslope flows. Such flows arise either downstream of sills such as the Strait of 925 Gibraltar or Denmark Strait, where dense water formed in marginal seas flows 926 into a basin filled with less dense water, or along the continental slope when dense 927 water masses are formed on a continental shelf. The amount of entrainment 928 that occurs in these gravity plumes is critical in determining the density 929 and volume flux of the densest waters of the ocean, such as Antarctic Bottom Water, 930 or North Atlantic Deep Water. $z$-coordinate models tend to overestimate the 931 entrainment, because the gravity flow is mixed vertically by convection 932 as it goes ''downstairs'' following the step topography, sometimes over a thickness 933 much larger than the thickness of the observed gravity plume. A similar problem 934 occurs in the $s$-coordinate when the thickness of the bottom level varies rapidly 935 downstream of a sill \citep{Willebrand_al_PO01}, and the thickness 936 of the plume is not resolved. 937 938 The idea of the bottom boundary layer (BBL) parameterisation, first introduced by 939 \citet{Beckmann_Doscher1997}, is to allow a direct communication between 940 two adjacent bottom cells at different levels, whenever the densest water is 941 located above the less dense water. The communication can be by a diffusive flux 942 (diffusive BBL), an advective flux (advective BBL), or both. In the current 943 implementation of the BBL, only the tracers are modified, not the velocities. 944 Furthermore, it only connects ocean bottom cells, and therefore does not include 945 all the improvements introduced by \citet{Campin_Goosse_Tel99}. 920 In a $z$-coordinate configuration, the bottom topography is represented by a series of discrete steps. 921 This is not adequate to represent gravity driven downslope flows. 922 Such flows arise either downstream of sills such as the Strait of Gibraltar or Denmark Strait, 923 where dense water formed in marginal seas flows into a basin filled with less dense water, 924 or along the continental slope when dense water masses are formed on a continental shelf. 925 The amount of entrainment that occurs in these gravity plumes is critical in determining the density and 926 volume flux of the densest waters of the ocean, such as Antarctic Bottom Water, or North Atlantic Deep Water. 927 $z$-coordinate models tend to overestimate the entrainment, 928 because the gravity flow is mixed vertically by convection as it goes ''downstairs'' following the step topography, 929 sometimes over a thickness much larger than the thickness of the observed gravity plume. 930 A similar problem occurs in the $s$-coordinate when the thickness of the bottom level varies rapidly downstream of 931 a sill \citep{Willebrand_al_PO01}, and the thickness of the plume is not resolved. 932 933 The idea of the bottom boundary layer (BBL) parameterisation, first introduced by \citet{Beckmann_Doscher1997}, 934 is to allow a direct communication between two adjacent bottom cells at different levels, 935 whenever the densest water is located above the less dense water. 936 The communication can be by a diffusive flux (diffusive BBL), an advective flux (advective BBL), or both. 937 In the current implementation of the BBL, only the tracers are modified, not the velocities. 938 Furthermore, it only connects ocean bottom cells, and therefore does not include all the improvements introduced by 939 \citet{Campin_Goosse_Tel99}. 946 940 947 941 % ------------------------------------------------------------------------------------------------------------- … … 951 945 \label{subsec:TRA_bbl_diff} 952 946 953 When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1), 947 When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1), 954 948 the diffusive flux between two adjacent cells at the ocean floor is given by 955 949 \begin{equation} \label{eq:tra_bbl_diff} 956 950 {\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 957 951 \end{equation} 958 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, 959 and $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{Beckmann_Doscher1997}, 960 the latter is prescribed with a spatial dependence, $i.e.$ in the conditional form 952 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, 953 and $A_l^\sigma$ the lateral diffusivity in the BBL. 954 Following \citet{Beckmann_Doscher1997}, the latter is prescribed with a spatial dependence, 955 $i.e.$ in the conditional form 961 956 \begin{equation} \label{eq:tra_bbl_coef} 962 957 A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} … … 966 961 \end{array}} \right. 967 962 \end{equation} 968 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist 969 parameter \np{rn\_ahtbbl} and usually set to a value much larger 970 than the one used for lateral mixing in the open ocean. The constraint in \autoref{eq:tra_bbl_coef} 971 implies that sigma-like diffusion only occurs when the density above the sea floor, at the top of 972 the slope, is larger than in the deeper ocean (see green arrow in \autoref{fig:bbl}). 973 In practice, this constraint is applied separately in the two horizontal directions, 963 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn\_ahtbbl} and 964 usually set to a value much larger than the one used for lateral mixing in the open ocean. 965 The constraint in \autoref{eq:tra_bbl_coef} implies that sigma-like diffusion only occurs when 966 the density above the sea floor, at the top of the slope, is larger than in the deeper ocean 967 (see green arrow in \autoref{fig:bbl}). 968 In practice, this constraint is applied separately in the two horizontal directions, 974 969 and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation: 975 970 \begin{equation} \label{eq:tra_bbl_Drho} 976 971 \nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta \,\nabla_\sigma S 977 972 \end{equation} 978 where $\rho$, $\alpha$ and $\beta$ are functions of $\overline{T}^\sigma$, 979 $\overline{S}^\sigma$ and $\overline{H}^\sigma$, the along bottom mean temperature, 980 salinity and depth, respectively. 973 where $\rho$, $\alpha$ and $\beta$ are functions of $\overline{T}^\sigma$, 974 $\overline{S}^\sigma$ and $\overline{H}^\sigma$, the along bottom mean temperature, salinity and depth, respectively. 981 975 982 976 % ------------------------------------------------------------------------------------------------------------- … … 990 984 991 985 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 992 \begin{figure}[!t] \begin{center} 993 \includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 994 \caption{ \protect\label{fig:bbl} 995 Advective/diffusive Bottom Boundary Layer. The BBL parameterisation is 996 activated when $\rho^i_{kup}$ is larger than $\rho^{i+1}_{kdnw}$. 997 Red arrows indicate the additional overturning circulation due to the advective BBL. 998 The transport of the downslope flow is defined either as the transport of the bottom 999 ocean cell (black arrow), or as a function of the along slope density gradient. 1000 The green arrow indicates the diffusive BBL flux directly connecting $kup$ and $kdwn$ 1001 ocean bottom cells. 1002 connection} 1003 \end{center} \end{figure} 986 \begin{figure}[!t] 987 \begin{center} 988 \includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 989 \caption{ \protect\label{fig:bbl} 990 Advective/diffusive Bottom Boundary Layer. 991 The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i+1}_{kdnw}$. 992 Red arrows indicate the additional overturning circulation due to the advective BBL. 993 The transport of the downslope flow is defined either as the transport of the bottom ocean cell (black arrow), 994 or as a function of the along slope density gradient. 995 The green arrow indicates the diffusive BBL flux directly connecting $kup$ and $kdwn$ ocean bottom cells. 996 } 997 \end{center} 998 \end{figure} 1004 999 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1005 1000 … … 1011 1006 %%%gmcomment : this section has to be really written 1012 1007 1013 When applying an advective BBL (\np{nn\_bbl\_adv}\forcode{ = 1..2}), an overturning 1014 c irculation is added which connects two adjacent bottom grid-points only if dense1015 water overlies less dense water on the slope. The density difference causes dense1016 water to move down the slope. 1017 1018 \np{nn\_bbl\_adv}\forcode{ = 1} : the downslope velocity is chosen to be the Eulerian 1019 ocean velocity just above the topographic step (see black arrow in \autoref{fig:bbl}) 1020 \citep{Beckmann_Doscher1997}. It is a \textit{conditional advection}, that is, advection 1021 i s allowed only if dense water overlies less dense water on the slope ($i.e.$1022 $\nabla_\sigma \rho \cdot \nabla H<0$) and if the velocity is directed towards 1023 greater depth ($i.e.$ $\vect{U} \cdot \nabla H>0$). 1024 1025 \np{nn\_bbl\_adv}\forcode{ = 2} :the downslope velocity is chosen to be proportional to $\Delta \rho$,1008 When applying an advective BBL (\np{nn\_bbl\_adv}\forcode{ = 1..2}), an overturning circulation is added which 1009 connects two adjacent bottom grid-points only if dense water overlies less dense water on the slope. 1010 The density difference causes dense water to move down the slope. 1011 1012 \np{nn\_bbl\_adv}\forcode{ = 1}: 1013 the downslope velocity is chosen to be the Eulerian ocean velocity just above the topographic step 1014 (see black arrow in \autoref{fig:bbl}) \citep{Beckmann_Doscher1997}. 1015 It is a \textit{conditional advection}, that is, advection is allowed only 1016 if dense water overlies less dense water on the slope ($i.e.$ $\nabla_\sigma \rho \cdot \nabla H<0$) and 1017 if the velocity is directed towards greater depth ($i.e.$ $\vect{U} \cdot \nabla H>0$). 1018 1019 \np{nn\_bbl\_adv}\forcode{ = 2}: 1020 the downslope velocity is chosen to be proportional to $\Delta \rho$, 1026 1021 the density difference between the higher cell and lower cell densities \citep{Campin_Goosse_Tel99}. 1027 The advection is allowed only if dense water overlies less dense water on the slope ($i.e.$1028 $\nabla_\sigma \rho \cdot \nabla H<0$). For example, the resulting transport of the 1029 downslope flow, here in the $i$-direction (\autoref{fig:bbl}), is simply given by the 1030 following expression:1022 The advection is allowed only if dense water overlies less dense water on the slope 1023 ($i.e.$ $\nabla_\sigma \rho \cdot \nabla H<0$). 1024 For example, the resulting transport of the downslope flow, here in the $i$-direction (\autoref{fig:bbl}), 1025 is simply given by the following expression: 1031 1026 \begin{equation} \label{eq:bbl_Utr} 1032 1027 u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o} e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right) 1033 1028 \end{equation} 1034 where $\gamma$, expressed in seconds, is the coefficient of proportionality 1035 provided as \np{rn\_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn} 1036 are the vertical index of the higher and lower cells, respectively. 1037 The parameter $\gamma$ should take a different value for each bathymetric 1038 step, but for simplicity, and because no direct estimation of this parameter is 1039 available, a uniform value has been assumed. The possible values for $\gamma$ 1040 range between 1 and $10~s$ \citep{Campin_Goosse_Tel99}. 1041 1042 Scalar properties are advected by this additional transport $( u^{tr}_{bbl}, v^{tr}_{bbl} )$ 1043 using the upwind scheme. Such a diffusive advective scheme has been chosen 1044 to mimic the entrainment between the downslope plume and the surrounding 1045 water at intermediate depths. The entrainment is replaced by the vertical mixing 1046 implicit in the advection scheme. Let us consider as an example the 1047 case displayed in \autoref{fig:bbl} where the density at level $(i,kup)$ is 1048 larger than the one at level $(i,kdwn)$. The advective BBL scheme 1049 modifies the tracer time tendency of the ocean cells near the 1050 topographic step by the downslope flow \autoref{eq:bbl_dw}, 1051 the horizontal \autoref{eq:bbl_hor} and the upward \autoref{eq:bbl_up} 1052 return flows as follows: 1029 where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn\_gambbl}, 1030 a namelist parameter, and \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, 1031 respectively. 1032 The parameter $\gamma$ should take a different value for each bathymetric step, but for simplicity, 1033 and because no direct estimation of this parameter is available, a uniform value has been assumed. 1034 The possible values for $\gamma$ range between 1 and $10~s$ \citep{Campin_Goosse_Tel99}. 1035 1036 Scalar properties are advected by this additional transport $( u^{tr}_{bbl}, v^{tr}_{bbl} )$ using the upwind scheme. 1037 Such a diffusive advective scheme has been chosen to mimic the entrainment between the downslope plume and 1038 the surrounding water at intermediate depths. 1039 The entrainment is replaced by the vertical mixing implicit in the advection scheme. 1040 Let us consider as an example the case displayed in \autoref{fig:bbl} where 1041 the density at level $(i,kup)$ is larger than the one at level $(i,kdwn)$. 1042 The advective BBL scheme modifies the tracer time tendency of the ocean cells near the topographic step by 1043 the downslope flow \autoref{eq:bbl_dw}, the horizontal \autoref{eq:bbl_hor} and 1044 the upward \autoref{eq:bbl_up} return flows as follows: 1053 1045 \begin{align} 1054 1046 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} … … 1065 1057 where $b_t$ is the $T$-cell volume. 1066 1058 1067 Note that the BBL transport, $( u^{tr}_{bbl}, v^{tr}_{bbl} )$, is available in 1068 the model outputs. It has to be used to compute the effective velocity 1069 as well as the effective overturning circulation. 1059 Note that the BBL transport, $( u^{tr}_{bbl}, v^{tr}_{bbl} )$, is available in the model outputs. 1060 It has to be used to compute the effective velocity as well as the effective overturning circulation. 1070 1061 1071 1062 % ================================================================ … … 1079 1070 %-------------------------------------------------------------------------------------------------------------- 1080 1071 1081 In some applications it can be useful to add a Newtonian damping term 1082 into the temperature and salinity equations: 1072 In some applications it can be useful to add a Newtonian damping term into the temperature and salinity equations: 1083 1073 \begin{equation} \label{eq:tra_dmp} 1084 1074 \begin{split} 1085 1075 \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right) \\ 1086 \frac{\partial S}{\partial t}=\;\cdots \;-\gamma \,\left( {S-S_o } \right) 1087 1088 1089 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ 1090 are given temperature and salinity fields (usually a climatology). 1076 \frac{\partial S}{\partial t}=\;\cdots \;-\gamma \,\left( {S-S_o } \right) 1077 \end{split} 1078 \end{equation} 1079 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields 1080 (usually a climatology). 1091 1081 Options are defined through the \ngn{namtra\_dmp} namelist variables. 1092 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true. 1093 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_tradmp} are set to true 1094 in \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are 1095 correctly set ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read 1096 using \mdl{fldread}, see \autoref{subsec:SBC_fldread}). 1097 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn\_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 1098 1099 The two main cases in which \autoref{eq:tra_dmp} is used are \textit{(a)} 1100 the specification of the boundary conditions along artificial walls of a 1101 limited domain basin and \textit{(b)} the computation of the velocity 1102 field associated with a given $T$-$S$ field (for example to build the 1103 initial state of a prognostic simulation, or to use the resulting velocity 1104 field for a passive tracer study). The first case applies to regional 1105 models that have artificial walls instead of open boundaries. 1106 In the vicinity of these walls, $\gamma$ takes large values (equivalent to 1107 a time scale of a few days) whereas it is zero in the interior of the 1108 model domain. The second case corresponds to the use of the robust 1109 diagnostic method \citep{Sarmiento1982}. It allows us to find the velocity 1110 field consistent with the model dynamics whilst having a $T$, $S$ field 1111 close to a given climatological field ($T_o$, $S_o$). 1112 1113 The robust diagnostic method is very efficient in preventing temperature 1114 drift in intermediate waters but it produces artificial sources of heat and salt 1115 within the ocean. It also has undesirable effects on the ocean convection. 1116 It tends to prevent deep convection and subsequent deep-water formation, 1117 by stabilising the water column too much. 1118 1119 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 1082 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true. 1083 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_tradmp} are set to true in 1084 \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are correctly set 1085 ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read using \mdl{fldread}, 1086 see \autoref{subsec:SBC_fldread}). 1087 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. 1088 The file name is specified by the namelist variable \np{cn\_resto}. 1089 The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 1090 1091 The two main cases in which \autoref{eq:tra_dmp} is used are 1092 \textit{(a)} the specification of the boundary conditions along artificial walls of a limited domain basin and 1093 \textit{(b)} the computation of the velocity field associated with a given $T$-$S$ field 1094 (for example to build the initial state of a prognostic simulation, 1095 or to use the resulting velocity field for a passive tracer study). 1096 The first case applies to regional models that have artificial walls instead of open boundaries. 1097 In the vicinity of these walls, $\gamma$ takes large values (equivalent to a time scale of a few days) whereas 1098 it is zero in the interior of the model domain. 1099 The second case corresponds to the use of the robust diagnostic method \citep{Sarmiento1982}. 1100 It allows us to find the velocity field consistent with the model dynamics whilst 1101 having a $T$, $S$ field close to a given climatological field ($T_o$, $S_o$). 1102 1103 The robust diagnostic method is very efficient in preventing temperature drift in intermediate waters but 1104 it produces artificial sources of heat and salt within the ocean. 1105 It also has undesirable effects on the ocean convection. 1106 It tends to prevent deep convection and subsequent deep-water formation, by stabilising the water column too much. 1107 1108 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or 1109 only below the mixed layer (defined either on a density or $S_o$ criterion). 1110 It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here 1111 \citep{Madec_al_JPO96}. 1120 1112 1121 1113 \subsection{Generating \ifile{resto} using DMP\_TOOLS} 1122 1114 1123 DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$. 1124 Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled 1125 and run on the same machine as the NEMO model. A \ifile{mesh\_mask} file for the model configuration is required as an input. 1126 This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1. 1127 The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work. 1128 The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 1115 DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$. 1116 Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled and 1117 run on the same machine as the NEMO model. 1118 A \ifile{mesh\_mask} file for the model configuration is required as an input. 1119 This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1. 1120 The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work. 1121 The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for 1122 the restoration coefficient. 1129 1123 1130 1124 %--------------------------------------------nam_dmp_create------------------------------------------------- … … 1132 1126 %------------------------------------------------------------------------------------------------------- 1133 1127 1134 \np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in the \nl{nam\_zoom\_dmp} name list. 1135 1136 The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations. 1137 \np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain. 1138 \np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea 1139 for the ORCA4, ORCA2 and ORCA05 configurations. 1140 If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as 1141 a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference 1142 configurations with previous model versions. 1143 \np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines. 1144 This option only has an effect if \np{ln\_full\_field} is true. 1145 \np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer. 1146 Finally \np{ln\_custom} specifies that the custom module will be called. 1147 This module is contained in the file \mdl{custom} and can be edited by users. For example damping could be applied in a specific region. 1148 1149 The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}. 1128 \np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and 1129 should be the same as specified in \nl{namcfg}. 1130 The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to 1131 provide boundary conditions to a zoom configuration. 1132 In the case of the arctic or antarctic zoom configurations this includes some specific treatment. 1133 Otherwise damping is applied to the 6 grid points along the ocean boundaries. 1134 The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in 1135 the \nl{nam\_zoom\_dmp} name list. 1136 1137 The remaining switch namelist variables determine the spatial variation of the restoration coefficient in 1138 non-zoom configurations. 1139 \np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain. 1140 \np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea for 1141 the ORCA4, ORCA2 and ORCA05 configurations. 1142 If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as 1143 a function of the model number. 1144 This option is included to allow backwards compatability of the ORCA2 reference configurations with 1145 previous model versions. 1146 \np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines. 1147 This option only has an effect if \np{ln\_full\_field} is true. 1148 \np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer. 1149 Finally \np{ln\_custom} specifies that the custom module will be called. 1150 This module is contained in the file \mdl{custom} and can be edited by users. 1151 For example damping could be applied in a specific region. 1152 1153 The restoration coefficient can be set to zero in equatorial regions by 1154 specifying a positive value of \np{nn\_hdmp}. 1150 1155 Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to 1151 1156 the full values of a 10\deg latitud band. 1152 This is often used because of the short adjustment time scale in the equatorial region 1153 \citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a 1154 hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}. 1157 This is often used because of the short adjustment time scale in the equatorial region 1158 \citep{Reverdin1991, Fujio1991, Marti_PhD92}. 1159 The time scale associated with the damping depends on the depth as a hyperbolic tangent, 1160 with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}. 1155 1161 1156 1162 % ================================================================ … … 1165 1171 1166 1172 Options are defined through the \ngn{namdom} namelist variables. 1167 The general framework for tracer time stepping is a modified leap-frog scheme 1168 \citep{Leclair_Madec_OM09}, $i.e.$ a three level centred time scheme associated 1169 with a Asselin time filter (cf. \autoref{sec:STP_mLF}): 1173 The general framework for tracer time stepping is a modified leap-frog scheme \citep{Leclair_Madec_OM09}, 1174 $i.e.$ a three level centred time scheme associated with a Asselin time filter (cf. \autoref{sec:STP_mLF}): 1170 1175 \begin{equation} \label{eq:tra_nxt} 1171 1176 \begin{aligned} … … 1177 1182 \end{aligned} 1178 1183 \end{equation} 1179 where RHS is the right hand side of the temperature equation, 1180 the subscript $f$ denotes filtered values, $\gamma$ is the Asselin coefficient, 1181 and $S$ is the total forcing applied on $T$ ($i.e.$ fluxes plus content in mass exchanges). 1182 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter). 1183 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}. Note that the forcing correction term in the filter1184 is not applied in linear free surface (\jp{lk\_vvl}\forcode{ = .false.}) (see \autoref{subsec:TRA_sbc}. 1185 Not also that in constant volume case, the time stepping is performed on $T$, 1186 not on its content, $e_{3t}T$.1187 1188 When the vertical mixing is solved implicitly, the update of the \textit{next} tracer1189 fields is done in module \mdl{trazdf}. In this case only the swapping of arrays 1190 and the Asselin filtering is done in the \mdl{tranxt} module.1191 1192 In order to prepare for the computation of the \textit{next} time step, 1193 a swap of tracer arrays is performed:$T^{t-\rdt} = T^t$ and $T^t = T_f$.1184 where RHS is the right hand side of the temperature equation, the subscript $f$ denotes filtered values, 1185 $\gamma$ is the Asselin coefficient, and $S$ is the total forcing applied on $T$ 1186 ($i.e.$ fluxes plus content in mass exchanges). 1187 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter). 1188 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}. 1189 Note that the forcing correction term in the filter is not applied in linear free surface 1190 (\jp{lk\_vvl}\forcode{ = .false.}) (see \autoref{subsec:TRA_sbc}. 1191 Not also that in constant volume case, the time stepping is performed on $T$, not on its content, $e_{3t}T$. 1192 1193 When the vertical mixing is solved implicitly, 1194 the update of the \textit{next} tracer fields is done in module \mdl{trazdf}. 1195 In this case only the swapping of arrays and the Asselin filtering is done in the \mdl{tranxt} module. 1196 1197 In order to prepare for the computation of the \textit{next} time step, a swap of tracer arrays is performed: 1198 $T^{t-\rdt} = T^t$ and $T^t = T_f$. 1194 1199 1195 1200 % ================================================================ … … 1209 1214 \label{subsec:TRA_eos} 1210 1215 1211 The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship 1212 linking seawater density, $\rho$, to a number of state variables, 1213 most typically temperature, salinity and pressure. 1214 Because density gradients control the pressure gradient force through the hydrostatic balance, 1215 the equation of state provides a fundamental bridge between the distribution of active tracers1216 and the fluid dynamics. Nonlinearities of the EOS are of major importance, in particular 1217 influencing the circulation through determination of the static stability below the mixed layer, 1218 thus controlling rates of exchange between the atmosphere and the ocean interior \citep{Roquet_JPO2015}.1219 Therefore an accurate EOS based on either the 1980 equation of state (EOS-80, \cite{UNESCO1983}) 1220 or TEOS-10 \citep{TEOS10} standards should be used anytime a simulation of the real 1221 ocean circulation is attempted \citep{Roquet_JPO2015}. 1222 The use of TEOS-10 is highly recommended because 1223 \textit{(i)} it is the new official EOS,1224 \textit{(ii)} it is more accurate, being based on an updated database of laboratory measurements, and1225 \textit{(iii)} it uses Conservative Temperature and Absolute Salinity (instead of potential temperature 1226 and practical salinity for EOS-980, both variables being more suitable for use as model variables 1227 \citep{TEOS10, Graham_McDougall_JPO13}. 1216 The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship linking seawater density, 1217 $\rho$, to a number of state variables, most typically temperature, salinity and pressure. 1218 Because density gradients control the pressure gradient force through the hydrostatic balance, 1219 the equation of state provides a fundamental bridge between the distribution of active tracers and 1220 the fluid dynamics. 1221 Nonlinearities of the EOS are of major importance, in particular influencing the circulation through 1222 determination of the static stability below the mixed layer, 1223 thus controlling rates of exchange between the atmosphere and the ocean interior \citep{Roquet_JPO2015}. 1224 Therefore an accurate EOS based on either the 1980 equation of state (EOS-80, \cite{UNESCO1983}) or 1225 TEOS-10 \citep{TEOS10} standards should be used anytime a simulation of the real ocean circulation is attempted 1226 \citep{Roquet_JPO2015}. 1227 The use of TEOS-10 is highly recommended because 1228 \textit{(i)} it is the new official EOS, 1229 \textit{(ii)} it is more accurate, being based on an updated database of laboratory measurements, and 1230 \textit{(iii)} it uses Conservative Temperature and Absolute Salinity (instead of potential temperature and 1231 practical salinity for EOS-980, both variables being more suitable for use as model variables 1232 \citep{TEOS10, Graham_McDougall_JPO13}. 1228 1233 EOS-80 is an obsolescent feature of the NEMO system, kept only for backward compatibility. 1229 For process studies, it is often convenient to use an approximation of the EOS. To that purposed, 1230 a simplified EOS (S-EOS) inspired by \citet{Vallis06} is also available. 1231 1232 In the computer code, a density anomaly, $d_a= \rho / \rho_o - 1$, 1233 is computed, with $\rho_o$ a reference density. Called \textit{rau0} 1234 in the code, $\rho_o$ is set in \mdl{phycst} to a value of $1,026~Kg/m^3$. 1235 This is a sensible choice for the reference density used in a Boussinesq ocean 1236 climate model, as, with the exception of only a small percentage of the ocean, 1234 For process studies, it is often convenient to use an approximation of the EOS. 1235 To that purposed, a simplified EOS (S-EOS) inspired by \citet{Vallis06} is also available. 1236 1237 In the computer code, a density anomaly, $d_a= \rho / \rho_o - 1$, is computed, with $\rho_o$ a reference density. 1238 Called \textit{rau0} in the code, $\rho_o$ is set in \mdl{phycst} to a value of $1,026~Kg/m^3$. 1239 This is a sensible choice for the reference density used in a Boussinesq ocean climate model, as, 1240 with the exception of only a small percentage of the ocean, 1237 1241 density in the World Ocean varies by no more than 2$\%$ from that value \citep{Gill1982}. 1238 1242 1239 Options are defined through the \ngn{nameos} namelist variables, and in particular \np{nn\_eos} 1240 whichcontrols the EOS used (\forcode{= -1} for TEOS10 ; \forcode{= 0} for EOS-80 ; \forcode{= 1} for S-EOS).1243 Options are defined through the \ngn{nameos} namelist variables, and in particular \np{nn\_eos} which 1244 controls the EOS used (\forcode{= -1} for TEOS10 ; \forcode{= 0} for EOS-80 ; \forcode{= 1} for S-EOS). 1241 1245 \begin{description} 1242 1243 \item[\np{nn\_eos}\forcode{ = -1}] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used. 1244 The accuracy of this approximation is comparable to the TEOS-10 rational function approximation, 1245 but it is optimized for a boussinesq fluid and the polynomial expressions have simpler 1246 and more computationally efficient expressions for their derived quantities 1247 which make them more adapted for use in ocean models. 1248 Note that a slightly higher precision polynomial form is now used replacement of the TEOS-10 1249 rational function approximation for hydrographic data analysis \citep{TEOS10}. 1250 A key point is that conservative state variables are used: 1251 Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \degC, notation: $\Theta$). 1252 The pressure in decibars is approximated by the depth in meters. 1253 With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant. It is set to 1254 $C_p=3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{TEOS10}. 1255 1256 Choosing polyTEOS10-bsq implies that the state variables used by the model are 1257 $\Theta$ and $S_A$. In particular, the initial state deined by the user have to be given as 1258 \textit{Conservative} Temperature and \textit{Absolute} Salinity. 1259 In addition, setting \np{ln\_useCT} to \forcode{.true.} convert the Conservative SST to potential SST 1260 prior to either computing the air-sea and ice-sea fluxes (forced mode) 1261 or sending the SST field to the atmosphere (coupled mode). 1262 1263 \item[\np{nn\_eos}\forcode{ = 0}] the polyEOS80-bsq equation of seawater is used. 1264 It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized 1265 to accurately fit EOS80 (Roquet, personal comm.). The state variables used in both the EOS80 1266 and the ocean model are: 1267 the Practical Salinity ((unit: psu, notation: $S_p$)) and Potential Temperature (unit: $^{\circ}C$, notation: $\theta$). 1268 The pressure in decibars is approximated by the depth in meters. 1269 With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature, 1270 salinity and pressure \citep{UNESCO1983}. Nevertheless, a severe assumption is made in order to 1271 have a heat content ($C_p T_p$) which is conserved by the model: $C_p$ is set to a constant 1272 value, the TEOS10 value. 1246 \item[\np{nn\_eos}\forcode{ = -1}] 1247 the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used. 1248 The accuracy of this approximation is comparable to the TEOS-10 rational function approximation, 1249 but it is optimized for a boussinesq fluid and the polynomial expressions have simpler and 1250 more computationally efficient expressions for their derived quantities which make them more adapted for 1251 use in ocean models. 1252 Note that a slightly higher precision polynomial form is now used replacement of 1253 the TEOS-10 rational function approximation for hydrographic data analysis \citep{TEOS10}. 1254 A key point is that conservative state variables are used: 1255 Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \degC, notation: $\Theta$). 1256 The pressure in decibars is approximated by the depth in meters. 1257 With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant. 1258 It is set to $C_p=3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{TEOS10}. 1259 1260 Choosing polyTEOS10-bsq implies that the state variables used by the model are $\Theta$ and $S_A$. 1261 In particular, the initial state deined by the user have to be given as \textit{Conservative} Temperature and 1262 \textit{Absolute} Salinity. 1263 In addition, setting \np{ln\_useCT} to \forcode{.true.} convert the Conservative SST to potential SST prior to 1264 either computing the air-sea and ice-sea fluxes (forced mode) or 1265 sending the SST field to the atmosphere (coupled mode). 1266 1267 \item[\np{nn\_eos}\forcode{ = 0}] 1268 the polyEOS80-bsq equation of seawater is used. 1269 It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized to 1270 accurately fit EOS80 (Roquet, personal comm.). 1271 The state variables used in both the EOS80 and the ocean model are: 1272 the Practical Salinity ((unit: psu, notation: $S_p$)) and 1273 Potential Temperature (unit: $^{\circ}C$, notation: $\theta$). 1274 The pressure in decibars is approximated by the depth in meters. 1275 With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature, salinity and 1276 pressure \citep{UNESCO1983}. 1277 Nevertheless, a severe assumption is made in order to have a heat content ($C_p T_p$) which 1278 is conserved by the model: $C_p$ is set to a constant value, the TEOS10 value. 1273 1279 1274 \item[\np{nn\_eos}\forcode{ = 1}] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen, 1275 the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.) 1276 (see also \citet{Roquet_JPO2015}). It provides a simplistic linear representation of both 1277 cabbeling and thermobaricity effects which is enough for a proper treatment of the EOS 1278 in theoretical studies \citep{Roquet_JPO2015}. 1279 With such an equation of state there is no longer a distinction between 1280 \textit{conservative} and \textit{potential} temperature, as well as between \textit{absolute} 1281 and \textit{practical} salinity. 1282 S-EOS takes the following expression: 1283 \begin{equation} \label{eq:tra_S-EOS} 1284 \begin{split} 1285 d_a(T,S,z) = ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a \\ 1286 & + b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * S_a \\ 1287 & - \nu \; T_a \; S_a \; ) \; / \; \rho_o \\ 1288 with \ \ T_a = T-10 \; ; & \; S_a = S-35 \; ;\; \rho_o = 1026~Kg/m^3 1289 \end{split} 1290 \end{equation} 1291 where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}. 1292 In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing 1293 the associated coefficients. 1294 Setting to zero the two thermobaric coefficients ($\mu_1$, $\mu_2$) remove thermobaric effect from S-EOS. 1295 setting to zero the three cabbeling coefficients ($\lambda_1$, $\lambda_2$, $\nu$) remove cabbeling effect from S-EOS. 1296 Keeping non-zero value to $a_0$ and $b_0$ provide a linear EOS function of T and S. 1297 1280 \item[\np{nn\_eos}\forcode{ = 1}] 1281 a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen, 1282 the coefficients of which has been optimized to fit the behavior of TEOS10 1283 (Roquet, personal comm.) (see also \citet{Roquet_JPO2015}). 1284 It provides a simplistic linear representation of both cabbeling and thermobaricity effects which 1285 is enough for a proper treatment of the EOS in theoretical studies \citep{Roquet_JPO2015}. 1286 With such an equation of state there is no longer a distinction between 1287 \textit{conservative} and \textit{potential} temperature, 1288 as well as between \textit{absolute} and \textit{practical} salinity. 1289 S-EOS takes the following expression: 1290 \begin{equation} \label{eq:tra_S-EOS} 1291 \begin{split} 1292 d_a(T,S,z) = ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a \\ 1293 & + b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * S_a \\ 1294 & - \nu \; T_a \; S_a \; ) \; / \; \rho_o \\ 1295 with \ \ T_a = T-10 \; ; & \; S_a = S-35 \; ;\; \rho_o = 1026~Kg/m^3 1296 \end{split} 1297 \end{equation} 1298 where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}. 1299 In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing the associated coefficients. 1300 Setting to zero the two thermobaric coefficients ($\mu_1$, $\mu_2$) remove thermobaric effect from S-EOS. 1301 setting to zero the three cabbeling coefficients ($\lambda_1$, $\lambda_2$, $\nu$) remove cabbeling effect from S-EOS. 1302 Keeping non-zero value to $a_0$ and $b_0$ provide a linear EOS function of T and S. 1298 1303 \end{description} 1299 1304 … … 1313 1318 \end{tabular} 1314 1319 \caption{ \protect\label{tab:SEOS} 1315 Standard value of S-EOS coefficients. } 1320 Standard value of S-EOS coefficients. 1321 } 1316 1322 \end{center} 1317 1323 \end{table} … … 1325 1331 \label{subsec:TRA_bn2} 1326 1332 1327 An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} 1328 frequency) is of paramount importance as determine the ocean stratification and 1329 is used in several ocean parameterisations (namely TKE, GLS, Richardson number dependent 1330 vertical diffusion, enhanced vertical diffusion, non-penetrative convection, tidal mixing 1331 parameterisation, iso-neutral diffusion). In particular, $N^2$ has to be computed at the local pressure 1332 (pressure in decibar being approximated by the depth in meters). The expression for $N^2$ 1333 is given by:1333 An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} frequency) is of 1334 paramount importance as determine the ocean stratification and is used in several ocean parameterisations 1335 (namely TKE, GLS, Richardson number dependent vertical diffusion, enhanced vertical diffusion, 1336 non-penetrative convection, tidal mixing parameterisation, iso-neutral diffusion). 1337 In particular, $N^2$ has to be computed at the local pressure 1338 (pressure in decibar being approximated by the depth in meters). 1339 The expression for $N^2$ is given by: 1334 1340 \begin{equation} \label{eq:tra_bn2} 1335 1341 N^2 = \frac{g}{e_{3w}} \left( \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T] \right) 1336 1342 \end{equation} 1337 where $(T,S) = (\Theta, S_A)$ for TEOS10, $= (\theta, S_p)$ for TEOS-80, or $=(T,S)$ for S-EOS, 1338 and, $\alpha$ and $\beta$ are the thermal and haline expansion coefficients. 1339 The coefficients are a polynomial function of temperature, salinity and depth which expression1340 depends on the chosen EOS. They are computed through \textit{eos\_rab}, a \textsc{Fortran} 1341 function that can be found in \mdl{eosbn2}.1343 where $(T,S) = (\Theta, S_A)$ for TEOS10, $= (\theta, S_p)$ for TEOS-80, or $=(T,S)$ for S-EOS, 1344 and, $\alpha$ and $\beta$ are the thermal and haline expansion coefficients. 1345 The coefficients are a polynomial function of temperature, salinity and depth which 1346 expression depends on the chosen EOS. 1347 They are computed through \textit{eos\_rab}, a \textsc{Fortran} function that can be found in \mdl{eosbn2}. 1342 1348 1343 1349 % ------------------------------------------------------------------------------------------------------------- … … 1356 1362 \end{equation} 1357 1363 1358 \autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of 1359 sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent 1360 t erms in \autoref{eq:tra_eos_fzp} (last term) have been dropped. The freezing1361 point is computed through \textit{eos\_fzp}, a \textsc{Fortran} function that can be found 1362 in \mdl{eosbn2}.1364 \autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of sea water 1365 ($i.e.$ referenced to the surface $p=0$), 1366 thus the pressure dependent terms in \autoref{eq:tra_eos_fzp} (last term) have been dropped. 1367 The freezing point is computed through \textit{eos\_fzp}, 1368 a \textsc{Fortran} function that can be found in \mdl{eosbn2}. 1363 1369 1364 1370 … … 1380 1386 1381 1387 \gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, 1382 I've changed "derivative" to "difference" and "mean" to "average"} 1383 1384 With partial cells (\np{ln\_zps}\forcode{ = .true.}) at bottom and top (\np{ln\_isfcav}\forcode{ = .true.}), in general, 1385 tracers in horizontally adjacent cells live at different depths. 1386 Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) 1387 and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module). 1388 The partial cell properties at the top (\np{ln\_isfcav}\forcode{ = .true.}) are computed in the same way as for the bottom. 1388 I've changed "derivative" to "difference" and "mean" to "average"} 1389 1390 With partial cells (\np{ln\_zps}\forcode{ = .true.}) at bottom and top (\np{ln\_isfcav}\forcode{ = .true.}), 1391 in general, tracers in horizontally adjacent cells live at different depths. 1392 Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) and 1393 the hydrostatic pressure gradient calculations (\mdl{dynhpg} module). 1394 The partial cell properties at the top (\np{ln\_isfcav}\forcode{ = .true.}) are computed in the same way as 1395 for the bottom. 1389 1396 So, only the bottom interpolation is explained below. 1390 1397 1391 Before taking horizontal gradients between the tracers next to the bottom, a linear 1392 interpolation in the vertical is used to approximate the deeper tracer as if it actually 1393 lived at the depth of the shallower tracer point (\autoref{fig:Partial_step_scheme}). 1394 For example, for temperature in the $i$-direction the needed interpolated 1395 temperature, $\widetilde{T}$, is: 1398 Before taking horizontal gradients between the tracers next to the bottom, 1399 a linear interpolation in the vertical is used to approximate the deeper tracer as if 1400 it actually lived at the depth of the shallower tracer point (\autoref{fig:Partial_step_scheme}). 1401 For example, for temperature in the $i$-direction the needed interpolated temperature, $\widetilde{T}$, is: 1396 1402 1397 1403 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1398 \begin{figure}[!p] \begin{center} 1399 \includegraphics[width=0.9\textwidth]{Partial_step_scheme} 1400 \caption{ \protect\label{fig:Partial_step_scheme} 1401 Discretisation of the horizontal difference and average of tracers in the $z$-partial 1402 step coordinate (\protect\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i )>0$. 1403 A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value 1404 at the depth of the shallower tracer point of the two adjacent bottom $T$-points. 1405 The horizontal difference is then given by: $\delta _{i+1/2} T_k= \widetilde{T}_k^{\,i+1} -T_k^{\,i}$ 1406 and the average by: $\overline{T}_k^{\,i+1/2}= ( \widetilde{T}_k^{\,i+1/2} - T_k^{\,i} ) / 2$. } 1407 \end{center} \end{figure} 1404 \begin{figure}[!p] 1405 \begin{center} 1406 \includegraphics[width=0.9\textwidth]{Fig_partial_step_scheme} 1407 \caption{ \protect\label{fig:Partial_step_scheme} 1408 Discretisation of the horizontal difference and average of tracers in the $z$-partial step coordinate 1409 (\protect\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i )>0$. 1410 A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, 1411 the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. 1412 The horizontal difference is then given by: $\delta _{i+1/2} T_k= \widetilde{T}_k^{\,i+1} -T_k^{\,i}$ and 1413 the average by: $\overline{T}_k^{\,i+1/2}= ( \widetilde{T}_k^{\,i+1/2} - T_k^{\,i} ) / 2$. 1414 } 1415 \end{center} 1416 \end{figure} 1408 1417 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1409 1418 \begin{equation*} … … 1416 1425 \end{aligned} \right. 1417 1426 \end{equation*} 1418 and the resulting forms for the horizontal difference and the horizontal average 1419 value of $T$ at a $U$-point are: 1427 and the resulting forms for the horizontal difference and the horizontal average value of $T$ at a $U$-point are: 1420 1428 \begin{equation} \label{eq:zps_hde} 1421 1429 \begin{aligned} … … 1434 1442 \end{equation} 1435 1443 1436 The computation of horizontal derivative of tracers as well as of density is 1437 performed once for all at each time step in \mdl{zpshde} module and stored 1438 in shared arrays to be used when needed. It has to be emphasized that the 1439 procedure used to compute the interpolated density, $\widetilde{\rho}$, is not 1440 the same as that used for $T$ and $S$. Instead of forming a linear approximation 1441 of density, we compute $\widetilde{\rho }$ from the interpolated values of $T$ 1442 and $S$, and the pressure at a $u$-point (in the equation of state pressure is 1443 approximated by depth, see \autoref{subsec:TRA_eos} ) : 1444 The computation of horizontal derivative of tracers as well as of density is performed once for all at 1445 each time step in \mdl{zpshde} module and stored in shared arrays to be used when needed. 1446 It has to be emphasized that the procedure used to compute the interpolated density, $\widetilde{\rho}$, 1447 is not the same as that used for $T$ and $S$. 1448 Instead of forming a linear approximation of density, we compute $\widetilde{\rho }$ from the interpolated values of 1449 $T$ and $S$, and the pressure at a $u$-point 1450 (in the equation of state pressure is approximated by depth, see \autoref{subsec:TRA_eos} ): 1444 1451 \begin{equation} \label{eq:zps_hde_rho} 1445 1452 \widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u }) … … 1447 1454 \end{equation} 1448 1455 1449 This is a much better approximation as the variation of $\rho$ with depth (and 1450 thus pressure) is highly non-linear with a true equation of state and thus is badly 1451 approximated with a linear interpolation. This approximation is used to compute 1452 both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) and the slopes of neutral 1453 surfaces (\autoref{sec:LDF_slp}) 1454 1455 Note that in almost all the advection schemes presented in this Chapter, both 1456 averaging and differencing operators appear. Yet \autoref{eq:zps_hde} has not 1457 been used in these schemes: in contrast to diffusion and pressure gradient 1458 computations, no correction for partial steps is applied for advection. The main 1459 motivation is to preserve the domain averaged mean variance of the advected 1460 field when using the $2^{nd}$ order centred scheme. Sensitivity of the advection 1461 schemes to the way horizontal averages are performed in the vicinity of partial 1462 cells should be further investigated in the near future.1456 This is a much better approximation as the variation of $\rho$ with depth (and thus pressure) 1457 is highly non-linear with a true equation of state and thus is badly approximated with a linear interpolation. 1458 This approximation is used to compute both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) and 1459 the slopes of neutral surfaces (\autoref{sec:LDF_slp}). 1460 1461 Note that in almost all the advection schemes presented in this Chapter, 1462 both averaging and differencing operators appear. 1463 Yet \autoref{eq:zps_hde} has not been used in these schemes: 1464 in contrast to diffusion and pressure gradient computations, 1465 no correction for partial steps is applied for advection. 1466 The main motivation is to preserve the domain averaged mean variance of the advected field when 1467 using the $2^{nd}$ order centred scheme. 1468 Sensitivity of the advection schemes to the way horizontal averages are performed in the vicinity of 1469 partial cells should be further investigated in the near future. 1463 1470 %%% 1464 1471 \gmcomment{gm : this last remark has to be done} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex
r10146 r10354 21 21 \label{sec:ZDF_zdf} 22 22 23 The discrete form of the ocean subgrid scale physics has been presented in 24 \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}. At the surface and bottom boundaries, 25 the turbulent fluxes of momentum, heat and salt have to be defined. At the 26 surface they are prescribed from the surface forcing (see \autoref{chap:SBC}), 27 while at the bottom they are set to zero for heat and salt, unless a geothermal 28 flux forcing is prescribed as a bottom boundary condition ($i.e.$ \key{trabbl} 29 defined, see \autoref{subsec:TRA_bbc}), and specified through a bottom friction 30 parameterisation for momentum (see \autoref{sec:ZDF_bfr}). 31 32 In this section we briefly discuss the various choices offered to compute 33 the vertical eddy viscosity and diffusivity coefficients, $A_u^{vm}$ , 34 $A_v^{vm}$ and $A^{vT}$ ($A^{vS}$), defined at $uw$-, $vw$- and $w$- 35 points, respectively (see \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}). These 36 coefficients can be assumed to be either constant, or a function of the local 37 Richardson number, or computed from a turbulent closure model (either 38 TKE or GLS formulation). The computation of these coefficients is initialized 39 in the \mdl{zdfini} module and performed in the \mdl{zdfric}, \mdl{zdftke} or 40 \mdl{zdfgls} modules. The trends due to the vertical momentum and tracer 41 diffusion, including the surface forcing, are computed and added to the 42 general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 43 These trends can be computed using either a forward time stepping scheme 44 (namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping 45 scheme (\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing 46 coefficients, and thus of the formulation used (see \autoref{chap:STP}). 23 The discrete form of the ocean subgrid scale physics has been presented in 24 \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}. 25 At the surface and bottom boundaries, the turbulent fluxes of momentum, heat and salt have to be defined. 26 At the surface they are prescribed from the surface forcing (see \autoref{chap:SBC}), 27 while at the bottom they are set to zero for heat and salt, 28 unless a geothermal flux forcing is prescribed as a bottom boundary condition ($i.e.$ \key{trabbl} defined, 29 see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum 30 (see \autoref{sec:ZDF_bfr}). 31 32 In this section we briefly discuss the various choices offered to compute the vertical eddy viscosity and 33 diffusivity coefficients, $A_u^{vm}$ , $A_v^{vm}$ and $A^{vT}$ ($A^{vS}$), defined at $uw$-, $vw$- and $w$- points, 34 respectively (see \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}). 35 These coefficients can be assumed to be either constant, or a function of the local Richardson number, 36 or computed from a turbulent closure model (either TKE or GLS formulation). 37 The computation of these coefficients is initialized in the \mdl{zdfini} module and performed in 38 the \mdl{zdfric}, \mdl{zdftke} or \mdl{zdfgls} modules. 39 The trends due to the vertical momentum and tracer diffusion, including the surface forcing, 40 are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 41 These trends can be computed using either a forward time stepping scheme 42 (namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping scheme 43 (\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing coefficients, 44 and thus of the formulation used (see \autoref{chap:STP}). 47 45 48 46 % ------------------------------------------------------------------------------------------------------------- … … 56 54 %-------------------------------------------------------------------------------------------------------------- 57 55 58 Options are defined through the \ngn{namzdf} namelist variables. 59 When \key{zdfcst} is defined, the momentum and tracer vertical eddy coefficients 60 are set to constant values over the whole ocean. This is the crudest way to define 61 the vertical ocean physics. It is recommended that this option is only used in 62 process studies, not in basin scale simulations. Typical values used in this case are: 56 Options are defined through the \ngn{namzdf} namelist variables. 57 When \key{zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to 58 constant values over the whole ocean. 59 This is the crudest way to define the vertical ocean physics. 60 It is recommended that this option is only used in process studies, not in basin scale simulations. 61 Typical values used in this case are: 63 62 \begin{align*} 64 63 A_u^{vm} = A_v^{vm} &= 1.2\ 10^{-4}~m^2.s^{-1} \\ … … 67 66 68 67 These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters. 69 In all cases, do not use values smaller that those associated with the molecular 70 viscosity and diffusivity, that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, 71 $\sim10^{- 7}~m^2.s^{-1}$ for temperature and $\sim10^{-9}~m^2.s^{-1}$ for salinity.68 In all cases, do not use values smaller that those associated with the molecular viscosity and diffusivity, 69 that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and 70 $\sim10^{-9}~m^2.s^{-1}$ for salinity. 72 71 73 72 … … 83 82 %-------------------------------------------------------------------------------------------------------------- 84 83 85 When \key{zdfric} is defined, a local Richardson number dependent formulation 86 for the vertical momentum and tracer eddy coefficients is set through the \ngn{namzdf\_ric} 87 namelist variables.The vertical mixing 88 coefficients are diagnosed from the large scale variables computed by the model. 89 \textit{In situ} measurements have been used to link vertical turbulent activity to 90 large scale ocean structures. The hypothesis of a mixing mainly maintained by the 91 growth of Kelvin-Helmholtz like instabilities leads to a dependency between the 92 vertical eddy coefficients and the local Richardson number ($i.e.$ the 93 ratio of stratification to vertical shear). Following \citet{Pacanowski_Philander_JPO81}, the following 94 formulation has been implemented: 84 When \key{zdfric} is defined, a local Richardson number dependent formulation for the vertical momentum and 85 tracer eddy coefficients is set through the \ngn{namzdf\_ric} namelist variables. 86 The vertical mixing coefficients are diagnosed from the large scale variables computed by the model. 87 \textit{In situ} measurements have been used to link vertical turbulent activity to large scale ocean structures. 88 The hypothesis of a mixing mainly maintained by the growth of Kelvin-Helmholtz like instabilities leads to 89 a dependency between the vertical eddy coefficients and the local Richardson number 90 ($i.e.$ the ratio of stratification to vertical shear). 91 Following \citet{Pacanowski_Philander_JPO81}, the following formulation has been implemented: 95 92 \begin{equation} \label{eq:zdfric} 96 93 \left\{ \begin{aligned} … … 99 96 \end{aligned} \right. 100 97 \end{equation} 101 where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson 102 number, $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 103 $A_b^{vT} $ and $A_b^{vm}$ are the constant background values set as in the 104 constant case (see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ 105 is the maximum value that can be reached by the coefficient when $Ri\leq 0$, 106 $a=5$ and $n=2$. The last three values can be modified by setting the 107 \np{rn\_avmri}, \np{rn\_alp} and \np{nn\_ric} namelist parameters, respectively. 108 109 A simple mixing-layer model to transfer and dissipate the atmospheric 110 forcings (wind-stress and buoyancy fluxes) can be activated setting 111 the \np{ln\_mldw}\forcode{ = .true.} in the namelist. 112 113 In this case, the local depth of turbulent wind-mixing or "Ekman depth" 114 $h_{e}(x,y,t)$ is evaluated and the vertical eddy coefficients prescribed within this layer. 98 where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson number, 99 $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 100 $A_b^{vT} $ and $A_b^{vm}$ are the constant background values set as in the constant case 101 (see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ is the maximum value that 102 can be reached by the coefficient when $Ri\leq 0$, $a=5$ and $n=2$. 103 The last three values can be modified by setting the \np{rn\_avmri}, \np{rn\_alp} and 104 \np{nn\_ric} namelist parameters, respectively. 105 106 A simple mixing-layer model to transfer and dissipate the atmospheric forcings 107 (wind-stress and buoyancy fluxes) can be activated setting the \np{ln\_mldw}\forcode{ = .true.} in the namelist. 108 109 In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and 110 the vertical eddy coefficients prescribed within this layer. 115 111 116 112 This depth is assumed proportional to the "depth of frictional influence" that is limited by rotation: 117 113 \begin{equation} 118 h_{e} = Ek \frac {u^{*}} {f_{0}} \\ 119 \end{equation} 120 where, $Ek$ is an empirical parameter, $u^{*}$ is the friction velocity and $f_{0}$ is the Coriolis 121 parameter. 114 h_{e} = Ek \frac {u^{*}} {f_{0}} 115 \end{equation} 116 where, $Ek$ is an empirical parameter, $u^{*}$ is the friction velocity and $f_{0}$ is the Coriolis parameter. 122 117 123 118 In this similarity height relationship, the turbulent friction velocity: 124 119 \begin{equation} 125 u^{*} = \sqrt \frac {|\tau|} {\rho_o} \\ 126 \end{equation} 127 120 u^{*} = \sqrt \frac {|\tau|} {\rho_o} 121 \end{equation} 128 122 is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 129 123 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. 130 Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to 124 Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to 131 125 the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{Lermusiaux2001}. 132 126 … … 142 136 %-------------------------------------------------------------------------------------------------------------- 143 137 144 The vertical eddy viscosity and diffusivity coefficients are computed from a TKE 145 turbulent closure model based on a prognostic equation for $\bar{e}$, the turbulent 146 kinetic energy, and a closure assumption for the turbulent length scales. This 147 turbulent closure model has been developed by \citet{Bougeault1989} in the 148 atmospheric case, adapted by \citet{Gaspar1990} for the oceanic case, and 149 embedded in OPA, the ancestor of NEMO, by \citet{Blanke1993} for equatorial Atlantic 150 simulations. Since then, significant modifications have been introduced by 151 \citet{Madec1998} in both the implementation and the formulation of the mixing 152 length scale. The time evolution of $\bar{e}$ is the result of the production of 153 $\bar{e}$ through vertical shear, its destruction through stratification, its vertical 154 diffusion, and its dissipation of \citet{Kolmogorov1942} type: 138 The vertical eddy viscosity and diffusivity coefficients are computed from a TKE turbulent closure model based on 139 a prognostic equation for $\bar{e}$, the turbulent kinetic energy, 140 and a closure assumption for the turbulent length scales. 141 This turbulent closure model has been developed by \citet{Bougeault1989} in the atmospheric case, 142 adapted by \citet{Gaspar1990} for the oceanic case, and embedded in OPA, the ancestor of NEMO, 143 by \citet{Blanke1993} for equatorial Atlantic simulations. 144 Since then, significant modifications have been introduced by \citet{Madec1998} in both the implementation and 145 the formulation of the mixing length scale. 146 The time evolution of $\bar{e}$ is the result of the production of $\bar{e}$ through vertical shear, 147 its destruction through stratification, its vertical diffusion, and its dissipation of \citet{Kolmogorov1942} type: 155 148 \begin{equation} \label{eq:zdftke_e} 156 149 \frac{\partial \bar{e}}{\partial t} = … … 170 163 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 171 164 $l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales, 172 $P_{rt}$ is the Prandtl number, $K_m$ and $K_\rho$ are the vertical eddy viscosity 173 and diffusivity coefficients. The constants $C_k = 0.1$ and $C_\epsilon = \sqrt {2} /2$ 174 $\approx 0.7$ are designed to deal with vertical mixing at any depth \citep{Gaspar1990}. 175 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}. 176 $P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function 177 of the local Richardson number, $R_i$: 165 $P_{rt}$ is the Prandtl number, $K_m$ and $K_\rho$ are the vertical eddy viscosity and diffusivity coefficients. 166 The constants $C_k = 0.1$ and $C_\epsilon = \sqrt {2} /2$ $\approx 0.7$ are designed to deal with 167 vertical mixing at any depth \citep{Gaspar1990}. 168 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}. 169 $P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function of the local Richardson number, $R_i$: 178 170 \begin{align*} \label{eq:prt} 179 171 P_{rt} = \begin{cases} … … 186 178 The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable. 187 179 188 At the sea surface, the value of $\bar{e}$ is prescribed from the wind 189 stress field as $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb} 190 namelist parameter. The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}), 191 however a much larger value can be used when taking into account the 192 surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}). 193 The bottom value of TKE is assumed to be equal to the value of the level just above. 194 The time integration of the $\bar{e}$ equation may formally lead to negative values 195 because the numerical scheme does not ensure its positivity. To overcome this 196 problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin} 197 namelist parameter). Following \citet{Gaspar1990}, the cut-off value is set 198 to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. This allows the subsequent formulations 199 to match that of \citet{Gargett1984} for the diffusion in the thermocline and 200 deep ocean : $K_\rho = 10^{-3} / N$. 201 In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical 202 instabilities associated with too weak vertical diffusion. They must be 203 specified at least larger than the molecular values, and are set through 204 \np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \autoref{subsec:ZDF_cst}). 180 At the sea surface, the value of $\bar{e}$ is prescribed from the wind stress field as 181 $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb} namelist parameter. 182 The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}), however a much larger value can be used when 183 taking into account the surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}). 184 The bottom value of TKE is assumed to be equal to the value of the level just above. 185 The time integration of the $\bar{e}$ equation may formally lead to negative values because 186 the numerical scheme does not ensure its positivity. 187 To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin} namelist parameter). 188 Following \citet{Gaspar1990}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. 189 This allows the subsequent formulations to match that of \citet{Gargett1984} for the diffusion in 190 the thermocline and deep ocean : $K_\rho = 10^{-3} / N$. 191 In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical instabilities associated with 192 too weak vertical diffusion. 193 They must be specified at least larger than the molecular values, and are set through \np{rn\_avm0} and 194 \np{rn\_avt0} (namzdf namelist, see \autoref{subsec:ZDF_cst}). 205 195 206 196 \subsubsection{Turbulent length scale} 207 For computational efficiency, the original formulation of the turbulent length 208 scales proposed by \citet{Gaspar1990} has been simplified. Four formulations 209 are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist 210 parameter. The first two are based on the following first order approximation 211 \citep{Blanke1993}: 197 For computational efficiency, the original formulation of the turbulent length scales proposed by 198 \citet{Gaspar1990} has been simplified. 199 Four formulations are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist parameter. 200 The first two are based on the following first order approximation \citep{Blanke1993}: 212 201 \begin{equation} \label{eq:tke_mxl0_1} 213 202 l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N 214 203 \end{equation} 215 which is valid in a stable stratified region with constant values of the Brunt- 216 Vais\"{a}l\"{a} frequency. The resulting length scale is bounded by the distance 217 to the surface or to the bottom (\np{nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor 218 (\np{nn\_mxl}\forcode{ = 1}). \citet{Blanke1993} notice that this simplification has two major 219 drawbacks: it makes no sense for locally unstable stratification and the 220 computation no longer uses all the information contained in the vertical density 221 profile. To overcome these drawbacks, \citet{Madec1998} introduces the 222 \np{nn\_mxl}\forcode{ = 2..3} cases, which add an extra assumption concerning the vertical 223 gradient of the computed length scale. So, the length scales are first evaluated 224 as in \autoref{eq:tke_mxl0_1} and then bounded such that: 204 which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency. 205 The resulting length scale is bounded by the distance to the surface or to the bottom 206 (\np{nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{ = 1}). 207 \citet{Blanke1993} notice that this simplification has two major drawbacks: 208 it makes no sense for locally unstable stratification and the computation no longer uses all 209 the information contained in the vertical density profile. 210 To overcome these drawbacks, \citet{Madec1998} introduces the \np{nn\_mxl}\forcode{ = 2..3} cases, 211 which add an extra assumption concerning the vertical gradient of the computed length scale. 212 So, the length scales are first evaluated as in \autoref{eq:tke_mxl0_1} and then bounded such that: 225 213 \begin{equation} \label{eq:tke_mxl_constraint} 226 214 \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1 227 215 \qquad \text{with }\ l = l_k = l_\epsilon 228 216 \end{equation} 229 \autoref{eq:tke_mxl_constraint} means that the vertical variations of the length 230 scale cannot be larger than the variations of depth. It provides a better 231 approximation of the \citet{Gaspar1990} formulation while being much less 232 time consuming. In particular, it allows the length scale to be limited not only 233 by the distance to the surface or to the ocean bottom but also by the distance 234 to a strongly stratified portion of the water column such as the thermocline 235 (\autoref{fig:mixing_length}). In order to impose the \autoref{eq:tke_mxl_constraint} 236 constraint, we introduce two additional length scales: $l_{up}$ and $l_{dwn}$, 237 the upward and downward length scales, and evaluate the dissipation and 238 mixing length scales as (and note that here we use numerical indexing): 217 \autoref{eq:tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than 218 the variations of depth. 219 It provides a better approximation of the \citet{Gaspar1990} formulation while being much less 220 time consuming. 221 In particular, it allows the length scale to be limited not only by the distance to the surface or 222 to the ocean bottom but also by the distance to a strongly stratified portion of the water column such as 223 the thermocline (\autoref{fig:mixing_length}). 224 In order to impose the \autoref{eq:tke_mxl_constraint} constraint, we introduce two additional length scales: 225 $l_{up}$ and $l_{dwn}$, the upward and downward length scales, and 226 evaluate the dissipation and mixing length scales as 227 (and note that here we use numerical indexing): 239 228 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 240 229 \begin{figure}[!t] \begin{center} … … 253 242 \end{aligned} 254 243 \end{equation} 255 where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, 256 $i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 257 258 In the \np{nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same 259 value: $ l_k= l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right)$, while in the 260 \np{nn\_mxl}\forcode{ = 3} case, the dissipation and mixing turbulent length scales are give 261 as in \citet{Gaspar1990}: 244 where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, $i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 245 246 In the \np{nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same value: 247 $ l_k= l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right)$, while in the \np{nn\_mxl}\forcode{ = 3} case, 248 the dissipation and mixing turbulent length scales are give as in \citet{Gaspar1990}: 262 249 \begin{equation} \label{eq:tke_mxl_gaspar} 263 250 \begin{aligned} … … 267 254 \end{equation} 268 255 269 At the ocean surface, a non zero length scale is set through the \np{rn\_mxl0} namelist 270 parameter. Usually the surface scale is given by $l_o = \kappa \,z_o$ 271 where $\kappa = 0.4$ is von Karman's constant and $z_o$ the roughness 272 parameter of the surface. Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94} 273 leads to a 0.04~m, the default value of \np{rn\_mxl0}. In the ocean interior 274 a minimum length scale is set to recover the molecular viscosity when $\bar{e}$ 275 reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 256 At the ocean surface, a non zero length scale is set through the \np{rn\_mxl0} namelist parameter. 257 Usually the surface scale is given by $l_o = \kappa \,z_o$ where $\kappa = 0.4$ is von Karman's constant and 258 $z_o$ the roughness parameter of the surface. 259 Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94} leads to a 0.04~m, the default value of \np{rn\_mxl0}. 260 In the ocean interior a minimum length scale is set to recover the molecular viscosity when 261 $\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 276 262 277 263 278 264 \subsubsection{Surface wave breaking parameterization} 279 265 %-----------------------------------------------------------------------% 280 Following \citet{Mellor_Blumberg_JPO04}, the TKE turbulence closure model has been modified 281 to include the effect of surface wave breaking energetics. This results in a reduction of summertime 282 surface temperature when the mixed layer is relatively shallow. The \citet{Mellor_Blumberg_JPO04} 283 modifications acts on surface length scale and TKE values and air-sea drag coefficient. 266 Following \citet{Mellor_Blumberg_JPO04}, the TKE turbulence closure model has been modified to 267 include the effect of surface wave breaking energetics. 268 This results in a reduction of summertime surface temperature when the mixed layer is relatively shallow. 269 The \citet{Mellor_Blumberg_JPO04} modifications acts on surface length scale and TKE values and 270 air-sea drag coefficient. 284 271 The latter concerns the bulk formulea and is not discussed here. 285 272 … … 288 275 \bar{e}_o = \frac{1}{2}\,\left( 15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o} 289 276 \end{equation} 290 where $\alpha_{CB}$ is the \citet{Craig_Banner_JPO94} constant of proportionality 291 which depends on the ''wave age'', ranging from 57 for mature waves to 146 for 292 younger waves \citep{Mellor_Blumberg_JPO04}. 277 where $\alpha_{CB}$ is the \citet{Craig_Banner_JPO94} constant of proportionality which depends on the ''wave age'', 278 ranging from 57 for mature waves to 146 for younger waves \citep{Mellor_Blumberg_JPO04}. 293 279 The boundary condition on the turbulent length scale follows the Charnock's relation: 294 280 \begin{equation} \label{eq:ZDF_Lsbc} … … 296 282 \end{equation} 297 283 where $\kappa=0.40$ is the von Karman constant, and $\beta$ is the Charnock's constant. 298 \citet{Mellor_Blumberg_JPO04} suggest $\beta = 2.10^{5}$ the value chosen by \citet{Stacey_JPO99} 299 citing observation evidence, and $\alpha_{CB} = 100$ the Craig and Banner's value. 300 As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$, 284 \citet{Mellor_Blumberg_JPO04} suggest $\beta = 2.10^{5}$ the value chosen by 285 \citet{Stacey_JPO99} citing observation evidence, and 286 $\alpha_{CB} = 100$ the Craig and Banner's value. 287 As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$, 301 288 with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds 302 to $\alpha_{CB} = 100$. Further setting \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc} 303 as surface boundary condition on length scale, with $\beta$ hard coded to the Stacey's value. 304 Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) 305 is applied on surface $\bar{e}$ value. 289 to $\alpha_{CB} = 100$. 290 Further setting \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc} as surface boundary condition on length scale, 291 with $\beta$ hard coded to the Stacey's value. 292 Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on 293 surface $\bar{e}$ value. 306 294 307 295 308 296 \subsubsection{Langmuir cells} 309 297 %--------------------------------------% 310 Langmuir circulations (LC) can be described as ordered large-scale vertical motions 311 in the surface layer of the oceans. Although LC have nothing to do with convection, 312 the circulation pattern is rather similar to so-called convective rolls in the atmospheric 313 boundary layer. The detailed physics behind LC is described in, for example, 314 \citet{Craik_Leibovich_JFM76}. The prevailing explanation is that LC arise from 315 a nonlinear interaction between the Stokes drift and wind drift currents. 316 317 Here we introduced in the TKE turbulent closure the simple parameterization of 318 Langmuir circulations proposed by \citep{Axell_JGR02} for a $k-\epsilon$ turbulent closure. 319 The parameterization, tuned against large-eddy simulation, includes the whole effect 320 of LC in an extra source terms of TKE, $P_{LC}$. 321 The presence of $P_{LC}$ in \autoref{eq:zdftke_e}, the TKE equation, is controlled 322 by setting \np{ln\_lc} to \forcode{.true.} in the namtke namelist. 298 Langmuir circulations (LC) can be described as ordered large-scale vertical motions in 299 the surface layer of the oceans. 300 Although LC have nothing to do with convection, the circulation pattern is rather similar to 301 so-called convective rolls in the atmospheric boundary layer. 302 The detailed physics behind LC is described in, for example, \citet{Craik_Leibovich_JFM76}. 303 The prevailing explanation is that LC arise from a nonlinear interaction between the Stokes drift and 304 wind drift currents. 305 306 Here we introduced in the TKE turbulent closure the simple parameterization of Langmuir circulations proposed by 307 \citep{Axell_JGR02} for a $k-\epsilon$ turbulent closure. 308 The parameterization, tuned against large-eddy simulation, includes the whole effect of LC in 309 an extra source terms of TKE, $P_{LC}$. 310 The presence of $P_{LC}$ in \autoref{eq:zdftke_e}, the TKE equation, is controlled by setting \np{ln\_lc} to 311 \forcode{.true.} in the namtke namelist. 323 312 324 By making an analogy with the characteristic convective velocity scale 325 ($e.g.$, \citet{D'Alessio_al_JPO98}),$P_{LC}$ is assumed to be :313 By making an analogy with the characteristic convective velocity scale ($e.g.$, \citet{D'Alessio_al_JPO98}), 314 $P_{LC}$ is assumed to be : 326 315 \begin{equation} 327 316 P_{LC}(z) = \frac{w_{LC}^3(z)}{H_{LC}} … … 330 319 With no information about the wave field, $w_{LC}$ is assumed to be proportional to 331 320 the Stokes drift $u_s = 0.377\,\,|\tau|^{1/2}$, where $|\tau|$ is the surface wind stress module 332 \footnote{Following \citet{Li_Garrett_JMR93}, the surface Stoke drift velocity 333 may be expressed as $u_s = 0.016 \,|U_{10m}|$. Assuming an air density of 334 $\rho_a=1.22 \,Kg/m^3$ and a drag coefficient of $1.5~10^{-3}$ give the expression 335 used of $u_s$ as a function of the module of surface stress}. 336 For the vertical variation, $w_{LC}$ is assumed to be zero at the surface as well as 337 a t a finite depth $H_{LC}$ (which is often close to the mixed layer depth), and simply338 varies as a sine function in between (a first-order profile for the Langmuir cell structures).321 \footnote{Following \citet{Li_Garrett_JMR93}, the surface Stoke drift velocity may be expressed as 322 $u_s = 0.016 \,|U_{10m}|$. 323 Assuming an air density of $\rho_a=1.22 \,Kg/m^3$ and a drag coefficient of 324 $1.5~10^{-3}$ give the expression used of $u_s$ as a function of the module of surface stress}. 325 For the vertical variation, $w_{LC}$ is assumed to be zero at the surface as well as at 326 a finite depth $H_{LC}$ (which is often close to the mixed layer depth), 327 and simply varies as a sine function in between (a first-order profile for the Langmuir cell structures). 339 328 The resulting expression for $w_{LC}$ is : 340 329 \begin{equation} … … 344 333 \end{cases} 345 334 \end{equation} 346 where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise 347 to fit LES data. The chosen value yields maximum vertical velocities $w_{LC}$ of the order 348 of a few centimeters per second. The value of $c_{LC}$ is set through the \np{rn\_lc} 349 namelist parameter,having in mind that it should stay between 0.15 and 0.54 \citep{Axell_JGR02}.335 where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise to fit LES data. 336 The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second. 337 The value of $c_{LC}$ is set through the \np{rn\_lc} namelist parameter, 338 having in mind that it should stay between 0.15 and 0.54 \citep{Axell_JGR02}. 350 339 351 340 The $H_{LC}$ is estimated in a similar way as the turbulent length scale of TKE equations: 352 $H_{LC}$ is depth to which a water parcel with kinetic energy due to Stoke drift 353 c an reach on its own by converting its kinetic energy to potential energy, according to341 $H_{LC}$ is depth to which a water parcel with kinetic energy due to Stoke drift can reach on its own by 342 converting its kinetic energy to potential energy, according to 354 343 \begin{equation} 355 344 - \int_{-H_{LC}}^0 { N^2\;z \;dz} = \frac{1}{2} u_s^2 … … 360 349 %--------------------------------------------------------------% 361 350 362 Vertical mixing parameterizations commonly used in ocean general circulation models 363 tend toproduce mixed-layer depths that are too shallow during summer months and windy conditions.364 This bias is particularly acute over the Southern Ocean. 365 To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme 366 The parameterization is an empirical one, $i.e.$ not derived from theoretical considerations, 351 Vertical mixing parameterizations commonly used in ocean general circulation models tend to 352 produce mixed-layer depths that are too shallow during summer months and windy conditions. 353 This bias is particularly acute over the Southern Ocean. 354 To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme \cite{Rodgers_2014}. 355 The parameterization is an empirical one, $i.e.$ not derived from theoretical considerations, 367 356 but rather is meant to account for observed processes that affect the density structure of 368 357 the ocean’s planetary boundary layer that are not explicitly captured by default in the TKE scheme 369 358 ($i.e.$ near-inertial oscillations and ocean swells and waves). 370 359 371 When using this parameterization ($i.e.$ when \np{nn\_etau}\forcode{ = 1}), the TKE input to the ocean ($S$) 372 imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized 373 by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 360 When using this parameterization ($i.e.$ when \np{nn\_etau}\forcode{ = 1}), 361 the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations, 362 swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, 363 plus a depth depend one given by: 374 364 \begin{equation} \label{eq:ZDF_Ehtau} 375 365 S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau} 376 366 \end{equation} 377 where 378 $z$ is the depth, 379 $e_s$ is TKE surface boundary condition, 380 $f_r$ is the fraction of the surface TKE that penetrate in the ocean, 381 $h_\tau$ is a vertical mixing length scale that controls exponential shape of the penetration, 382 and $f_i$ is the ice concentration (no penetration if $f_i=1$, that is if the ocean is entirely 383 covered by sea-ice). 384 The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter. 385 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{ = 0}) 386 or a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m 387 at high latitudes (\np{nn\_etau}\forcode{ = 1}). 388 389 Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}. They correspond to applying 390 \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part 391 of the stress to evaluate the fraction of TKE that penetrate the ocean. 367 where $z$ is the depth, $e_s$ is TKE surface boundary condition, $f_r$ is the fraction of the surface TKE that 368 penetrate in the ocean, $h_\tau$ is a vertical mixing length scale that controls exponential shape of 369 the penetration, and $f_i$ is the ice concentration 370 (no penetration if $f_i=1$, that is if the ocean is entirely covered by sea-ice). 371 The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter. 372 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{ = 0}) or 373 a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes 374 (\np{nn\_etau}\forcode{ = 1}). 375 376 Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}. 377 They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, 378 or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrate the ocean. 392 379 Those two options are obsolescent features introduced for test purposes. 393 380 They will be removed in the next release. … … 420 407 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 421 408 422 The production of turbulence by vertical shear (the first term of the right hand side 423 of \autoref{eq:zdftke_e}) should balance the loss of kinetic energy associated with 424 the vertical momentum diffusion (first line in \autoref{eq:PE_zdf}). To do so a special care 425 have to be taken for both the time and space discretization of the TKE equation 426 \citep{Burchard_OM02,Marsaleix_al_OM08}. 427 428 Let us first address the time stepping issue. \autoref{fig:TKE_time_scheme} shows 429 how the two-level Leap-Frog time stepping of the momentum and tracer equations interplays 430 with the one-level forward time stepping of TKE equation. With this framework, the total loss 431 of kinetic energy (in 1D for the demonstration) due to the vertical momentum diffusion is 432 obtained by multiplying this quantity by $u^t$ and summing the result vertically: 409 The production of turbulence by vertical shear (the first term of the right hand side of 410 \autoref{eq:zdftke_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion 411 (first line in \autoref{eq:PE_zdf}). 412 To do so a special care have to be taken for both the time and space discretization of 413 the TKE equation \citep{Burchard_OM02,Marsaleix_al_OM08}. 414 415 Let us first address the time stepping issue. \autoref{fig:TKE_time_scheme} shows how 416 the two-level Leap-Frog time stepping of the momentum and tracer equations interplays with 417 the one-level forward time stepping of TKE equation. 418 With this framework, the total loss of kinetic energy (in 1D for the demonstration) due to 419 the vertical momentum diffusion is obtained by multiplying this quantity by $u^t$ and 420 summing the result vertically: 433 421 \begin{equation} \label{eq:energ1} 434 422 \begin{split} … … 438 426 \end{split} 439 427 \end{equation} 440 Here, the vertical diffusion of momentum is discretized backward in time 441 with a coefficient, $K_m$, known at time $t$ (\autoref{fig:TKE_time_scheme}), 442 as it is required when using the TKE scheme (see \autoref{sec:STP_forward_imp}). 443 The first term of the right hand side of \autoref{eq:energ1} represents the kinetic energy 444 transfer at the surface (atmospheric forcing) and at the bottom (friction effect). 445 The second term is always negative. It is the dissipation rate of kinetic energy, 446 and thus minus the shear production rate of $\bar{e}$. \autoref{eq:energ1} 447 implies that, to be energetically consistent, the production rate of $\bar{e}$ 448 used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as 449 ${K_m}^{t-\rdt}\,(\partial_z u)^{t-\rdt} \,(\partial_z u)^t$ (and not by the more straightforward 450 $K_m \left( \partial_z u \right)^2$ expression taken at time $t$ or $t-\rdt$). 451 452 A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification 453 (second term of the right hand side of \autoref{eq:zdftke_e}). This term 454 must balance the input of potential energy resulting from vertical mixing. 455 The rate of change of potential energy (in 1D for the demonstration) due vertical 456 mixing is obtained by multiplying vertical density diffusion 457 tendency by $g\,z$ and and summing the result vertically: 428 Here, the vertical diffusion of momentum is discretized backward in time with a coefficient, $K_m$, 429 known at time $t$ (\autoref{fig:TKE_time_scheme}), as it is required when using the TKE scheme 430 (see \autoref{sec:STP_forward_imp}). 431 The first term of the right hand side of \autoref{eq:energ1} represents the kinetic energy transfer at 432 the surface (atmospheric forcing) and at the bottom (friction effect). 433 The second term is always negative. 434 It is the dissipation rate of kinetic energy, and thus minus the shear production rate of $\bar{e}$. 435 \autoref{eq:energ1} implies that, to be energetically consistent, 436 the production rate of $\bar{e}$ used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as 437 ${K_m}^{t-\rdt}\,(\partial_z u)^{t-\rdt} \,(\partial_z u)^t$ 438 (and not by the more straightforward $K_m \left( \partial_z u \right)^2$ expression taken at time $t$ or $t-\rdt$). 439 440 A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification 441 (second term of the right hand side of \autoref{eq:zdftke_e}). 442 This term must balance the input of potential energy resulting from vertical mixing. 443 The rate of change of potential energy (in 1D for the demonstration) due vertical mixing is obtained by 444 multiplying vertical density diffusion tendency by $g\,z$ and and summing the result vertically: 458 445 \begin{equation} \label{eq:energ2} 459 446 \begin{split} … … 466 453 \end{equation} 467 454 where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$. 468 The first term of the right hand side of \autoref{eq:energ2} is always zero 469 because there is no diffusive flux through the ocean surface and bottom). 470 The second term is minus the destruction rate of $\bar{e}$ due to stratification. 471 Therefore \autoref{eq:energ1} implies that, to be energetically consistent, the product 472 ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:zdftke_e}, the TKE equation. 473 474 Let us now address the space discretization issue. 475 The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity 476 components are in the centre of the side faces of a $t$-box in staggered C-grid 477 (\autoref{fig:cell}). A space averaging is thus required to obtain the shear TKE production term. 478 By redoing the \autoref{eq:energ1} in the 3D case, it can be shown that the product of 479 eddy coefficient by the shear at $t$ and $t-\rdt$ must be performed prior to the averaging. 480 Furthermore, the possible time variation of $e_3$ (\key{vvl} case) have to be taken into 481 account. 482 483 The above energetic considerations leads to 484 the following final discrete form for the TKE equation: 455 The first term of the right hand side of \autoref{eq:energ2} is always zero because 456 there is no diffusive flux through the ocean surface and bottom). 457 The second term is minus the destruction rate of $\bar{e}$ due to stratification. 458 Therefore \autoref{eq:energ1} implies that, to be energetically consistent, 459 the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:zdftke_e}, the TKE equation. 460 461 Let us now address the space discretization issue. 462 The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity components are in 463 the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig:cell}). 464 A space averaging is thus required to obtain the shear TKE production term. 465 By redoing the \autoref{eq:energ1} in the 3D case, it can be shown that the product of eddy coefficient by 466 the shear at $t$ and $t-\rdt$ must be performed prior to the averaging. 467 Furthermore, the possible time variation of $e_3$ (\key{vvl} case) have to be taken into account. 468 469 The above energetic considerations leads to the following final discrete form for the TKE equation: 485 470 \begin{equation} \label{eq:zdftke_ene} 486 471 \begin{split} … … 500 485 \end{split} 501 486 \end{equation} 502 where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation) 503 are time stepped using a backward scheme (see\autoref{sec:STP_forward_imp}). 504 Note that the Kolmogorov term has been linearized in time in order to render 505 the implicit computation possible. The restart of the TKE scheme 506 requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as they all appear in 507 the right hand side of \autoref{eq:zdftke_ene}. For the latter, it is in fact 508 the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored. 487 where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation) 488 are time stepped using a backward scheme (see\autoref{sec:STP_forward_imp}). 489 Note that the Kolmogorov term has been linearized in time in order to render the implicit computation possible. 490 The restart of the TKE scheme requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as 491 they all appear in the right hand side of \autoref{eq:zdftke_ene}. 492 For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored. 509 493 510 494 % ------------------------------------------------------------------------------------------------------------- … … 519 503 %-------------------------------------------------------------------------------------------------------------- 520 504 521 The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on 522 two prognostic equations: one for the turbulent kinetic energy $\bar {e}$, and another 523 for the generic length scale, $\psi$ \citep{Umlauf_Burchard_JMS03, Umlauf_Burchard_CSR05}. 524 This later variable is defined as : $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$, 525 where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:GLS} allows to recover 526 a number of well-known turbulent closures ($k$-$kl$ \citep{Mellor_Yamada_1982}, 527 $k$-$\epsilon$ \citep{Rodi_1987}, $k$-$\omega$ \citep{Wilcox_1988} 528 among others \citep{Umlauf_Burchard_JMS03,Kantha_Carniel_CSR05}). 505 The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on two prognostic equations: 506 one for the turbulent kinetic energy $\bar {e}$, and another for the generic length scale, 507 $\psi$ \citep{Umlauf_Burchard_JMS03, Umlauf_Burchard_CSR05}. 508 This later variable is defined as: $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$, 509 where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:GLS} allows to recover a number of 510 well-known turbulent closures ($k$-$kl$ \citep{Mellor_Yamada_1982}, $k$-$\epsilon$ \citep{Rodi_1987}, 511 $k$-$\omega$ \citep{Wilcox_1988} among others \citep{Umlauf_Burchard_JMS03,Kantha_Carniel_CSR05}). 529 512 The GLS scheme is given by the following set of equations: 530 513 \begin{equation} \label{eq:zdfgls_e} … … 558 541 {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \; 559 542 \end{equation} 560 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) 561 and $\epsilon$ the dissipation rate. 562 The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$) 563 depends of the choice of the turbulence model. Four different turbulent models are pre-defined 564 (Tab.\autoref{tab:GLS}). They are made available through the \np{nn\_clo} namelist parameter. 543 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and 544 $\epsilon$ the dissipation rate. 545 The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$) depends of 546 the choice of the turbulence model. 547 Four different turbulent models are pre-defined (Tab.\autoref{tab:GLS}). 548 They are made available through the \np{nn\_clo} namelist parameter. 565 549 566 550 %--------------------------------------------------TABLE-------------------------------------------------- … … 584 568 \end{tabular} 585 569 \caption{ \protect\label{tab:GLS} 586 Set of predefined GLS parameters, or equivalently predefined turbulence models available 587 with \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.}570 Set of predefined GLS parameters, or equivalently predefined turbulence models available with 571 \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.} 588 572 \end{center} \end{table} 589 573 %-------------------------------------------------------------------------------------------------------------- 590 574 591 In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force 592 the convergence of the mixing length towards $K z_b$ ($K$: Kappa and $z_b$: rugosity length) 593 value near physical boundaries (logarithmic boundary layer law). $C_{\mu}$ and $C_{\mu'}$ 594 are calculated from stability function proposed by \citet{Galperin_al_JAS88}, or by \citet{Kantha_Clayson_1994} 595 or one of the two functions suggested by \citet{Canuto_2001} (\np{nn\_stab\_func}\forcode{ = 0..3}, resp.). 575 In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force the convergence of 576 the mixing length towards $K z_b$ ($K$: Kappa and $z_b$: rugosity length) value near physical boundaries 577 (logarithmic boundary layer law). 578 $C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{Galperin_al_JAS88}, 579 or by \citet{Kantha_Clayson_1994} or one of the two functions suggested by \citet{Canuto_2001} 580 (\np{nn\_stab\_func}\forcode{ = 0..3}, resp.). 596 581 The value of $C_{0\mu}$ depends of the choice of the stability function. 597 582 598 The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated 599 thanks to Dirichlet or Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp. 600 As for TKE closure , the wave effect on the mixing is considered when \np{ln\_crban}\forcode{ = .true.} 601 \citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn\_crban} namelist parameter 602 is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 603 604 The $\psi$ equation is known to fail in stably stratified flows, and for this reason 605 almost all authors apply a clipping of the length scale as an \textit{ad hoc} remedy. 606 With this clipping, the maximum permissible length scale is determined by 607 $l_{max} = c_{lim} \sqrt{2\bar{e}}/ N$. A value of $c_{lim} = 0.53$ is often used 608 \citep{Galperin_al_JAS88}. \cite{Umlauf_Burchard_CSR05} show that the value of 609 the clipping factor is of crucial importance for the entrainment depth predicted in 610 stably stratified situations, and that its value has to be chosen in accordance 611 with the algebraic model for the turbulent fluxes. The clipping is only activated 612 if \np{ln\_length\_lim}\forcode{ = .true.}, and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 613 614 The time and space discretization of the GLS equations follows the same energetic 615 consideration as for the TKE case described in \autoref{subsec:ZDF_tke_ene} \citep{Burchard_OM02}. 583 The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or 584 Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp. 585 As for TKE closure, the wave effect on the mixing is considered when 586 \np{ln\_crban}\forcode{ = .true.} \citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. 587 The \np{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and 588 \np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 589 590 The $\psi$ equation is known to fail in stably stratified flows, and for this reason 591 almost all authors apply a clipping of the length scale as an \textit{ad hoc} remedy. 592 With this clipping, the maximum permissible length scale is determined by $l_{max} = c_{lim} \sqrt{2\bar{e}}/ N$. 593 A value of $c_{lim} = 0.53$ is often used \citep{Galperin_al_JAS88}. 594 \cite{Umlauf_Burchard_CSR05} show that the value of the clipping factor is of crucial importance for 595 the entrainment depth predicted in stably stratified situations, 596 and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes. 597 The clipping is only activated if \np{ln\_length\_lim}\forcode{ = .true.}, 598 and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 599 600 The time and space discretization of the GLS equations follows the same energetic consideration as for 601 the TKE case described in \autoref{subsec:ZDF_tke_ene} \citep{Burchard_OM02}. 616 602 Examples of performance of the 4 turbulent closure scheme can be found in \citet{Warner_al_OM05}. 617 603 … … 640 626 %-------------------------------------------------------------------------------------------------------------- 641 627 642 Static instabilities (i.e. light potential densities under heavy ones) may 643 occur at particular ocean grid points. In nature, convective processes 644 quickly re-establish the static stability of the water column. These 645 processes have been removed from the model via the hydrostatic 646 assumption so they must be parameterized. Three parameterisations 647 are available to deal with convective processes: a non-penetrative 648 convective adjustment or an enhanced vertical diffusion, or/and the 649 use of a turbulent closure scheme. 628 Static instabilities (i.e. light potential densities under heavy ones) may occur at particular ocean grid points. 629 In nature, convective processes quickly re-establish the static stability of the water column. 630 These processes have been removed from the model via the hydrostatic assumption so they must be parameterized. 631 Three parameterisations are available to deal with convective processes: 632 a non-penetrative convective adjustment or an enhanced vertical diffusion, 633 or/and the use of a turbulent closure scheme. 650 634 651 635 % ------------------------------------------------------------------------------------------------------------- … … 665 649 \includegraphics[width=0.90\textwidth]{Fig_npc} 666 650 \caption{ \protect\label{fig:npc} 667 Example of an unstable density profile treated by the non penetrative 668 convective adjustment algorithm. $1^{st}$ step: the initial profile is checked from 669 the surface to the bottom. It is found to be unstable between levels 3 and 4. 670 They are mixed. The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 671 are mixed. The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are 672 mixed. The $1^{st}$ step ends since the density profile is then stable below 673 the level 3. $2^{nd}$ step: the new $\rho$ profile is checked following the same 674 procedure as in $1^{st}$ step: levels 2 to 5 are mixed. The new density profile 675 is checked. It is found stable: end of algorithm.} 651 Example of an unstable density profile treated by the non penetrative convective adjustment algorithm. 652 $1^{st}$ step: the initial profile is checked from the surface to the bottom. 653 It is found to be unstable between levels 3 and 4. 654 They are mixed. 655 The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed. 656 The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed. 657 The $1^{st}$ step ends since the density profile is then stable below the level 3. 658 $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step: 659 levels 2 to 5 are mixed. 660 The new density profile is checked. 661 It is found stable: end of algorithm.} 676 662 \end{center} \end{figure} 677 663 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 678 664 679 Options are defined through the \ngn{namzdf} namelist variables. 680 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}. 681 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously 682 the statically unstable portion of the water column, but only until the density 683 structure becomes neutrally stable ($i.e.$ until the mixed portion of the water 684 column has \textit{exactly} the density of the water just below) \citep{Madec_al_JPO91}. 685 The associated algorithm is an iterative process used in the following way 686 (\autoref{fig:npc}): starting from the top of the ocean, the first instability is 687 found. Assume in the following that the instability is located between levels 688 $k$ and $k+1$. The temperature and salinity in the two levels are 689 vertically mixed, conserving the heat and salt contents of the water column. 690 The new density is then computed by a linear approximation. If the new 691 density profile is still unstable between levels $k+1$ and $k+2$, levels $k$, 692 $k+1$ and $k+2$ are then mixed. This process is repeated until stability is 693 established below the level $k$ (the mixing process can go down to the 694 ocean bottom). The algorithm is repeated to check if the density profile 695 between level $k-1$ and $k$ is unstable and/or if there is no deeper instability. 696 697 This algorithm is significantly different from mixing statically unstable levels 698 two by two. The latter procedure cannot converge with a finite number 699 of iterations for some vertical profiles while the algorithm used in \NEMO 700 converges for any profile in a number of iterations which is less than the 701 number of vertical levels. This property is of paramount importance as 702 pointed out by \citet{Killworth1989}: it avoids the existence of permanent 703 and unrealistic static instabilities at the sea surface. This non-penetrative 704 convective algorithm has been proved successful in studies of the deep 705 water formation in the north-western Mediterranean Sea 706 \citep{Madec_al_JPO91, Madec_al_DAO91, Madec_Crepon_Bk91}. 707 708 The current implementation has been modified in order to deal with any non linear 709 equation of seawater (L. Brodeau, personnal communication). 710 Two main differences have been introduced compared to the original algorithm: 665 Options are defined through the \ngn{namzdf} namelist variables. 666 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}. 667 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 668 the water column, but only until the density structure becomes neutrally stable 669 ($i.e.$ until the mixed portion of the water column has \textit{exactly} the density of the water just below) 670 \citep{Madec_al_JPO91}. 671 The associated algorithm is an iterative process used in the following way (\autoref{fig:npc}): 672 starting from the top of the ocean, the first instability is found. 673 Assume in the following that the instability is located between levels $k$ and $k+1$. 674 The temperature and salinity in the two levels are vertically mixed, conserving the heat and salt contents of 675 the water column. 676 The new density is then computed by a linear approximation. 677 If the new density profile is still unstable between levels $k+1$ and $k+2$, 678 levels $k$, $k+1$ and $k+2$ are then mixed. 679 This process is repeated until stability is established below the level $k$ 680 (the mixing process can go down to the ocean bottom). 681 The algorithm is repeated to check if the density profile between level $k-1$ and $k$ is unstable and/or 682 if there is no deeper instability. 683 684 This algorithm is significantly different from mixing statically unstable levels two by two. 685 The latter procedure cannot converge with a finite number of iterations for some vertical profiles while 686 the algorithm used in \NEMO converges for any profile in a number of iterations which is less than 687 the number of vertical levels. 688 This property is of paramount importance as pointed out by \citet{Killworth1989}: 689 it avoids the existence of permanent and unrealistic static instabilities at the sea surface. 690 This non-penetrative convective algorithm has been proved successful in studies of the deep water formation in 691 the north-western Mediterranean Sea \citep{Madec_al_JPO91, Madec_al_DAO91, Madec_Crepon_Bk91}. 692 693 The current implementation has been modified in order to deal with any non linear equation of seawater 694 (L. Brodeau, personnal communication). 695 Two main differences have been introduced compared to the original algorithm: 711 696 $(i)$ the stability is now checked using the Brunt-V\"{a}is\"{a}l\"{a} frequency 712 (not the the difference in potential density) ; 713 $(ii)$ when two levels are found unstable, their thermal and haline expansion coefficients 714 are vertically mixed in the same way their temperature and salinity has been mixed. 715 These two modifications allow the algorithm to perform properly and accurately 716 with TEOS10 or EOS-80 without having to recompute the expansion coefficients at each 717 mixing iteration. 697 (not the the difference in potential density); 698 $(ii)$ when two levels are found unstable, their thermal and haline expansion coefficients are vertically mixed in 699 the same way their temperature and salinity has been mixed. 700 These two modifications allow the algorithm to perform properly and accurately with TEOS10 or EOS-80 without 701 having to recompute the expansion coefficients at each mixing iteration. 718 702 719 703 % ------------------------------------------------------------------------------------------------------------- … … 729 713 730 714 Options are defined through the \ngn{namzdf} namelist variables. 731 The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}. 732 In this case, the vertical eddy mixing coefficients are assigned very large values 733 (a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable 734 ($i.e.$ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) 735 \citep{Lazar_PhD97, Lazar_al_JPO99}. This is done either on tracers only 736 (\np{nn\_evdm}\forcode{ = 0}) or on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}). 737 738 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and 739 if \np{nn\_evdm}\forcode{ = 1}, the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ 740 values also, are set equal to the namelist parameter \np{rn\_avevd}. A typical value 741 for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. This parameterisation of 742 convective processes is less time consuming than the convective adjustment 743 algorithm presented above when mixing both tracers and momentum in the 744 case of static instabilities. It requires the use of an implicit time stepping on 745 vertical diffusion terms (i.e. \np{ln\_zdfexp}\forcode{ = .false.}). 746 747 Note that the stability test is performed on both \textit{before} and \textit{now} 748 values of $N^2$. This removes a potential source of divergence of odd and 749 even time step in a leapfrog environment \citep{Leclair_PhD2010} (see \autoref{sec:STP_mLF}). 715 The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}. 716 In this case, the vertical eddy mixing coefficients are assigned very large values 717 (a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable 718 ($i.e.$ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{Lazar_PhD97, Lazar_al_JPO99}. 719 This is done either on tracers only (\np{nn\_evdm}\forcode{ = 0}) or 720 on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}). 721 722 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn\_evdm}\forcode{ = 1}, 723 the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to 724 the namelist parameter \np{rn\_avevd}. 725 A typical value for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. 726 This parameterisation of convective processes is less time consuming than 727 the convective adjustment algorithm presented above when mixing both tracers and 728 momentum in the case of static instabilities. 729 It requires the use of an implicit time stepping on vertical diffusion terms 730 (i.e. \np{ln\_zdfexp}\forcode{ = .false.}). 731 732 Note that the stability test is performed on both \textit{before} and \textit{now} values of $N^2$. 733 This removes a potential source of divergence of odd and even time step in 734 a leapfrog environment \citep{Leclair_PhD2010} (see \autoref{sec:STP_mLF}). 750 735 751 736 % ------------------------------------------------------------------------------------------------------------- … … 755 740 \label{subsec:ZDF_tcs} 756 741 757 The turbulent closure scheme presented in \autoref{subsec:ZDF_tke} and \autoref{subsec:ZDF_gls} 758 (\key{zdftke} or \key{zdftke} is defined) in theory solves the problem of statically 759 unstable density profiles. In such a case, the term corresponding to the 760 destruction of turbulent kinetic energy through stratification in \autoref{eq:zdftke_e} 761 or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative. 762 It results in large values of $A_T^{vT}$ and $A_T^{vT}$, and also the four neighbouring 763 $A_u^{vm} {and}\;A_v^{vm}$ (up to $1\;m^2s^{-1})$. These large values 764 restore the static stability of the water column in a way similar to that of the 765 enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}). However, 766 in the vicinity of the sea surface (first ocean layer), the eddy coefficients 767 computed by the turbulent closure scheme do not usually exceed $10^{-2}m.s^{-1}$, 768 because the mixing length scale is bounded by the distance to the sea surface. 769 It can thus be useful to combine the enhanced vertical 770 diffusion with the turbulent closure scheme, $i.e.$ setting the \np{ln\_zdfnpc} 771 namelist parameter to true and defining the turbulent closure CPP key all together. 772 773 The KPP turbulent closure scheme already includes enhanced vertical diffusion 774 in the case of convection, as governed by the variables $bvsqcon$ and $difcon$ 775 found in \mdl{zdfkpp}, therefore \np{ln\_zdfevd}\forcode{ = .false.} should be used with the KPP 776 scheme. %gm% + one word on non local flux with KPP scheme trakpp.F90 module... 742 The turbulent closure scheme presented in \autoref{subsec:ZDF_tke} and \autoref{subsec:ZDF_gls} 743 (\key{zdftke} or \key{zdftke} is defined) in theory solves the problem of statically unstable density profiles. 744 In such a case, the term corresponding to the destruction of turbulent kinetic energy through stratification in 745 \autoref{eq:zdftke_e} or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative. 746 It results in large values of $A_T^{vT}$ and $A_T^{vT}$, and also the four neighbouring $A_u^{vm} {and}\;A_v^{vm}$ 747 (up to $1\;m^2s^{-1}$). 748 These large values restore the static stability of the water column in a way similar to that of 749 the enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}). 750 However, in the vicinity of the sea surface (first ocean layer), the eddy coefficients computed by 751 the turbulent closure scheme do not usually exceed $10^{-2}m.s^{-1}$, 752 because the mixing length scale is bounded by the distance to the sea surface. 753 It can thus be useful to combine the enhanced vertical diffusion with the turbulent closure scheme, 754 $i.e.$ setting the \np{ln\_zdfnpc} namelist parameter to true and 755 defining the turbulent closure CPP key all together. 756 757 The KPP turbulent closure scheme already includes enhanced vertical diffusion in the case of convection, 758 as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp}, 759 therefore \np{ln\_zdfevd}\forcode{ = .false.} should be used with the KPP scheme. 760 % gm% + one word on non local flux with KPP scheme trakpp.F90 module... 777 761 778 762 % ================================================================ … … 788 772 789 773 Options are defined through the \ngn{namzdf\_ddm} namelist variables. 790 Double diffusion occurs when relatively warm, salty water overlies cooler, fresher 791 water, or vice versa. The former condition leads to salt fingering and the latter 792 to diffusive convection. Double-diffusive phenomena contribute to diapycnal 793 mixing in extensive regions of the ocean. \citet{Merryfield1999} include a 794 parameterisation of such phenomena in a global ocean model and show that 795 it leads to relatively minor changes in circulation but exerts significant regional 796 influences on temperature and salinity. This parameterisation has been 797 introduced in \mdl{zdfddm} module and is controlled by the \key{zdfddm} CPP key. 774 Double diffusion occurs when relatively warm, salty water overlies cooler, fresher water, or vice versa. 775 The former condition leads to salt fingering and the latter to diffusive convection. 776 Double-diffusive phenomena contribute to diapycnal mixing in extensive regions of the ocean. 777 \citet{Merryfield1999} include a parameterisation of such phenomena in a global ocean model and show that 778 it leads to relatively minor changes in circulation but exerts significant regional influences on 779 temperature and salinity. 780 This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the \key{zdfddm} CPP key. 798 781 799 782 Diapycnal mixing of S and T are described by diapycnal diffusion coefficients … … 802 785 &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS} 803 786 \end{align*} 804 where subscript $f$ represents mixing by salt fingering, $d$ by diffusive convection, 805 and $o$ by processes other than double diffusion. The rates of double-diffusive 806 mixing depend on the buoyancy ratio $R_\rho = \alpha \partial_z T / \beta \partial_z S$, 807 where $\alpha$ and $\beta$ are coefficients of thermal expansion and saline 808 contraction (see \autoref{subsec:TRA_eos}). To represent mixing of $S$ and $T$ by salt 809 fingering, we adopt the diapycnal diffusivities suggested by Schmitt (1981): 787 where subscript $f$ represents mixing by salt fingering, $d$ by diffusive convection, 788 and $o$ by processes other than double diffusion. 789 The rates of double-diffusive mixing depend on the buoyancy ratio 790 $R_\rho = \alpha \partial_z T / \beta \partial_z S$, where $\alpha$ and $\beta$ are coefficients of 791 thermal expansion and saline contraction (see \autoref{subsec:TRA_eos}). 792 To represent mixing of $S$ and $T$ by salt fingering, we adopt the diapycnal diffusivities suggested by Schmitt 793 (1981): 810 794 \begin{align} \label{eq:zdfddm_f} 811 795 A_f^{vS} &= \begin{cases} … … 821 805 \includegraphics[width=0.99\textwidth]{Fig_zdfddm} 822 806 \caption{ \protect\label{fig:zdfddm} 823 From \citet{Merryfield1999} : (a) Diapycnal diffusivities $A_f^{vT}$ 824 and $A_f^{vS}$ for temperature and salt in regions of salt fingering. Heavy 825 curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves 826 $A^{\ast v} = 10^{-4}~m^2.s^{-1}$ ; (b) diapycnal diffusivities $A_d^{vT}$ and 827 $A_d^{vS}$ for temperature and salt in regions of diffusive convection. Heavy 828 curves denote the Federov parameterisation and thin curves the Kelley 829 parameterisation. The latter is not implemented in \NEMO. } 807 From \citet{Merryfield1999} : 808 (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering. 809 Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$; 810 (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of diffusive convection. 811 Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation. 812 The latter is not implemented in \NEMO. } 830 813 \end{center} \end{figure} 831 814 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 832 815 833 The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio 834 $\alpha F_T /\beta F_S \approx 0.7$ of buoyancy flux of heat to buoyancy 835 flux of salt ($e.g.$, \citet{McDougall_Taylor_JMR84}). Following \citet{Merryfield1999}, 836 we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$. 837 838 To represent mixing of S and T by diffusive layering, the diapycnal diffusivities suggested byFederov (1988) is used:816 The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx 0.7$ of 817 buoyancy flux of heat to buoyancy flux of salt ($e.g.$, \citet{McDougall_Taylor_JMR84}). 818 Following \citet{Merryfield1999}, we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$. 819 820 To represent mixing of S and T by diffusive layering, the diapycnal diffusivities suggested by 821 Federov (1988) is used: 839 822 \begin{align} \label{eq:zdfddm_d} 840 823 A_d^{vT} &= \begin{cases} … … 853 836 \end{align} 854 837 855 The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ 856 are illustrated in \autoref{fig:zdfddm}. Implementing this requires computing 857 $R_\rho$ at each grid point on every time step. This is done in \mdl{eosbn2} at the 858 same time as $N^2$ is computed. This avoids duplication in the computation of 859 $\alpha$ and $\beta$ (which is usually quite expensive).838 The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ are illustrated in 839 \autoref{fig:zdfddm}. 840 Implementing this requires computing $R_\rho$ at each grid point on every time step. 841 This is done in \mdl{eosbn2} at the same time as $N^2$ is computed. 842 This avoids duplication in the computation of $\alpha$ and $\beta$ (which is usually quite expensive). 860 843 861 844 % ================================================================ … … 870 853 %-------------------------------------------------------------------------------------------------------------- 871 854 872 Options to define the top and bottom friction are defined through the 873 The bottom friction represents the friction generated by the bathymetry. 874 The top friction represents the friction generated by the ice shelf/ocean interface. 875 As the friction processes at the top and bottom are treated in similar way, 855 Options to define the top and bottom friction are defined through the \ngn{nambfr} namelist variables. 856 The bottom friction represents the friction generated by the bathymetry. 857 The top friction represents the friction generated by the ice shelf/ocean interface. 858 As the friction processes at the top and bottom are treated in similar way, 876 859 only the bottom friction is described in detail below. 877 860 878 861 879 Both the surface momentum flux (wind stress) and the bottom momentum 880 flux (bottom friction) enter the equations as a condition on the vertical 881 diffusive flux.For the bottom boundary layer, one has:862 Both the surface momentum flux (wind stress) and the bottom momentum flux (bottom friction) enter the equations as 863 a condition on the vertical diffusive flux. 864 For the bottom boundary layer, one has: 882 865 \begin{equation} \label{eq:zdfbfr_flux} 883 866 A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U} 884 867 \end{equation} 885 where ${\cal F}_h^{\textbf U}$ is represents the downward flux of horizontal momentum 886 outside the logarithmic turbulent boundary layer (thickness of the order of 887 1~m in the ocean). How ${\cal F}_h^{\textbf U}$ influences the interior depends on the 888 vertical resolution of the model near the bottom relative to the Ekman layer 889 depth. For example, in order to obtain an Ekman layer depth 890 $d = \sqrt{2\;A^{vm}} / f = 50$~m, one needs a vertical diffusion coefficient 891 $A^{vm} = 0.125$~m$^2$s$^{-1}$ (for a Coriolis frequency 892 $f = 10^{-4}$~m$^2$s$^{-1}$). With a background diffusion coefficient 893 $A^{vm} = 10^{-4}$~m$^2$s$^{-1}$, the Ekman layer depth is only 1.4~m. 894 When the vertical mixing coefficient is this small, using a flux condition is 895 equivalent to entering the viscous forces (either wind stress or bottom friction) 896 as a body force over the depth of the top or bottom model layer. To illustrate 897 this, consider the equation for $u$ at $k$, the last ocean level: 868 where ${\cal F}_h^{\textbf U}$ is represents the downward flux of horizontal momentum outside 869 the logarithmic turbulent boundary layer (thickness of the order of 1~m in the ocean). 870 How ${\cal F}_h^{\textbf U}$ influences the interior depends on the vertical resolution of the model near 871 the bottom relative to the Ekman layer depth. 872 For example, in order to obtain an Ekman layer depth $d = \sqrt{2\;A^{vm}} / f = 50$~m, 873 one needs a vertical diffusion coefficient $A^{vm} = 0.125$~m$^2$s$^{-1}$ 874 (for a Coriolis frequency $f = 10^{-4}$~m$^2$s$^{-1}$). 875 With a background diffusion coefficient $A^{vm} = 10^{-4}$~m$^2$s$^{-1}$, the Ekman layer depth is only 1.4~m. 876 When the vertical mixing coefficient is this small, using a flux condition is equivalent to 877 entering the viscous forces (either wind stress or bottom friction) as a body force over the depth of the top or 878 bottom model layer. 879 To illustrate this, consider the equation for $u$ at $k$, the last ocean level: 898 880 \begin{equation} \label{eq:zdfbfr_flux2} 899 881 \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}} 900 882 \end{equation} 901 If the bottom layer thickness is 200~m, the Ekman transport will 902 be distributed over that depth. On the other hand, if the vertical resolution 903 is high (1~m or less) and a turbulent closure model is used, the turbulent 904 Ekman layer will be represented explicitly by the model. However, the 905 logarithmic layer is never represented in current primitive equation model 906 applications: it is \emph{necessary} to parameterize the flux ${\cal F}^u_h $. 907 Two choices are available in \NEMO: a linear and a quadratic bottom friction. 908 Note that in both cases, the rotation between the interior velocity and the 909 bottom friction is neglected in the present release of \NEMO. 910 911 In the code, the bottom friction is imposed by adding the trend due to the bottom 912 friction to the general momentum trend in \mdl{dynbfr}. For the time-split surface 913 pressure gradient algorithm, the momentum trend due to the barotropic component 914 needs to be handled separately. For this purpose it is convenient to compute and 915 store coefficients which can be simply combined with bottom velocities and geometric 916 values to provide the momentum trend due to bottom friction. 917 These coefficients are computed in \mdl{zdfbfr} and generally take the form 918 $c_b^{\textbf U}$ where: 883 If the bottom layer thickness is 200~m, the Ekman transport will be distributed over that depth. 884 On the other hand, if the vertical resolution is high (1~m or less) and a turbulent closure model is used, 885 the turbulent Ekman layer will be represented explicitly by the model. 886 However, the logarithmic layer is never represented in current primitive equation model applications: 887 it is \emph{necessary} to parameterize the flux ${\cal F}^u_h $. 888 Two choices are available in \NEMO: a linear and a quadratic bottom friction. 889 Note that in both cases, the rotation between the interior velocity and the bottom friction is neglected in 890 the present release of \NEMO. 891 892 In the code, the bottom friction is imposed by adding the trend due to the bottom friction to 893 the general momentum trend in \mdl{dynbfr}. 894 For the time-split surface pressure gradient algorithm, the momentum trend due to 895 the barotropic component needs to be handled separately. 896 For this purpose it is convenient to compute and store coefficients which can be simply combined with 897 bottom velocities and geometric values to provide the momentum trend due to bottom friction. 898 These coefficients are computed in \mdl{zdfbfr} and generally take the form $c_b^{\textbf U}$ where: 919 899 \begin{equation} \label{eq:zdfbfr_bdef} 920 900 \frac{\partial {\textbf U_h}}{\partial t} = … … 929 909 \label{subsec:ZDF_bfr_linear} 930 910 931 The linear bottom friction parameterisation (including the special case 932 of a free-slip condition) assumes that the bottom friction 933 is proportional to the interior velocity (i.e. the velocity of the last 934 model level): 911 The linear bottom friction parameterisation (including the special case of a free-slip condition) assumes that 912 the bottom friction is proportional to the interior velocity (i.e. the velocity of the last model level): 935 913 \begin{equation} \label{eq:zdfbfr_linear} 936 914 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b 937 915 \end{equation} 938 where $r$ is a friction coefficient expressed in ms$^{-1}$. 939 This coefficient is generally estimated by setting a typical decay time 940 $\tau$ in the deep ocean, 941 and setting $r = H / \tau$, where $H$ is the ocean depth. Commonly accepted 942 values of $\tau$ are of the order of 100 to 200 days \citep{Weatherly_JMR84}. 943 A value $\tau^{-1} = 10^{-7}$~s$^{-1}$ equivalent to 115 days, is usually used 944 in quasi-geostrophic models. One may consider the linear friction as an 945 approximation of quadratic friction, $r \approx 2\;C_D\;U_{av}$ (\citet{Gill1982}, 946 Eq. 9.6.6). For example, with a drag coefficient $C_D = 0.002$, a typical speed 947 of tidal currents of $U_{av} =0.1$~m\;s$^{-1}$, and assuming an ocean depth 948 $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$. 949 This is the default value used in \NEMO. It corresponds to a decay time scale 950 of 115~days. It can be changed by specifying \np{rn\_bfri1} (namelist parameter). 951 952 For the linear friction case the coefficients defined in the general 953 expression \autoref{eq:zdfbfr_bdef} are: 916 where $r$ is a friction coefficient expressed in ms$^{-1}$. 917 This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean, 918 and setting $r = H / \tau$, where $H$ is the ocean depth. 919 Commonly accepted values of $\tau$ are of the order of 100 to 200 days \citep{Weatherly_JMR84}. 920 A value $\tau^{-1} = 10^{-7}$~s$^{-1}$ equivalent to 115 days, is usually used in quasi-geostrophic models. 921 One may consider the linear friction as an approximation of quadratic friction, $r \approx 2\;C_D\;U_{av}$ 922 (\citet{Gill1982}, Eq. 9.6.6). 923 For example, with a drag coefficient $C_D = 0.002$, a typical speed of tidal currents of $U_{av} =0.1$~m\;s$^{-1}$, 924 and assuming an ocean depth $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$. 925 This is the default value used in \NEMO. It corresponds to a decay time scale of 115~days. 926 It can be changed by specifying \np{rn\_bfri1} (namelist parameter). 927 928 For the linear friction case the coefficients defined in the general expression \autoref{eq:zdfbfr_bdef} are: 954 929 \begin{equation} \label{eq:zdfbfr_linbfr_b} 955 930 \begin{split} … … 958 933 \end{split} 959 934 \end{equation} 960 When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}. 961 Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and leads to a free-slip 962 bottom boundary condition. These values are assigned in \mdl{zdfbfr}. 963 From v3.2 onwards there is support for local enhancement of these values 964 via an externally defined 2D mask array (\np{ln\_bfr2d}\forcode{ = .true.}) given 965 in the \ifile{bfr\_coef} input NetCDF file. The mask values should vary from 0 to 1. 966 Locations with a non-zero mask value will have the friction coefficient increased 967 by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 935 When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}. 936 Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and 937 leads to a free-slip bottom boundary condition. 938 These values are assigned in \mdl{zdfbfr}. 939 From v3.2 onwards there is support for local enhancement of these values via an externally defined 2D mask array 940 (\np{ln\_bfr2d}\forcode{ = .true.}) given in the \ifile{bfr\_coef} input NetCDF file. 941 The mask values should vary from 0 to 1. 942 Locations with a non-zero mask value will have the friction coefficient increased by 943 $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 968 944 969 945 % ------------------------------------------------------------------------------------------------------------- … … 973 949 \label{subsec:ZDF_bfr_nonlinear} 974 950 975 The non-linear bottom friction parameterisation assumes that the bottom 976 friction is quadratic: 951 The non-linear bottom friction parameterisation assumes that the bottom friction is quadratic: 977 952 \begin{equation} \label{eq:zdfbfr_nonlinear} 978 953 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h 979 954 }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b 980 955 \end{equation} 981 where $C_D$ is a drag coefficient, and $e_b $ a bottom turbulent kinetic energy 982 due to tides, internal waves breaking and other short time scale currents. 983 A typical value of the drag coefficient is $C_D = 10^{-3} $. As an example, 984 the CME experiment \citep{Treguier_JGR92} uses $C_D = 10^{-3}$ and 985 $e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992} 986 uses $C_D = 1.4\;10^{-3}$ and $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$. 987 The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2} 988 namelist parameters). 989 990 As for the linear case, the bottom friction is imposed in the code by 991 adding the trend due to the bottom friction to the general momentum trend 992 in \mdl{dynbfr}. 993 For the non-linear friction case the terms 994 computed in \mdl{zdfbfr} are: 956 where $C_D$ is a drag coefficient, and $e_b $ a bottom turbulent kinetic energy due to tides, 957 internal waves breaking and other short time scale currents. 958 A typical value of the drag coefficient is $C_D = 10^{-3} $. 959 As an example, the CME experiment \citep{Treguier_JGR92} uses $C_D = 10^{-3}$ and 960 $e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992} uses $C_D = 1.4\;10^{-3}$ and 961 $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$. 962 The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2} namelist parameters). 963 964 As for the linear case, the bottom friction is imposed in the code by adding the trend due to 965 the bottom friction to the general momentum trend in \mdl{dynbfr}. 966 For the non-linear friction case the terms computed in \mdl{zdfbfr} are: 995 967 \begin{equation} \label{eq:zdfbfr_nonlinbfr} 996 968 \begin{split} … … 1000 972 \end{equation} 1001 973 1002 The coefficients that control the strength of the non-linear bottom friction are 1003 initialised as namelist parameters:$C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}.1004 Note for applications which treat tides explicitly a low or even zero value of 1005 \np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 1006 via an externally defined 2D mask array (\np{ln\_bfr2d}\forcode{ = .true.}). This works in the same way 1007 as for the linear bottom friction case with non-zero masked locations increased by974 The coefficients that control the strength of the non-linear bottom friction are initialised as namelist parameters: 975 $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}. 976 Note for applications which treat tides explicitly a low or even zero value of \np{rn\_bfeb2} is recommended. 977 From v3.2 onwards a local enhancement of $C_D$ is possible via an externally defined 2D mask array 978 (\np{ln\_bfr2d}\forcode{ = .true.}). 979 This works in the same way as for the linear bottom friction case with non-zero masked locations increased by 1008 980 $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}. 1009 981 … … 1015 987 \label{subsec:ZDF_bfr_loglayer} 1016 988 1017 In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally 1018 enhanced using a "law of the wall" scaling. If \np{ln\_loglayer} = .true., $C_D$ is no 1019 longer constant but is related to the thickness of the last wet layer in each column by: 1020 989 In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally enhanced using 990 a "law of the wall" scaling. 991 If \np{ln\_loglayer} = .true., $C_D$ is no longer constant but is related to the thickness of 992 the last wet layer in each column by: 1021 993 \begin{equation} 1022 994 C_D = \left ( {\kappa \over {\rm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2 1023 995 \end{equation} 1024 996 1025 \noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness 1026 length provided viathe namelist.997 \noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness length provided via 998 the namelist. 1027 999 1028 1000 For stability, the drag coefficient is bounded such that it is kept greater or equal to 1029 the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional 1030 namelist parameter: \np{rn\_bfri2\_max}, i.e.: 1031 1001 the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional namelist parameter: 1002 \np{rn\_bfri2\_max}, i.e.: 1032 1003 \begin{equation} 1033 1004 rn\_bfri2 \leq C_D \leq rn\_bfri2\_max 1034 1005 \end{equation} 1035 1006 1036 \noindent Note also that a log-layer enhancement can also be applied to the top boundary 1037 friction if under ice-shelf cavities are in use (\np{ln\_isfcav}\forcode{ = .true.}). In this case, the 1038 relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} 1039 and \np{rn\_tfri2\_max}. 1007 \noindent Note also that a log-layer enhancement can also be applied to the top boundary friction if 1008 under ice-shelf cavities are in use (\np{ln\_isfcav}\forcode{ = .true.}). 1009 In this case, the relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} and \np{rn\_tfri2\_max}. 1040 1010 1041 1011 % ------------------------------------------------------------------------------------------------------------- … … 1045 1015 \label{subsec:ZDF_bfr_stability} 1046 1016 1047 Some care needs to exercised over the choice of parameters to ensure that the 1048 implementation of bottom friction does not induce numerical instability. For 1049 the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} 1050 is: 1017 Some care needs to exercised over the choice of parameters to ensure that the implementation of 1018 bottom friction does not induce numerical instability. 1019 For the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} is: 1051 1020 \begin{equation} \label{eq:Eqn_bfrstab} 1052 1021 \begin{split} … … 1055 1024 \end{split} 1056 1025 \end{equation} 1057 \noindent where linear bottom friction and a leapfrog timestep have been assumed. 1026 \noindent where linear bottom friction and a leapfrog timestep have been assumed. 1058 1027 To ensure that the bottom friction cannot reverse the direction of flow it is necessary to have: 1059 1028 \begin{equation} … … 1064 1033 r\frac{2\rdt}{e_{3u}} < 1 \qquad \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\ 1065 1034 \end{equation} 1066 This same inequality can also be derived in the non-linear bottom friction case 1067 if a velocity of 1 m.s$^{-1}$ is assumed. Alternatively, this criterion can be 1068 rearranged to suggest a minimum bottom box thickness to ensure stability:1035 This same inequality can also be derived in the non-linear bottom friction case if 1036 a velocity of 1 m.s$^{-1}$ is assumed. 1037 Alternatively, this criterion can be rearranged to suggest a minimum bottom box thickness to ensure stability: 1069 1038 \begin{equation} 1070 1039 e_{3u} > 2\;r\;\rdt 1071 1040 \end{equation} 1072 \noindent which it may be necessary to impose if partial steps are being used. 1073 For example, if $|u| = 1$ m.s$^{-1}$, $rdt = 1800$ s, $r = 10^{-3}$ then 1074 $e_{3u}$ should be greater than 3.6 m. For most applications, with physically 1075 sensible parameters these restrictions should not be of concern. But 1076 caution may be necessary if attempts are made to locally enhance the bottom 1077 friction parameters. 1078 To ensure stability limits are imposed on the bottom friction coefficients both during 1079 initialisation and at each time step. Checks at initialisation are made in \mdl{zdfbfr} 1080 (assuming a 1 m.s$^{-1}$ velocity in the non-linear case). 1081 The number of breaches of the stability criterion are reported as well as the minimum 1082 and maximum values that have been set. The criterion is also checked at each time step, 1083 using the actual velocity, in \mdl{dynbfr}. Values of the bottom friction coefficient are 1084 reduced as necessary to ensure stability; these changes are not reported. 1041 \noindent which it may be necessary to impose if partial steps are being used. 1042 For example, if $|u| = 1$ m.s$^{-1}$, $rdt = 1800$ s, $r = 10^{-3}$ then $e_{3u}$ should be greater than 3.6 m. 1043 For most applications, with physically sensible parameters these restrictions should not be of concern. 1044 But caution may be necessary if attempts are made to locally enhance the bottom friction parameters. 1045 To ensure stability limits are imposed on the bottom friction coefficients both 1046 during initialisation and at each time step. 1047 Checks at initialisation are made in \mdl{zdfbfr} (assuming a 1 m.s$^{-1}$ velocity in the non-linear case). 1048 The number of breaches of the stability criterion are reported as well as 1049 the minimum and maximum values that have been set. 1050 The criterion is also checked at each time step, using the actual velocity, in \mdl{dynbfr}. 1051 Values of the bottom friction coefficient are reduced as necessary to ensure stability; 1052 these changes are not reported. 1085 1053 1086 1054 Limits on the bottom friction coefficient are not imposed if the user has elected to 1087 handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}). The number of potential1088 breaches of the explicit stability criterion are still reported for information purposes.1055 handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}). 1056 The number of potential breaches of the explicit stability criterion are still reported for information purposes. 1089 1057 1090 1058 % ------------------------------------------------------------------------------------------------------------- … … 1094 1062 \label{subsec:ZDF_bfr_imp} 1095 1063 1096 An optional implicit form of bottom friction has been implemented to improve 1097 model stability. We recommend this option for shelf sea and coastal ocean applications, especially 1098 for split-explicit time splitting. This option can be invoked by setting \np{ln\_bfrimp} 1099 to \forcode{.true.} in the \textit{nambfr} namelist. This option requires \np{ln\_zdfexp} to be \forcode{.false.} 1100 in the \textit{namzdf} namelist. 1101 1102 This implementation is realised in \mdl{dynzdf\_imp} and \mdl{dynspg\_ts}. In \mdl{dynzdf\_imp}, the 1103 bottom boundary condition is implemented implicitly. 1064 An optional implicit form of bottom friction has been implemented to improve model stability. 1065 We recommend this option for shelf sea and coastal ocean applications, especially for split-explicit time splitting. 1066 This option can be invoked by setting \np{ln\_bfrimp} to \forcode{.true.} in the \textit{nambfr} namelist. 1067 This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \textit{namzdf} namelist. 1068 1069 This implementation is realised in \mdl{dynzdf\_imp} and \mdl{dynspg\_ts}. In \mdl{dynzdf\_imp}, 1070 the bottom boundary condition is implemented implicitly. 1104 1071 1105 1072 \begin{equation} \label{eq:dynzdf_bfr} … … 1108 1075 \end{equation} 1109 1076 1110 where $mbk$ is the layer number of the bottom wet layer. superscript $n+1$ means the velocity used in the1111 friction formula is to be calculated, so, it is implicit.1112 1113 If split-explicit time splitting is used, care must be taken to avoid the double counting of 1114 the bottom friction in the 2-D barotropic momentum equations. As NEMO only updates the barotropic1115 pressure gradient and Coriolis' forcing terms in the 2-D barotropic calculation, we need to remove 1116 the bottom friction induced by these two terms which has been included in the 3-D momentum trend1117 and update it with the latest value. On the other hand, the bottom friction contributed by the1118 other terms (e.g. the advection term, viscosity term) has been included in the 3-D momentum equations1119 and should not be added in the 2-D barotropic mode. 1120 1121 The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the 1122 following:1077 where $mbk$ is the layer number of the bottom wet layer. 1078 Superscript $n+1$ means the velocity used in the friction formula is to be calculated, so, it is implicit. 1079 1080 If split-explicit time splitting is used, care must be taken to avoid the double counting of the bottom friction in 1081 the 2-D barotropic momentum equations. 1082 As NEMO only updates the barotropic pressure gradient and Coriolis' forcing terms in the 2-D barotropic calculation, 1083 we need to remove the bottom friction induced by these two terms which has been included in the 3-D momentum trend 1084 and update it with the latest value. 1085 On the other hand, the bottom friction contributed by the other terms 1086 (e.g. the advection term, viscosity term) has been included in the 3-D momentum equations and 1087 should not be added in the 2-D barotropic mode. 1088 1089 The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the following: 1123 1090 1124 1091 \begin{equation} \label{eq:dynspg_ts_bfr1} … … 1132 1099 \end{equation} 1133 1100 1134 where $\textbf{T}$ is the vertical integrated 3-D momentum trend. We assume the leap-frog time-stepping 1135 is used here. $\Delta t$ is the barotropic mode time step and $\Delta t_{bc}$ is the baroclinic mode time step. 1136 $c_{b}$ is the friction coefficient. $\eta$ is the sea surface level calculated in the barotropic loops 1137 while $\eta^{'}$ is the sea surface level used in the 3-D baroclinic mode. $\textbf{u}_{b}$ is the bottom 1138 layer horizontal velocity. 1101 where $\textbf{T}$ is the vertical integrated 3-D momentum trend. 1102 We assume the leap-frog time-stepping is used here. 1103 $\Delta t$ is the barotropic mode time step and $\Delta t_{bc}$ is the baroclinic mode time step. 1104 $c_{b}$ is the friction coefficient. 1105 $\eta$ is the sea surface level calculated in the barotropic loops while $\eta^{'}$ is the sea surface level used in 1106 the 3-D baroclinic mode. 1107 $\textbf{u}_{b}$ is the bottom layer horizontal velocity. 1139 1108 1140 1109 … … 1148 1117 \label{subsec:ZDF_bfr_ts} 1149 1118 1150 When calculating the momentum trend due to bottom friction in \mdl{dynbfr}, the 1151 bottom velocity at the before time step is used. This velocity includes both the 1152 baroclinic and barotropic components which is appropriate when using either the 1153 explicit or filtered surface pressure gradient algorithms (\key{dynspg\_exp} or 1154 \key{dynspg\_flt}). Extra attention is required, however, when using 1155 split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface 1156 equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three 1157 dimensional prognostic variables are solved with the longer time step 1158 of \np{rn\_rdt} seconds. The trend in the barotropic momentum due to bottom 1159 friction appropriate to this method is that given by the selected parameterisation 1160 ($i.e.$ linear or non-linear bottom friction) computed with the evolving velocities 1161 at each barotropic timestep. 1162 1163 In the case of non-linear bottom friction, we have elected to partially linearise 1164 the problem by keeping the coefficients fixed throughout the barotropic 1165 time-stepping to those computed in \mdl{zdfbfr} using the now timestep. 1119 When calculating the momentum trend due to bottom friction in \mdl{dynbfr}, 1120 the bottom velocity at the before time step is used. 1121 This velocity includes both the baroclinic and barotropic components which is appropriate when 1122 using either the explicit or filtered surface pressure gradient algorithms 1123 (\key{dynspg\_exp} or \key{dynspg\_flt}). 1124 Extra attention is required, however, when using split-explicit time stepping (\key{dynspg\_ts}). 1125 In this case the free surface equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, 1126 while the three dimensional prognostic variables are solved with the longer time step of \np{rn\_rdt} seconds. 1127 The trend in the barotropic momentum due to bottom friction appropriate to this method is that given by 1128 the selected parameterisation ($i.e.$ linear or non-linear bottom friction) computed with 1129 the evolving velocities at each barotropic timestep. 1130 1131 In the case of non-linear bottom friction, we have elected to partially linearise the problem by 1132 keeping the coefficients fixed throughout the barotropic time-stepping to those computed in 1133 \mdl{zdfbfr} using the now timestep. 1166 1134 This decision allows an efficient use of the $c_b^{\vect{U}}$ coefficients to: 1167 1135 1168 1136 \begin{enumerate} 1169 \item On entry to \rou{dyn\_spg\_ts}, remove the contribution of the before 1170 barotropic velocity to the bottom friction component of the vertically 1171 integrated momentum trend. Note the same stability check that is carried out 1172 on the bottom friction coefficient in \mdl{dynbfr} has to be applied here to 1173 ensure that the trend removed matches that which was added in \mdl{dynbfr}. 1174 \item At each barotropic step, compute the contribution of the current barotropic 1175 velocity to the trend due to bottom friction. Add this contribution to the 1176 vertically integrated momentum trend. This contribution is handled implicitly which 1177 eliminates the need to impose a stability criteria on the values of the bottom friction 1178 coefficient within the barotropic loop. 1137 \item On entry to \rou{dyn\_spg\_ts}, remove the contribution of the before barotropic velocity to 1138 the bottom friction component of the vertically integrated momentum trend. 1139 Note the same stability check that is carried out on the bottom friction coefficient in \mdl{dynbfr} has to 1140 be applied here to ensure that the trend removed matches that which was added in \mdl{dynbfr}. 1141 \item At each barotropic step, compute the contribution of the current barotropic velocity to 1142 the trend due to bottom friction. 1143 Add this contribution to the vertically integrated momentum trend. 1144 This contribution is handled implicitly which eliminates the need to impose a stability criteria on 1145 the values of the bottom friction coefficient within the barotropic loop. 1179 1146 \end{enumerate} 1180 1147 1181 Note that the use of an implicit formulation within the barotropic loop 1182 for the bottom friction trend means that any limiting of the bottom friction coefficient 1183 in \mdl{dynbfr} does not adversely affect the solution when using split-explicit time 1184 splitting. This is because the major contribution to bottom friction is likely to come from 1185 the barotropic component which uses the unrestricted value of the coefficient. However, if the 1186 limiting is thought to be having a major effect (a more likely prospect in coastal and shelf seas 1187 applications) then the fully implicit form of the bottom friction should be used (see \autoref{subsec:ZDF_bfr_imp} ) 1148 Note that the use of an implicit formulation within the barotropic loop for the bottom friction trend means that 1149 any limiting of the bottom friction coefficient in \mdl{dynbfr} does not adversely affect the solution when 1150 using split-explicit time splitting. 1151 This is because the major contribution to bottom friction is likely to come from the barotropic component which 1152 uses the unrestricted value of the coefficient. 1153 However, if the limiting is thought to be having a major effect 1154 (a more likely prospect in coastal and shelf seas applications) then 1155 the fully implicit form of the bottom friction should be used (see \autoref{subsec:ZDF_bfr_imp}) 1188 1156 which can be selected by setting \np{ln\_bfrimp} $=$ \forcode{.true.}. 1189 1157 … … 1193 1161 \end{equation} 1194 1162 where $\bar U$ is the barotropic velocity, $H_e$ is the full depth (including sea surface height), 1195 $c_b^u$ is the bottom friction coefficient as calculated in \rou{zdf\_bfr} and $RHS$ represents 1196 all the components to the vertically integrated momentum trend except for that due to bottom friction. 1163 $c_b^u$ is the bottom friction coefficient as calculated in \rou{zdf\_bfr} and 1164 $RHS$ represents all the components to the vertically integrated momentum trend except for 1165 that due to bottom friction. 1197 1166 1198 1167 … … 1218 1187 1219 1188 Options are defined through the \ngn{namzdf\_tmx} namelist variables. 1220 The parameterization of tidal mixing follows the general formulation for 1221 the vertical eddy diffusivity proposed by \citet{St_Laurent_al_GRL02} and 1222 first introduced in an OGCM by \citep{Simmons_al_OM04}. 1223 In this formulation an additional vertical diffusivity resulting from internal tide breaking, 1224 $A^{vT}_{tides}$ is expressed as a function of $E(x,y)$, the energy transfer from barotropic 1225 tides to baroclinic tides : 1189 The parameterization of tidal mixing follows the general formulation for the vertical eddy diffusivity proposed by 1190 \citet{St_Laurent_al_GRL02} and first introduced in an OGCM by \citep{Simmons_al_OM04}. 1191 In this formulation an additional vertical diffusivity resulting from internal tide breaking, 1192 $A^{vT}_{tides}$ is expressed as a function of $E(x,y)$, 1193 the energy transfer from barotropic tides to baroclinic tides: 1226 1194 \begin{equation} \label{eq:Ktides} 1227 1195 A^{vT}_{tides} = q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 } 1228 1196 \end{equation} 1229 where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency 1230 (see \autoref{subsec:TRA_bn2}), $\rho$ the density, $q$ the tidal dissipation efficiency,1231 and $F(z)$ the vertical structure function. 1232 1233 The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) 1234 and is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980). 1235 The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter) 1236 represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally, 1237 with the remaining $1-q$ radiating away as low mode internal waves and 1238 contributing to the background internal wave field. A value of $q=1/3$ is typically used 1239 \citet{St_Laurent_al_GRL02}.1240 The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical. 1241 It is implemented as a simple exponential decaying upward away from the bottom, 1242 with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, with atypical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},1197 where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 1198 $\rho$ the density, $q$ the tidal dissipation efficiency, and $F(z)$ the vertical structure function. 1199 1200 The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) and 1201 is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980). 1202 The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter) 1203 represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally, 1204 with the remaining $1-q$ radiating away as low mode internal waves and 1205 contributing to the background internal wave field. 1206 A value of $q=1/3$ is typically used \citet{St_Laurent_al_GRL02}. 1207 The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical. 1208 It is implemented as a simple exponential decaying upward away from the bottom, 1209 with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, 1210 with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04}, 1243 1211 \begin{equation} \label{eq:Fz} 1244 1212 F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } … … 1246 1214 and is normalized so that vertical integral over the water column is unity. 1247 1215 1248 The associated vertical viscosity is calculated from the vertical 1249 diffusivity assuming a Prandtl number of 1, $i.e.$ $A^{vm}_{tides}=A^{vT}_{tides}$. 1250 In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity 1251 is capped at $300\,cm^2/s$ and impose a lower limit on $N^2$ of \np{rn\_n2min} 1252 usually set to $10^{-8} s^{-2}$. These bounds are usually rarely encountered. 1253 1254 The internal wave energy map, $E(x, y)$ in \autoref{eq:Ktides}, is derived 1255 from a barotropic model of the tides utilizing a parameterization of the 1256 conversion of barotropic tidal energy into internal waves. 1257 The essential goal of the parameterization is to represent the momentum 1258 exchange between the barotropic tides and the unrepresented internal waves 1259 induced by the tidal flow over rough topography in a stratified ocean. 1260 In the current version of \NEMO, the map is built from the output of 1216 The associated vertical viscosity is calculated from the vertical diffusivity assuming a Prandtl number of 1, 1217 $i.e.$ $A^{vm}_{tides}=A^{vT}_{tides}$. 1218 In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity is capped at $300\,cm^2/s$ and 1219 impose a lower limit on $N^2$ of \np{rn\_n2min} usually set to $10^{-8} s^{-2}$. 1220 These bounds are usually rarely encountered. 1221 1222 The internal wave energy map, $E(x, y)$ in \autoref{eq:Ktides}, is derived from a barotropic model of 1223 the tides utilizing a parameterization of the conversion of barotropic tidal energy into internal waves. 1224 The essential goal of the parameterization is to represent the momentum exchange between the barotropic tides and 1225 the unrepresented internal waves induced by the tidal flow over rough topography in a stratified ocean. 1226 In the current version of \NEMO, the map is built from the output of 1261 1227 the barotropic global ocean tide model MOG2D-G \citep{Carrere_Lyard_GRL03}. 1262 This model provides the dissipation associated with internal wave energy for the M2 and K1 1263 tides component (\autoref{fig:ZDF_M2_K1_tmx}). The S2 dissipation is simply approximated 1264 as being $1/4$ of the M2 one. The internal wave energy is thus : $E(x, y) = 1.25 E_{M2} + E_{K1}$. 1265 Its global mean value is $1.1$ TW, in agreement with independent estimates 1266 \citep{Egbert_Ray_Nat00, Egbert_Ray_JGR01}. 1228 This model provides the dissipation associated with internal wave energy for the M2 and K1 tides component 1229 (\autoref{fig:ZDF_M2_K1_tmx}). 1230 The S2 dissipation is simply approximated as being $1/4$ of the M2 one. 1231 The internal wave energy is thus : $E(x, y) = 1.25 E_{M2} + E_{K1}$. 1232 Its global mean value is $1.1$ TW, 1233 in agreement with independent estimates \citep{Egbert_Ray_Nat00, Egbert_Ray_JGR01}. 1267 1234 1268 1235 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 1281 1248 1282 1249 When the Indonesian Through Flow (ITF) area is included in the model domain, 1283 a specific treatment of tidal induced mixing in this area can be used. 1284 It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide 1285 an input NetCDF file, \ifile{mask\_itf}, which contains a mask array defining the ITF area 1286 where the specific treatment is applied. 1287 1288 When \np{ln\_tmx\_itf}\forcode{ = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following 1250 a specific treatment of tidal induced mixing in this area can be used. 1251 It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide an input NetCDF file, 1252 \ifile{mask\_itf}, which contains a mask array defining the ITF area where the specific treatment is applied. 1253 1254 When \np{ln\_tmx\_itf}\forcode{ = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following 1289 1255 the parameterisation developed by \citet{Koch-Larrouy_al_GRL07}: 1290 1256 1291 First, the Indonesian archipelago is a complex geographic region 1292 with a series of large, deep, semi-enclosed basins connected via 1293 numerous narrow straits. Once generated, internal tides remain 1294 confined within this semi-enclosed area and hardly radiate away. 1295 Therefore all the internal tides energy is consumed within this area. 1257 First, the Indonesian archipelago is a complex geographic region with a series of 1258 large, deep, semi-enclosed basins connected via numerous narrow straits. 1259 Once generated, internal tides remain confined within this semi-enclosed area and hardly radiate away. 1260 Therefore all the internal tides energy is consumed within this area. 1296 1261 So it is assumed that $q = 1$, $i.e.$ all the energy generated is available for mixing. 1297 Note that for test purposed, the ITF tidal dissipation efficiency is a 1298 namelist parameter (\np{rn\_tfe\_itf}). A value of $1$ or close to is 1299 this recommended for this parameter. 1300 1301 Second, the vertical structure function, $F(z)$, is no more associated 1302 with a bottom intensification of the mixing, but with a maximum of 1303 energy available within the thermocline. \citet{Koch-Larrouy_al_GRL07} 1304 have suggested that the vertical distribution of the energy dissipation 1305 proportional to $N^2$ below the core of the thermocline and to $N$ above. 1262 Note that for test purposed, the ITF tidal dissipation efficiency is a namelist parameter (\np{rn\_tfe\_itf}). 1263 A value of $1$ or close to is this recommended for this parameter. 1264 1265 Second, the vertical structure function, $F(z)$, is no more associated with a bottom intensification of the mixing, 1266 but with a maximum of energy available within the thermocline. 1267 \citet{Koch-Larrouy_al_GRL07} have suggested that the vertical distribution of 1268 the energy dissipation proportional to $N^2$ below the core of the thermocline and to $N$ above. 1306 1269 The resulting $F(z)$ is: 1307 1270 \begin{equation} \label{eq:Fz_itf} … … 1313 1276 1314 1277 Averaged over the ITF area, the resulting tidal mixing coefficient is $1.5\,cm^2/s$, 1315 which agrees with the independent estimates inferred from observations. 1316 Introduced in a regional OGCM, the parameterization improves the water mass 1317 characteristics in the different Indonesian seas, suggesting that the horizontal 1318 and vertical distributions of the mixing are adequately prescribed 1319 \citep{Koch-Larrouy_al_GRL07, Koch-Larrouy_al_OD08a, Koch-Larrouy_al_OD08b}. 1320 Note also that such a parameterisation has a significant impact on the behaviour 1321 of global coupled GCMs \citep{Koch-Larrouy_al_CD10}. 1278 which agrees with the independent estimates inferred from observations. 1279 Introduced in a regional OGCM, the parameterization improves the water mass characteristics in 1280 the different Indonesian seas, suggesting that the horizontal and vertical distributions of 1281 the mixing are adequately prescribed \citep{Koch-Larrouy_al_GRL07, Koch-Larrouy_al_OD08a, Koch-Larrouy_al_OD08b}. 1282 Note also that such a parameterisation has a significant impact on the behaviour of 1283 global coupled GCMs \citep{Koch-Larrouy_al_CD10}. 1322 1284 1323 1285 … … 1333 1295 %-------------------------------------------------------------------------------------------------------------- 1334 1296 1335 The parameterization of mixing induced by breaking internal waves is a generalization 1336 of the approach originally proposed by \citet{St_Laurent_al_GRL02}. 1337 A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed, 1297 The parameterization of mixing induced by breaking internal waves is a generalization of 1298 the approach originally proposed by \citet{St_Laurent_al_GRL02}. 1299 A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed, 1338 1300 and the resulting diffusivity is obtained as 1339 1301 \begin{equation} \label{eq:Kwave} 1340 1302 A^{vT}_{wave} = R_f \,\frac{ \epsilon }{ \rho \, N^2 } 1341 1303 \end{equation} 1342 where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution 1343 of the energy available for mixing. If the \np{ln\_mevar} namelist parameter is set to false, 1344 the mixing efficiency is taken as constant and equal to 1/6 \citep{Osborn_JPO80}. 1345 In the opposite (recommended) case, $R_f$ is instead a function of the turbulence intensity parameter 1346 $Re_b = \frac{ \epsilon}{\nu \, N^2}$, with $\nu$ the molecular viscosity of seawater, 1347 following the model of \cite{Bouffard_Boegman_DAO2013} 1348 and the implementation of \cite{de_lavergne_JPO2016_efficiency}. 1349 Note that $A^{vT}_{wave}$ is bounded by $10^{-2}\,m^2/s$, a limit that is often reached when the mixing efficiency is constant. 1304 where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of 1305 the energy available for mixing. 1306 If the \np{ln\_mevar} namelist parameter is set to false, the mixing efficiency is taken as constant and 1307 equal to 1/6 \citep{Osborn_JPO80}. 1308 In the opposite (recommended) case, $R_f$ is instead a function of 1309 the turbulence intensity parameter $Re_b = \frac{ \epsilon}{\nu \, N^2}$, 1310 with $\nu$ the molecular viscosity of seawater, following the model of \cite{Bouffard_Boegman_DAO2013} and 1311 the implementation of \cite{de_lavergne_JPO2016_efficiency}. 1312 Note that $A^{vT}_{wave}$ is bounded by $10^{-2}\,m^2/s$, a limit that is often reached when 1313 the mixing efficiency is constant. 1350 1314 1351 1315 In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary 1352 as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice ).1353 This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014}, 1316 as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice. 1317 This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014}, 1354 1318 is implemented as in \cite{de_lavergne_JPO2016_efficiency}. 1355 1319 1356 The three-dimensional distribution of the energy available for mixing, $\epsilon(i,j,k)$, is constructed1357 from three static maps of column-integrated internal wave energy dissipation, $E_{cri}(i,j)$, 1358 $E_{ pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures1320 The three-dimensional distribution of the energy available for mixing, $\epsilon(i,j,k)$, 1321 is constructed from three static maps of column-integrated internal wave energy dissipation, 1322 $E_{cri}(i,j)$, $E_{pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures 1359 1323 (de Lavergne et al., in prep): 1360 1324 \begin{align*} … … 1363 1327 F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} } 1364 1328 \end{align*} 1365 In the above formula, $h_{ab}$ denotes the height above bottom, 1329 In the above formula, $h_{ab}$ denotes the height above bottom, 1366 1330 $h_{wkb}$ denotes the WKB-stretched height above bottom, defined by 1367 1331 \begin{equation*} 1368 1332 h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz' } \; , 1369 1333 \end{equation*} 1370 The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist) controls the stratification-dependence of the pycnocline-intensified dissipation. 1334 The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist) 1335 controls the stratification-dependence of the pycnocline-intensified dissipation. 1371 1336 It can take values of 1 (recommended) or 2. 1372 Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of 1373 the decay scales $h_{cri}(i,j)$ and $h_{bot}(i,j)$, which are defined by two additional input maps. 1374 $h_{cri}$ is related to the large-scale topography of the ocean (etopo2) 1375 and $h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of 1337 Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of 1338 the decay scales $h_{cri}(i,j)$ and $h_{bot}(i,j)$, which are defined by two additional input maps. 1339 $h_{cri}$ is related to the large-scale topography of the ocean (etopo2) and 1340 $h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of 1376 1341 the abyssal hill topography \citep{Goff_JGR2010} and the latitude. 1377 1342 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex
r9407 r10354 9 9 \minitoc 10 10 11 The continuous equations of motion have many analytic properties. Many 12 quantities (total mass, energy, enstrophy, etc.) are strictly conserved in 13 the inviscid and unforced limit, while ocean physics conserve the total 14 quantities on which they act (momentum, temperature, salinity) but dissipate 15 their total variance (energy, enstrophy, etc.). Unfortunately, the finite 16 difference form of these equations is not guaranteed to retain all these 17 important properties. In constructing the finite differencing schemes, we 18 wish to ensure that certain integral constraints will be maintained. In 19 particular, it is desirable to construct the finite difference equations so 20 that horizontal kinetic energy and/or potential enstrophy of horizontally 21 non-divergent flow, and variance of temperature and salinity will be 22 conserved in the absence of dissipative effects and forcing. \citet{Arakawa1966} 23 has first pointed out the advantage of this approach. He showed that if 24 integral constraints on energy are maintained, the computation will be free 25 of the troublesome "non linear" instability originally pointed out by 26 \citet{Phillips1959}. A consistent formulation of the energetic properties is 27 also extremely important in carrying out long-term numerical simulations for 28 an oceanographic model. Such a formulation avoids systematic errors that 29 accumulate with time \citep{Bryan1997}. 30 31 The general philosophy of OPA which has led to the discrete formulation 32 presented in {\S}II.2 and II.3 is to choose second order non-diffusive 33 scheme for advective terms for both dynamical and tracer equations. At this 34 level of complexity, the resulting schemes are dispersive schemes. 35 Therefore, they require the addition of a diffusive operator to be stable. 36 The alternative is to use diffusive schemes such as upstream or flux 37 corrected schemes. This last option was rejected because we prefer a 38 complete handling of the model diffusion, i.e. of the model physics rather 39 than letting the advective scheme produces its own implicit diffusion 40 without controlling the space and time structure of this implicit diffusion. 41 Note that in some very specific cases as passive tracer studies, the 42 positivity of the advective scheme is required. In that case, and in that 43 case only, the advective scheme used for passive tracer is a flux correction 44 scheme \citep{Marti1992, Levy1996, Levy1998}. 11 The continuous equations of motion have many analytic properties. 12 Many quantities (total mass, energy, enstrophy, etc.) are strictly conserved in the inviscid and unforced limit, 13 while ocean physics conserve the total quantities on which they act (momentum, temperature, salinity) but 14 dissipate their total variance (energy, enstrophy, etc.). 15 Unfortunately, the finite difference form of these equations is not guaranteed to 16 retain all these important properties. 17 In constructing the finite differencing schemes, we wish to ensure that 18 certain integral constraints will be maintained. 19 In particular, it is desirable to construct the finite difference equations so that 20 horizontal kinetic energy and/or potential enstrophy of horizontally non-divergent flow, 21 and variance of temperature and salinity will be conserved in the absence of dissipative effects and forcing. 22 \citet{Arakawa1966} has first pointed out the advantage of this approach. 23 He showed that if integral constraints on energy are maintained, 24 the computation will be free of the troublesome "non linear" instability originally pointed out by 25 \citet{Phillips1959}. 26 A consistent formulation of the energetic properties is also extremely important in carrying out 27 long-term numerical simulations for an oceanographic model. 28 Such a formulation avoids systematic errors that accumulate with time \citep{Bryan1997}. 29 30 The general philosophy of OPA which has led to the discrete formulation presented in {\S}II.2 and II.3 is to 31 choose second order non-diffusive scheme for advective terms for both dynamical and tracer equations. 32 At this level of complexity, the resulting schemes are dispersive schemes. 33 Therefore, they require the addition of a diffusive operator to be stable. 34 The alternative is to use diffusive schemes such as upstream or flux corrected schemes. 35 This last option was rejected because we prefer a complete handling of the model diffusion, 36 i.e. of the model physics rather than letting the advective scheme produces its own implicit diffusion without 37 controlling the space and time structure of this implicit diffusion. 38 Note that in some very specific cases as passive tracer studies, the positivity of the advective scheme is required. 39 In that case, and in that case only, the advective scheme used for passive tracer is a flux correction scheme 40 \citep{Marti1992, Levy1996, Levy1998}. 45 41 46 42 % ------------------------------------------------------------------------------------------------------------- … … 50 46 \label{sec:Invariant_dyn} 51 47 52 The non linear term of the momentum equations has been split into a 53 vorticity term, a gradient of horizontal kinetic energy and a vertical 54 advection term. Three schemes are available for the former (see {\S}~II.2) 55 according to the CPP variable defined (default option\textbf{ 56 }or \textbf{key{\_}vorenergy } or \textbf{key{\_}vorcombined 57 } defined). They differ in their conservative 58 properties (energy or enstrophy conserving scheme). The two latter terms 59 preserve the total kinetic energy: the large scale kinetic energy is also 60 preserved in practice. The remaining non-diffusive terms of the momentum 61 equation (namely the hydrostatic and surface pressure gradient terms) also 62 preserve the total kinetic energy and have no effect on the vorticity of the 63 flow. 48 The non linear term of the momentum equations has been split into a vorticity term, 49 a gradient of horizontal kinetic energy and a vertical advection term. 50 Three schemes are available for the former (see {\S}~II.2) according to the CPP variable defined 51 (default option\textbf{?}or \textbf{key{\_}vorenergy} or \textbf{key{\_}vorcombined} defined). 52 They differ in their conservative properties (energy or enstrophy conserving scheme). 53 The two latter terms preserve the total kinetic energy: 54 the large scale kinetic energy is also preserved in practice. 55 The remaining non-diffusive terms of the momentum equation 56 (namely the hydrostatic and surface pressure gradient terms) also preserve the total kinetic energy and 57 have no effect on the vorticity of the flow. 64 58 65 59 \textbf{* relative, planetary and total vorticity term:} 66 60 67 Let us define as either the relative, planetary and total potential 68 vorticity, i.e. , , and , respectively. The continuous formulation of the 69 vorticity term satisfies following integral constraints: 61 Let us define as either the relative, planetary and total potential vorticity, i.e. ?, ?, and ?, respectively. 62 The continuous formulation of the vorticity term satisfies following integral constraints: 70 63 \begin{equation} \label{eq:vor_vorticity} 71 64 \int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma … … 82 75 \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0 83 76 \end{equation} 84 where $dv = e_1\, e_2\, e_3\, di\, dj\, dk$ is the volume element. 85 (II.4.1a) means that $\varsigma $ is conserved. (II.4.1b) is obtained by an 86 integration by part. It means that $\varsigma^2$ is conserved for a horizontally 87 non-divergent flow. 88 (II.4.1c) is even satisfied locally since the vorticity term is orthogonal 89 to the horizontal velocity. It means that the vorticity term has no 90 contribution to the evolution of the total kinetic energy. (II.4.1a) is 91 obviously always satisfied, but (II.4.1b) and (II.4.1c) cannot be satisfied 92 simultaneously with a second order scheme. Using the symmetry or 93 anti-symmetry properties of the operators (Eqs II.1.10 and 11), it can be 94 shown that the scheme (II.2.11) satisfies (II.4.1b) but not (II.4.1c), while 95 scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C). 96 Note that the enstrophy conserving scheme on total vorticity has been chosen 97 as the standard discrete form of the vorticity term. 77 where $dv = e_1\, e_2\, e_3\, di\, dj\, dk$ is the volume element. 78 (II.4.1a) means that $\varsigma $ is conserved. (II.4.1b) is obtained by an integration by part. 79 It means that $\varsigma^2$ is conserved for a horizontally non-divergent flow. 80 (II.4.1c) is even satisfied locally since the vorticity term is orthogonal to the horizontal velocity. 81 It means that the vorticity term has no contribution to the evolution of the total kinetic energy. 82 (II.4.1a) is obviously always satisfied, but (II.4.1b) and (II.4.1c) cannot be satisfied simultaneously with 83 a second order scheme. 84 Using the symmetry or anti-symmetry properties of the operators (Eqs II.1.10 and 11), 85 it can be shown that the scheme (II.2.11) satisfies (II.4.1b) but not (II.4.1c), 86 while scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C). 87 Note that the enstrophy conserving scheme on total vorticity has been chosen as the standard discrete form of 88 the vorticity term. 98 89 99 90 \textbf{* Gradient of kinetic energy / vertical advection} 100 91 101 In continuous formulation, the gradient of horizontal kinetic energy has no 102 contribution to the evolution of the vorticity as the curl of a gradient is 103 zero. This property is satisfied locally with the discrete form of both the 104 gradient and the curl operator we have made (property (II.1.9)~). Another 105 continuous property is that the change of horizontal kinetic energy due to 106 vertical advection is exactly balanced by the change of horizontal kinetic 107 energy due tothe horizontal gradient of horizontal kinetic energy:92 In continuous formulation, the gradient of horizontal kinetic energy has no contribution to the evolution of 93 the vorticity as the curl of a gradient is zero. 94 This property is satisfied locally with the discrete form of both the gradient and the curl operator we have made 95 (property (II.1.9)~). 96 Another continuous property is that the change of horizontal kinetic energy due to 97 vertical advection is exactly balanced by the change of horizontal kinetic energy due to 98 the horizontal gradient of horizontal kinetic energy: 108 99 109 100 \begin{equation} \label{eq:keg_zad} … … 112 103 \end{equation} 113 104 114 Using the discrete form given in {\S}II.2-a and the symmetry or 115 anti-symmetry properties of the mean and difference operators, \autoref{eq:keg_zad} is 116 demonstrated in the Appendix C. The main point here is that satisfying 117 \autoref{eq:keg_zad} links the choice of the discrete forms of the vertical advection 118 and of the horizontal gradient of horizontal kinetic energy. Choosing one 119 imposes the other. The discrete form of the vertical advection given in 120 {\S}II.2-a is a direct consequence of formulating the horizontal kinetic 121 energy as $1/2 \left( \overline{u^2}^i + \overline{v^2}^j \right) $ inthe gradient term.105 Using the discrete form given in {\S}II.2-a and the symmetry or anti-symmetry properties of 106 the mean and difference operators, \autoref{eq:keg_zad} is demonstrated in the Appendix C. 107 The main point here is that satisfying \autoref{eq:keg_zad} links the choice of the discrete forms of 108 the vertical advection and of the horizontal gradient of horizontal kinetic energy. 109 Choosing one imposes the other. 110 The discrete form of the vertical advection given in {\S}II.2-a is a direct consequence of 111 formulating the horizontal kinetic energy as $1/2 \left( \overline{u^2}^i + \overline{v^2}^j \right) $ in 112 the gradient term. 122 113 123 114 \textbf{* hydrostatic pressure gradient term} 124 115 125 In continuous formulation, a pressure gradient has no contribution to the 126 evolution of the vorticity as the curl of a gradient is zero. This 127 properties is satisfied locally with the choice of discretization we have 128 made (property (II.1.9)~). In addition, when the equation of state is linear 129 (i.e. when an advective-diffusive equation for density can be derived from 130 those of temperature and salinity) the change of horizontal kinetic energy 131 due to the work of pressure forces is balanced by the change of potential 132 energy due to buoyancy forces: 116 In continuous formulation, a pressure gradient has no contribution to the evolution of the vorticity as 117 the curl of a gradient is zero. 118 This properties is satisfied locally with the choice of discretization we have made (property (II.1.9)~). 119 In addition, when the equation of state is linear 120 (i.e. when an advective-diffusive equation for density can be derived from those of temperature and salinity) 121 the change of horizontal kinetic energy due to the work of pressure forces is balanced by the change of 122 potential energy due to buoyancy forces: 133 123 134 124 \begin{equation} \label{eq:hpg_pe} … … 136 126 \end{equation} 137 127 138 Using the discrete form given in {\S}~II.2-a and the symmetry or 139 anti-symmetry properties of the mean and difference operators, (II.4.3) is 140 demonstrated in the Appendix C. The main point here is that satisfying 141 (II.4.3) strongly constraints the discrete expression of the depth of 142 $T$-points and of the term added to the pressure gradient in $s-$coordinates: the 143 depth of a $T$-point, $z_T$, is defined as the sum the vertical scale 144 factors at $w$-points starting from the surface. 128 Using the discrete form given in {\S}~II.2-a and the symmetry or anti-symmetry properties of 129 the mean and difference operators, (II.4.3) is demonstrated in the Appendix C. 130 The main point here is that satisfying (II.4.3) strongly constraints the discrete expression of the depth of 131 $T$-points and of the term added to the pressure gradient in $s-$coordinates: the depth of a $T$-point, $z_T$, 132 is defined as the sum the vertical scale factors at $w$-points starting from the surface. 145 133 146 134 \textbf{* surface pressure gradient term} 147 135 148 In continuous formulation, the surface pressure gradient has no contribution 149 to the evolution of vorticity. This properties is trivially satisfied 150 locally as (II.2.3) (the equation verified by $\psi$ has been 151 derived from the discrete formulation of the momentum equations, vertical 152 sum and curl. Nevertheless, the $\psi$-equation is solved numerically by an 153 iterative solver (see {\S}~III.5), thus the property is only satisfied with 154 the accuracy required on the solver. In addition, with the rigid-lid 155 approximation, the change of horizontal kinetic energy due to the work of 136 In continuous formulation, the surface pressure gradient has no contribution to the evolution of vorticity. 137 This properties is trivially satisfied locally as (II.2.3) 138 (the equation verified by $\psi$ has been derived from the discrete formulation of the momentum equations, 139 vertical sum and curl). 140 Nevertheless, the $\psi$-equation is solved numerically by an iterative solver (see {\S}~III.5), 141 thus the property is only satisfied with the accuracy required on the solver. 142 In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of 156 143 surface pressure forces is exactly zero: 157 144 \begin{equation} \label{eq:spg} … … 159 146 \end{equation} 160 147 161 (II.4.4) is satisfied in discrete form only if the discrete barotropic 162 streamfunction time evolution equation is given by (II.2.3) (see appendix 163 C). This shows that (II.2.3) is the only way to compute the streamfunction, 164 otherwise there is no guarantee that the surface pressure force work 165 vanishes. 148 (II.4.4) is satisfied in discrete form only if 149 the discrete barotropic streamfunction time evolution equation is given by (II.2.3) (see appendix C). 150 This shows that (II.2.3) is the only way to compute the streamfunction, 151 otherwise there is no guarantee that the surface pressure force work vanishes. 166 152 167 153 % ------------------------------------------------------------------------------------------------------------- … … 171 157 \label{sec:Invariant_tra} 172 158 173 In continuous formulation, the advective terms of the tracer equations 174 conserve the tracer content and the quadratic form of the tracer, i.e. 159 In continuous formulation, the advective terms of the tracer equations conserve the tracer content and 160 the quadratic form of the tracer, $i.e.$ 175 161 \begin{equation} \label{eq:tra_tra2} 176 162 \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 … … 179 165 \end{equation} 180 166 181 The numerical scheme used ({\S}II.2-b) (equations in flux form, second order 182 centred finite differences) satisfies (II.4.5) (see appendix C). Note that 183 in both continuous and discrete formulations, there is generally no strict 184 conservation of mass, since the equation of state is non linear with respect 185 to $T$ and $S$.In practice, the mass is conserved with a very good accuracy.167 The numerical scheme used ({\S}II.2-b) (equations in flux form, second order centred finite differences) satisfies 168 (II.4.5) (see appendix C). 169 Note that in both continuous and discrete formulations, there is generally no strict conservation of mass, 170 since the equation of state is non linear with respect to $T$ and $S$. 171 In practice, the mass is conserved with a very good accuracy. 186 172 187 173 % ------------------------------------------------------------------------------------------------------------- … … 193 179 \textbf{* lateral momentum diffusion term} 194 180 195 The continuous formulation of the horizontal diffusion of momentum satisfies 196 the following integral constraints~: 181 The continuous formulation of the horizontal diffusion of momentum satisfies the following integral constraints~: 197 182 \begin{equation} \label{eq:dynldf_dyn} 198 183 \int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla … … 227 212 228 213 229 (II.4.6a) and (II.4.6b) means that the horizontal diffusion of momentum 230 conserve both the potential vorticity and the divergence of the flow, while 231 Eqs (II.4.6c) to (II.4.6e) mean that it dissipates the energy, the enstrophy 232 and the square of the divergence. The two latter properties are only 233 satisfied when the eddy coefficients are horizontally uniform. 234 235 Using (II.1.8) and (II.1.9), and the symmetry or anti-symmetry properties of 236 the mean and difference operators, it is shown that the discrete form of the 237 lateral momentum diffusion given in {\S}II.2-c satisfies all the integral 238 constraints (II.4.6) (see appendix C). In particular, when the eddy 239 coefficients are horizontally uniform, a complete separation of vorticity 240 and horizontal divergence fields is ensured, so that diffusion (dissipation) 241 of vorticity (enstrophy) does not generate horizontal divergence (variance 242 of the horizontal divergence) and \textit{vice versa}. When the vertical curl of the horizontal 243 diffusion of momentum (discrete sense) is taken, the term associated to the 244 horizontal gradient of the divergence is zero locally. When the horizontal 245 divergence of the horizontal diffusion of momentum (discrete sense) is 246 taken, the term associated to the vertical curl of the vorticity is zero 247 locally. The resulting term conserves $\chi$ and dissipates 248 $\chi^2$ when the 249 eddy coefficient is horizontally uniform. 214 (II.4.6a) and (II.4.6b) means that the horizontal diffusion of momentum conserve both the potential vorticity and 215 the divergence of the flow, while Eqs (II.4.6c) to (II.4.6e) mean that it dissipates the energy, the enstrophy and 216 the square of the divergence. 217 The two latter properties are only satisfied when the eddy coefficients are horizontally uniform. 218 219 Using (II.1.8) and (II.1.9), and the symmetry or anti-symmetry properties of the mean and difference operators, 220 it is shown that the discrete form of the lateral momentum diffusion given in 221 {\S}II.2-c satisfies all the integral constraints (II.4.6) (see appendix C). 222 In particular, when the eddy coefficients are horizontally uniform, 223 a complete separation of vorticity and horizontal divergence fields is ensured, 224 so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence 225 (variance of the horizontal divergence) and \textit{vice versa}. 226 When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, 227 the term associated to the horizontal gradient of the divergence is zero locally. 228 When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, 229 the term associated to the vertical curl of the vorticity is zero locally. 230 The resulting term conserves $\chi$ and dissipates $\chi^2$ when the eddy coefficient is horizontally uniform. 250 231 251 232 \textbf{* vertical momentum diffusion term} 252 233 253 As for the lateral momentum physics, the continuous form of the vertical 254 diffusion ofmomentum satisfies following integral constraints~:234 As for the lateral momentum physics, the continuous form of the vertical diffusion of 235 momentum satisfies following integral constraints~: 255 236 256 237 conservation of momentum, dissipation of horizontal kinetic energy … … 273 254 \end{aligned} 274 255 \end{equation} 275 conservation of horizontal divergence, dissipation of square of the 276 horizontal divergence 256 conservation of horizontal divergence, dissipation of square of the horizontal divergence 277 257 \begin{equation} \label{eq:dynzdf_div} 278 258 \begin{aligned} … … 286 266 \end{equation} 287 267 288 In discrete form, all these properties are satisfied in $z$-coordinate (see 289 Appendix C). In $s$-coordinates, only first order properties can be 290 demonstrated, i.e. the vertical momentum physics conserve momentum, 291 potential vorticity, and horizontal divergence. 268 In discrete form, all these properties are satisfied in $z$-coordinate (see Appendix C). 269 In $s$-coordinates, only first order properties can be demonstrated, 270 $i.e.$ the vertical momentum physics conserve momentum, potential vorticity, and horizontal divergence. 292 271 293 272 % ------------------------------------------------------------------------------------------------------------- … … 297 276 \label{subsec:Invariant_tra_physics} 298 277 299 The numerical schemes used for tracer subgridscale physics are written in 300 such a way that the heat and salt contents are conserved (equations in flux 301 form, second order centred finite differences). As a form flux is used to 302 compute the temperature and salinity, the quadratic form of these quantities 303 (i.e. their variance) globally tends to diminish. As for the advective term, 304 there is generally no strict conservation of mass even if, in practice, the 305 mass is conserved with a very good accuracy. 278 The numerical schemes used for tracer subgridscale physics are written in such a way that 279 the heat and salt contents are conserved (equations in flux form, second order centred finite differences). 280 As a form flux is used to compute the temperature and salinity, 281 the quadratic form of these quantities (i.e. their variance) globally tends to diminish. 282 As for the advective term, there is generally no strict conservation of mass even if, 283 in practice, the mass is conserved with a very good accuracy. 306 284 307 285 \textbf{* lateral physics: }conservation of tracer, dissipation of tracer … … 315 293 \end{equation} 316 294 317 \textbf{* vertical physics: }conservation of tracer, dissipation of tracer 318 variance, i.e. 295 \textbf{* vertical physics: }conservation of tracer, dissipation of tracer variance, $i.e.$ 319 296 320 297 \begin{equation} \label{eq:trazdf_t_t2} … … 325 302 \end{equation} 326 303 327 Using the symmetry or anti-symmetry properties of the mean and difference 328 operators, it is shown that the discrete form of tracer physics given in 329 {\S}~II.2-c satisfies all the integral constraints (II.4.8) and (II.4.9) 330 except the dissipation of the square of the tracer when non-geopotential 331 diffusion is used (see appendix C). A discrete form of the lateral tracer 332 physics can be derived which satisfies these last properties. Nevertheless, 333 it requires a horizontal averaging of the vertical component of the lateral 334 physics that prevents the use of implicit resolution in the vertical. It has 335 not been implemented. 304 Using the symmetry or anti-symmetry properties of the mean and difference operators, 305 it is shown that the discrete form of tracer physics given in {\S}~II.2-c satisfies all the integral constraints 306 (II.4.8) and (II.4.9) except the dissipation of the square of the tracer when non-geopotential diffusion is used 307 (see appendix C). 308 A discrete form of the lateral tracer physics can be derived which satisfies these last properties. 309 Nevertheless, it requires a horizontal averaging of the vertical component of the lateral physics that 310 prevents the use of implicit resolution in the vertical. 311 It has not been implemented. 336 312 337 313 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex
r10146 r10354 17 17 \label{sec:MISC_strait} 18 18 19 In climate modeling, it often occurs that a crucial connections between water masses 20 is broken as the grid mesh is too coarse to resolve narrow straits. For example, coarse 21 grid spacing typically closes off the Mediterranean from the Atlantic at the Strait of 22 Gibraltar. In this case, it is important for climate models to include the effects of salty 23 water entering the Atlantic from the Mediterranean. Likewise, it is important for the 24 Mediterranean to replenish its supply of water from the Atlantic to balance the net 25 evaporation occurring over the Mediterranean region. This problem occurs even in 26 eddy permitting simulations. For example, in ORCA 1/4\deg several straits of the Indonesian 27 archipelago (Ombai, Lombok...) are much narrow than even a single ocean grid-point.28 29 We describe briefly here the three methods that can be used in \NEMO to handle 30 such improperly resolved straits. The first two consist of opening the strait by hand 31 while ensuring that the mass exchanges through the strait are not too large by 32 either artificially reducing the surface of the strait grid-cells or, locally increasing 33 the lateral friction. In the third one, the strait is closed but exchanges of mass,34 heat and salt across the land are allowed.35 Note that such modifications are so specific to a given configuration that no attempt 36 has been made to set them in a generic way. However, examples of how 37 they can be set up is given in the ORCA 2\deg and 0.5\deg configurations. For example, 38 for details of implementation in ORCA2, search: 39 \texttt{ IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 )}19 In climate modeling, it often occurs that a crucial connections between water masses is broken as 20 the grid mesh is too coarse to resolve narrow straits. 21 For example, coarse grid spacing typically closes off the Mediterranean from the Atlantic at 22 the Strait of Gibraltar. 23 In this case, it is important for climate models to include the effects of salty water entering the Atlantic from 24 the Mediterranean. 25 Likewise, it is important for the Mediterranean to replenish its supply of water from the Atlantic to 26 balance the net evaporation occurring over the Mediterranean region. 27 This problem occurs even in eddy permitting simulations. 28 For example, in ORCA 1/4\deg several straits of the Indonesian archipelago (Ombai, Lombok...) 29 are much narrow than even a single ocean grid-point. 30 31 We describe briefly here the three methods that can be used in \NEMO to handle such improperly resolved straits. 32 The first two consist of opening the strait by hand while ensuring that the mass exchanges through 33 the strait are not too large by either artificially reducing the surface of the strait grid-cells or, 34 locally increasing the lateral friction. 35 In the third one, the strait is closed but exchanges of mass, heat and salt across the land are allowed. 36 Note that such modifications are so specific to a given configuration that no attempt has been made to 37 set them in a generic way. 38 However, examples of how they can be set up is given in the ORCA 2\deg and 0.5\deg configurations. 39 For example, for details of implementation in ORCA2, search: \texttt{IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 )} 40 40 41 41 % ------------------------------------------------------------------------------------------------------------- … … 45 45 \label{subsec:MISC_strait_hand} 46 46 47 $\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement 48 with the true mean width of the strait.(\autoref{fig:MISC_strait_hand}).47 $\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement with 48 the true mean width of the strait (\autoref{fig:MISC_strait_hand}). 49 49 This technique is sometime called "partially open face" or "partially closed cells". 50 The key issue here is only to reduce the faces of $T$-cell ($i.e.$ change the value51 of the horizontal scale factors at $u$- or $v$-point) but not the volume of the $T$-cell.52 Indeed, reducing the volume of strait $T$-cell can easily produce a numerical 53 instability atthat grid point that would require a reduction of the model time step.54 The changes associated with strait management are done in \mdl{domhgr}, 50 The key issue here is only to reduce the faces of $T$-cell 51 ($i.e.$ change the value of the horizontal scale factors at $u$- or $v$-point) but not the volume of the $T$-cell. 52 Indeed, reducing the volume of strait $T$-cell can easily produce a numerical instability at 53 that grid point that would require a reduction of the model time step. 54 The changes associated with strait management are done in \mdl{domhgr}, 55 55 just after the definition or reading of the horizontal scale factors. 56 56 57 $\bullet$ increase of the viscous boundary layer thickness by local increase of the 58 fmask value at the coast (\autoref{fig:MISC_strait_hand}). This is done in 59 \mdl{dommsk} together with the setting of the coastal value of fmask 60 (see \autoref{sec:LBC_coast}) 61 62 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 63 \begin{figure}[!tbp] \begin{center} 64 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 65 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 66 \caption{ \protect\label{fig:MISC_strait_hand} 67 Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh. 68 \textit{Top}: using partially open cells. The meridional scale factor at $v$-point 69 is reduced on both sides of the strait to account for the real width of the strait 70 (about 20 km). Note that the scale factors of the strait $T$-point remains unchanged. 71 \textit{Bottom}: using viscous boundary layers. The four fmask parameters 72 along the strait coastlines are set to a value larger than 4, $i.e.$ "strong" no-slip 73 case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer 74 that allows a reduced transport through the strait.} 75 \end{center} \end{figure} 57 $\bullet$ increase of the viscous boundary layer thickness by local increase of the fmask value at the coast 58 (\autoref{fig:MISC_strait_hand}). 59 This is done in \mdl{dommsk} together with the setting of the coastal value of fmask (see \autoref{sec:LBC_coast}). 60 61 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 62 \begin{figure}[!tbp] 63 \begin{center} 64 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 65 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 66 \caption{ \protect\label{fig:MISC_strait_hand} 67 Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh. 68 \textit{Top}: using partially open cells. 69 The meridional scale factor at $v$-point is reduced on both sides of the strait to account for 70 the real width of the strait (about 20 km). 71 Note that the scale factors of the strait $T$-point remains unchanged. 72 \textit{Bottom}: using viscous boundary layers. 73 The four fmask parameters along the strait coastlines are set to a value larger than 4, 74 $i.e.$ "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer that 75 allows a reduced transport through the strait.} 76 \end{center} 77 \end{figure} 76 78 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 77 79 … … 94 96 \subsection{Simple subsetting of input files via NetCDF attributes} 95 97 96 The extended grids for use with the under-shelf ice cavities will result in redundant rows 97 around Antarctica if the ice cavities are not active. A simple mechanism for subsetting 98 input files associated with the extended domains has been implemented to avoid the need to 99 maintain different sets of input fields for use with or without active ice cavities. The 100 existing 'zoom' options are overly complex for this task and marked for deletion anyway. 101 This alternative subsetting operates for the j-direction only and works by optionally 102 looking for and using a global file attribute (named: \np{open\_ocean\_jstart}) to 103 determine the starting j-row for input. The use of this option is best explained with an 104 example: Consider an ORCA1 configuration using the extended grid bathymetry and coordinate 105 files: 98 The extended grids for use with the under-shelf ice cavities will result in redundant rows around Antarctica if 99 the ice cavities are not active. 100 A simple mechanism for subsetting input files associated with the extended domains has been implemented to 101 avoid the need to maintain different sets of input fields for use with or without active ice cavities. 102 The existing 'zoom' options are overly complex for this task and marked for deletion anyway. 103 This alternative subsetting operates for the j-direction only and works by optionally looking for and 104 using a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row for input. 105 The use of this option is best explained with an example: 106 consider an ORCA1 configuration using the extended grid bathymetry and coordinate files: 106 107 \vspace{-10pt} 107 108 \ifile{eORCA1\_bathymetry\_v2} 108 109 \ifile{eORCA1\_coordinates} 109 \noindent These files define a horizontal domain of 362x332. Assuming the first row with 110 open ocean wet points in the non-isf bathymetry for this set is row 42 (Fortran indexing) 111 then the formally correct setting for \np{open\_ocean\_jstart} is 41. Using this value as the 112 first row to be read will result in a 362x292 domain which is the same size as the original 113 ORCA1 domain. Thus the extended coordinates and bathymetry files can be used with all the 114 original input files for ORCA1 if the ice cavities are not active (\np{ln\_isfcav = 115 .false.}). Full instructions for achieving this are: 110 \noindent These files define a horizontal domain of 362x332. 111 Assuming the first row with open ocean wet points in the non-isf bathymetry for this set is row 42 112 (Fortran indexing) then the formally correct setting for \np{open\_ocean\_jstart} is 41. 113 Using this value as the first row to be read will result in a 362x292 domain which is the same size as 114 the original ORCA1 domain. 115 Thus the extended coordinates and bathymetry files can be used with all the original input files for ORCA1 if 116 the ice cavities are not active (\np{ln\_isfcav = .false.}). 117 Full instructions for achieving this are: 116 118 117 119 \noindent Add the new attribute to any input files requiring a j-row offset, i.e: … … 128 130 %-------------------------------------------------------------------------------------------------------------- 129 131 130 \noindent Note the j-size of the global domain is the (extended j-size minus 131 \np{open\_ocean\_jstart} + 1 ) and this must match the size of all datasets other than 132 bathymetry and coordinates currently. However the option can be extended to any global, 2D 133 and 3D, netcdf, input field by adding the: 132 \noindent Note the j-size of the global domain is the (extended j-size minus \np{open\_ocean\_jstart} + 1 ) and 133 this must match the size of all datasets other than bathymetry and coordinates currently. 134 However the option can be extended to any global, 2D and 3D, netcdf, input field by adding the: 134 135 \vspace{-10pt} 135 136 \begin{forlines} 136 137 lrowattr=ln_use_jattr 137 138 \end{forlines} 138 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to the corresponding input files. It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in the \np{namelist\_cfg} file according to their needs. 139 140 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 141 \begin{figure}[!ht] \begin{center} 142 \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 143 \caption{ \protect\label{fig:LBC_zoom} 144 Position of a model domain compared to the data input domain when the zoom functionality is used.} 145 \end{center} \end{figure} 139 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to 140 the corresponding input files. 141 It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in 142 the \np{namelist\_cfg} file according to their needs. 143 144 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 145 \begin{figure}[!ht] 146 \begin{center} 147 \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 148 \caption{ \protect\label{fig:LBC_zoom} 149 Position of a model domain compared to the data input domain when the zoom functionality is used. 150 } 151 \end{center} 152 \end{figure} 146 153 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 147 154 … … 156 163 \label{subsec:MISC_sign} 157 164 158 The SIGN(A, B) is the \textsc {Fortran} intrinsic function delivers the magnitude 159 of A with the sign of B.For example, SIGN(-3.0,2.0) has the value 3.0.160 The problematic case is when the second argument is zero, because, on platforms 161 that support IEEE arithmetic, zero is actually a signed number. 165 The SIGN(A, B) is the \textsc {Fortran} intrinsic function delivers the magnitude of A with the sign of B. 166 For example, SIGN(-3.0,2.0) has the value 3.0. 167 The problematic case is when the second argument is zero, because, on platforms that support IEEE arithmetic, 168 zero is actually a signed number. 162 169 There is a positive zero and a negative zero. 163 170 164 In \textsc{Fortran}~90, the processor was required always to deliver a positive result for SIGN(A, B) 165 if B was zero. Nevertheless, in \textsc{Fortran}~95, the processor is allowed to do the correct thing 166 and deliver ABS(A) when B is a positive zero and -ABS(A) when B is a negative zero. 167 This change in the specification becomes apparent only when B is of type real, and is zero, 168 and the processor is capable of distinguishing between positive and negative zero, 169 and B is negative real zero. Then SIGN delivers a negative result where, under \textsc{Fortran}~90170 rules, it used to return a positive result. 171 This change may be especially sensitive for the ice model, so we overwrite the intrinsinc172 function with our own function simply performing : \\171 In \textsc{Fortran}~90, the processor was required always to deliver a positive result for SIGN(A, B) if B was zero. 172 Nevertheless, in \textsc{Fortran}~95, the processor is allowed to do the correct thing and deliver ABS(A) when 173 B is a positive zero and -ABS(A) when B is a negative zero. 174 This change in the specification becomes apparent only when B is of type real, and is zero, 175 and the processor is capable of distinguishing between positive and negative zero, 176 and B is negative real zero. 177 Then SIGN delivers a negative result where, under \textsc{Fortran}~90 rules, it used to return a positive result. 178 This change may be especially sensitive for the ice model, 179 so we overwrite the intrinsinc function with our own function simply performing : \\ 173 180 \verb? IF( B >= 0.e0 ) THEN ; SIGN(A,B) = ABS(A) ? \\ 174 181 \verb? ELSE ; SIGN(A,B) =-ABS(A) ? \\ 175 182 \verb? ENDIF ? \\ 176 This feature can be found in \mdl{lib\_fortran} module and is effective when \key{nosignedzero} 177 is defined. We use a CPP key as the overwritting of a intrinsic function can present 178 performance issues withsome computers/compilers.183 This feature can be found in \mdl{lib\_fortran} module and is effective when \key{nosignedzero} is defined. 184 We use a CPP key as the overwritting of a intrinsic function can present performance issues with 185 some computers/compilers. 179 186 180 187 … … 182 189 \label{subsec:MISC_glosum} 183 190 184 The numerical reproducibility of simulations on distributed memory parallel computers 185 is a critical issue. In particular, within NEMO global summation of distributed arrays 186 is most susceptible to rounding errors, and their propagation and accumulation cause 187 uncertainty in final simulation reproducibility on different numbers of processors. 188 To avoid so, based on \citet{He_Ding_JSC01} review of different technics, 189 we use a so called self-compensated summation method. The idea is to estimate 190 the roundoff error, store it in a buffer, and then add it back in the next addition. 191 192 Suppose we need to calculate $b = a_1 + a_2 + a_3$. The following algorithm 193 will allow to split the sum in two ($sum_1 = a_{1} + a_{2}$ and $b = sum_2 = sum_1 + a_3$) 194 with exactly the same rounding errors as the sum performed all at once. 191 The numerical reproducibility of simulations on distributed memory parallel computers is a critical issue. 192 In particular, within NEMO global summation of distributed arrays is most susceptible to rounding errors, 193 and their propagation and accumulation cause uncertainty in final simulation reproducibility on 194 different numbers of processors. 195 To avoid so, based on \citet{He_Ding_JSC01} review of different technics, 196 we use a so called self-compensated summation method. 197 The idea is to estimate the roundoff error, store it in a buffer, and then add it back in the next addition. 198 199 Suppose we need to calculate $b = a_1 + a_2 + a_3$. 200 The following algorithm will allow to split the sum in two 201 ($sum_1 = a_{1} + a_{2}$ and $b = sum_2 = sum_1 + a_3$) with exactly the same rounding errors as 202 the sum performed all at once. 195 203 \begin{align*} 196 204 sum_1 \ \ &= a_1 + a_2 \\ … … 201 209 \end{align*} 202 210 An example of this feature can be found in \mdl{lib\_fortran} module. 203 It is systematicallt used in glob\_sum function (summation over the entire basin excluding 204 duplicated rows and columns due to cyclic or north fold boundary condition as well as 205 overlap MPP areas). The self-compensated summation method should be used in all summation 206 in i- and/or j-direction.See \mdl{closea} module for an example.211 It is systematicallt used in glob\_sum function (summation over the entire basin excluding duplicated rows and 212 columns due to cyclic or north fold boundary condition as well as overlap MPP areas). 213 The self-compensated summation method should be used in all summation in i- and/or j-direction. 214 See \mdl{closea} module for an example. 207 215 Note also that this implementation may be sensitive to the optimization level. 208 216 … … 210 218 \label{subsec:MISC_mppsca} 211 219 212 The default method of communicating values across the north-fold in distributed memory applications 213 (\key{mpp\_mpi}) uses a \textsc{MPI\_ALLGATHER} function to exchange values from each processing 214 region in the northern row with every other processing region in the northern row. This enables a 215 global width array containing the top 4 rows to be collated on every northern row processor and then 216 folded with a simple algorithm. Although conceptually simple, this "All to All" communication will 217 hamper performance scalability for large numbers of northern row processors. From version 3.4 218 onwards an alternative method is available which only performs direct "Peer to Peer" communications 219 between each processor and its immediate "neighbours" across the fold line. This is achieved by 220 using the default \textsc{MPI\_ALLGATHER} method during initialisation to help identify the "active" 221 neighbours. Stored lists of these neighbours are then used in all subsequent north-fold exchanges to 222 restrict exchanges to those between associated regions. The collated global width array for each 223 region is thus only partially filled but is guaranteed to be set at all the locations actually 224 required by each individual for the fold operation. This alternative method should give identical 225 results to the default \textsc{ALLGATHER} method and is recommended for large values of \np{jpni}. 226 The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). The 227 reproducibility of results using the two methods should be confirmed for each new, non-reference 228 configuration. 220 The default method of communicating values across the north-fold in distributed memory applications (\key{mpp\_mpi}) 221 uses a \textsc{MPI\_ALLGATHER} function to exchange values from each processing region in 222 the northern row with every other processing region in the northern row. 223 This enables a global width array containing the top 4 rows to be collated on every northern row processor and then 224 folded with a simple algorithm. 225 Although conceptually simple, this "All to All" communication will hamper performance scalability for 226 large numbers of northern row processors. 227 From version 3.4 onwards an alternative method is available which only performs direct "Peer to Peer" communications 228 between each processor and its immediate "neighbours" across the fold line. 229 This is achieved by using the default \textsc{MPI\_ALLGATHER} method during initialisation to 230 help identify the "active" neighbours. 231 Stored lists of these neighbours are then used in all subsequent north-fold exchanges to 232 restrict exchanges to those between associated regions. 233 The collated global width array for each region is thus only partially filled but is guaranteed to 234 be set at all the locations actually required by each individual for the fold operation. 235 This alternative method should give identical results to the default \textsc{ALLGATHER} method and 236 is recommended for large values of \np{jpni}. 237 The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). 238 The reproducibility of results using the two methods should be confirmed for each new, 239 non-reference configuration. 229 240 230 241 % ================================================================ … … 243 254 $\bullet$ Vector optimisation: 244 255 245 \key{vectopt\_loop} enables the internal loops to collapse. This is very246 a very efficient way to increase the length of vector calculations and thus 256 \key{vectopt\_loop} enables the internal loops to collapse. 257 This is very a very efficient way to increase the length of vector calculations and thus 247 258 to speed up the model on vector computers. 248 259 … … 253 264 $\bullet$ Control print %: describe here 4 things: 254 265 255 1- \np{ln\_ctl} : compute and print the trends averaged over the interior domain256 in all TRA, DYN, LDF and ZDF modules. This option is very helpful when 257 diagnosing the origin of an undesired change in model results.258 259 2- also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check 260 the source of differences betweenmono and multi processor runs.266 1- \np{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and 267 ZDF modules. 268 This option is very helpful when diagnosing the origin of an undesired change in model results. 269 270 2- also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between 271 mono and multi processor runs. 261 272 262 273 %%gm to be removed both here and in the code 263 3- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of 264 a sum over the whole domain is performed as the summation over all processors of 265 each of their sums over their interior domains. This double sum never gives exactly 266 the same result as a single sum over the whole domain, due to truncation differences. 267 The "bit comparison" option has been introduced in order to be able to check that 268 mono-processor and multi-processor runs give exactly the same results. 269 %THIS is to be updated with the mpp_sum_glo introduced in v3.3 274 3- last digit comparison (\np{nn\_bit\_cmp}). 275 In an MPP simulation, the computation of a sum over the whole domain is performed as the summation over 276 all processors of each of their sums over their interior domains. 277 This double sum never gives exactly the same result as a single sum over the whole domain, 278 due to truncation differences. 279 The "bit comparison" option has been introduced in order to be able to check that 280 mono-processor and multi-processor runs give exactly the same results. 281 % THIS is to be updated with the mpp_sum_glo introduced in v3.3 270 282 % nn_bit_cmp today only check that the nn_cla = 0 (no cross land advection) 271 283 %%gm end 272 284 273 $\bullet$ Benchmark (\np{nn\_bench}). This option defines a benchmark run based on274 a GYRE configuration (see \autoref{sec:CFG_gyre}) in which the resolution remains the same 275 whatever the domain size. This allows a very large model domain to be used, just by 276 changing the domain size (\jp{jpiglo}, \jp{jpjglo}) and without adjusting either the time-step 277 or the physical parameterisations.285 $\bullet$ Benchmark (\np{nn\_bench}). 286 This option defines a benchmark run based on a GYRE configuration (see \autoref{sec:CFG_gyre}) in which 287 the resolution remains the same whatever the domain size. 288 This allows a very large model domain to be used, just by changing the domain size (\jp{jpiglo}, \jp{jpjglo}) and 289 without adjusting either the time-step or the physical parameterisations. 278 290 279 291 % ================================================================ -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex
r9414 r10354 26 26 27 27 28 The ocean is a fluid that can be described to a good approximation by the primitive 29 equations, $i.e.$ the Navier-Stokes equations along with a nonlinear equation of 30 state which couples the two active tracers (temperature and salinity) to the fluid 31 velocity, plus the following additional assumptions made from scale considerations: 32 33 \textit{(1) spherical earth approximation: }the geopotential surfaces are assumed to 34 be spheres so that gravity (local vertical) is parallel to the earth's radius 35 36 \textit{(2) thin-shell approximation: }the ocean depth is neglected compared to the earth's radius 37 38 \textit{(3) turbulent closure hypothesis: }the turbulent fluxes (which represent the effect 39 of small scale processes on the large-scale) are expressed in terms of large-scale features 40 41 \textit{(4) Boussinesq hypothesis:} density variations are neglected except in their 42 contribution to the buoyancy force 43 44 \textit{(5) Hydrostatic hypothesis: }the vertical momentum equation is reduced to a 45 balance between the vertical pressure gradient and the buoyancy force (this removes 46 convective processes from the initial Navier-Stokes equations and so convective processes 47 must be parameterized instead) 48 49 \textit{(6) Incompressibility hypothesis: }the three dimensional divergence of the velocity 50 vector is assumed to be zero. 51 52 Because the gravitational force is so dominant in the equations of large-scale motions, 53 it is useful to choose an orthogonal set of unit vectors (\textbf{i},\textbf{j},\textbf{k}) linked 54 to the earth such that \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are two 55 vectors orthogonal to \textbf{k}, $i.e.$ tangent to the geopotential surfaces. Let us define 56 the following variables: \textbf{U} the vector velocity, $\textbf{U}=\textbf{U}_h + w\, \textbf{k}$ 28 The ocean is a fluid that can be described to a good approximation by the primitive equations, 29 $i.e.$ the Navier-Stokes equations along with a nonlinear equation of state which 30 couples the two active tracers (temperature and salinity) to the fluid velocity, 31 plus the following additional assumptions made from scale considerations: 32 33 \textit{(1) spherical earth approximation:} the geopotential surfaces are assumed to be spheres so that 34 gravity (local vertical) is parallel to the earth's radius 35 36 \textit{(2) thin-shell approximation:} the ocean depth is neglected compared to the earth's radius 37 38 \textit{(3) turbulent closure hypothesis:} the turbulent fluxes 39 (which represent the effect of small scale processes on the large-scale) are expressed in terms of 40 large-scale features 41 42 \textit{(4) Boussinesq hypothesis:} density variations are neglected except in their contribution to 43 the buoyancy force 44 45 \textit{(5) Hydrostatic hypothesis:} the vertical momentum equation is reduced to a balance between 46 the vertical pressure gradient and the buoyancy force 47 (this removes convective processes from the initial Navier-Stokes equations and so 48 convective processes must be parameterized instead) 49 50 \textit{(6) Incompressibility hypothesis:} the three dimensional divergence of the velocity vector is assumed to 51 be zero. 52 53 Because the gravitational force is so dominant in the equations of large-scale motions, 54 it is useful to choose an orthogonal set of unit vectors (\textbf{i},\textbf{j},\textbf{k}) linked to 55 the earth such that \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are two vectors orthogonal to 56 \textbf{k}, $i.e.$ tangent to the geopotential surfaces. 57 Let us define the following variables: \textbf{U} the vector velocity, $\textbf{U}=\textbf{U}_h + w\, \textbf{k}$ 57 58 (the subscript $h$ denotes the local horizontal vector, $i.e.$ over the (\textbf{i},\textbf{j}) plane), 58 $T$ the potential temperature, $S$ the salinity, \textit{$\rho $} the \textit{in situ} density. 59 The vector invariant form of the primitive equations in the (\textbf{i},\textbf{j},\textbf{k}) 60 vector system provides the following six equations (namely the momentum balance, the 61 hydrostatic equilibrium, the incompressibility equation, the heat and salt conservation 62 equations and an equation of state):59 $T$ the potential temperature, $S$ the salinity, \textit{$\rho $} the \textit{in situ} density. 60 The vector invariant form of the primitive equations in the (\textbf{i},\textbf{j},\textbf{k}) vector system 61 provides the following six equations 62 (namely the momentum balance, the hydrostatic equilibrium, the incompressibility equation, 63 the heat and salt conservation equations and an equation of state): 63 64 \begin{subequations} \label{eq:PE} 64 65 \begin{equation} \label{eq:PE_dyn} … … 85 86 \end{equation} 86 87 \end{subequations} 87 where $\nabla$ is the generalised derivative vector operator in $(\bf i,\bf j, \bf k)$ directions, 88 $t$ is the time, $z$ is the vertical coordinate, $\rho $ is the \textit{in situ} density given by 89 the equation of state (\autoref{eq:PE_eos}), $\rho_o$ is a reference density, $p$ the pressure, 90 $f=2 \bf \Omega \cdot \bf k$ is the Coriolis acceleration (where $\bf \Omega$ is the Earth's 91 angular velocity vector), and $g$ is the gravitational acceleration. 92 ${\rm {\bf D}}^{\rm {\bf U}}$, $D^T$ and $D^S$ are the parameterisations of small-scale 93 physics for momentum, temperature and salinity, and ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ 94 and $F^S$ surface forcing terms. Their nature and formulation are discussed in 95 \autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}. 96 97 . 88 where $\nabla$ is the generalised derivative vector operator in $(\bf i,\bf j, \bf k)$ directions, $t$ is the time, 89 $z$ is the vertical coordinate, $\rho $ is the \textit{in situ} density given by the equation of state 90 (\autoref{eq:PE_eos}), $\rho_o$ is a reference density, $p$ the pressure, 91 $f=2 \bf \Omega \cdot \bf k$ is the Coriolis acceleration 92 (where $\bf \Omega$ is the Earth's angular velocity vector), and $g$ is the gravitational acceleration. 93 ${\rm {\bf D}}^{\rm {\bf U}}$, $D^T$ and $D^S$ are the parameterisations of small-scale physics for momentum, 94 temperature and salinity, and ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ and $F^S$ surface forcing terms. 95 Their nature and formulation are discussed in \autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}. 96 97 98 98 99 99 % ------------------------------------------------------------------------------------------------------------- … … 103 103 \label{subsec:PE_boundary_condition} 104 104 105 An ocean is bounded by complex coastlines, bottom topography at its base and an air-sea 106 or ice-sea interface at its top. These boundaries can be defined by two surfaces, $z=-H(i,j)$ 107 and $z=\eta(i,j,k,t)$, where $H$ is the depth of the ocean bottom and $\eta$ is the height 108 of the sea surface. Both $H$ and $\eta$ are usually referenced to a given surface, $z=0$, 109 chosen as a mean sea surface (\autoref{fig:ocean_bc}). Through these two boundaries, 110 the ocean can exchange fluxes of heat, fresh water, salt, and momentum with the solid earth, 111 the continental margins, the sea ice and the atmosphere. However, some of these fluxes are 112 so weak that even on climatic time scales of thousands of years they can be neglected. 113 In the following, we briefly review the fluxes exchanged at the interfaces between the ocean 114 and the other components of the earth system. 105 An ocean is bounded by complex coastlines, bottom topography at its base and 106 an air-sea or ice-sea interface at its top. 107 These boundaries can be defined by two surfaces, $z=-H(i,j)$ and $z=\eta(i,j,k,t)$, 108 where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface. 109 Both $H$ and $\eta$ are usually referenced to a given surface, $z=0$, chosen as a mean sea surface 110 (\autoref{fig:ocean_bc}). 111 Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, and momentum with 112 the solid earth, the continental margins, the sea ice and the atmosphere. 113 However, some of these fluxes are so weak that even on climatic time scales of thousands of years 114 they can be neglected. 115 In the following, we briefly review the fluxes exchanged at the interfaces between the ocean and 116 the other components of the earth system. 115 117 116 118 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 117 \begin{figure}[!ht] \begin{center} 118 \includegraphics[width=0.90\textwidth]{Fig_I_ocean_bc} 119 \caption{ \protect\label{fig:ocean_bc} 120 The ocean is bounded by two surfaces, $z=-H(i,j)$ and $z=\eta(i,j,t)$, where $H$ 121 is the depth of the sea floor and $\eta$ the height of the sea surface. 122 Both $H$ and $\eta$ are referenced to $z=0$.} 123 \end{center} \end{figure} 119 \begin{figure}[!ht] 120 \begin{center} 121 \includegraphics[width=0.90\textwidth]{Fig_I_ocean_bc} 122 \caption{ \protect\label{fig:ocean_bc} 123 The ocean is bounded by two surfaces, $z=-H(i,j)$ and $z=\eta(i,j,t)$, 124 where $H$ is the depth of the sea floor and $\eta$ the height of the sea surface. 125 Both $H$ and $\eta$ are referenced to $z=0$. 126 } 127 \end{center} 128 \end{figure} 124 129 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 125 130 126 131 127 132 \begin{description} 128 \item[Land - ocean interface:] the major flux between continental margins and the ocean is 129 a mass exchange of fresh water through river runoff. Such an exchange modifies the sea 130 surface salinity especially in the vicinity of major river mouths. It can be neglected for short 131 range integrations but has to be taken into account for long term integrations as it influences 132 the characteristics of water masses formed (especially at high latitudes). It is required in order 133 to close the water cycle of the climate system. It is usually specified as a fresh water flux at 134 the air-sea interface in the vicinity of river mouths. 135 \item[Solid earth - ocean interface:] heat and salt fluxes through the sea floor are small, 136 except in special areas of little extent. They are usually neglected in the model 137 \footnote{In fact, it has been shown that the heat flux associated with the solid Earth cooling 138 ($i.e.$the geothermal heating) is not negligible for the thermohaline circulation of the world 139 ocean (see \autoref{subsec:TRA_bbc}).}. 140 The boundary condition is thus set to no flux of heat and salt across solid boundaries. 141 For momentum, the situation is different. There is no flow across solid boundaries, 142 $i.e.$ the velocity normal to the ocean bottom and coastlines is zero (in other words, 143 the bottom velocity is parallel to solid boundaries). This kinematic boundary condition 144 can be expressed as: 145 \begin{equation} \label{eq:PE_w_bbc} 146 w = -{\rm {\bf U}}_h \cdot \nabla _h \left( H \right) 147 \end{equation} 148 In addition, the ocean exchanges momentum with the earth through frictional processes. 149 Such momentum transfer occurs at small scales in a boundary layer. It must be parameterized 150 in terms of turbulent fluxes using bottom and/or lateral boundary conditions. Its specification 151 depends on the nature of the physical parameterisation used for ${\rm {\bf D}}^{\rm {\bf U}}$ 152 in \autoref{eq:PE_dyn}. It is discussed in \autoref{eq:PE_zdf}.% and Chap. III.6 to 9. 153 \item[Atmosphere - ocean interface:] the kinematic surface condition plus the mass flux 154 of fresh water PE (the precipitation minus evaporation budget) leads to: 155 \begin{equation} \label{eq:PE_w_sbc} 156 w = \frac{\partial \eta }{\partial t} 157 + \left. {{\rm {\bf U}}_h } \right|_{z=\eta } \cdot \nabla _h \left( \eta \right) 133 \item[Land - ocean interface:] 134 the major flux between continental margins and the ocean is a mass exchange of fresh water through river runoff. 135 Such an exchange modifies the sea surface salinity especially in the vicinity of major river mouths. 136 It can be neglected for short range integrations but has to be taken into account for long term integrations as 137 it influences the characteristics of water masses formed (especially at high latitudes). 138 It is required in order to close the water cycle of the climate system. 139 It is usually specified as a fresh water flux at the air-sea interface in the vicinity of river mouths. 140 \item[Solid earth - ocean interface:] 141 heat and salt fluxes through the sea floor are small, except in special areas of little extent. 142 They are usually neglected in the model \footnote{ 143 In fact, it has been shown that the heat flux associated with the solid Earth cooling 144 ($i.e.$the geothermal heating) is not negligible for the thermohaline circulation of the world ocean 145 (see \autoref{subsec:TRA_bbc}). 146 }. 147 The boundary condition is thus set to no flux of heat and salt across solid boundaries. 148 For momentum, the situation is different. There is no flow across solid boundaries, 149 $i.e.$ the velocity normal to the ocean bottom and coastlines is zero (in other words, 150 the bottom velocity is parallel to solid boundaries). This kinematic boundary condition 151 can be expressed as: 152 \begin{equation} \label{eq:PE_w_bbc} 153 w = -{\rm {\bf U}}_h \cdot \nabla _h \left( H \right) 154 \end{equation} 155 In addition, the ocean exchanges momentum with the earth through frictional processes. 156 Such momentum transfer occurs at small scales in a boundary layer. 157 It must be parameterized in terms of turbulent fluxes using bottom and/or lateral boundary conditions. 158 Its specification depends on the nature of the physical parameterisation used for 159 ${\rm {\bf D}}^{\rm {\bf U}}$ in \autoref{eq:PE_dyn}. 160 It is discussed in \autoref{eq:PE_zdf}.% and Chap. III.6 to 9. 161 \item[Atmosphere - ocean interface:] 162 the kinematic surface condition plus the mass flux of fresh water PE (the precipitation minus evaporation budget) 163 leads to: 164 \begin{equation} \label{eq:PE_w_sbc} 165 w = \frac{\partial \eta }{\partial t} 166 + \left. {{\rm {\bf U}}_h } \right|_{z=\eta } \cdot \nabla _h \left( \eta \right) 158 167 + P-E 159 \end{equation}160 The dynamic boundary condition, neglecting the surface tension (which removes capillary 161 waves from the system) leads to the continuity of pressure across the interface $z=\eta$. 162 The atmosphere and ocean also exchange horizontal momentum (wind stress), and heat.163 \item[Sea ice - ocean interface:] the ocean and sea ice exchange heat, salt, fresh water164 and momentum. The sea surface temperature is constrained to be at the freezing point 165 at the interface. Sea ice salinity is very low ($\sim4-6 \,psu$) compared to those of the 166 ocean ($\sim34 \,psu$). The cycle of freezing/melting is associated with fresh water and 167 salt fluxes that cannot be neglected.168 \end{equation} 169 The dynamic boundary condition, neglecting the surface tension (which removes capillary waves from the system) 170 leads to the continuity of pressure across the interface $z=\eta$. 171 The atmosphere and ocean also exchange horizontal momentum (wind stress), and heat. 172 \item[Sea ice - ocean interface:] 173 the ocean and sea ice exchange heat, salt, fresh water and momentum. 174 The sea surface temperature is constrained to be at the freezing point at the interface. 175 Sea ice salinity is very low ($\sim4-6 \,psu$) compared to those of the ocean ($\sim34 \,psu$). 176 The cycle of freezing/melting is associated with fresh water and salt fluxes that cannot be neglected. 168 177 \end{description} 169 178 … … 184 193 \label{subsec:PE_p_formulation} 185 194 186 The total pressure at a given depth $z$ is composed of a surface pressure $p_s$ at a 187 reference geopotential surface ($z=0$) and a hydrostatic pressure $p_h$ such that: 188 $p(i,j,k,t)=p_s(i,j,t)+p_h(i,j,k,t)$. The latter is computed by integrating (\autoref{eq:PE_hydrostatic}), 189 assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:PE_eos}). 195 The total pressure at a given depth $z$ is composed of a surface pressure $p_s$ at 196 a reference geopotential surface ($z=0$) and a hydrostatic pressure $p_h$ such that: 197 $p(i,j,k,t)=p_s(i,j,t)+p_h(i,j,k,t)$. 198 The latter is computed by integrating (\autoref{eq:PE_hydrostatic}), 199 assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:PE_eos}). 190 200 The hydrostatic pressure is then given by: 191 201 \begin{equation} \label{eq:PE_pressure} … … 193 203 = \int_{\varsigma =z}^{\varsigma =0} {g\;\rho \left( {T,S,\varsigma} \right)\;d\varsigma } 194 204 \end{equation} 195 Two strategies can be considered for the surface pressure term: $(a)$ introduce of a 196 new variable $\eta$, the free-surface elevation, for which a prognostic equation can be 197 established and solved; $(b)$ assume that the ocean surface is a rigid lid, on which the 198 pressure (or its horizontal gradient) can be diagnosed. When the former strategy is used, 199 one solution of the free-surface elevation consists of the excitation of external gravity waves. 200 The flow is barotropic and the surface moves up and down with gravity as the restoring force. 201 The phase speed of such waves is high (some hundreds of metres per second) so that 202 the time step would have to be very short if they were present in the model. The latter 203 strategy filters out these waves since the rigid lid approximation implies $\eta=0$, $i.e.$ 204 the sea surface is the surface $z=0$. This well known approximation increases the surface 205 wave speed to infinity and modifies certain other longwave dynamics ($e.g.$ barotropic 206 Rossby or planetary waves). The rigid-lid hypothesis is an obsolescent feature in modern 207 OGCMs. It has been available until the release 3.1 of \NEMO, and it has been removed 208 in release 3.2 and followings. Only the free surface formulation is now described in the 209 this document (see the next sub-section). 205 Two strategies can be considered for the surface pressure term: 206 $(a)$ introduce of a new variable $\eta$, the free-surface elevation, 207 for which a prognostic equation can be established and solved; 208 $(b)$ assume that the ocean surface is a rigid lid, 209 on which the pressure (or its horizontal gradient) can be diagnosed. 210 When the former strategy is used, one solution of the free-surface elevation consists of 211 the excitation of external gravity waves. 212 The flow is barotropic and the surface moves up and down with gravity as the restoring force. 213 The phase speed of such waves is high (some hundreds of metres per second) so that 214 the time step would have to be very short if they were present in the model. 215 The latter strategy filters out these waves since the rigid lid approximation implies $\eta=0$, 216 $i.e.$ the sea surface is the surface $z=0$. 217 This well known approximation increases the surface wave speed to infinity and 218 modifies certain other longwave dynamics ($e.g.$ barotropic Rossby or planetary waves). 219 The rigid-lid hypothesis is an obsolescent feature in modern OGCMs. 220 It has been available until the release 3.1 of \NEMO, and it has been removed in release 3.2 and followings. 221 Only the free surface formulation is now described in the this document (see the next sub-section). 210 222 211 223 % ------------------------------------------------------------------------------------------------------------- … … 215 227 \label{subsec:PE_free_surface} 216 228 217 In the free surface formulation, a variable $\eta$, the sea-surface height, is introduced218 which describes the shape of the air-sea interface. This variable is solution of a 219 prognostic equation which is established by forming the vertical average of the kinematic 220 surface condition (\autoref{eq:PE_w_bbc}):229 In the free surface formulation, a variable $\eta$, the sea-surface height, 230 is introduced which describes the shape of the air-sea interface. 231 This variable is solution of a prognostic equation which is established by forming the vertical average of 232 the kinematic surface condition (\autoref{eq:PE_w_bbc}): 221 233 \begin{equation} \label{eq:PE_ssh} 222 234 \frac{\partial \eta }{\partial t}=-D+P-E … … 226 238 and using (\autoref{eq:PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$. 227 239 228 Allowing the air-sea interface to move introduces the external gravity waves (EGWs) 229 a s a class of solution of the primitive equations. These waves are barotropic because230 of hydrostatic assumption, and their phase speed is quite high. Their time scale is 231 short with respect to the other processes described by the primitive equations.232 233 Two choices can be made regarding the implementation of the free surface in the model, 240 Allowing the air-sea interface to move introduces the external gravity waves (EGWs) as 241 a class of solution of the primitive equations. 242 These waves are barotropic because of hydrostatic assumption, and their phase speed is quite high. 243 Their time scale is short with respect to the other processes described by the primitive equations. 244 245 Two choices can be made regarding the implementation of the free surface in the model, 234 246 depending on the physical processes of interest. 235 247 236 $\bullet$ If one is interested in EGWs, in particular the tides and their interaction 237 with the baroclinic structure of the ocean (internal waves) possibly in shallow seas, 238 then a non linear free surface is the most appropriate. This means that no 239 approximation is made in (\autoref{eq:PE_ssh}) and that the variation of the ocean 240 volume is fully taken into account. Note that in order to study the fast time scales 241 associated with EGWs it is necessary to minimize time filtering effects (use an 242 explicit time scheme with very small time step, or a split-explicit scheme with 243 reasonably small time step, see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}. 244 245 $\bullet$ If one is not interested in EGW but rather sees them as high frequency 246 noise, it is possible to apply an explicit filter to slow down the fastest waves while 247 not altering the slow barotropic Rossby waves. If further, an approximative conservation 248 of heat and salt contents is sufficient for the problem solved, then it is 249 sufficient to solve a linearized version of (\autoref{eq:PE_ssh}), which still allows 250 to take into account freshwater fluxes applied at the ocean surface \citep{Roullet_Madec_JGR00}. 248 $\bullet$ If one is interested in EGWs, in particular the tides and their interaction with 249 the baroclinic structure of the ocean (internal waves) possibly in shallow seas, 250 then a non linear free surface is the most appropriate. 251 This means that no approximation is made in (\autoref{eq:PE_ssh}) and that 252 the variation of the ocean volume is fully taken into account. 253 Note that in order to study the fast time scales associated with EGWs it is necessary to 254 minimize time filtering effects 255 (use an explicit time scheme with very small time step, or a split-explicit scheme with reasonably small time step, 256 see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}). 257 258 $\bullet$ If one is not interested in EGW but rather sees them as high frequency noise, 259 it is possible to apply an explicit filter to slow down the fastest waves while 260 not altering the slow barotropic Rossby waves. 261 If further, an approximative conservation of heat and salt contents is sufficient for the problem solved, 262 then it is sufficient to solve a linearized version of (\autoref{eq:PE_ssh}), 263 which still allows to take into account freshwater fluxes applied at the ocean surface \citep{Roullet_Madec_JGR00}. 251 264 Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost. 252 265 253 The filtering of EGWs in models with a free surface is usually a matter of discretisation 254 of the temporal derivatives, using a split-explicit method \citep{Killworth_al_JPO91, Zhang_Endoh_JGR92} 255 or the implicit scheme \citep{Dukowicz1994} or the addition of a filtering force in the momentum equation 256 \citep{Roullet_Madec_JGR00}. With the present release, \NEMO offers the choice between 257 an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or a split-explicit scheme strongly 258 inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} (see \autoref{subsec:DYN_spg_ts}). 266 The filtering of EGWs in models with a free surface is usually a matter of discretisation of 267 the temporal derivatives, 268 using a split-explicit method \citep{Killworth_al_JPO91, Zhang_Endoh_JGR92} or 269 the implicit scheme \citep{Dukowicz1994} or 270 the addition of a filtering force in the momentum equation \citep{Roullet_Madec_JGR00}. 271 With the present release, \NEMO offers the choice between 272 an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or 273 a split-explicit scheme strongly inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} 274 (see \autoref{subsec:DYN_spg_ts}). 259 275 260 276 %\newpage … … 274 290 \label{subsec:PE_tensorial} 275 291 276 In many ocean circulation problems, the flow field has regions of enhanced dynamics 277 ($i.e.$ surface layers, western boundary currents, equatorial currents, or ocean fronts). 278 The representation of such dynamical processes can be improved by specifically increasing 279 the model resolution in these regions. As well, it may be convenient to use a lateral 280 boundary-following coordinate system to better represent coastal dynamics. Moreover, 281 the common geographical coordinate system has a singular point at the North Pole that 282 cannot be easily treated in a global model without filtering. A solution consists of introducing 283 an appropriate coordinate transformation that shifts the singular point onto land 284 \citep{Madec_Imbard_CD96, Murray_JCP96}. As a consequence, it is important to solve the primitive 285 equations in various curvilinear coordinate systems. An efficient way of introducing an 286 appropriate coordinate transform can be found when using a tensorial formalism. 287 This formalism is suited to any multidimensional curvilinear coordinate system. Ocean 288 modellers mainly use three-dimensional orthogonal grids on the sphere (spherical earth 289 approximation), with preservation of the local vertical. Here we give the simplified equations 290 for this particular case. The general case is detailed by \citet{Eiseman1980} in their survey 291 of the conservation laws of fluid dynamics. 292 293 Let (\textit{i},\textit{j},\textit{k}) be a set of orthogonal curvilinear coordinates on the sphere 294 associated with the positively oriented orthogonal set of unit vectors (\textbf{i},\textbf{j},\textbf{k}) 295 linked to the earth such that \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are 296 two vectors orthogonal to \textbf{k}, $i.e.$ along geopotential surfaces (\autoref{fig:referential}). 297 Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined 298 by the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and the distance from the centre of 299 the earth $a+z(k)$ where $a$ is the earth's radius and $z$ the altitude above a reference sea 300 level (\autoref{fig:referential}). The local deformation of the curvilinear coordinate system is 301 given by $e_1$, $e_2$ and $e_3$, the three scale factors: 292 In many ocean circulation problems, the flow field has regions of enhanced dynamics 293 ($i.e.$ surface layers, western boundary currents, equatorial currents, or ocean fronts). 294 The representation of such dynamical processes can be improved by 295 specifically increasing the model resolution in these regions. 296 As well, it may be convenient to use a lateral boundary-following coordinate system to 297 better represent coastal dynamics. 298 Moreover, the common geographical coordinate system has a singular point at the North Pole that 299 cannot be easily treated in a global model without filtering. 300 A solution consists of introducing an appropriate coordinate transformation that 301 shifts the singular point onto land \citep{Madec_Imbard_CD96, Murray_JCP96}. 302 As a consequence, it is important to solve the primitive equations in various curvilinear coordinate systems. 303 An efficient way of introducing an appropriate coordinate transform can be found when using a tensorial formalism. 304 This formalism is suited to any multidimensional curvilinear coordinate system. 305 Ocean modellers mainly use three-dimensional orthogonal grids on the sphere (spherical earth approximation), 306 with preservation of the local vertical. Here we give the simplified equations for this particular case. 307 The general case is detailed by \citet{Eiseman1980} in their survey of the conservation laws of fluid dynamics. 308 309 Let (\textit{i},\textit{j},\textit{k}) be a set of orthogonal curvilinear coordinates on 310 the sphere associated with the positively oriented orthogonal set of unit vectors 311 (\textbf{i},\textbf{j},\textbf{k}) linked to the earth such that 312 \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are two vectors orthogonal to \textbf{k}, 313 $i.e.$ along geopotential surfaces (\autoref{fig:referential}). 314 Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined by 315 the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and 316 the distance from the centre of the earth $a+z(k)$ where $a$ is the earth's radius and 317 $z$ the altitude above a reference sea level (\autoref{fig:referential}). 318 The local deformation of the curvilinear coordinate system is given by $e_1$, $e_2$ and $e_3$, 319 the three scale factors: 302 320 \begin{equation} \label{eq:scale_factors} 303 \begin{aligned} 304 e_1 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda 305 }{\partial i}\cos \varphi } \right)^2+\left( {\frac{\partial \varphi 306 }{\partial i}} \right)^2} \right]^{1/2} \\ 307 e_2 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda 308 }{\partial j}\cos \varphi } \right)^2+\left( {\frac{\partial \varphi 309 }{\partial j}} \right)^2} \right]^{1/2} \\ 310 e_3 &=\left( {\frac{\partial z}{\partial k}} \right) \\ 311 \end{aligned} 312 \end{equation} 313 321 \begin{aligned} 322 e_1 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda}{\partial i}\cos \varphi } \right)^2 323 +\left( {\frac{\partial \varphi }{\partial i}} \right)^2} \right]^{1/2} \\ 324 e_2 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda }{\partial j}\cos \varphi } \right)^2+ 325 \left( {\frac{\partial \varphi }{\partial j}} \right)^2} \right]^{1/2} \\ 326 e_3 &=\left( {\frac{\partial z}{\partial k}} \right) \\ 327 \end{aligned} 328 \end{equation} 329 330 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 331 \begin{figure}[!tb] 332 \begin{center} 333 \includegraphics[width=0.60\textwidth]{Fig_I_earth_referential} 334 \caption{ \protect\label{fig:referential} 335 the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear 336 coordinate system (\textbf{i},\textbf{j},\textbf{k}). } 337 \end{center} 338 \end{figure} 314 339 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 315 \begin{figure}[!tb] \begin{center} 316 \includegraphics[width=0.60\textwidth]{Fig_I_earth_referential} 317 \caption{ \protect\label{fig:referential} 318 the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear 319 coordinate system (\textbf{i},\textbf{j},\textbf{k}). } 320 \end{center} \end{figure} 321 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 322 323 Since the ocean depth is far smaller than the earth's radius, $a+z$, can be replaced by 324 $a$ in (\autoref{eq:scale_factors}) (thin-shell approximation). The resulting horizontal scale 325 factors $e_1$, $e_2$ are independent of $k$ while the vertical scale factor is a single 326 function of $k$ as \textbf{k} is parallel to \textbf{z}. The scalar and vector operators that 327 appear in the primitive equations (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can 328 be written in the tensorial form, invariant in any orthogonal horizontal curvilinear coordinate 329 system transformation: 340 341 Since the ocean depth is far smaller than the earth's radius, $a+z$, can be replaced by $a$ in 342 (\autoref{eq:scale_factors}) (thin-shell approximation). 343 The resulting horizontal scale factors $e_1$, $e_2$ are independent of $k$ while 344 the vertical scale factor is a single function of $k$ as \textbf{k} is parallel to \textbf{z}. 345 The scalar and vector operators that appear in the primitive equations 346 (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can be written in the tensorial form, 347 invariant in any orthogonal horizontal curvilinear coordinate system transformation: 330 348 \begin{subequations} \label{eq:PE_discrete_operators} 331 349 \begin{equation} \label{eq:PE_grad} … … 369 387 \label{subsec:PE_zco_Eq} 370 388 371 In order to express the Primitive Equations in tensorial formalism, it is necessary to compute 372 the horizontal component of the non-linear and viscous terms of the equation using 373 \autoref{eq:PE_grad}) to \autoref{eq:PE_lap_vector}. 374 Let us set $\vect U=(u,v,w)={\vect{U}}_h +w\;\vect{k}$, the velocity in the $(i,j,k)$ coordinate 375 system and define the relative vorticity $\zeta$ and the divergence of the horizontal velocity 376 field $\chi$, by: 389 In order to express the Primitive Equations in tensorial formalism, 390 it is necessary to compute the horizontal component of the non-linear and viscous terms of the equation using 391 \autoref{eq:PE_grad}) to \autoref{eq:PE_lap_vector}. 392 Let us set $\vect U=(u,v,w)={\vect{U}}_h +w\;\vect{k}$, the velocity in the $(i,j,k)$ coordinate system and 393 define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$, by: 377 394 \begin{equation} \label{eq:PE_curl_Uh} 378 395 \zeta =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,v} … … 386 403 \end{equation} 387 404 388 Using the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ 389 and that $e_3$ is a function of the single variable $k$, the nonlinear term of 390 \autoref{eq:PE_dyn} can be transformed as follows:405 Using the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that 406 $e_3$ is a function of the single variable $k$, 407 the nonlinear term of \autoref{eq:PE_dyn} can be transformed as follows: 391 408 \begin{flalign*} 392 409 &\left[ {\left( { \nabla \times {\rm {\bf U}} } \right) \times {\rm {\bf U}} … … 426 443 \end{flalign*} 427 444 428 The last term of the right hand side is obviously zero, and thus the nonlinear term of 445 The last term of the right hand side is obviously zero, and thus the nonlinear term of 429 446 \autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system: 430 447 \begin{equation} \label{eq:PE_vector_form} … … 437 454 \end{equation} 438 455 439 This is the so-called \textit{vector invariant form} of the momentum advection term. 440 For some purposes, it can be advantageous to write this term in the so-called flux form, 441 $i.e.$ to write it as the divergence of fluxes. For example, the first component of442 \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows:456 This is the so-called \textit{vector invariant form} of the momentum advection term. 457 For some purposes, it can be advantageous to write this term in the so-called flux form, 458 $i.e.$ to write it as the divergence of fluxes. 459 For example, the first component of \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows: 443 460 \begin{flalign*} 444 461 &{ \begin{array}{*{20}l} … … 525 542 \end{multline} 526 543 527 The flux form has two terms, the first one is expressed as the divergence of momentum528 fluxes (hence the flux form name given to this formulation) and the second one is due to 529 the curvilinear nature of the coordinate system used. The latter is called the \emph{metric} 530 term and can be viewed as a modification of the Coriolis parameter:544 The flux form has two terms, 545 the first one is expressed as the divergence of momentum fluxes (hence the flux form name given to this formulation) 546 and the second one is due to the curvilinear nature of the coordinate system used. 547 The latter is called the \emph{metric} term and can be viewed as a modification of the Coriolis parameter: 531 548 \begin{equation} \label{eq:PE_cor+metric} 532 549 f \to f + \frac{1}{e_1\;e_2} \left( v \frac{\partial e_2}{\partial i} … … 534 551 \end{equation} 535 552 536 Note that in the case of geographical coordinate, $i.e.$ when $(i,j) \to (\lambda ,\varphi )$537 and $(e_1 ,e_2) \to (a \,\cos \varphi ,a)$, we recover the commonly used modification of 538 the Coriolis parameter $f \to f+(u/a) \tan \varphi$.553 Note that in the case of geographical coordinate, 554 $i.e.$ when $(i,j) \to (\lambda ,\varphi )$ and $(e_1 ,e_2) \to (a \,\cos \varphi ,a)$, 555 we recover the commonly used modification of the Coriolis parameter $f \to f+(u/a) \tan \varphi$. 539 556 540 557 541 558 $\ $\newline % force a new ligne 542 559 543 To sum up, the curvilinear $z$-coordinate equations solved by the ocean model can be 544 written inthe following tensorial formalism:560 To sum up, the curvilinear $z$-coordinate equations solved by the ocean model can be written in 561 the following tensorial formalism: 545 562 546 563 \vspace{+10pt} … … 594 611 \end{multline} 595 612 \end{subequations} 596 where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and $p_s $,597 the surface pressure, is given by:613 where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and 614 $p_s $, the surface pressure, is given by: 598 615 \begin{equation} \label{eq:PE_spg} 599 616 p_s = \rho \,g \,\eta 600 617 \end{equation} 601 with $\eta$ is solution of \autoref{eq:PE_ssh} 618 with $\eta$ is solution of \autoref{eq:PE_ssh}. 602 619 603 620 The vertical velocity and the hydrostatic pressure are diagnosed from the following equations: … … 628 645 \end{equation} 629 646 630 The expression of \textbf{D}$^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale 631 parameterisation used. It will be defined in \autoref{eq:PE_zdf}. The nature and formulation of 632 ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ and $F^S$, the surface forcing terms, are discussed 633 in \autoref{chap:SBC}.647 The expression of \textbf{D}$^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale parameterisation used. 648 It will be defined in \autoref{eq:PE_zdf}. 649 The nature and formulation of ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ and $F^S$, the surface forcing terms, 650 are discussed in \autoref{chap:SBC}. 634 651 635 652 … … 642 659 \label{sec:PE_gco} 643 660 644 The ocean domain presents a huge diversity of situation in the vertical. First the ocean surface is a time dependent surface (moving surface). Second the ocean floor depends on the geographical position, varying from more than 6,000 meters in abyssal trenches to zero at the coast. Last but not least, the ocean stratification exerts a strong barrier to vertical motions and mixing. 645 Therefore, in order to represent the ocean with respect to the first point a space and time dependent vertical coordinate that follows the variation of the sea surface height $e.g.$ an $z$*-coordinate; for the second point, a space variation to fit the change of bottom topography $e.g.$ a terrain-following or $\sigma$-coordinate; and for the third point, one will be tempted to use a space and time dependent coordinate that follows the isopycnal surfaces, $e.g.$ an isopycnic coordinate. 646 647 In order to satisfy two or more constrains one can even be tempted to mixed these coordinate systems, as in HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and $\sigma$ at the ocean bottom) \citep{Chassignet_al_JPO03} or OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and $\sigma$-coordinate elsewhere) \citep{Madec_al_JPO96} among others. 648 649 In fact one is totally free to choose any space and time vertical coordinate by introducing an arbitrary vertical coordinate : 661 The ocean domain presents a huge diversity of situation in the vertical. 662 First the ocean surface is a time dependent surface (moving surface). 663 Second the ocean floor depends on the geographical position, 664 varying from more than 6,000 meters in abyssal trenches to zero at the coast. 665 Last but not least, the ocean stratification exerts a strong barrier to vertical motions and mixing. 666 Therefore, in order to represent the ocean with respect to 667 the first point a space and time dependent vertical coordinate that follows the variation of the sea surface height 668 $e.g.$ an $z$*-coordinate; 669 for the second point, a space variation to fit the change of bottom topography 670 $e.g.$ a terrain-following or $\sigma$-coordinate; 671 and for the third point, one will be tempted to use a space and time dependent coordinate that 672 follows the isopycnal surfaces, $e.g.$ an isopycnic coordinate. 673 674 In order to satisfy two or more constrains one can even be tempted to mixed these coordinate systems, as in 675 HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and $\sigma$ at 676 the ocean bottom) \citep{Chassignet_al_JPO03} or 677 OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and $\sigma$-coordinate elsewhere) 678 \citep{Madec_al_JPO96} among others. 679 680 In fact one is totally free to choose any space and time vertical coordinate by 681 introducing an arbitrary vertical coordinate : 650 682 \begin{equation} \label{eq:PE_s} 651 683 s=s(i,j,k,t) 652 684 \end{equation} 653 with the restriction that the above equation gives a single-valued monotonic relationship between $s$ and $k$, when $i$, $j$ and $t$ are held fixed. \autoref{eq:PE_s} is a transformation from the $(i,j,k,t)$ coordinate system with independent variables into the $(i,j,s,t)$ generalised coordinate system with $s$ depending on the other three variables through \autoref{eq:PE_s}. 654 This so-called \textit{generalised vertical coordinate} \citep{Kasahara_MWR74} is in fact an Arbitrary Lagrangian--Eulerian (ALE) coordinate. Indeed, choosing an expression for $s$ is an arbitrary choice that determines which part of the vertical velocity (defined from a fixed referential) will cross the levels (Eulerian part) and which part will be used to move them (Lagrangian part). 655 The coordinate is also sometime referenced as an adaptive coordinate \citep{Hofmeister_al_OM09}, since the coordinate system is adapted in the course of the simulation. Its most often used implementation is via an ALE algorithm, in which a pure lagrangian step is followed by regridding and remapping steps, the later step implicitly embedding the vertical advection \citep{Hirt_al_JCP74, Chassignet_al_JPO03, White_al_JCP09}. Here we follow the \citep{Kasahara_MWR74} strategy : a regridding step (an update of the vertical coordinate) followed by an eulerian step with an explicit computation of vertical advection relative to the moving s-surfaces. 685 with the restriction that the above equation gives a single-valued monotonic relationship between $s$ and $k$, 686 when $i$, $j$ and $t$ are held fixed. 687 \autoref{eq:PE_s} is a transformation from the $(i,j,k,t)$ coordinate system with independent variables into 688 the $(i,j,s,t)$ generalised coordinate system with $s$ depending on the other three variables through 689 \autoref{eq:PE_s}. 690 This so-called \textit{generalised vertical coordinate} \citep{Kasahara_MWR74} is in fact 691 an Arbitrary Lagrangian--Eulerian (ALE) coordinate. 692 Indeed, choosing an expression for $s$ is an arbitrary choice that determines 693 which part of the vertical velocity (defined from a fixed referential) will cross the levels (Eulerian part) and 694 which part will be used to move them (Lagrangian part). 695 The coordinate is also sometime referenced as an adaptive coordinate \citep{Hofmeister_al_OM09}, 696 since the coordinate system is adapted in the course of the simulation. 697 Its most often used implementation is via an ALE algorithm, 698 in which a pure lagrangian step is followed by regridding and remapping steps, 699 the later step implicitly embedding the vertical advection 700 \citep{Hirt_al_JCP74, Chassignet_al_JPO03, White_al_JCP09}. 701 Here we follow the \citep{Kasahara_MWR74} strategy: 702 a regridding step (an update of the vertical coordinate) followed by an eulerian step with 703 an explicit computation of vertical advection relative to the moving s-surfaces. 656 704 657 705 %\gmcomment{ … … 659 707 %A key point here is that the $s$-coordinate depends on $(i,j)$ ==> horizontal pressure gradient... 660 708 661 the generalized vertical coordinates used in ocean modelling are not orthogonal, 662 which contrasts with many other applications in mathematical physics. 663 Hence, it is useful to keep in mind the following properties that may seem 664 odd on initial encounter. 665 666 The horizontal velocity in ocean models measures motions in the horizontal plane, 667 perpendicular to the local gravitational field. That is, horizontal velocity is mathematically 668 the same regardless the vertical coordinate, be it geopotential, isopycnal, pressure, 669 or terrain following. The key motivation for maintaining the same horizontal velocity 670 component is that the hydrostatic and geostrophic balances are dominant in the large-scale ocean. 671 Use of an alternative quasi-horizontal velocity, for example one oriented parallel 672 to the generalized surface, would lead to unacceptable numerical errors. 673 Correspondingly, the vertical direction is anti-parallel to the gravitational force in all 674 of the coordinate systems. We do not choose the alternative of a quasi-vertical 675 direction oriented normal to the surface of a constant generalized vertical coordinate. 676 677 It is the method used to measure transport across the generalized vertical coordinate 678 surfaces which differs between the vertical coordinate choices. That is, computation 679 of the dia-surface velocity component represents the fundamental distinction between 680 the various coordinates. In some models, such as geopotential, pressure, and 681 terrain following, this transport is typically diagnosed from volume or mass conservation. 682 In other models, such as isopycnal layered models, this transport is prescribed based 683 on assumptions about the physical processes producing a flux across the layer interfaces. 684 685 686 In this section we first establish the PE in the generalised vertical $s$-coordinate, 709 the generalized vertical coordinates used in ocean modelling are not orthogonal, 710 which contrasts with many other applications in mathematical physics. 711 Hence, it is useful to keep in mind the following properties that may seem odd on initial encounter. 712 713 The horizontal velocity in ocean models measures motions in the horizontal plane, 714 perpendicular to the local gravitational field. 715 That is, horizontal velocity is mathematically the same regardless the vertical coordinate, be it geopotential, 716 isopycnal, pressure, or terrain following. 717 The key motivation for maintaining the same horizontal velocity component is that 718 the hydrostatic and geostrophic balances are dominant in the large-scale ocean. 719 Use of an alternative quasi-horizontal velocity, for example one oriented parallel to the generalized surface, 720 would lead to unacceptable numerical errors. 721 Correspondingly, the vertical direction is anti-parallel to the gravitational force in 722 all of the coordinate systems. 723 We do not choose the alternative of a quasi-vertical direction oriented normal to 724 the surface of a constant generalized vertical coordinate. 725 726 It is the method used to measure transport across the generalized vertical coordinate surfaces which differs between 727 the vertical coordinate choices. 728 That is, computation of the dia-surface velocity component represents the fundamental distinction between 729 the various coordinates. 730 In some models, such as geopotential, pressure, and terrain following, this transport is typically diagnosed from 731 volume or mass conservation. 732 In other models, such as isopycnal layered models, this transport is prescribed based on assumptions about 733 the physical processes producing a flux across the layer interfaces. 734 735 736 In this section we first establish the PE in the generalised vertical $s$-coordinate, 687 737 then we discuss the particular cases available in \NEMO, namely $z$, $z$*, $s$, and $\tilde z$. 688 738 %} … … 693 743 \subsection{\textit{S-}coordinate formulation} 694 744 695 Starting from the set of equations established in \autoref{sec:PE_zco} for the special case $k=z$ 696 and thus $e_3=1$, we introduce an arbitrary vertical coordinate $s=s(i,j,k,t)$, which includes 697 $z$-, \textit{z*}- and $\sigma-$coordinates as special cases ($s=z$, $s=\textit{z*}$, and 698 $s=\sigma=z/H$ or $=z/\left(H+\eta \right)$, resp.). A formal derivation of the transformed 699 equations is given in \autoref{apdx:A}. Let us define the vertical scale factor by 700 $e_3=\partial_s z$ ($e_3$ is now a function of $(i,j,k,t)$ ), and the slopes in the 701 (\textbf{i},\textbf{j}) directions between $s-$ and $z-$surfaces by:745 Starting from the set of equations established in \autoref{sec:PE_zco} for the special case $k=z$ and thus $e_3=1$, 746 we introduce an arbitrary vertical coordinate $s=s(i,j,k,t)$, 747 which includes $z$-, \textit{z*}- and $\sigma-$coordinates as special cases 748 ($s=z$, $s=\textit{z*}$, and $s=\sigma=z/H$ or $=z/\left(H+\eta \right)$, resp.). 749 A formal derivation of the transformed equations is given in \autoref{apdx:A}. 750 Let us define the vertical scale factor by $e_3=\partial_s z$ ($e_3$ is now a function of $(i,j,k,t)$ ), 751 and the slopes in the (\textbf{i},\textbf{j}) directions between $s-$ and $z-$surfaces by: 702 752 \begin{equation} \label{eq:PE_sco_slope} 703 753 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s … … 711 761 \end{equation} 712 762 713 The equations solved by the ocean model \autoref{eq:PE} in $s-$coordinate can be written as follows (see \autoref{sec:A_momentum}): 763 The equations solved by the ocean model \autoref{eq:PE} in $s-$coordinate can be written as follows 764 (see \autoref{sec:A_momentum}): 714 765 715 766 \vspace{0.5cm} … … 763 814 \end{multline} 764 815 765 where the relative vorticity, \textit{$\zeta $}, the surface pressure gradient, and the hydrostatic766 pressure have the same expressions as in $z$-coordinates although they do not represent 767 exactly the same quantities. $\omega$ is provided by the continuity equation 768 (see \autoref{apdx:A}):816 where the relative vorticity, \textit{$\zeta $}, the surface pressure gradient, 817 and the hydrostatic pressure have the same expressions as in $z$-coordinates although 818 they do not represent exactly the same quantities. 819 $\omega$ is provided by the continuity equation (see \autoref{apdx:A}): 769 820 \begin{equation} \label{eq:PE_sco_continuity} 770 821 \frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0 … … 791 842 \end{multline} 792 843 793 The equation of state has the same expression as in $z$-coordinate, and similar expressions794 a re used for mixing and forcing terms.844 The equation of state has the same expression as in $z$-coordinate, 845 and similar expressions are used for mixing and forcing terms. 795 846 796 847 \gmcomment{ … … 808 859 809 860 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 810 \begin{figure}[!b] \begin{center} 811 \includegraphics[width=1.0\textwidth]{Fig_z_zstar} 812 \caption{ \protect\label{fig:z_zstar} 813 (a) $z$-coordinate in linear free-surface case ; 814 (b) $z-$coordinate in non-linear free surface case ; 815 (c) re-scaled height coordinate (become popular as the \textit{z*-}coordinate 816 \citep{Adcroft_Campin_OM04} ).} 817 \end{center} \end{figure} 861 \begin{figure}[!b] 862 \begin{center} 863 \includegraphics[width=1.0\textwidth]{Fig_z_zstar} 864 \caption{ \protect\label{fig:z_zstar} 865 (a) $z$-coordinate in linear free-surface case ; 866 (b) $z-$coordinate in non-linear free surface case ; 867 (c) re-scaled height coordinate (become popular as the \textit{z*-}coordinate 868 \citep{Adcroft_Campin_OM04} ). 869 } 870 \end{center} 871 \end{figure} 818 872 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 819 873 820 874 821 In that case, the free surface equation is nonlinear, and the variations of volume are fully 822 taken into account. These coordinates systems is presented in a report \citep{Levier2007} 823 available on the \NEMO web site. 875 In that case, the free surface equation is nonlinear, and the variations of volume are fully taken into account. 876 These coordinates systems is presented in a report \citep{Levier2007} available on the \NEMO web site. 824 877 825 878 %\gmcomment{ 826 The \textit{z*} coordinate approach is an unapproximated, non-linear free surface implementation 827 which allows one to deal with large amplitude free-surface 828 variations relative to the vertical resolution \citep{Adcroft_Campin_OM04}. In 829 the \textit{z*} formulation, the variation of the column thickness due to sea-surface 830 undulations is not concentrated in the surface level, as in the $z$-coordinate formulation, 831 but is equally distributed over the full water column. Thus vertical 832 levels naturally follow sea-surface variations, with a linear attenuation with 833 depth, as illustrated by figure fig.1c . Note that with a flat bottom, such as in 834 fig.1c, the bottom-following $z$ coordinate and \textit{z*} are equivalent. 835 The definition and modified oceanic equations for the rescaled vertical coordinate 836 \textit{z*}, including the treatment of fresh-water flux at the surface, are 837 detailed in Adcroft and Campin (2004). The major points are summarized 838 here. The position ( \textit{z*}) and vertical discretization (\textit{z*}) are expressed as: 879 The \textit{z*} coordinate approach is an unapproximated, non-linear free surface implementation which allows one to 880 deal with large amplitude free-surface variations relative to the vertical resolution \citep{Adcroft_Campin_OM04}. 881 In the \textit{z*} formulation, 882 the variation of the column thickness due to sea-surface undulations is not concentrated in the surface level, 883 as in the $z$-coordinate formulation, but is equally distributed over the full water column. 884 Thus vertical levels naturally follow sea-surface variations, with a linear attenuation with depth, 885 as illustrated by figure fig.1c. 886 Note that with a flat bottom, such as in fig.1c, the bottom-following $z$ coordinate and \textit{z*} are equivalent. 887 The definition and modified oceanic equations for the rescaled vertical coordinate \textit{z*}, 888 including the treatment of fresh-water flux at the surface, are detailed in Adcroft and Campin (2004). 889 The major points are summarized here. 890 The position ( \textit{z*}) and vertical discretization (\textit{z*}) are expressed as: 839 891 \begin{equation} \label{eq:z-star} 840 892 H + \textit{z*} = (H + z) / r \quad \text{and} \ \delta \textit{z*} = \delta z / r \quad \text{with} \ r = \frac{H+\eta} {H} 841 893 \end{equation} 842 Since the vertical displacement of the free surface is incorporated in the vertical 843 coordinate \textit{z*}, the upper and lower boundaries are at fixed \textit{z*} position, 844 $\textit{z*} = 0$ and $\textit{z*} = -H$ respectively. Also the divergence of the flow field845 is no longer zero as shown by the continuity equation:894 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \textit{z*}, 895 the upper and lower boundaries are at fixed \textit{z*} position, 896 $\textit{z*} = 0$ and $\textit{z*} = -H$ respectively. 897 Also the divergence of the flow field is no longer zero as shown by the continuity equation: 846 898 \begin{equation*} 847 899 \frac{\partial r}{\partial t} = \nabla_{\textit{z*}} \cdot \left( r \; \rm{\bf U}_h \right) … … 853 905 % from MOM4p1 documentation 854 906 855 To overcome problems with vanishing surface and/or bottom cells, we consider the 856 zstar coordinate 907 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 857 908 \begin{equation} \label{eq:PE_} 858 909 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 859 910 \end{equation} 860 911 861 This coordinate is closely related to the "eta" coordinate used in many atmospheric 862 models (see Black (1994) for a review of eta coordinate atmospheric models). It 863 was originally used in ocean models by Stacey et al. (1995) for studies of tides 864 next to shelves, and it has been recently promoted by Adcroft and Campin (2004) 865 for global climate modelling. 866 867 The surfaces of constant $z^\star$ are quasi-horizontal. Indeed, the $z^\star$ coordinate reduces to $z$ when $\eta$ is zero. In general, when noting the large differences between 868 undulations of the bottom topography versus undulations in the surface height, it 869 is clear that surfaces constant $z^\star$ are very similar to the depth surfaces. These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to terrain following sigma models discussed in \autoref{subsec:PE_sco}. 870 Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in an 871 unforced ocean starting from rest, regardless the bottom topography. This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in 872 the presence of nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state, depending on the sophistication of the pressure 873 gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of neutral physics parameterizations in $z^\star$ models using 874 the same techniques as in $z$-models (see Chapters 13-16 of \cite{Griffies_Bk04}) for a 875 discussion of neutral physics in $z$-models, as well as \autoref{sec:LDF_slp} 876 in this document for treatment in \NEMO). 877 878 The range over which $z^\star$ varies is time independent $-H \leq z^\star \leq 0$. Hence, all 879 cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$. This 880 is a minor constraint relative to that encountered on the surface height when using 881 $s = z$ or $s = z - \eta$. 882 883 Because $z^\star$ has a time independent range, all grid cells have static increments 884 ds, and the sum of the ver tical increments yields the time independent ocean 885 depth %·k ds = H. 886 The $z^\star$ coordinate is therefore invisible to undulations of the 887 free surface, since it moves along with the free surface. This proper ty means that 888 no spurious ver tical transpor t is induced across surfaces of constant $z^\star$ by the 889 motion of external gravity waves. Such spurious transpor t can be a problem in 890 z-models, especially those with tidal forcing. Quite generally, the time independent 891 range for the $z^\star$ coordinate is a very convenient proper ty that allows for a nearly 892 arbitrary ver tical resolution even in the presence of large amplitude fluctuations of 893 the surface height, again so long as $\eta > -H$. 912 This coordinate is closely related to the "eta" coordinate used in many atmospheric models 913 (see Black (1994) for a review of eta coordinate atmospheric models). 914 It was originally used in ocean models by Stacey et al. (1995) for studies of tides next to shelves, 915 and it has been recently promoted by Adcroft and Campin (2004) for global climate modelling. 916 917 The surfaces of constant $z^\star$ are quasi-horizontal. 918 Indeed, the $z^\star$ coordinate reduces to $z$ when $\eta$ is zero. 919 In general, when noting the large differences between 920 undulations of the bottom topography versus undulations in the surface height, 921 it is clear that surfaces constant $z^\star$ are very similar to the depth surfaces. 922 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to 923 terrain following sigma models discussed in \autoref{subsec:PE_sco}. 924 Additionally, since $z^\star$ when $\eta = 0$, 925 no flow is spontaneously generated in an unforced ocean starting from rest, regardless the bottom topography. 926 This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in the presence of 927 nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state, 928 depending on the sophistication of the pressure gradient solver. 929 The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of 930 neutral physics parameterizations in $z^\star$ models using the same techniques as in $z$-models 931 (see Chapters 13-16 of \cite{Griffies_Bk04}) for a discussion of neutral physics in $z$-models, 932 as well as \autoref{sec:LDF_slp} in this document for treatment in \NEMO). 933 934 The range over which $z^\star$ varies is time independent $-H \leq z^\star \leq 0$. 935 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$. 936 This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$. 937 938 Because $z^\star$ has a time independent range, all grid cells have static increments ds, 939 and the sum of the ver tical increments yields the time independent ocean depth. %·k ds = H. 940 The $z^\star$ coordinate is therefore invisible to undulations of the free surface, 941 since it moves along with the free surface. 942 This proper ty means that no spurious vertical transport is induced across surfaces of constant $z^\star$ by 943 the motion of external gravity waves. 944 Such spurious transpor t can be a problem in z-models, especially those with tidal forcing. 945 Quite generally, the time independent range for the $z^\star$ coordinate is a very convenient property that 946 allows for a nearly arbitrary ver tical resolution even in the presence of large amplitude fluctuations of 947 the surface height, again so long as $\eta > -H$. 894 948 895 949 %end MOM doc %%% … … 909 963 \subsubsection{Introduction} 910 964 911 Several important aspects of the ocean circulation are influenced by bottom topography. 912 Of course, the most important is that bottom topography determines deep ocean sub-basins, 913 barriers, sills and channels that strongly constrain the path of water masses, but more subtle 914 effects exist. For example, the topographic $\beta$-effect is usually larger than the planetary 915 one along continental slopes. Topographic Rossby waves can be excited and can interact 916 with the mean current. In the $z-$coordinate system presented in the previous section 917 (\autoref{sec:PE_zco}), $z-$surfaces are geopotential surfaces. The bottom topography is 918 discretised by steps. This often leads to a misrepresentation of a gradually sloping bottom 919 and to large localized depth gradients associated with large localized vertical velocities. 920 The response to such a velocity field often leads to numerical dispersion effects. 921 One solution to strongly reduce this error is to use a partial step representation of bottom 922 topography instead of a full step one \cite{Pacanowski_Gnanadesikan_MWR98}. 923 Another solution is to introduce a terrain-following coordinate system (hereafter $s-$coordinate) 924 925 The $s$-coordinate avoids the discretisation error in the depth field since the layers of 926 computation are gradually adjusted with depth to the ocean bottom. Relatively small 927 topographic features as well as gentle, large-scale slopes of the sea floor in the deep 928 ocean, which would be ignored in typical $z$-model applications with the largest grid 929 spacing at greatest depths, can easily be represented (with relatively low vertical resolution). 930 A terrain-following model (hereafter $s-$model) also facilitates the modelling of the 931 boundary layer flows over a large depth range, which in the framework of the $z$-model 932 would require high vertical resolution over the whole depth range. Moreover, with a 933 $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface 934 as the only boundaries of the domain (nomore lateral boundary condition to specify). 935 Nevertheless, a $s$-coordinate also has its drawbacks. Perfectly adapted to a 936 homogeneous ocean, it has strong limitations as soon as stratification is introduced. 937 The main two problems come from the truncation error in the horizontal pressure 938 gradient and a possibly increased diapycnal diffusion. The horizontal pressure force 939 in $s$-coordinate consists of two terms (see \autoref{apdx:A}), 965 Several important aspects of the ocean circulation are influenced by bottom topography. 966 Of course, the most important is that bottom topography determines deep ocean sub-basins, barriers, sills and 967 channels that strongly constrain the path of water masses, but more subtle effects exist. 968 For example, the topographic $\beta$-effect is usually larger than the planetary one along continental slopes. 969 Topographic Rossby waves can be excited and can interact with the mean current. 970 In the $z-$coordinate system presented in the previous section (\autoref{sec:PE_zco}), 971 $z-$surfaces are geopotential surfaces. 972 The bottom topography is discretised by steps. 973 This often leads to a misrepresentation of a gradually sloping bottom and to 974 large localized depth gradients associated with large localized vertical velocities. 975 The response to such a velocity field often leads to numerical dispersion effects. 976 One solution to strongly reduce this error is to use a partial step representation of bottom topography instead of 977 a full step one \cite{Pacanowski_Gnanadesikan_MWR98}. 978 Another solution is to introduce a terrain-following coordinate system (hereafter $s-$coordinate). 979 980 The $s$-coordinate avoids the discretisation error in the depth field since the layers of 981 computation are gradually adjusted with depth to the ocean bottom. 982 Relatively small topographic features as well as gentle, large-scale slopes of the sea floor in the deep ocean, 983 which would be ignored in typical $z$-model applications with the largest grid spacing at greatest depths, 984 can easily be represented (with relatively low vertical resolution). 985 A terrain-following model (hereafter $s-$model) also facilitates the modelling of the boundary layer flows over 986 a large depth range, which in the framework of the $z$-model would require high vertical resolution over 987 the whole depth range. 988 Moreover, with a $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface as 989 the only boundaries of the domain (no more lateral boundary condition to specify). 990 Nevertheless, a $s$-coordinate also has its drawbacks. Perfectly adapted to a homogeneous ocean, 991 it has strong limitations as soon as stratification is introduced. 992 The main two problems come from the truncation error in the horizontal pressure gradient and 993 a possibly increased diapycnal diffusion. 994 The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:A}), 940 995 941 996 \begin{equation} \label{eq:PE_p_sco} … … 944 999 \end{equation} 945 1000 946 The second term in \autoref{eq:PE_p_sco} depends on the tilt of the coordinate surface 947 and introduces a truncation error that is not present in a $z$-model. In the special case 948 of a $\sigma-$coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$), 949 \citet{Haney1991} and \citet{Beckmann1993} have given estimates of the magnitude 950 of this truncation error. It depends on topographic slope, stratification, horizontal and 951 vertical resolution, the equation of state, and the finite difference scheme. This error 952 limits the possible topographic slopes that a model can handle at a given horizontal 953 and vertical resolution. This is a severe restriction for large-scale applications using 954 realistic bottom topography. The large-scale slopes require high horizontal resolution, 955 and the computational cost becomes prohibitive. This problem can be at least partially 956 overcome by mixing $s$-coordinate and step-like representation of bottom topography \citep{Gerdes1993a,Gerdes1993b,Madec_al_JPO96}. However, the definition of the model 957 domain vertical coordinate becomes then a non-trivial thing for a realistic bottom 958 topography: a envelope topography is defined in $s$-coordinate on which a full or 959 partial step bottom topography is then applied in order to adjust the model depth to 960 the observed one (see \autoref{sec:DOM_zgr}. 961 962 For numerical reasons a minimum of diffusion is required along the coordinate surfaces 963 of any finite difference model. It causes spurious diapycnal mixing when coordinate 964 surfaces do not coincide with isoneutral surfaces. This is the case for a $z$-model as 965 well as for a $s$-model. However, density varies more strongly on $s-$surfaces than 966 on horizontal surfaces in regions of large topographic slopes, implying larger diapycnal 967 diffusion in a $s$-model than in a $z$-model. Whereas such a diapycnal diffusion in a 968 $z$-model tends to weaken horizontal density (pressure) gradients and thus the horizontal 969 circulation, it usually reinforces these gradients in a $s$-model, creating spurious circulation. 970 For example, imagine an isolated bump of topography in an ocean at rest with a horizontally 971 uniform stratification. Spurious diffusion along $s$-surfaces will induce a bump of isoneutral 972 surfaces over the topography, and thus will generate there a baroclinic eddy. In contrast, 973 the ocean will stay at rest in a $z$-model. As for the truncation error, the problem can be reduced by introducing the terrain-following coordinate below the strongly stratified portion of the water column 974 ($i.e.$ the main thermocline) \citep{Madec_al_JPO96}. An alternate solution consists of rotating 975 the lateral diffusive tensor to geopotential or to isoneutral surfaces (see \autoref{subsec:PE_ldf}. 976 Unfortunately, the slope of isoneutral surfaces relative to the $s$-surfaces can very large, 1001 The second term in \autoref{eq:PE_p_sco} depends on the tilt of the coordinate surface and 1002 introduces a truncation error that is not present in a $z$-model. 1003 In the special case of a $\sigma-$coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$), 1004 \citet{Haney1991} and \citet{Beckmann1993} have given estimates of the magnitude of this truncation error. 1005 It depends on topographic slope, stratification, horizontal and vertical resolution, the equation of state, 1006 and the finite difference scheme. 1007 This error limits the possible topographic slopes that a model can handle at 1008 a given horizontal and vertical resolution. 1009 This is a severe restriction for large-scale applications using realistic bottom topography. 1010 The large-scale slopes require high horizontal resolution, and the computational cost becomes prohibitive. 1011 This problem can be at least partially overcome by mixing $s$-coordinate and 1012 step-like representation of bottom topography \citep{Gerdes1993a,Gerdes1993b,Madec_al_JPO96}. 1013 However, the definition of the model domain vertical coordinate becomes then a non-trivial thing for 1014 a realistic bottom topography: 1015 a envelope topography is defined in $s$-coordinate on which a full or 1016 partial step bottom topography is then applied in order to adjust the model depth to the observed one 1017 (see \autoref{sec:DOM_zgr}. 1018 1019 For numerical reasons a minimum of diffusion is required along the coordinate surfaces of any finite difference model. 1020 It causes spurious diapycnal mixing when coordinate surfaces do not coincide with isoneutral surfaces. 1021 This is the case for a $z$-model as well as for a $s$-model. 1022 However, density varies more strongly on $s-$surfaces than on horizontal surfaces in regions of 1023 large topographic slopes, implying larger diapycnal diffusion in a $s$-model than in a $z$-model. 1024 Whereas such a diapycnal diffusion in a $z$-model tends to weaken horizontal density (pressure) gradients and thus 1025 the horizontal circulation, it usually reinforces these gradients in a $s$-model, creating spurious circulation. 1026 For example, imagine an isolated bump of topography in an ocean at rest with a horizontally uniform stratification. 1027 Spurious diffusion along $s$-surfaces will induce a bump of isoneutral surfaces over the topography, 1028 and thus will generate there a baroclinic eddy. 1029 In contrast, the ocean will stay at rest in a $z$-model. 1030 As for the truncation error, the problem can be reduced by introducing the terrain-following coordinate below 1031 the strongly stratified portion of the water column ($i.e.$ the main thermocline) \citep{Madec_al_JPO96}. 1032 An alternate solution consists of rotating the lateral diffusive tensor to geopotential or to isoneutral surfaces 1033 (see \autoref{subsec:PE_ldf}). 1034 Unfortunately, the slope of isoneutral surfaces relative to the $s$-surfaces can very large, 977 1035 strongly exceeding the stability limit of such a operator when it is discretized (see \autoref{chap:LDF}). 978 1036 979 The $s-$coordinates introduced here \citep{Lott_al_OM90,Madec_al_JPO96} differ mainly in two 980 aspects from similar models: it allows a representation of bottom topography with mixed 981 full or partial step-like/terrain following topography ; It also offers a completely general 982 transformation, $s=s(i,j,z)$ for the vertical coordinate.1037 The $s-$coordinates introduced here \citep{Lott_al_OM90,Madec_al_JPO96} differ mainly in two aspects from 1038 similar models: 1039 it allows a representation of bottom topography with mixed full or partial step-like/terrain following topography; 1040 It also offers a completely general transformation, $s=s(i,j,z)$ for the vertical coordinate. 983 1041 984 1042 … … 991 1049 992 1050 The $\tilde{z}$-coordinate has been developed by \citet{Leclair_Madec_OM11}. 993 It is available in \NEMO since the version 3.4. Nevertheless, it is currently not robust enough 994 to be used in all possible configurations. Its use is therefore not recommended. 1051 It is available in \NEMO since the version 3.4. 1052 Nevertheless, it is currently not robust enough to be used in all possible configurations. 1053 Its use is therefore not recommended. 995 1054 996 1055 … … 1002 1061 \label{sec:PE_zdf_ldf} 1003 1062 1004 The primitive equations describe the behaviour of a geophysical fluid at 1005 space and time scales larger than a few kilometres in the horizontal, a few 1006 meters in the vertical and a few minutes. They are usually solved at larger 1007 scales: the specified grid spacing and time step of the numerical model. The 1008 effects of smaller scale motions (coming from the advective terms in the 1009 Navier-Stokes equations) must be represented entirely in terms of 1010 large-scale patterns to close the equations. These effects appear in the 1011 equations as the divergence of turbulent fluxes ($i.e.$ fluxes associated with 1012 the mean correlation of small scale perturbations). Assuming a turbulent 1013 closure hypothesis is equivalent to choose a formulation for these fluxes. 1014 It is usually called the subgrid scale physics. It must be emphasized that 1015 this is the weakest part of the primitive equations, but also one of the 1016 most important for long-term simulations as small scale processes \textit{in fine} 1017 balance the surface input of kinetic energy and heat. 1018 1019 The control exerted by gravity on the flow induces a strong anisotropy 1020 between the lateral and vertical motions. Therefore subgrid-scale physics 1021 \textbf{D}$^{\vect{U}}$, $D^{S}$ and $D^{T}$ in \autoref{eq:PE_dyn}, 1022 \autoref{eq:PE_tra_T} and \autoref{eq:PE_tra_S} are divided into a lateral part 1023 \textbf{D}$^{l \vect{U}}$, $D^{lS}$ and $D^{lT}$ and a vertical part 1024 \textbf{D}$^{vU}$, $D^{vS}$ and $D^{vT}$. The formulation of these terms 1025 and their underlying physics are briefly discussed in the next two subsections. 1063 The primitive equations describe the behaviour of a geophysical fluid at space and time scales larger than 1064 a few kilometres in the horizontal, a few meters in the vertical and a few minutes. 1065 They are usually solved at larger scales: the specified grid spacing and time step of the numerical model. 1066 The effects of smaller scale motions (coming from the advective terms in the Navier-Stokes equations) must be represented entirely in terms of large-scale patterns to close the equations. 1067 These effects appear in the equations as the divergence of turbulent fluxes 1068 ($i.e.$ fluxes associated with the mean correlation of small scale perturbations). 1069 Assuming a turbulent closure hypothesis is equivalent to choose a formulation for these fluxes. 1070 It is usually called the subgrid scale physics. 1071 It must be emphasized that this is the weakest part of the primitive equations, 1072 but also one of the most important for long-term simulations as 1073 small scale processes \textit{in fine} balance the surface input of kinetic energy and heat. 1074 1075 The control exerted by gravity on the flow induces a strong anisotropy between the lateral and vertical motions. 1076 Therefore subgrid-scale physics \textbf{D}$^{\vect{U}}$, $D^{S}$ and $D^{T}$ in 1077 \autoref{eq:PE_dyn}, \autoref{eq:PE_tra_T} and \autoref{eq:PE_tra_S} are divided into 1078 a lateral part \textbf{D}$^{l \vect{U}}$, $D^{lS}$ and $D^{lT}$ and 1079 a vertical part \textbf{D}$^{vU}$, $D^{vS}$ and $D^{vT}$. 1080 The formulation of these terms and their underlying physics are briefly discussed in the next two subsections. 1026 1081 1027 1082 % ------------------------------------------------------------------------------------------------------------- … … 1031 1086 \label{subsec:PE_zdf} 1032 1087 1033 The model resolution is always larger than the scale at which the major 1034 sources of vertical turbulence occur (shear instability, internal wave 1035 breaking...). Turbulent motions are thus never explicitly solved, even 1036 partially, but always parameterized. The vertical turbulent fluxes are 1037 assumed to depend linearly on the gradients of large-scale quantities (for 1038 example, the turbulent heat flux is given by $\overline{T'w'}=-A^{vT} \partial_z \overline T$, 1039 where $A^{vT}$ is an eddy coefficient). This formulation is 1040 analogous to that of molecular diffusion and dissipation. This is quite 1041 clearly a necessary compromise: considering only the molecular viscosity 1042 acting on large scale severely underestimates the role of turbulent 1043 diffusion and dissipation, while an accurate consideration of the details of 1044 turbulent motions is simply impractical. The resulting vertical momentum and 1045 tracer diffusive operators are of second order: 1088 The model resolution is always larger than the scale at which the major sources of vertical turbulence occur 1089 (shear instability, internal wave breaking...). 1090 Turbulent motions are thus never explicitly solved, even partially, but always parameterized. 1091 The vertical turbulent fluxes are assumed to depend linearly on the gradients of large-scale quantities 1092 (for example, the turbulent heat flux is given by $\overline{T'w'}=-A^{vT} \partial_z \overline T$, 1093 where $A^{vT}$ is an eddy coefficient). 1094 This formulation is analogous to that of molecular diffusion and dissipation. 1095 This is quite clearly a necessary compromise: considering only the molecular viscosity acting on 1096 large scale severely underestimates the role of turbulent diffusion and dissipation, 1097 while an accurate consideration of the details of turbulent motions is simply impractical. 1098 The resulting vertical momentum and tracer diffusive operators are of second order: 1046 1099 \begin{equation} \label{eq:PE_zdf} 1047 1100 \begin{split} … … 1052 1105 \end{split} 1053 1106 \end{equation} 1054 where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, 1055 respectively. At the sea surface and at the bottom, turbulent fluxes of momentum, heat 1056 and salt must be specified (see \autoref{chap:SBC} and \autoref{chap:ZDF} and \autoref{sec:TRA_bbl}). 1057 All the vertical physics is embedded in the specification of the eddy coefficients. 1058 They can be assumed to be either constant, or function of the local fluid properties 1059 ($e.g.$ Richardson number, Brunt-Vais\"{a}l\"{a} frequency...), or computed from a 1060 turbulent closure model. The choices available in \NEMO are discussed in \autoref{chap:ZDF}). 1107 where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, respectively. 1108 At the sea surface and at the bottom, turbulent fluxes of momentum, heat and salt must be specified 1109 (see \autoref{chap:SBC} and \autoref{chap:ZDF} and \autoref{sec:TRA_bbl}). 1110 All the vertical physics is embedded in the specification of the eddy coefficients. 1111 They can be assumed to be either constant, or function of the local fluid properties 1112 ($e.g.$ Richardson number, Brunt-Vais\"{a}l\"{a} frequency...), 1113 or computed from a turbulent closure model. 1114 The choices available in \NEMO are discussed in \autoref{chap:ZDF}). 1061 1115 1062 1116 % ------------------------------------------------------------------------------------------------------------- … … 1066 1120 \label{subsec:PE_ldf} 1067 1121 1068 Lateral turbulence can be roughly divided into a mesoscale turbulence 1069 associated with eddies (which can be solved explicitly if the resolution is 1070 sufficient since their underlying physics are included in the primitive 1071 equations), and a sub mesoscale turbulence which is never explicitly solved 1072 even partially, but always parameterized. The formulation of lateral eddy 1073 fluxes depends on whether the mesoscale is below or above the grid-spacing 1122 Lateral turbulence can be roughly divided into a mesoscale turbulence associated with eddies 1123 (which can be solved explicitly if the resolution is sufficient since 1124 their underlying physics are included in the primitive equations), 1125 and a sub mesoscale turbulence which is never explicitly solved even partially, but always parameterized. 1126 The formulation of lateral eddy fluxes depends on whether the mesoscale is below or above the grid-spacing 1074 1127 ($i.e.$ the model is eddy-resolving or not). 1075 1128 1076 In non-eddy-resolving configurations, the closure is similar to that used 1077 for the vertical physics. The lateral turbulent fluxes are assumed to depend 1078 linearly on the lateral gradients of large-scale quantities. The resulting 1079 lateral diffusive and dissipative operators are of second order. 1080 Observations show that lateral mixing induced by mesoscale turbulence tends 1081 to be along isopycnal surfaces (or more precisely neutral surfaces \cite{McDougall1987}) 1082 rather than across them. 1083 As the slope of neutral surfaces is small in the ocean, a common 1084 approximation is to assume that the `lateral' direction is the horizontal, 1085 $i.e.$ the lateral mixing is performed along geopotential surfaces. This leads 1086 to a geopotential second order operator for lateral subgrid scale physics. 1087 This assumption can be relaxed: the eddy-induced turbulent fluxes can be 1088 better approached by assuming that they depend linearly on the gradients of 1089 large-scale quantities computed along neutral surfaces. In such a case, 1090 the diffusive operator is an isoneutral second order operator and it has 1091 components in the three space directions. However, both horizontal and 1092 isoneutral operators have no effect on mean ($i.e.$ large scale) potential 1093 energy whereas potential energy is a main source of turbulence (through 1094 baroclinic instabilities). \citet{Gent1990} have proposed a 1095 parameterisation of mesoscale eddy-induced turbulence which associates an 1096 eddy-induced velocity to the isoneutral diffusion. Its mean effect is to 1097 reduce the mean potential energy of the ocean. This leads to a formulation 1098 of lateral subgrid-scale physics made up of an isoneutral second order 1099 operator and an eddy induced advective part. In all these lateral diffusive 1100 formulations, the specification of the lateral eddy coefficients remains the 1101 problematic point as there is no really satisfactory formulation of these 1102 coefficients as a function of large-scale features. 1103 1104 In eddy-resolving configurations, a second order operator can be used, but 1105 usually the more scale selective biharmonic operator is preferred as the 1106 grid-spacing is usually not small enough compared to the scale of the 1107 eddies. The role devoted to the subgrid-scale physics is to dissipate the 1108 energy that cascades toward the grid scale and thus to ensure the stability of 1109 the model while not interfering with the resolved mesoscale activity. Another approach 1110 is becoming more and more popular: instead of specifying explicitly a sub-grid scale 1111 term in the momentum and tracer time evolution equations, one uses a advective 1112 scheme which is diffusive enough to maintain the model stability. It must be emphasised 1113 that then, all the sub-grid scale physics is included in the formulation of the 1114 advection scheme. 1115 1116 All these parameterisations of subgrid scale physics have advantages and 1117 drawbacks. There are not all available in \NEMO. For active tracers (temperature and 1118 salinity) the main ones are: Laplacian and bilaplacian operators acting along 1119 geopotential or iso-neutral surfaces, \citet{Gent1990} parameterisation, 1120 and various slightly diffusive advection schemes. 1121 For momentum, the main ones are: Laplacian and bilaplacian operators acting along 1122 geopotential surfaces, and UBS advection schemes when flux form is chosen for the momentum advection. 1129 In non-eddy-resolving configurations, the closure is similar to that used for the vertical physics. 1130 The lateral turbulent fluxes are assumed to depend linearly on the lateral gradients of large-scale quantities. 1131 The resulting lateral diffusive and dissipative operators are of second order. 1132 Observations show that lateral mixing induced by mesoscale turbulence tends to be along isopycnal surfaces 1133 (or more precisely neutral surfaces \cite{McDougall1987}) rather than across them. 1134 As the slope of neutral surfaces is small in the ocean, a common approximation is to assume that 1135 the `lateral' direction is the horizontal, $i.e.$ the lateral mixing is performed along geopotential surfaces. 1136 This leads to a geopotential second order operator for lateral subgrid scale physics. 1137 This assumption can be relaxed: the eddy-induced turbulent fluxes can be better approached by assuming that 1138 they depend linearly on the gradients of large-scale quantities computed along neutral surfaces. 1139 In such a case, the diffusive operator is an isoneutral second order operator and 1140 it has components in the three space directions. 1141 However, 1142 both horizontal and isoneutral operators have no effect on mean ($i.e.$ large scale) potential energy whereas 1143 potential energy is a main source of turbulence (through baroclinic instabilities). 1144 \citet{Gent1990} have proposed a parameterisation of mesoscale eddy-induced turbulence which 1145 associates an eddy-induced velocity to the isoneutral diffusion. 1146 Its mean effect is to reduce the mean potential energy of the ocean. 1147 This leads to a formulation of lateral subgrid-scale physics made up of an isoneutral second order operator and 1148 an eddy induced advective part. 1149 In all these lateral diffusive formulations, 1150 the specification of the lateral eddy coefficients remains the problematic point as 1151 there is no really satisfactory formulation of these coefficients as a function of large-scale features. 1152 1153 In eddy-resolving configurations, a second order operator can be used, 1154 but usually the more scale selective biharmonic operator is preferred as 1155 the grid-spacing is usually not small enough compared to the scale of the eddies. 1156 The role devoted to the subgrid-scale physics is to dissipate the energy that 1157 cascades toward the grid scale and thus to ensure the stability of the model while 1158 not interfering with the resolved mesoscale activity. 1159 Another approach is becoming more and more popular: 1160 instead of specifying explicitly a sub-grid scale term in the momentum and tracer time evolution equations, 1161 one uses a advective scheme which is diffusive enough to maintain the model stability. 1162 It must be emphasised that then, all the sub-grid scale physics is included in the formulation of 1163 the advection scheme. 1164 1165 All these parameterisations of subgrid scale physics have advantages and drawbacks. 1166 There are not all available in \NEMO. For active tracers (temperature and salinity) the main ones are: 1167 Laplacian and bilaplacian operators acting along geopotential or iso-neutral surfaces, 1168 \citet{Gent1990} parameterisation, and various slightly diffusive advection schemes. 1169 For momentum, the main ones are: Laplacian and bilaplacian operators acting along geopotential surfaces, 1170 and UBS advection schemes when flux form is chosen for the momentum advection. 1123 1171 1124 1172 \subsubsection{Lateral laplacian tracer diffusive operator} … … 1133 1181 \end{array} }} \right) 1134 1182 \end{equation} 1135 where $r_1 \;\mbox{and}\;r_2 $ are the slopes between the surface along 1136 which the diffusive operator acts and the model level ($e. g.$ $z$- or 1137 $s$-surfaces). Note that the formulation \autoref{eq:PE_iso_tensor} is exact for the 1138 rotation between geopotential and $s$-surfaces, while it is only an approximation 1139 for the rotation between isoneutral and $z$- or $s$-surfaces. Indeed, in the latter 1140 case, two assumptions are made to simplify \autoref{eq:PE_iso_tensor} \citep{Cox1987}. 1141 First, the horizontal contribution of the dianeutral mixing is neglected since the ratio 1142 between iso and dia-neutral diffusive coefficients is known to be several orders of 1143 magnitude smaller than unity. Second, the two isoneutral directions of diffusion are 1144 assumed to be independent since the slopes are generally less than $10^{-2}$ in the 1145 ocean (see \autoref{apdx:B}). 1146 1147 For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. $\Re $ reduces to the identity 1148 in the horizontal direction, no rotation is applied. 1149 1150 For \textit{geopotential} diffusion, $r_1$ and $r_2 $ are the slopes between the 1151 geopotential and computational surfaces: they are equal to $\sigma _1$ and $\sigma _2$, 1152 respectively (see \autoref{eq:PE_sco_slope}). 1153 1154 For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral 1155 and computational surfaces. Therefore, they are different quantities, 1156 but have similar expressions in $z$- and $s$-coordinates. In $z$-coordinates: 1183 where $r_1 \;\mbox{and}\;r_2 $ are the slopes between the surface along which the diffusive operator acts and 1184 the model level ($e. g.$ $z$- or $s$-surfaces). 1185 Note that the formulation \autoref{eq:PE_iso_tensor} is exact for 1186 the rotation between geopotential and $s$-surfaces, 1187 while it is only an approximation for the rotation between isoneutral and $z$- or $s$-surfaces. 1188 Indeed, in the latter case, two assumptions are made to simplify \autoref{eq:PE_iso_tensor} \citep{Cox1987}. 1189 First, the horizontal contribution of the dianeutral mixing is neglected since the ratio between iso and 1190 dia-neutral diffusive coefficients is known to be several orders of magnitude smaller than unity. 1191 Second, the two isoneutral directions of diffusion are assumed to be independent since 1192 the slopes are generally less than $10^{-2}$ in the ocean (see \autoref{apdx:B}). 1193 1194 For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. 1195 $\Re $ reduces to the identity in the horizontal direction, no rotation is applied. 1196 1197 For \textit{geopotential} diffusion, 1198 $r_1$ and $r_2 $ are the slopes between the geopotential and computational surfaces: 1199 they are equal to $\sigma _1$ and $\sigma _2$, respectively (see \autoref{eq:PE_sco_slope}). 1200 1201 For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral and computational surfaces. 1202 Therefore, they are different quantities, but have similar expressions in $z$- and $s$-coordinates. 1203 In $z$-coordinates: 1157 1204 \begin{equation} \label{eq:PE_iso_slopes} 1158 1205 r_1 =\frac{e_3 }{e_1 } \left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad … … 1162 1209 1163 1210 \subsubsection{Eddy induced velocity} 1164 When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used, 1211 When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used, 1165 1212 an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers: 1166 1213 \begin{equation} \label{eq:PE_iso+eiv} … … 1168 1215 +\nabla \cdot \left( {{\vect{U}}^\ast \,T} \right) 1169 1216 \end{equation} 1170 where ${\vect{U}}^\ast =\left( {u^\ast ,v^\ast ,w^\ast } \right)$ is a non-divergent, 1217 where ${\vect{U}}^\ast =\left( {u^\ast ,v^\ast ,w^\ast } \right)$ is a non-divergent, 1171 1218 eddy-induced transport velocity. This velocity field is defined by: 1172 1219 \begin{equation} \label{eq:PE_eiv} … … 1179 1226 \end{split} 1180 1227 \end{equation} 1181 where $A^{eiv}$ is the eddy induced velocity coefficient (or equivalently the isoneutral1182 thickness diffusivity coefficient), and $\tilde{r}_1$ and $\tilde{r}_2$ are the slopes 1183 between isoneutral and \emph{geopotential} surfaces. Their values are 1184 thus independent of the vertical coordinate, but their expression depends on the coordinate:1228 where $A^{eiv}$ is the eddy induced velocity coefficient 1229 (or equivalently the isoneutral thickness diffusivity coefficient), 1230 and $\tilde{r}_1$ and $\tilde{r}_2$ are the slopes between isoneutral and \emph{geopotential} surfaces. 1231 Their values are thus independent of the vertical coordinate, but their expression depends on the coordinate: 1185 1232 \begin{align} \label{eq:PE_slopes_eiv} 1186 1233 \tilde{r}_n = \begin{cases} … … 1191 1238 \end{align} 1192 1239 1193 The normal component of the eddy induced velocity is zero at all the boundaries. 1194 This can be achieved in a model by tapering either the eddy coefficient or the slopes 1195 to zero in the vicinity of the boundaries. The latter strategy is used in \NEMO (cf. \autoref{chap:LDF}). 1240 The normal component of the eddy induced velocity is zero at all the boundaries. 1241 This can be achieved in a model by tapering either the eddy coefficient or 1242 the slopes to zero in the vicinity of the boundaries. 1243 The latter strategy is used in \NEMO (cf. \autoref{chap:LDF}). 1196 1244 1197 1245 \subsubsection{Lateral bilaplacian tracer diffusive operator} … … 1201 1249 D^{lT}= - \Delta \left( \;\Delta T \right) 1202 1250 \qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right) 1203 1204 It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with 1251 \end{equation} 1252 It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with 1205 1253 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. 1206 1254 … … 1208 1256 \subsubsection{Lateral Laplacian momentum diffusive operator} 1209 1257 1210 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by 1258 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by 1211 1259 applying \autoref{eq:PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}): 1212 1260 \begin{equation} \label{eq:PE_lapU} … … 1224 1272 \end{equation} 1225 1273 1226 Such a formulation ensures a complete separation between the vorticity and 1227 horizontal divergence fields (see \autoref{apdx:C}). 1228 Unfortunately, it is only available in \textit{iso-level} direction. 1229 When a rotation is required ($i.e.$ geopotential diffusion in $s-$coordinates1230 or isoneutral diffusion in both $z$- and $s$-coordinates), the $u$ and $v-$fields 1231 are considered as independent scalar fields, so that the diffusive operator is given by:1274 Such a formulation ensures a complete separation between the vorticity and horizontal divergence fields 1275 (see \autoref{apdx:C}). 1276 Unfortunately, it is only available in \textit{iso-level} direction. 1277 When a rotation is required 1278 ($i.e.$ geopotential diffusion in $s-$coordinates or isoneutral diffusion in both $z$- and $s$-coordinates), 1279 the $u$ and $v-$fields are considered as independent scalar fields, so that the diffusive operator is given by: 1232 1280 \begin{equation} \label{eq:PE_lapU_iso} 1233 1281 \begin{split} 1234 1282 D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\ 1235 1283 D_v^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla v} \right) 1236 \end{split} 1237 \end{equation} 1238 where $\Re$ is given by \autoref{eq:PE_iso_tensor}. It is the same expression as 1239 those used for diffusive operator on tracers. It must be emphasised that such a 1240 formulation is only exact in a Cartesian coordinate system, $i.e.$ on a $f-$ or 1241 $\beta-$plane, not on the sphere. It is also a very good approximation in vicinity 1242 of the Equator in a geographical coordinate system \citep{Lengaigne_al_JGR03}. 1284 \end{split} 1285 \end{equation} 1286 where $\Re$ is given by \autoref{eq:PE_iso_tensor}. 1287 It is the same expression as those used for diffusive operator on tracers. 1288 It must be emphasised that such a formulation is only exact in a Cartesian coordinate system, 1289 $i.e.$ on a $f-$ or $\beta-$plane, not on the sphere. 1290 It is also a very good approximation in vicinity of the Equator in 1291 a geographical coordinate system \citep{Lengaigne_al_JGR03}. 1243 1292 1244 1293 \subsubsection{lateral bilaplacian momentum diffusive operator} 1245 1294 1246 As for tracers, the bilaplacian order momentum diffusive operator is a 1247 re-entering Laplacian operator with the harmonic eddy diffusion coefficient 1248 set to the square root of the biharmonic one. Nevertheless it is currently 1249 not available in the iso-neutral case. 1295 As for tracers, the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with 1296 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. 1297 Nevertheless it is currently not available in the iso-neutral case. 1250 1298 1251 1299 \end{document} -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
r10146 r10354 16 16 \colorbox{yellow}{ to be updated } 17 17 18 In that case, the free surface equation is nonlinear, and the variations of 19 volume are fully taken into account. These coordinates systems is presented in 20 a report \citep{Levier2007} available on the \NEMO web site. 18 In that case, the free surface equation is nonlinear, and the variations of volume are fully taken into account. 19 These coordinates systems is presented in a report \citep{Levier2007} available on the \NEMO web site. 21 20 22 21 \colorbox{yellow}{ end of to be updated} … … 25 24 % from MOM4p1 documentation 26 25 27 To overcome problems with vanishing surface and/or bottom cells, we consider the 28 zstar coordinate 26 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 29 27 \begin{equation} \label{eq:PE_} 30 28 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 31 29 \end{equation} 32 30 33 This coordinate is closely related to the "eta" coordinate used in many atmospheric 34 models (see Black (1994) for a review of eta coordinate atmospheric models). It 35 was originally used in ocean models by Stacey et al. (1995) for studies of tides 36 next to shelves, and it has been recently promoted by Adcroft and Campin (2004) 37 for global climate modelling. 38 39 The surfaces of constant $z^\star$ are quasi-horizontal. Indeed, the $z^\star$ coordinate reduces to $z$ when $\eta$ is zero. In general, when noting the large differences between 40 undulations of the bottom topography versus undulations in the surface height, it 41 is clear that surfaces constant $z^\star$ are very similar to the depth surfaces. These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to terrain following sigma models discussed in \autoref{subsec:PE_sco}. 42 Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in an 43 unforced ocean starting from rest, regardless the bottom topography. This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in 44 the presence of nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state, depending on the sophistication of the pressure 45 gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of neutral physics parameterizations in $z^\star$ models using 46 the same techniques as in $z$-models (see Chapters 13-16 of Griffies (2004) for a 47 discussion of neutral physics in $z$-models, as well as \autoref{sec:LDF_slp} 48 in this document for treatment in \NEMO). 49 50 The range over which $z^\star$ varies is time independent $-H \leq z^\star \leq 0$. Hence, all 51 cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$. This 52 is a minor constraint relative to that encountered on the surface height when using 53 $s = z$ or $s = z - \eta$. 54 55 Because $z^\star$ has a time independent range, all grid cells have static increments 56 ds, and the sum of the ver tical increments yields the time independent ocean 57 depth %�k ds = H. 58 The $z^\star$ coordinate is therefore invisible to undulations of the 59 free surface, since it moves along with the free surface. This proper ty means that 60 no spurious ver tical transpor t is induced across surfaces of constant $z^\star$ by the 61 motion of external gravity waves. Such spurious transpor t can be a problem in 62 z-models, especially those with tidal forcing. Quite generally, the time independent 63 range for the $z^\star$ coordinate is a very convenient proper ty that allows for a nearly 64 arbitrary ver tical resolution even in the presence of large amplitude fluctuations of 31 This coordinate is closely related to the "eta" coordinate used in many atmospheric models 32 (see Black (1994) for a review of eta coordinate atmospheric models). 33 It was originally used in ocean models by Stacey et al. (1995) for studies of tides next to shelves, 34 and it has been recently promoted by Adcroft and Campin (2004) for global climate modelling. 35 36 The surfaces of constant $z^\star$ are quasi-horizontal. 37 Indeed, the $z^\star$ coordinate reduces to $z$ when $\eta$ is zero. 38 In general, when noting the large differences between undulations of the bottom topography versus undulations in 39 the surface height, it is clear that surfaces constant $z^\star$ are very similar to the depth surfaces. 40 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to 41 terrain following sigma models discussed in \autoref{subsec:PE_sco}. 42 Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in 43 an unforced ocean starting from rest, regardless the bottom topography. 44 This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in the presence of 45 nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state, 46 depending on the sophistication of the pressure gradient solver. 47 The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of 48 neutral physics parameterizations in $z^\star$ models using the same techniques as in $z$-models 49 (see Chapters 13-16 of Griffies (2004) for a discussion of neutral physics in $z$-models, 50 as well as \autoref{sec:LDF_slp} in this document for treatment in \NEMO). 51 52 The range over which $z^\star$ varies is time independent $-H \leq z^\star \leq 0$. 53 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$. 54 This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$. 55 56 Because $z^\star$ has a time independent range, all grid cells have static increments ds, 57 and the sum of the ver tical increments yields the time independent ocean depth %�k ds = H. 58 The $z^\star$ coordinate is therefore invisible to undulations of the free surface, 59 since it moves along with the free surface. 60 This proper ty means that no spurious ver tical transpor t is induced across surfaces of 61 constant $z^\star$ by the motion of external gravity waves. 62 Such spurious transpor t can be a problem in z-models, especially those with tidal forcing. 63 Quite generally, the time independent range for the $z^\star$ coordinate is a very convenient property that 64 allows for a nearly arbitrary vertical resolution even in the presence of large amplitude fluctuations of 65 65 the surface height, again so long as $\eta > -H$. 66 66 … … 81 81 \nlst{nam_dynspg} 82 82 %------------------------------------------------------------------------------------------------------------ 83 Options are defined through the \ngn{nam\_dynspg} namelist variables. 84 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). The main distinction is between the fixed volume case (linear free surface or rigid lid) and the variable volume case (nonlinear free surface, \key{vvl} is active). In the linear free surface case (\autoref{subsec:PE_free_surface}) and rigid lid (\autoref{PE_rigid_lid}), the vertical scale factors $e_{3}$ are fixed in time, while in the nonlinear case (\autoref{subsec:PE_free_surface}) they are time-dependent. With both linear and nonlinear free surface, external gravity waves are allowed in the equations, which imposes a very small time step when an explicit time stepping is used. Two methods are proposed to allow a longer time step for the three-dimensional equations: the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}), and the split-explicit free surface described below. The extra term introduced in the filtered method is calculated implicitly, so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 83 Options are defined through the \ngn{nam\_dynspg} namelist variables. 84 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 85 The main distinction is between the fixed volume case (linear free surface or rigid lid) and 86 the variable volume case (nonlinear free surface, \key{vvl} is active). 87 In the linear free surface case (\autoref{subsec:PE_free_surface}) and rigid lid (\autoref{PE_rigid_lid}), 88 the vertical scale factors $e_{3}$ are fixed in time, 89 while in the nonlinear case (\autoref{subsec:PE_free_surface}) they are time-dependent. 90 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 91 which imposes a very small time step when an explicit time stepping is used. 92 Two methods are proposed to allow a longer time step for the three-dimensional equations: 93 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}), 94 and the split-explicit free surface described below. 95 The extra term introduced in the filtered method is calculated implicitly, 96 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 85 97 86 98 %------------------------------------------------------------- … … 90 102 \label{subsec:DYN_spg_exp} 91 103 92 In the explicit free surface formulation, the model time step is chosen small enough to describe the external gravity waves (typically a few ten seconds). The sea surface height is given by : 104 In the explicit free surface formulation, the model time step is chosen small enough to 105 describe the external gravity waves (typically a few ten seconds). 106 The sea surface height is given by: 93 107 \begin{equation} \label{eq:dynspg_ssh} 94 108 \frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho _w }+\frac{1}{e_{1T} … … 97 111 \end{equation} 98 112 99 where EMP is the surface freshwater budget (evaporation minus precipitation, and minus river runoffs (if the later are introduced as a surface freshwater flux, see \autoref{chap:SBC}) expressed in $Kg.m^{-2}.s^{-1}$, and $\rho _w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water. The sea-surface height is evaluated using a leapfrog scheme in combination with an Asselin time filter, i.e. the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity). 100 101 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by : 113 where EMP is the surface freshwater budget (evaporation minus precipitation, and minus river runoffs 114 (if the later are introduced as a surface freshwater flux, see \autoref{chap:SBC}) expressed in $Kg.m^{-2}.s^{-1}$, 115 and $\rho _w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water. 116 The sea-surface height is evaluated using a leapfrog scheme in combination with an Asselin time filter, 117 i.e. the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity). 118 119 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by: 102 120 \begin{equation} \label{eq:dynspg_exp} 103 121 \left\{ \begin{aligned} … … 108 126 \end{equation} 109 127 110 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in (\autoref{eq:dynspg_exp}). 128 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in 129 (\autoref{eq:dynspg_exp}). 111 130 112 131 %------------------------------------------------------------- … … 119 138 \nlst{namdom} 120 139 %-------------------------------------------------------------------------------------------------------------- 121 The split-explicit free surface formulation used in OPA follows the one proposed by \citet{Griffies2004}. The general idea is to solve the free surface equation with a small time step, while the three dimensional prognostic variables are solved with a longer time step that is a multiple of \np{rdtbt} 122 in the \ngn{namdom} namelist. 123 (Figure III.3). 140 The split-explicit free surface formulation used in OPA follows the one proposed by \citet{Griffies2004}. 141 The general idea is to solve the free surface equation with a small time step, 142 while the three dimensional prognostic variables are solved with a longer time step that 143 is a multiple of \np{rdtbt} in the \ngn{namdom} namelist (Figure III.3). 124 144 125 145 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > … … 127 147 \includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts} 128 148 \caption{ \protect\label{fig:DYN_dynspg_ts} 129 Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes, 130 after \citet{Griffies2004}. Time increases to the right. Baroclinic time steps are denoted by 131 $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$. The curved line represents a leap-frog time step, 132 and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. 133 The vertically integrated forcing \textbf{M}(t) computed at baroclinic time step t represents 134 the interaction between the barotropic and baroclinic motions. While keeping the total depth, 135 tracer, and freshwater forcing fields fixed, a leap-frog integration carries the surface height 136 and vertically integrated velocity from t to $t+2 \Delta t$ using N barotropic time steps of length 137 $\Delta t$. Time averaging the barotropic fields over the N+1 time steps (endpoints included) 138 centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$. 139 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence 140 of the time averaged vertically integrated velocity taken from baroclinic time step t. } 149 Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes, 150 after \citet{Griffies2004}. 151 Time increases to the right. 152 Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$. 153 The curved line represents a leap-frog time step, 154 and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. 155 The vertically integrated forcing \textbf{M}(t) computed at 156 baroclinic time step t represents the interaction between the barotropic and baroclinic motions. 157 While keeping the total depth, tracer, and freshwater forcing fields fixed, 158 a leap-frog integration carries the surface height and vertically integrated velocity from 159 t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$. 160 Time averaging the barotropic fields over the N+1 time steps (endpoints included) 161 centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$. 162 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence of 163 the time averaged vertically integrated velocity taken from baroclinic time step t. } 141 164 \end{center} 142 165 \end{figure} 143 166 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 144 167 145 The split-explicit formulation has a damping effect on external gravity waves, which is weaker than the filtered free surface but still significant as shown by \citet{Levier2007} in the case of an analytical barotropic Kelvin wave. 168 The split-explicit formulation has a damping effect on external gravity waves, 169 which is weaker than the filtered free surface but still significant as shown by \citet{Levier2007} in 170 the case of an analytical barotropic Kelvin wave. 146 171 147 172 %from griffies book: ..... copy past ! … … 149 174 \textbf{title: Time stepping the barotropic system } 150 175 151 Assume knowledge of the full velocity and tracer fields at baroclinic time $\tau$. Hence,152 we can update the surface height and vertically integrated velocity with a leap-frog 153 scheme using the small barotropic time step $\Delta t$. We have 154 176 Assume knowledge of the full velocity and tracer fields at baroclinic time $\tau$. 177 Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using 178 the small barotropic time step $\Delta t$. 179 We have 155 180 \begin{equation} \label{eq:DYN_spg_ts_eta} 156 181 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) … … 164 189 \ 165 190 166 In these equations, araised (b) denotes values of surface height and vertically integrated velocity updated with the barotropic time steps. The $\tau$ time label on $\eta^{(b)}$ 167 and $U^{(b)}$ denotes the baroclinic time at which the vertically integrated forcing $\textbf{M}(\tau)$ (note that this forcing includes the surface freshwater forcing), the tracer fields, the freshwater flux $\text{EMP}_w(\tau)$, and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over a single cycle. This is also the time 168 that sets the barotropic time steps via 191 In these equations, araised (b) denotes values of surface height and 192 vertically integrated velocity updated with the barotropic time steps. 193 The $\tau$ time label on $\eta^{(b)}$ and $U^{(b)}$ denotes the baroclinic time at which 194 the vertically integrated forcing $\textbf{M}(\tau)$ 195 (note that this forcing includes the surface freshwater forcing), the tracer fields, 196 the freshwater flux $\text{EMP}_w(\tau)$, and total depth of the ocean $H(\tau)$ are held for 197 the duration of the barotropic time stepping over a single cycle. 198 This is also the time that sets the barotropic time steps via 169 199 \begin{equation} \label{eq:DYN_spg_ts_t} 170 200 t_n=\tau+n\Delta t 171 201 \end{equation} 172 with $n$ an integer. The density scaled surface pressure is evaluated via 202 with $n$ an integer. 203 The density scaled surface pressure is evaluated via 173 204 \begin{equation} \label{eq:DYN_spg_ts_ps} 174 205 p_s^{(b)}(\tau,t_{n}) = \begin{cases} … … 189 220 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n}) 190 221 \end{equation} 191 the time averaged surface height taken from the previous barotropic cycle. Likewise, 222 the time averaged surface height taken from the previous barotropic cycle. 223 Likewise, 192 224 \begin{equation} \label{eq:DYN_spg_ts_u} 193 225 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ … … 200 232 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\Delta t,t_{n}) 201 233 \end{equation} 202 the time averaged vertically integrated transport. Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 203 204 Upon reaching $t_{n=N} = \tau + 2\Delta \tau$ , the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$ 234 the time averaged vertically integrated transport. 235 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 236 237 Upon reaching $t_{n=N} = \tau + 2\Delta \tau$ , the vertically integrated velocity is time averaged to 238 produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$ 205 239 \begin{equation} \label{eq:DYN_spg_ts_u} 206 240 \textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)} 207 241 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 208 242 \end{equation} 209 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form210 243 The surface height on the new baroclinic time step is then determined via 244 a baroclinic leap-frog using the following form 211 245 \begin{equation} \label{eq:DYN_spg_ts_ssh} 212 246 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 213 247 \end{equation} 214 248 215 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between the mass/volume budgets and the tracer budgets. More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 249 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between 250 the mass/volume budgets and the tracer budgets. 251 More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 216 252 217 In general, some form of time filter is needed to maintain integrity of the surface 218 height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We 219 have tried various forms of such filtering, with the following method discussed in 220 Griffies et al. (2001) chosen due to its stability and reasonably good maintenance of 221 tracer conservation properties (see ??)253 In general, some form of time filter is needed to maintain integrity of the surface height field due to 254 the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. 255 We have tried various forms of such filtering, 256 with the following method discussed in Griffies et al. (2001) chosen due to its stability and 257 reasonably good maintenance of tracer conservation properties (see ??) 222 258 223 259 \begin{equation} \label{eq:DYN_spg_ts_sshf} … … 232 268 \end{equation} 233 269 234 which is useful since it isolates all the time filtering aspects into the term multiplied 235 by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when 236 eliminating tracer and surface height time filtering (see ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 270 which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. 271 This isolation allows for an easy check that tracer conservation is exact when eliminating tracer and 272 surface height time filtering (see ?? for more complete discussion). 273 However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:DYN_spg_ts_sshf} was found to 274 be more conservative, and so is recommended. 237 275 238 276 … … 246 284 \label{subsec:DYN_spg_flt} 247 285 248 The filtered formulation follows the \citet{Roullet2000} implementation. The extra term introduced in the equations (see {\S}I.2.2) is solved implicitly. The elliptic solvers available in the code are 249 documented in \autoref{chap:MISC}. The amplitude of the extra term is given by the namelist variable \np{rnu}. The default value is 1, as recommended by \citet{Roullet2000} 286 The filtered formulation follows the \citet{Roullet2000} implementation. 287 The extra term introduced in the equations (see {\S}I.2.2) is solved implicitly. 288 The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 289 The amplitude of the extra term is given by the namelist variable \np{rnu}. 290 The default value is 1, as recommended by \citet{Roullet2000} 250 291 251 292 \colorbox{red}{\np{rnu}\forcode{ = 1} to be suppressed from namelist !} … … 257 298 \label{subsec:DYN_spg_vvl} 258 299 259 In the non-linear free surface formulation, the variations of volume are fully taken into account. This option is presented in a report \citep{Levier2007} available on the NEMO web site. The three time-stepping methods (explicit, split-explicit and filtered) are the same as in \autoref{DYN_spg_linear} except that the ocean depth is now time-dependent. In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step. 300 In the non-linear free surface formulation, the variations of volume are fully taken into account. 301 This option is presented in a report \citep{Levier2007} available on the NEMO web site. 302 The three time-stepping methods (explicit, split-explicit and filtered) are the same as in 303 \autoref{DYN_spg_linear} except that the ocean depth is now time-dependent. 304 In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step. 260 305 261 306 -
NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex
r10146 r10354 13 13 14 14 15 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction 16 which could be referred to here,would help ==> to be added}15 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here, 16 would help ==> to be added} 17 17 %%%% 18 18 … … 22 22 23 23 24 Having defined the continuous equations in \autoref{chap:PE}, we need now to choose 25 a time discretization, a key feature of an ocean model as it exerts a strong influence 26 on the structure of the computer code ($i.e.$ on its flowchart). 27 In the present chapter, we provide a general description of the \NEMO 28 time stepping strategy and the consequences for the order in which the equations are 29 solved. 24 Having defined the continuous equations in \autoref{chap:PE}, we need now to choose a time discretization, 25 a key feature of an ocean model as it exerts a strong influence on the structure of the computer code 26 ($i.e.$ on its flowchart). 27 In the present chapter, we provide a general description of the \NEMO time stepping strategy and 28 the consequences for the order in which the equations are solved. 30 29 31 30 $\ $\newline % force a new ligne … … 36 35 \label{sec:STP_environment} 37 36 38 The time stepping used in \NEMO is a three level scheme that can be 39 represented as follows: 37 The time stepping used in \NEMO is a three level scheme that can be represented as follows: 40 38 \begin{equation} \label{eq:STP} 41 39 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t-\rdt,\,t,\,t+\rdt} 42 40 \end{equation} 43 where $x$ stands for $u$, $v$, $T$ or $S$; RHS is the Right-Hand-Side of the44 corresponding time evolution equation; $\rdt$ is the time step; and the 45 superscripts indicate the time at which a quantity is evaluated. Each term of the 46 RHS is evaluated at a specific time step depending on the physics with which 47 it is associated. 48 49 The choice of the time step used for this evaluation is discussed below as 50 well as the implications for starting or restarting a model 51 simulation. Note that the time stepping calculation is generally performed in a single 52 operation. With such a complex and nonlinear system of equations it would be 53 dangerous to let a prognostic variable evolve intime for each term separately.54 55 The three level scheme requires three arrays for each prognostic variable. 56 For each variable $x$ there is $x_b$ (before), $x_n$ (now) and $x_a$. The third array,57 although referred to as $x_a$ (after) in the code, is usually not the variable at 58 the after time step; but rather it is used to store the time derivative (RHS in 59 \autoref{eq:STP}) prior to time-stepping the equation. Generally, the time 60 stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt} 61 modules, except when using implicit vertical diffusion or calculating sea surface height 62 in whichcase time-splitting options are used.41 where $x$ stands for $u$, $v$, $T$ or $S$; 42 RHS is the Right-Hand-Side of the corresponding time evolution equation; 43 $\rdt$ is the time step; 44 and the superscripts indicate the time at which a quantity is evaluated. 45 Each term of the RHS is evaluated at a specific time step depending on the physics with which it is associated. 46 47 The choice of the time step used for this evaluation is discussed below as well as 48 the implications for starting or restarting a model simulation. 49 Note that the time stepping calculation is generally performed in a single operation. 50 With such a complex and nonlinear system of equations it would be dangerous to let a prognostic variable evolve in 51 time for each term separately. 52 53 The three level scheme requires three arrays for each prognostic variable. 54 For each variable $x$ there is $x_b$ (before), $x_n$ (now) and $x_a$. 55 The third array, although referred to as $x_a$ (after) in the code, 56 is usually not the variable at the after time step; 57 but rather it is used to store the time derivative (RHS in \autoref{eq:STP}) prior to time-stepping the equation. 58 Generally, the time stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt} modules, 59 except when using implicit vertical diffusion or calculating sea surface height in which 60 case time-splitting options are used. 63 61 64 62 % ------------------------------------------------------------------------------------------------------------- … … 68 66 \label{sec:STP_leap_frog} 69 67 70 The time stepping used for processes other than diffusion is the well-known leapfrog 71 scheme \citep{Mesinger_Arakawa_Bk76}. This scheme is widely used for advection 72 processes in low-viscosity fluids. It is a time centred scheme, $i.e.$ 73 the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step. 74 It may be used for momentum and tracer advection, 75 pressure gradient, and Coriolis terms,but not for diffusion terms.76 It is an efficient method that achieves 77 second-order accuracy with just one right hand side evaluation per time step. 78 Moreover, it does not artificially damp linear oscillatory motion nor does it produce 79 instability by amplifying the oscillations. These advantages are somewhat diminished 80 by the large phase-speed error of the leapfrog scheme, and the unsuitability 81 of leapfrog differencing for the representation of diffusion and Rayleigh 82 damping processes. However, the scheme allows the coexistence of a numerical 83 and a physical mode due to its leading third order dispersive error. In other words a 84 divergence of odd and even time steps may occur. To prevent it, the leapfrog scheme 85 is often used in association with a Robert-Asselin time filter (hereafter the LF-RA scheme). 86 This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied 87 by \citet{Asselin_MWR72}, is a kind of laplacian diffusion in time that mixes odd and 88 even time steps:68 The time stepping used for processes other than diffusion is the well-known leapfrog scheme 69 \citep{Mesinger_Arakawa_Bk76}. 70 This scheme is widely used for advection processes in low-viscosity fluids. 71 It is a time centred scheme, $i.e.$ the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step. 72 It may be used for momentum and tracer advection, pressure gradient, and Coriolis terms, 73 but not for diffusion terms. 74 It is an efficient method that achieves second-order accuracy with 75 just one right hand side evaluation per time step. 76 Moreover, it does not artificially damp linear oscillatory motion nor does it produce instability by 77 amplifying the oscillations. 78 These advantages are somewhat diminished by the large phase-speed error of the leapfrog scheme, 79 and the unsuitability of leapfrog differencing for the representation of diffusion and Rayleigh damping processes. 80 However, the scheme allows the coexistence of a numerical and a physical mode due to 81 its leading third order dispersive error. 82 In other words a divergence of odd and even time steps may occur. 83 To prevent it, the leapfrog scheme is often used in association with a Robert-Asselin time filter 84 (hereafter the LF-RA scheme). 85 This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied by \citet{Asselin_MWR72}, 86 is a kind of laplacian diffusion in time that mixes odd and even time steps: 89 87 \begin{equation} \label{eq:STP_asselin} 90 88 x_F^t = x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 91 89 \end{equation} 92 where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin 93 coefficient. $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter). 94 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:STP_mLF}), 95 causing only a weak dissipation of high frequency motions (\citep{Farge1987}). 96 The addition of a time filter degrades the accuracy of the 97 calculation from second to first order. However, the second order truncation 98 error is proportional to $\gamma$, which is small compared to 1. Therefore, 99 the LF-RA is a quasi second order accurate scheme. The LF-RA scheme 100 is preferred to other time differencing schemes such as 101 predictor corrector or trapezoidal schemes, because the user has an explicit 102 and simple control of the magnitude of the time diffusion of the scheme. 103 When used with the 2nd order space centred discretisation of the 104 advection terms in the momentum and tracer equations, LF-RA avoids implicit 105 numerical diffusion: diffusion is set explicitly by the user through the Robert-Asselin 90 where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient. 91 $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter). 92 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:STP_mLF}), 93 causing only a weak dissipation of high frequency motions (\citep{Farge1987}). 94 The addition of a time filter degrades the accuracy of the calculation from second to first order. 95 However, the second order truncation error is proportional to $\gamma$, which is small compared to 1. 96 Therefore, the LF-RA is a quasi second order accurate scheme. 97 The LF-RA scheme is preferred to other time differencing schemes such as predictor corrector or trapezoidal schemes, 98 because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme. 99 When used with the 2nd order space centred discretisation of the advection terms in 100 the momentum and tracer equations, LF-RA avoids implicit numerical diffusion: 101 diffusion is set explicitly by the user through the Robert-Asselin 106 102 filter parameter and the viscosity and diffusion coefficients. 107 103 … … 112 108 \label{sec:STP_forward_imp} 113 109 114 The leapfrog differencing scheme is unsuitable for the representation of 115 diffusion and damping processes. For a tendancy $D_x$, representing a 116 diffusion term or a restoring term to a tracer climatology 117 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme 118 is used : 110 The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes. 111 For a tendancy $D_x$, representing a diffusion term or a restoring term to a tracer climatology 112 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used : 119 113 \begin{equation} \label{eq:STP_euler} 120 114 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ {D_x}^{t-\rdt} 121 115 \end{equation} 122 116 123 This is diffusive in time and conditionally stable. The124 conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}:117 This is diffusive in time and conditionally stable. 118 The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}: 125 119 \begin{equation} \label{eq:STP_euler_stability} 126 120 A^h < \left\{ … … 131 125 \right. 132 126 \end{equation} 133 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is 134 the mixing coefficient. The linear constraint \autoref{eq:STP_euler_stability} 135 is a necessary condition, but not sufficient. If it is not satisfied, even mildly, 136 then the model soon becomes wildly unstable. The instability can be removed 137 by either reducing the length of the time steps or reducing the mixing coefficient. 138 139 For the vertical diffusion terms, a forward time differencing scheme can be 140 used, but usually the numerical stability condition imposes a strong 141 constraint on the time step. Two solutions are available in \NEMO to overcome 142 the stability constraint: $(a)$ a forward time differencing scheme using a 143 time splitting technique (\np{ln\_zdfexp}\forcode{ = .true.}) or $(b)$ a backward (or implicit) 144 time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}). In $(a)$, the master 145 time step $\Delta $t is cut into $N$ fractional time steps so that the 146 stability criterion is reduced by a factor of $N$. The computation is performed as 147 follows: 127 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is the mixing coefficient. 128 The linear constraint \autoref{eq:STP_euler_stability} is a necessary condition, but not sufficient. 129 If it is not satisfied, even mildly, then the model soon becomes wildly unstable. 130 The instability can be removed by either reducing the length of the time steps or reducing the mixing coefficient. 131 132 For the vertical diffusion terms, a forward time differencing scheme can be used, 133 but usually the numerical stability condition imposes a strong constraint on the time step. 134 Two solutions are available in \NEMO to overcome the stability constraint: 135 $(a)$ a forward time differencing scheme using a time splitting technique (\np{ln\_zdfexp}\forcode{ = .true.}) or 136 $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}). 137 In $(a)$, the master time step $\Delta $t is cut into $N$ fractional time steps so that 138 the stability criterion is reduced by a factor of $N$. 139 The computation is performed as follows: 148 140 \begin{equation} \label{eq:STP_ts} 149 141 \begin{split} … … 155 147 \end{split} 156 148 \end{equation} 157 with DF a vertical diffusion term. The number of fractional time steps, $N$, is given158 by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally 159 stable but diffusive. It can be written as follows:149 with DF a vertical diffusion term. 150 The number of fractional time steps, $N$, is given by setting \np{nn\_zdfexp}, (namelist parameter). 151 The scheme $(b)$ is unconditionally stable but diffusive. It can be written as follows: 160 152 \begin{equation} \label{eq:STP_imp} 161 153 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t+\rdt} … … 166 158 %%gm 167 159 168 This scheme is rather time consuming since it requires a matrix inversion, 169 but it becomes attractive since a value of 3 or more is needed for N in 170 the forward time differencing scheme. For example, the finite difference 171 approximation of the temperature equation is: 160 This scheme is rather time consuming since it requires a matrix inversion, 161 but it becomes attractive since a value of 3 or more is needed for N in the forward time differencing scheme. 162 For example, the finite difference approximation of the temperature equation is: 172 163 \begin{equation} \label{eq:STP_imp_zdf} 173 164 \frac{T(k)^{t+1}-T(k)^{t-1}}{2\;\rdt}\equiv \text{RHS}+\frac{1}{e_{3t} }\delta … … 175 166 \right] 176 167 \end{equation} 177 where RHS is the right hand side of the equation except for the vertical diffusion term. 168 where RHS is the right hand side of the equation except for the vertical diffusion term. 178 169 We rewrite \autoref{eq:STP_imp} as: 179 170 \begin{equation} \label{eq:STP_imp_mat} … … 187 178 \end{align*} 188 179 189 \autoref{eq:STP_imp_mat} is a linear system of equations with an associated 190 matrix which is tridiagonal. Moreover, $c(k)$ and $d(k)$ are positive and the diagonal 191 term is greater than the sum of the two extra-diagonal terms, therefore a special 192 adaptation of the Gauss elimination procedure is used to find the solution 180 \autoref{eq:STP_imp_mat} is a linear system of equations with an associated matrix which is tridiagonal. 181 Moreover, 182 $c(k)$ and $d(k)$ are positive and the diagonal term is greater than the sum of the two extra-diagonal terms, 183 therefore a special adaptation of the Gauss elimination procedure is used to find the solution 193 184 (see for example \citet{Richtmyer1967}). 194 185 … … 205 196 %\gmcomment{ 206 197 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 207 \begin{figure}[!t] \begin{center} 208 \includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 209 \caption{ \protect\label{fig:TimeStep_flowchart} 210 Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}. 211 The use of a semi-implicit computation of the hydrostatic pressure gradient requires 212 the tracer equation to be stepped forward prior to the momentum equation. 213 The need for knowledge of the vertical scale factor (here denoted as $h$) 214 requires the sea surface height and the continuity equation to be stepped forward 215 prior to the computation of the tracer equation. 216 Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here 217 (see \autoref{sec:DYN_spg}). } 198 \begin{figure}[!t] 199 \begin{center} 200 \includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 201 \caption{ \protect\label{fig:TimeStep_flowchart} 202 Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}. 203 The use of a semi-implicit computation of the hydrostatic pressure gradient requires the tracer equation to 204 be stepped forward prior to the momentum equation. 205 The need for knowledge of the vertical scale factor (here denoted as $h$) requires the sea surface height and 206 the continuity equation to be stepped forward prior to the computation of the tracer equation. 207 Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here 208 (see \autoref{sec:DYN_spg}). 209 } 218 210 \end{center} \end{figure} 219 211 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 226 218 \label{sec:STP_mLF} 227 219 228 Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the 229 LF-RA scheme in order to ensure tracer conservation and to allow the use of 230 a much smaller value of the Asselin filter parameter. The modifications affect 231 both the forcing and filtering treatments in the LF-RA scheme. 232 233 In a classical LF-RA environment, the forcing term is centred in time, $i.e.$ 234 it is time-stepped over a $2\rdt$ period: $x^t = x^t + 2\rdt Q^t $ where $Q$ 235 is the forcing applied to $x$, and the time filter is given by \autoref{eq:STP_asselin} 236 so that $Q$ is redistributed over several time step. 220 Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the LF-RA scheme in order to ensure tracer conservation and to allow the use of a much smaller value of the Asselin filter parameter. 221 The modifications affect both the forcing and filtering treatments in the LF-RA scheme. 222 223 In a classical LF-RA environment, the forcing term is centred in time, 224 $i.e.$ it is time-stepped over a $2\rdt$ period: 225 $x^t = x^t + 2\rdt Q^t $ where $Q$ is the forcing applied to $x$, 226 and the time filter is given by \autoref{eq:STP_asselin} so that $Q$ is redistributed over several time step. 237 227 In the modified LF-RA environment, these two formulations have been replaced by: 238 228 \begin{align} … … 242 232 - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} - Q^{t-\rdt/2} \right] \label{eq:STP_RA} 243 233 \end{align} 244 The change in the forcing formulation given by \autoref{eq:STP_forcing} 245 (see \autoref{fig:MLF_forcing}) has a significant effect: the forcing term no 246 longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}.234 The change in the forcing formulation given by \autoref{eq:STP_forcing} (see \autoref{fig:MLF_forcing}) 235 has a significant effect: 236 the forcing term no longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}. 247 237 % forcing seen by the model.... 248 This property improves the LF-RA scheme in two respects. 238 This property improves the LF-RA scheme in two respects. 249 239 First, the LF-RA can now ensure the local and global conservation of tracers. 250 Indeed, time filtering is no longer required on the forcing part. The influence of 251 the Asselin filter on the forcing is be removed by adding a new term in the filter 252 (last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}). Since 253 the filtering of the forcing was the source of non-conservation in the classical 254 LF-RA scheme, the modified formulation becomes conservative \citep{Leclair_Madec_OM09}. 255 Second, the LF-RA becomes a truly quasi-second order scheme. Indeed, 256 \autoref{eq:STP_forcing} used in combination with a careful treatment of static 257 instability (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}), 258 the two other main sources of time step divergence, allows a reduction by 259 two orders of magnitude of the Asselin filter parameter. 260 261 Note that the forcing is now provided at the middle of a time step: $Q^{t+\rdt/2}$ 262 is the forcing applied over the $[t,t+\rdt]$ time interval. This and the change 263 in the time filter, \autoref{eq:STP_RA}, allows an exact evaluation of the 264 contribution due to the forcing term between any two time steps, 265 even if separated by only $\rdt$ since the time filter is no longer applied to the 266 forcing term. 240 Indeed, time filtering is no longer required on the forcing part. 241 The influence of the Asselin filter on the forcing is be removed by adding a new term in the filter 242 (last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}). 243 Since the filtering of the forcing was the source of non-conservation in the classical LF-RA scheme, 244 the modified formulation becomes conservative \citep{Leclair_Madec_OM09}. 245 Second, the LF-RA becomes a truly quasi-second order scheme. 246 Indeed, \autoref{eq:STP_forcing} used in combination with a careful treatment of static instability 247 (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}), 248 the two other main sources of time step divergence, 249 allows a reduction by two orders of magnitude of the Asselin filter parameter. 250 251 Note that the forcing is now provided at the middle of a time step: 252 $Q^{t+\rdt/2}$ is the forcing applied over the $[t,t+\rdt]$ time interval. 253 This and the change in the time filter, \autoref{eq:STP_RA}, 254 allows an exact evaluation of the contribution due to the forcing term between any two time steps, 255 even if separated by only $\rdt$ since the time filter is no longer applied to the forcing term. 267 256 268 257 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 269 \begin{figure}[!t] \begin{center} 270 \includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 271 \caption{ \protect\label{fig:MLF_forcing} 272 Illustration of forcing integration methods. 273 (top) ''Traditional'' formulation : the forcing is defined at the same time as the variable 274 to which it is applied (integer value of the time step index) and it is applied over a $2\rdt$ period. 275 (bottom) modified formulation : the forcing is defined in the middle of the time (integer and a half 276 value of the time step index) and the mean of two successive forcing values ($n-1/2$, $n+1/2$). 277 is applied over a $2\rdt$ period.} 278 \end{center} \end{figure} 258 \begin{figure}[!t] 259 \begin{center} 260 \includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 261 \caption{ \protect\label{fig:MLF_forcing} 262 Illustration of forcing integration methods. 263 (top) ''Traditional'' formulation: 264 the forcing is defined at the same time as the variable to which it is applied 265 (integer value of the time step index) and it is applied over a $2\rdt$ period. 266 (bottom) modified formulation: 267 the forcing is defined in the middle of the time (integer and a half value of the time step index) and 268 the mean of two successive forcing values ($n-1/2$, $n+1/2$) is applied over a $2\rdt$ period. 269 } 270 \end{center} 271 \end{figure} 279 272 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 280 273 … … 289 282 %-------------------------------------------------------------------------------------------------------------- 290 283 291 The first time step of this three level scheme when starting from initial conditions 292 is a forward step (Euler time integration): 284 The first time step of this three level scheme when starting from initial conditions is a forward step 285 (Euler time integration): 293 286 \begin{equation} \label{eq:DOM_euler} 294 287 x^1 = x^0 + \rdt \ \text{RHS}^0 295 288 \end{equation} 296 This is done simply by keeping the leapfrog environment ($i.e.$ the \autoref{eq:STP} 297 three level time stepping) but setting all $x^0$ (\textit{before}) and $x^{1}$ (\textit{now}) fields 298 equal at the first time step and using half the value of $\rdt$. 299 300 It is also possible to restart from a previous computation, by using a 301 restart file. The restart strategy is designed to ensure perfect 302 restartability of the code: the user should obtain the same results to 303 machine precision either by running the model for $2N$ time steps in one go, 304 or by performing two consecutive experiments of $N$ steps with a restart. 305 This requires saving two time levels and many auxiliary data in the restart 306 files in machine precision. 307 308 Note that when a semi-implicit scheme is used to evaluate the hydrostatic pressure 309 gradient (see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to be 310 added to the restart file to ensure an exact restartability. This is done optionally 311 via the \np{nn\_dynhpg\_rst} namelist parameter, so that the size of the 312 restart file can be reduced when restartability is not a key issue (operational 313 oceanography or in ensemble simulations for seasonal forecasting). 314 315 Note the size of the time step used, $\rdt$, is also saved in the restart file. 316 When restarting, if the the time step has been changed, a restart using an Euler time 317 stepping scheme is imposed. 289 This is done simply by keeping the leapfrog environment ($i.e.$ the \autoref{eq:STP} three level time stepping) but 290 setting all $x^0$ (\textit{before}) and $x^{1}$ (\textit{now}) fields equal at the first time step and 291 using half the value of $\rdt$. 292 293 It is also possible to restart from a previous computation, by using a restart file. 294 The restart strategy is designed to ensure perfect restartability of the code: 295 the user should obtain the same results to machine precision either by 296 running the model for $2N$ time steps in one go, 297 or by performing two consecutive experiments of $N$ steps with a restart. 298 This requires saving two time levels and many auxiliary data in the restart files in machine precision. 299 300 Note that when a semi-implicit scheme is used to evaluate the hydrostatic pressure gradient 301 (see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to 302 be added to the restart file to ensure an exact restartability. 303 This is done optionally via the \np{nn\_dynhpg\_rst} namelist parameter, 304 so that the size of the restart file can be reduced when restartability is not a key issue 305 (operational oceanography or in ensemble simulations for seasonal forecasting). 306 307 Note the size of the time step used, $\rdt$, is also saved in the restart file. 308 When restarting, if the the time step has been changed, a restart using an Euler time stepping scheme is imposed. 318 309 Options are defined through the \ngn{namrun} namelist variables. 319 310 %%% -
NEMO/trunk/doc/latex/NEMO/subfiles/introduction.tex
r9407 r10354 8 8 \chapter{Introduction} 9 9 10 The Nucleus for European Modelling of the Ocean (\NEMO) is a framework of ocean 11 related engines, namely OPA\footnote{OPA = Oc\'{e}an PArall\'{e}lis\'{e}} for the 12 ocean dynamics and thermodynamics, LIM\footnote{LIM = Louvain la-neuve Ice 13 Model} for the sea-ice dynamics and thermodynamics, TOP\footnote{TOP = Tracer 14 in the Ocean Paradigm} for the biogeochemistry (both transport (TRP) and sources 15 minus sinks (LOBSTER\footnote{LOBSTER = Lodyc Ocean Biogeochemical SysTem for 16 Ecosystem and Resources}, PISCES\footnote{PISCES = Pelagic Interactions Scheme for 17 Carbon and Ecosystem Studies}). It is intended to be a flexible tool for studying 18 the ocean and its interactions with the other components of the earth climate system 19 (atmosphere, sea-ice, biogeochemical tracers, ...) over a wide range of space and time scales. 20 This documentation provides information about the physics represented by the ocean 21 component of \NEMO and the rationale for the choice of numerical schemes and 22 the model design. More specific information about running the model on different 23 computers, or how to set up a configuration, are found on the \NEMO web site 24 (www.nemo-ocean.eu). 25 26 The ocean component of \NEMO has been developed from the OPA model, 27 release 8.2, described in \citet{Madec1998}. This model has been used for a wide 28 range of applications, both regional or global, as a forced ocean model and as a 29 model coupled with the sea-ice and/or the atmosphere. 30 31 This manual is organised in as follows. \autoref{chap:PE} presents the model basics, 32 $i.e.$ the equations and their assumptions, the vertical coordinates used, and the 33 subgrid scale physics. This part deals with the continuous equations of the model 34 (primitive equations, with temperature, salinity and an equation of seawater). 35 The equations are written in a curvilinear coordinate system, with a choice of vertical 36 coordinates ($z$, $s$, \textit{z*}, \textit{s*}, $\tilde{z}$, $\tilde{s}$, and a mixture of them). 37 Momentum equations are formulated in vector invariant or flux form. 38 Dimensional units in the meter, kilogram, second (MKS) international system 39 are used throughout. 40 41 The following chapters deal with the discrete equations. \autoref{chap:STP} presents the 42 time domain. The model time stepping environment is a three level scheme in which 43 the tendency terms of the equations are evaluated either centered in time, or forward, 44 or backward depending of the nature of the term. 45 \autoref{chap:DOM} presents the space domain. The model is discretised on a staggered 46 grid (Arakawa C grid) with masking of land areas. Vertical discretisation used depends 47 on both how the bottom topography is represented and whether the free surface is linear or not. 48 Full step or partial step $z$-coordinate or $s$- (terrain-following) coordinate is used 49 with linear free surface (level position are then fixed in time). In non-linear free surface, 50 the corresponding rescaled height coordinate formulation (\textit{z*} or \textit{s*}) is used 51 (the level position then vary in time as a function of the sea surface heigh). 52 The following two chapters (\autoref{chap:TRA} and \autoref{chap:DYN}) describe the discretisation of the 53 prognostic equations for the active tracers and the momentum. Explicit, split-explicit 54 and filtered free surface formulations are implemented. 55 A number of numerical schemes are available for momentum advection, for the computation 56 of the pressure gradients, as well as for the advection of tracers (second or higher 57 order advection schemes, including positive ones). 58 59 Surface boundary conditions (\autoref{chap:SBC}) can be implemented as prescribed 60 fluxes, or bulk formulations for the surface fluxes (wind stress, heat, freshwater). The 61 model allows penetration of solar radiation There is an optional geothermal heating at 62 the ocean bottom. Within the \NEMO system the ocean model is interactively coupled 63 with a sea ice model (LIM) and with biogeochemistry models (PISCES, LOBSTER). 64 Interactive coupling to Atmospheric models is possible via the OASIS coupler 65 \citep{OASIS2006}. Two-way nesting is also available through an interface to the 66 AGRIF package (Adaptative Grid Refinement in \textsc{Fortran}) \citep{Debreu_al_CG2008}. 67 The interface code for coupling to an alternative sea ice model (CICE, \citet{Hunke2008}) 68 has now been upgraded so that it works for both global and regional domains, although AGRIF 69 is still not available. 70 71 Other model characteristics are the lateral boundary conditions (\autoref{chap:LBC}). 72 Global configurations of the model make use of the ORCA tripolar grid, with special north 73 fold boundary condition. Free-slip or no-slip boundary conditions are allowed at land 74 boundaries. Closed basin geometries as well as periodic domains and open boundary 75 conditions are possible. 76 77 Physical parameterisations are described in \autoref{chap:LDF} and \autoref{chap:ZDF}. The 78 model includes an implicit treatment of vertical viscosity and diffusivity. The lateral 79 Laplacian and biharmonic viscosity and diffusion can be rotated following a geopotential 80 or neutral direction. There is an optional eddy induced velocity \citep{Gent1990} with a 81 space and time variable coefficient \citet{Treguier1997}. The model has vertical harmonic 82 viscosity and diffusion with a space and time variable coefficient, with options to compute 83 the coefficients with \citet{Blanke1993}, \citet{Pacanowski_Philander_JPO81}, 10 The Nucleus for European Modelling of the Ocean (\NEMO) is a framework of ocean related engines, 11 namely OPA\footnote{OPA = Oc\'{e}an PArall\'{e}lis\'{e}} for the ocean dynamics and thermodynamics, 12 LIM\footnote{LIM = Louvain la-neuve Ice Model} for the sea-ice dynamics and thermodynamics, 13 TOP\footnote{TOP = Tracer in the Ocean Paradigm} for the biogeochemistry (both transport (TRP) and sources 14 minus sinks (LOBSTER\footnote{LOBSTER = Lodyc Ocean Biogeochemical SysTem for Ecosystem and Resources}, 15 PISCES\footnote{PISCES = Pelagic Interactions Scheme for Carbon and Ecosystem Studies})). 16 It is intended to be a flexible tool for studying the ocean and its interactions with the other components of 17 the earth climate system (atmosphere, sea-ice, biogeochemical tracers, ...) over 18 a wide range of space and time scales. 19 This documentation provides information about the physics represented by the ocean component of \NEMO and 20 the rationale for the choice of numerical schemes and the model design. 21 More specific information about running the model on different computers, or how to set up a configuration, 22 are found on the \NEMO web site (www.nemo-ocean.eu). 23 24 The ocean component of \NEMO has been developed from the OPA model, release 8.2, described in \citet{Madec1998}. 25 This model has been used for a wide range of applications, both regional or global, 26 as a forced ocean model and as a model coupled with the sea-ice and/or the atmosphere. 27 28 This manual is organised in as follows. 29 \autoref{chap:PE} presents the model basics, $i.e.$ the equations and their assumptions, 30 the vertical coordinates used, and the subgrid scale physics. 31 This part deals with the continuous equations of the model 32 (primitive equations, with temperature, salinity and an equation of seawater). 33 The equations are written in a curvilinear coordinate system, with a choice of vertical coordinates 34 ($z$, $s$, \textit{z*}, \textit{s*}, $\tilde{z}$, $\tilde{s}$, and a mixture of them). 35 Momentum equations are formulated in vector invariant or flux form. 36 Dimensional units in the meter, kilogram, second (MKS) international system are used throughout. 37 38 The following chapters deal with the discrete equations. 39 \autoref{chap:STP} presents the time domain. 40 The model time stepping environment is a three level scheme in which the tendency terms of 41 the equations are evaluated either centered in time, or forward, or backward depending of the nature of the term. 42 \autoref{chap:DOM} presents the space domain. 43 The model is discretised on a staggered grid (Arakawa C grid) with masking of land areas. 44 Vertical discretisation used depends on both how the bottom topography is represented and 45 whether the free surface is linear or not. 46 Full step or partial step $z$-coordinate or $s$- (terrain-following) coordinate is used with 47 linear free surface (level position are then fixed in time). 48 In non-linear free surface, 49 the corresponding rescaled height coordinate formulation (\textit{z*} or \textit{s*}) is used 50 (the level position then vary in time as a function of the sea surface heigh). 51 The following two chapters (\autoref{chap:TRA} and \autoref{chap:DYN}) describe the discretisation of 52 the prognostic equations for the active tracers and the momentum. 53 Explicit, split-explicit and filtered free surface formulations are implemented. 54 A number of numerical schemes are available for momentum advection, for the computation of the pressure gradients, 55 as well as for the advection of tracers (second or higher order advection schemes, including positive ones). 56 57 Surface boundary conditions (\autoref{chap:SBC}) can be implemented as prescribed fluxes, 58 or bulk formulations for the surface fluxes (wind stress, heat, freshwater). 59 The model allows penetration of solar radiation. 60 There is an optional geothermal heating at the ocean bottom. 61 Within the \NEMO system the ocean model is interactively coupled with a sea ice model (LIM) and 62 with biogeochemistry models (PISCES, LOBSTER). 63 Interactive coupling to Atmospheric models is possible via the OASIS coupler \citep{OASIS2006}. 64 Two-way nesting is also available through an interface to the AGRIF package 65 (Adaptative Grid Refinement in \textsc{Fortran}) \citep{Debreu_al_CG2008}. 66 The interface code for coupling to an alternative sea ice model (CICE, \citet{Hunke2008}) has now been upgraded so 67 that it works for both global and regional domains, although AGRIF is still not available. 68 69 Other model characteristics are the lateral boundary conditions (\autoref{chap:LBC}). 70 Global configurations of the model make use of the ORCA tripolar grid, with special north fold boundary condition. 71 Free-slip or no-slip boundary conditions are allowed at land boundaries. 72 Closed basin geometries as well as periodic domains and open boundary conditions are possible. 73 74 Physical parameterisations are described in \autoref{chap:LDF} and \autoref{chap:ZDF}. 75 The model includes an implicit treatment of vertical viscosity and diffusivity. 76 The lateral Laplacian and biharmonic viscosity and diffusion can be rotated following 77 a geopotential or neutral direction. 78 There is an optional eddy induced velocity \citep{Gent1990} with a space and time variable coefficient 79 \citet{Treguier1997}. 80 The model has vertical harmonic viscosity and diffusion with a space and time variable coefficient, 81 with options to compute the coefficients with \citet{Blanke1993}, \citet{Pacanowski_Philander_JPO81}, 84 82 or \citet{Umlauf_Burchard_JMS03} mixing schemes. 85 83 \vspace{1cm} … … 90 88 91 89 \noindent \index{CPP keys} CPP keys \newline 92 Some CPP keys are implemented in the FORTRAN code to allow code selection at compiling step. This selection of code at compilation time reduces the reliability of the whole platform since it changes the code from one set of CPP keys to the other. It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time. 90 Some CPP keys are implemented in the FORTRAN code to allow code selection at compiling step. 91 This selection of code at compilation time reduces the reliability of the whole platform since 92 it changes the code from one set of CPP keys to the other. 93 It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time. 93 94 Usual coding looks like : 94 95 \begin{forlines} … … 101 102 \noindent \index{Namelist} Namelists 102 103 103 The namelist allows to input variables (character, logical, real and integer) into the code. There is one namelist file for each component of NEMO (dynamics, sea-ice, biogeochemistry...) containing all the FOTRAN namelists needed. The implementation in NEMO uses a two step process. For each FORTRAN namelist, two files are read: 104 \begin{enumerate} 105 \item A reference namelist (in \path{CONFIG/SHARED/namelist_ref}) is read first. This file contains all the namelist variables which are initialised to default values 106 \item A configuration namelist (in \path{CONFIG/CFG_NAME/EXP00/namelist_cfg}) is read aferwards. This file contains only the namelist variables which are changed from default values, and overwrites those. 104 The namelist allows to input variables (character, logical, real and integer) into the code. 105 There is one namelist file for each component of NEMO (dynamics, sea-ice, biogeochemistry...) 106 containing all the FOTRAN namelists needed. 107 The implementation in NEMO uses a two step process. For each FORTRAN namelist, two files are read: 108 \begin{enumerate} 109 \item 110 A reference namelist (in \path{CONFIG/SHARED/namelist_ref}) is read first. 111 This file contains all the namelist variables which are initialised to default values 112 \item 113 A configuration namelist (in \path{CONFIG/CFG_NAME/EXP00/namelist_cfg}) is read aferwards. 114 This file contains only the namelist variables which are changed from default values, and overwrites those. 107 115 \end{enumerate} 108 116 A template can be found in \path{NEMO/OPA_SRC/module.example}. 109 The effective namelist, taken in account during the run, is stored at execution time in an output\_namelist\_dyn (or \_ice or \_top) file. 110 \vspace{1cm} 117 The effective namelist, taken in account during the run, is stored at execution time in 118 an output\_namelist\_dyn (or \_ice or \_top) file. 119 \vspace{1cm} 111 120 112 121 %%gm end 113 122 114 123 Model outputs management and specific online diagnostics are described in \autoref{chap:DIA}. 115 The diagnostics includes the output of all the tendencies of the momentum and tracers equations, 116 the output of tracers tendencies averaged over the time evolving mixed layer, the output of 117 the tendencies of the barotropic vorticity equation, the computation of on-line floats trajectories... 118 \autoref{chap:OBS} describes a tool which reads in observation files (profile temperature 119 and salinity, sea surface temperature, sea level anomaly and sea ice concentration) 120 and calculates an interpolated model equivalent value at the observation location 121 and nearest model timestep. Originally developed of data assimilation, it is a fantastic 122 tool for model and data comparison. \autoref{chap:ASM} describes how increments 123 produced by data assimilation may be applied to the model equations. 124 Finally, \autoref{chap:CFG} provides a brief introduction to the pre-defined model 125 configurations (water column model, ORCA and GYRE families of configurations). 126 127 The model is implemented in \textsc{Fortran 90}, with preprocessing (C-pre-processor). 128 It runs under UNIX. It is optimized for vector computers and parallelised by domain 129 decomposition with MPI. All input and output is done in NetCDF (Network Common Data 130 Format) with a optional direct access format for output. To ensure the clarity and 131 readability of the code it is necessary to follow coding rules. The coding rules for OPA 132 include conventions for naming variables, with different starting letters for different types 133 of variables (real, integer, parameter\ldots). Those rules are briefly presented in 134 \autoref{apdx:D} and a more complete document is available on the \NEMO web site. 135 136 The model is organized with a high internal modularity based on physics. For example, 137 each trend ($i.e.$, a term in the RHS of the prognostic equation) for momentum and 138 tracers is computed in a dedicated module. To make it easier for the user to find his way 139 around the code, the module names follow a three-letter rule. For example, \mdl{traldf} 140 is a module related to the TRAcers equation, computing the Lateral DiFfussion. 124 The diagnostics includes the output of all the tendencies of the momentum and tracers equations, 125 the output of tracers tendencies averaged over the time evolving mixed layer, 126 the output of the tendencies of the barotropic vorticity equation, 127 the computation of on-line floats trajectories... 128 \autoref{chap:OBS} describes a tool which reads in observation files 129 (profile temperature and salinity, sea surface temperature, sea level anomaly and sea ice concentration) 130 and calculates an interpolated model equivalent value at the observation location and nearest model timestep. 131 Originally developed of data assimilation, it is a fantastic tool for model and data comparison. 132 \autoref{chap:ASM} describes how increments produced by data assimilation may be applied to the model equations. 133 Finally, \autoref{chap:CFG} provides a brief introduction to the pre-defined model configurations 134 (water column model, ORCA and GYRE families of configurations). 135 136 The model is implemented in \textsc{Fortran 90}, with preprocessing (C-pre-processor). 137 It runs under UNIX. 138 It is optimized for vector computers and parallelised by domain decomposition with MPI. 139 All input and output is done in NetCDF (Network Common Data Format) with a optional direct access format for output. 140 To ensure the clarity and readability of the code it is necessary to follow coding rules. 141 The coding rules for OPA include conventions for naming variables, 142 with different starting letters for different types of variables (real, integer, parameter\ldots). 143 Those rules are briefly presented in \autoref{apdx:D} and a more complete document is available on 144 the \NEMO web site. 145 146 The model is organized with a high internal modularity based on physics. 147 For example, each trend ($i.e.$, a term in the RHS of the prognostic equation) for momentum and tracers 148 is computed in a dedicated module. 149 To make it easier for the user to find his way around the code, the module names follow a three-letter rule. 150 For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion. 141 151 %The complete list of module names is presented in \autoref{apdx:D}. %====>>>> to be done ! 142 Furthermore, modules are organized in a few directories that correspond to their category, 152 Furthermore, modules are organized in a few directories that correspond to their category, 143 153 as indicated by the first three letters of their name (\autoref{tab:chap}). 144 154 145 The manual mirrors the organization of the model. 146 After the presentation of the continuous equations (\autoref{chap:PE}), the following chapters 147 refer to specific terms of the equations each associated with a group of modules (\autoref{tab:chap}). 155 The manual mirrors the organization of the model. 156 After the presentation of the continuous equations (\autoref{chap:PE}), 157 the following chapters refer to specific terms of the equations each associated with 158 a group of modules (\autoref{tab:chap}). 148 159 149 160 150 161 %--------------------------------------------------TABLE-------------------------------------------------- 151 162 \begin{table}[!t] 152 %\begin{center} \begin{tabular}{|p{143pt}|l|l|} \hline 153 \caption{ \protect\label{tab:chap} Organization of Chapters mimicking the one of the model directories. } 154 \begin{center} \begin{tabular}{|l|l|l|} \hline 155 \autoref{chap:STP} & - & model time STePping environment \\ \hline 156 \autoref{chap:DOM} & DOM & model DOMain \\ \hline 157 \autoref{chap:TRA} & TRA & TRAcer equations (potential temperature and salinity) \\ \hline 158 \autoref{chap:DYN} & DYN & DYNamic equations (momentum) \\ \hline 159 \autoref{chap:SBC} & SBC & Surface Boundary Conditions \\ \hline 160 \autoref{chap:LBC} & LBC & Lateral Boundary Conditions (also OBC and BDY) \\ \hline 161 \autoref{chap:LDF} & LDF & Lateral DiFfusion (parameterisations) \\ \hline 162 \autoref{chap:ZDF} & ZDF & vertical (Z) DiFfusion (parameterisations) \\ \hline 163 \autoref{chap:DIA} & DIA & I/O and DIAgnostics (also IOM, FLO and TRD) \\ \hline 164 \autoref{chap:OBS} & OBS & OBServation and model comparison \\ \hline 165 \autoref{chap:ASM} & ASM & ASsiMilation increment \\ \hline 166 \autoref{chap:MISC} & SOL & Miscellaneous topics (including solvers) \\ \hline 167 \autoref{chap:CFG} & - & predefined configurations (including C1D) \\ \hline 168 \end{tabular} 169 \end{center} \end{table} 163 % \begin{center} \begin{tabular}{|p{143pt}|l|l|} \hline 164 \caption{ \protect\label{tab:chap} Organization of Chapters mimicking the one of the model directories. } 165 \begin{center} 166 \begin{tabular}{|l|l|l|} \hline 167 \autoref{chap:STP} & - & model time STePping environment \\ \hline 168 \autoref{chap:DOM} & DOM & model DOMain \\ \hline 169 \autoref{chap:TRA} & TRA & TRAcer equations (potential temperature and salinity) \\ \hline 170 \autoref{chap:DYN} & DYN & DYNamic equations (momentum) \\ \hline 171 \autoref{chap:SBC} & SBC & Surface Boundary Conditions \\ \hline 172 \autoref{chap:LBC} & LBC & Lateral Boundary Conditions (also OBC and BDY) \\ \hline 173 \autoref{chap:LDF} & LDF & Lateral DiFfusion (parameterisations) \\ \hline 174 \autoref{chap:ZDF} & ZDF & vertical (Z) DiFfusion (parameterisations) \\ \hline 175 \autoref{chap:DIA} & DIA & I/O and DIAgnostics (also IOM, FLO and TRD) \\ \hline 176 \autoref{chap:OBS} & OBS & OBServation and model comparison \\ \hline 177 \autoref{chap:ASM} & ASM & ASsiMilation increment \\ \hline 178 \autoref{chap:MISC} & SOL & Miscellaneous topics (including solvers) \\ \hline 179 \autoref{chap:CFG} & - & predefined configurations (including C1D) \\ \hline 180 \end{tabular} 181 \end{center} 182 \end{table} 170 183 %-------------------------------------------------------------------------------------------------------------- 171 184 172 185 173 186 \subsubsection{Changes between releases} 174 NEMO/OPA, like all research tools, is in perpetual evolution. The present document describes175 the OPA version include in the release 3.4 of NEMO. This release differs significantly 176 from version 8, documented in \citet{Madec1998}.\\187 NEMO/OPA, like all research tools, is in perpetual evolution. 188 The present document describes the OPA version include in the release 3.4 of NEMO. 189 This release differs significantly from version 8, documented in \citet{Madec1998}.\\ 177 190 178 191 $\bullet$ The main modifications from OPA v8 and NEMO/OPA v3.2 are :\\ 179 192 \begin{enumerate} 180 \item transition to full native \textsc{Fortran} 90, deep code restructuring and drastic 181 reduction of CPP keys; 182 \item introduction of partial step representation of bottom topography \citep{Barnier_al_OD06, Le_Sommer_al_OM09, Penduff_al_OS07}; 183 \item partial reactivation of a terrain-following vertical coordinate ($s$- and hybrid $s$-$z$) 184 with the addition of several options for pressure gradient computation \footnote{Partial 185 support of $s$-coordinate: there is presently no support for neutral physics in $s$- 186 coordinate and for the new options for horizontal pressure gradient computation with 187 a non-linear equation of state.}; 188 \item more choices for the treatment of the free surface: full explicit, split-explicit or filtered 189 schemes, and suppression of the rigid-lid option; 190 \item non linear free surface associated with the rescaled height coordinate 191 \textit{z*} or \textit{s}; 192 \item additional schemes for vector and flux forms of the momentum advection; 193 \item additional advection schemes for tracers; 194 \item implementation of the AGRIF package (Adaptative Grid Refinement in \textsc{Fortran}) \citep{Debreu_al_CG2008}; 195 \item online diagnostics : tracers trend in the mixed layer and vorticity balance; 196 \item rewriting of the I/O management with the use of an I/O server; 197 \item generalized ocean-ice-atmosphere-CO2 coupling interface, interfaced with OASIS 3 coupler ; 198 \item surface module (SBC) that simplify the way the ocean is forced and include two 199 bulk formulea (CLIO and CORE) and which includes an on-the-fly interpolation of input forcing fields ; 200 \item RGB light penetration and optional use of ocean color 201 \item major changes in the TKE schemes: it now includes a Langmuir cell parameterization \citep{Axell_JGR02}, 202 the \citet{Mellor_Blumberg_JPO04} surface wave breaking parameterization, and has a time discretization 203 which is energetically consistent with the ocean model equations \citep{Burchard_OM02, Marsaleix_al_OM08}; 204 \item tidal mixing parametrisation (bottom intensification) + Indonesian specific tidal mixing \citep{Koch-Larrouy_al_GRL07}; 205 \item introduction of LIM-3, the new Louvain-la-Neuve sea-ice model (C-grid rheology and 206 new thermodynamics including bulk ice salinity) \citep{Vancoppenolle_al_OM09a, Vancoppenolle_al_OM09b} 193 \item 194 transition to full native \textsc{Fortran} 90, deep code restructuring and drastic reduction of CPP keys; 195 \item 196 introduction of partial step representation of bottom topography 197 \citep{Barnier_al_OD06, Le_Sommer_al_OM09, Penduff_al_OS07}; 198 \item 199 partial reactivation of a terrain-following vertical coordinate ($s$- and hybrid $s$-$z$) with 200 the addition of several options for pressure gradient computation 201 \footnote{Partial support of $s$-coordinate: there is presently no support for neutral physics in 202 $s$-coordinate and for the new options for horizontal pressure gradient computation with 203 a non-linear equation of state. 204 }; 205 \item 206 more choices for the treatment of the free surface: full explicit, split-explicit or filtered schemes, 207 and suppression of the rigid-lid option; 208 \item 209 non linear free surface associated with the rescaled height coordinate \textit{z*} or \textit{s}; 210 \item 211 additional schemes for vector and flux forms of the momentum advection; 212 \item 213 additional advection schemes for tracers; 214 \item 215 implementation of the AGRIF package (Adaptative Grid Refinement in \textsc{Fortran}) \citep{Debreu_al_CG2008}; 216 \item 217 online diagnostics : tracers trend in the mixed layer and vorticity balance; 218 \item 219 rewriting of the I/O management with the use of an I/O server; 220 \item 221 generalized ocean-ice-atmosphere-CO2 coupling interface, interfaced with OASIS 3 coupler; 222 \item 223 surface module (SBC) that simplify the way the ocean is forced and include two bulk formulea (CLIO and CORE) and 224 which includes an on-the-fly interpolation of input forcing fields; 225 \item 226 RGB light penetration and optional use of ocean color 227 \item 228 major changes in the TKE schemes: it now includes a Langmuir cell parameterization \citep{Axell_JGR02}, 229 the \citet{Mellor_Blumberg_JPO04} surface wave breaking parameterization, and has a time discretization which 230 is energetically consistent with the ocean model equations \citep{Burchard_OM02, Marsaleix_al_OM08}; 231 \item 232 tidal mixing parametrisation (bottom intensification) + Indonesian specific tidal mixing 233 \citep{Koch-Larrouy_al_GRL07}; 234 \item 235 introduction of LIM-3, the new Louvain-la-Neuve sea-ice model 236 (C-grid rheology and new thermodynamics including bulk ice salinity) 237 \citep{Vancoppenolle_al_OM09a, Vancoppenolle_al_OM09b} 207 238 \end{enumerate} 208 239 209 240 \vspace{1cm} 210 $\bullet$ The main modifications from NEMO/OPA v3.2 and v3.3 are :\\ 211 \begin{enumerate} 212 \item introduction of a modified leapfrog-Asselin filter time stepping scheme \citep{Leclair_Madec_OM09}; 213 \item additional scheme for iso-neutral mixing \citep{Griffies_al_JPO98}, although it is still a "work in progress"; 214 \item a rewriting of the bottom boundary layer scheme, following \citet{Campin_Goosse_Tel99}; 215 \item addition of a Generic Length Scale vertical mixing scheme, following \citet{Umlauf_Burchard_JMS03}; 216 \item addition of the atmospheric pressure as an external forcing on both ocean and sea-ice dynamics; 217 \item addition of a diurnal cycle on solar radiation \citep{Bernie_al_CD07}; 218 \item river runoffs added through a non-zero depth, and having its own temperature and salinity; 219 \item CORE II normal year forcing set as the default forcing of ORCA2-LIM configuration ; 220 \item generalisation of the use of \mdl{fldread} for all input fields (ocean climatology, sea-ice damping...) ; 221 \item addition of an on-line observation and model comparison (thanks to NEMOVAR project); 222 \item optional application of an assimilation increment (thanks to NEMOVAR project); 223 \item coupling interface adjusted for WRF atmospheric model; 224 \item C-grid ice rheology now available fro both LIM-2 and LIM-3 \citep{Bouillon_al_OM09}; 225 \item LIM-3 ice-ocean momentum coupling applied to LIM-2 ; 226 \item a deep re-writting and simplification of the off-line tracer component (OFF\_SRC) ; 227 \item the merge of passive and active advection and diffusion modules ; 228 \item Use of the Flexible Configuration Manager (FCM) to build configurations, generate the Makefile and produce the executable ; 229 \item Linear-tangent and Adjoint component (TAM) added, phased with v3.0 230 \end{enumerate} 231 \vspace{1cm} 232 In addition, several minor modifications in the coding have been introduced with the constant 233 concern of improving the model performance. 234 235 \vspace{1cm} 241 $\bullet$ The main modifications from NEMO/OPA v3.2 and v3.3 are :\\ 242 \begin{enumerate} 243 \item 244 introduction of a modified leapfrog-Asselin filter time stepping scheme 245 \citep{Leclair_Madec_OM09}; 246 \item 247 additional scheme for iso-neutral mixing \citep{Griffies_al_JPO98}, although it is still a "work in progress"; 248 \item 249 a rewriting of the bottom boundary layer scheme, following \citet{Campin_Goosse_Tel99}; 250 \item 251 addition of a Generic Length Scale vertical mixing scheme, following \citet{Umlauf_Burchard_JMS03}; 252 \item 253 addition of the atmospheric pressure as an external forcing on both ocean and sea-ice dynamics; 254 \item 255 addition of a diurnal cycle on solar radiation \citep{Bernie_al_CD07}; 256 \item 257 river runoffs added through a non-zero depth, and having its own temperature and salinity; 258 \item 259 CORE II normal year forcing set as the default forcing of ORCA2-LIM configuration; 260 \item 261 generalisation of the use of \mdl{fldread} for all input fields (ocean climatology, sea-ice damping...); 262 \item 263 addition of an on-line observation and model comparison (thanks to NEMOVAR project); 264 \item 265 optional application of an assimilation increment (thanks to NEMOVAR project); 266 \item 267 coupling interface adjusted for WRF atmospheric model; 268 \item 269 C-grid ice rheology now available fro both LIM-2 and LIM-3 \citep{Bouillon_al_OM09}; 270 \item 271 LIM-3 ice-ocean momentum coupling applied to LIM-2; 272 \item 273 a deep re-writting and simplification of the off-line tracer component (OFF\_SRC); 274 \item 275 the merge of passive and active advection and diffusion modules; 276 \item 277 Use of the Flexible Configuration Manager (FCM) to build configurations, 278 generate the Makefile and produce the executable; 279 \item 280 Linear-tangent and Adjoint component (TAM) added, phased with v3.0 281 \end{enumerate} 282 \vspace{1cm} 283 In addition, several minor modifications in the coding have been introduced with the constant concern of 284 improving the model performance. 285 286 \vspace{1cm} 236 287 $\bullet$ The main modifications from NEMO/OPA v3.3 and v3.4 are :\\ 237 288 \begin{enumerate} 238 \item finalisation of above iso-neutral mixing \citep{Griffies_al_JPO98}"; 289 \item finalisation of above iso-neutral mixing \citep{Griffies_al_JPO98}"; 239 290 \item "Neptune effect" parametrisation; 240 \item horizontal pressure gradient suitable for s-coordinate; 291 \item horizontal pressure gradient suitable for s-coordinate; 241 292 \item semi-implicit bottom friction; 242 \item finalisation of the merge of passive and active tracers advection-diffusion modules; 293 \item finalisation of the merge of passive and active tracers advection-diffusion modules; 243 294 \item a new bulk formulae (so-called MFS); 244 \item use fldread for the off-line tracer component (OFF\_SRC) ;295 \item use fldread for the off-line tracer component (OFF\_SRC); 245 296 \item use MPI point to point communications for north fold; 246 \item diagnostic of transport ;297 \item diagnostic of transport; 247 298 \end{enumerate} 248 299
Note: See TracChangeset
for help on using the changeset viewer.