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

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

Ignore:
Timestamp:
2019-09-20T11:44:31+02:00 (5 years ago)
Author:
nicolasmartin
Message:

New LaTeX commands \nam and \np to mention namelist content (step 2)
Finally convert \forcode{...} following \np{}{} into optional arg of the new command \np[]{}{}

File:
1 edited

Legend:

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

    r11578 r11582  
    33%% Custom aliases 
    44\newcommand{\cf}{\ensuremath{C\kern-0.14em f}} 
     5 
     6\onlyinsubfile{\makeindex} 
    57 
    68\begin{document} 
     
    4244are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 
    4345%These trends can be computed using either a forward time stepping scheme 
    44 %(namelist parameter \np{ln_zdfexp}{ln\_zdfexp}\forcode{=.true.}) or a backward time stepping scheme 
    45 %(\np{ln_zdfexp}{ln\_zdfexp}\forcode{=.false.}) depending on the magnitude of the mixing coefficients, 
     46%(namelist parameter \np[=.true.]{ln_zdfexp}{ln\_zdfexp}) or a backward time stepping scheme 
     47%(\np[=.false.]{ln_zdfexp}{ln\_zdfexp}) depending on the magnitude of the mixing coefficients, 
    4648%and thus of the formulation used (see \autoref{chap:TD}). 
    4749 
     
    9294%-------------------------------------------------------------------------------------------------------------- 
    9395 
    94 When \np{ln_zdfric}{ln\_zdfric}\forcode{=.true.}, a local Richardson number dependent formulation for the vertical momentum and 
     96When \np[=.true.]{ln_zdfric}{ln\_zdfric}, a local Richardson number dependent formulation for the vertical momentum and 
    9597tracer eddy coefficients is set through the \nam{zdf_ric}{zdf\_ric} namelist variables. 
    9698The vertical mixing coefficients are diagnosed from the large scale variables computed by the model. 
     
    118120 
    119121A simple mixing-layer model to transfer and dissipate the atmospheric forcings 
    120 (wind-stress and buoyancy fluxes) can be activated setting the \np{ln_mldw}{ln\_mldw}\forcode{=.true.} in the namelist. 
     122(wind-stress and buoyancy fluxes) can be activated setting the \np[=.true.]{ln_mldw}{ln\_mldw} in the namelist. 
    121123 
    122124In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and 
     
    225227which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency. 
    226228The resulting length scale is bounded by the distance to the surface or to the bottom 
    227 (\np{nn_mxl}{nn\_mxl}\forcode{=0}) or by the local vertical scale factor (\np{nn_mxl}{nn\_mxl}\forcode{=1}). 
     229(\np[=0]{nn_mxl}{nn\_mxl}) or by the local vertical scale factor (\np[=1]{nn_mxl}{nn\_mxl}). 
    228230\citet{blanke.delecluse_JPO93} notice that this simplification has two major drawbacks: 
    229231it makes no sense for locally unstable stratification and the computation no longer uses all 
    230232the information contained in the vertical density profile. 
    231 To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np{nn_mxl}{nn\_mxl}\forcode{=2, 3} cases, 
     233To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np[=2, 3]{nn_mxl}{nn\_mxl} cases, 
    232234which add an extra assumption concerning the vertical gradient of the computed length scale. 
    233235So, the length scales are first evaluated as in \autoref{eq:ZDF_tke_mxl0_1} and then bounded such that: 
     
    267269where $l^{(k)}$ is computed using \autoref{eq:ZDF_tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 
    268270 
    269 In the \np{nn_mxl}{nn\_mxl}\forcode{=2} case, the dissipation and mixing length scales take the same value: 
    270 $ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np{nn_mxl}{nn\_mxl}\forcode{=3} case, 
     271In the \np[=2]{nn_mxl}{nn\_mxl} case, the dissipation and mixing length scales take the same value: 
     272$ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np[=3]{nn_mxl}{nn\_mxl} case, 
    271273the dissipation and mixing turbulent length scales are give as in \citet{gaspar.gregoris.ea_JGR90}: 
    272274\[ 
     
    312314$\alpha_{CB} = 100$ the Craig and Banner's value. 
    313315As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$, 
    314 with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter, setting \np{rn_ebb}{rn\_ebb}\forcode{ = 67.83} corresponds 
     316with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter, setting \np[=67.83]{rn_ebb}{rn\_ebb} corresponds 
    315317to $\alpha_{CB} = 100$. 
    316 Further setting  \np{ln_mxl0}{ln\_mxl0}\forcode{ =.true.},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale, 
     318Further setting  \np[=.true.]{ln_mxl0}{ln\_mxl0},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale, 
    317319with $\beta$ hard coded to the Stacey's value. 
    318320Note that a minimal threshold of \np{rn_emin0}{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the 
     
    385387(\ie\ near-inertial oscillations and ocean swells and waves). 
    386388 
    387 When using this parameterization (\ie\ when \np{nn_etau}{nn\_etau}\forcode{=1}), 
     389When using this parameterization (\ie\ when \np[=1]{nn_etau}{nn\_etau}), 
    388390the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations, 
    389391swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, 
     
    398400(no penetration if $f_i=1$, \ie\ if the ocean is entirely covered by sea-ice). 
    399401The value of $f_r$, usually a few percents, is specified through \np{rn_efr}{rn\_efr} namelist parameter. 
    400 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn_etau}{nn\_etau}\forcode{=0}) or 
     402The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np[=0]{nn_etau}{nn\_etau}) or 
    401403a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes 
    402 (\np{nn_etau}{nn\_etau}\forcode{=1}). 
    403  
    404 Note that two other option exist, \np{nn_etau}{nn\_etau}\forcode{=2, 3}. 
     404(\np[=1]{nn_etau}{nn\_etau}). 
     405 
     406Note that two other option exist, \np[=2, 3]{nn_etau}{nn\_etau}. 
    405407They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, 
    406408or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrates the ocean. 
     
    508510  \caption[Set of predefined GLS parameters or equivalently predefined turbulence models available]{ 
    509511    Set of predefined GLS parameters, or equivalently predefined turbulence models available with 
    510     \protect\np{ln_zdfgls}{ln\_zdfgls}\forcode{=.true.} and controlled by 
     512    \protect\np[=.true.]{ln_zdfgls}{ln\_zdfgls} and controlled by 
    511513    the \protect\np{nn_clos}{nn\_clos} namelist variable in \protect\nam{zdf_gls}{zdf\_gls}.} 
    512514  \label{tab:ZDF_GLS} 
     
    519521$C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{galperin.kantha.ea_JAS88}, 
    520522or by \citet{kantha.clayson_JGR94} or one of the two functions suggested by \citet{canuto.howard.ea_JPO01} 
    521 (\np{nn_stab_func}{nn\_stab\_func}\forcode{=0, 3}, resp.). 
     523(\np[=0, 3]{nn_stab_func}{nn\_stab\_func}, resp.). 
    522524The value of $C_{0\mu}$ depends on the choice of the stability function. 
    523525 
     
    525527Neumann condition through \np{nn_bc_surf}{nn\_bc\_surf} and \np{nn_bc_bot}{nn\_bc\_bot}, resp. 
    526528As for TKE closure, the wave effect on the mixing is considered when 
    527 \np{rn_crban}{rn\_crban}\forcode{ > 0.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}. 
     529\np[ > 0.]{rn_crban}{rn\_crban} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}. 
    528530The \np{rn_crban}{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and 
    529531\np{rn_charn}{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 
     
    536538the entrainment depth predicted in stably stratified situations, 
    537539and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes. 
    538 The clipping is only activated if \np{ln_length_lim}{ln\_length\_lim}\forcode{=.true.}, 
     540The clipping is only activated if \np[=.true.]{ln_length_lim}{ln\_length\_lim}, 
    539541and the $c_{lim}$ is set to the \np{rn_clim_galp}{rn\_clim\_galp} value. 
    540542 
     
    707709 
    708710Options are defined through the \nam{zdf}{zdf} namelist variables. 
    709 The non-penetrative convective adjustment is used when \np{ln_zdfnpc}{ln\_zdfnpc}\forcode{=.true.}. 
     711The non-penetrative convective adjustment is used when \np[=.true.]{ln_zdfnpc}{ln\_zdfnpc}. 
    710712It is applied at each \np{nn_npc}{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 
    711713the water column, but only until the density structure becomes neutrally stable 
     
    751753 
    752754Options are defined through the  \nam{zdf}{zdf} namelist variables. 
    753 The enhanced vertical diffusion parameterisation is used when \np{ln_zdfevd}{ln\_zdfevd}\forcode{=.true.}. 
     755The enhanced vertical diffusion parameterisation is used when \np[=.true.]{ln_zdfevd}{ln\_zdfevd}. 
    754756In this case, the vertical eddy mixing coefficients are assigned very large values 
    755757in regions where the stratification is unstable 
    756758(\ie\ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}. 
    757 This is done either on tracers only (\np{nn_evdm}{nn\_evdm}\forcode{=0}) or 
    758 on both momentum and tracers (\np{nn_evdm}{nn\_evdm}\forcode{=1}). 
    759  
    760 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn_evdm}{nn\_evdm}\forcode{=1}, 
     759This is done either on tracers only (\np[=0]{nn_evdm}{nn\_evdm}) or 
     760on both momentum and tracers (\np[=1]{nn_evdm}{nn\_evdm}). 
     761 
     762In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np[=1]{nn_evdm}{nn\_evdm}, 
    761763the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to 
    762764the namelist parameter \np{rn_avevd}{rn\_avevd}. 
     
    795797The OSMOSIS turbulent closure scheme already includes enhanced vertical diffusion in the case of convection, 
    796798%as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp}, 
    797 therefore \np{ln_zdfevd}{ln\_zdfevd}\forcode{=.false.} should be used with the OSMOSIS scheme. 
     799therefore \np[=.false.]{ln_zdfevd}{ln\_zdfevd} should be used with the OSMOSIS scheme. 
    798800% gm%  + one word on non local flux with KPP scheme trakpp.F90 module... 
    799801 
     
    10021004    c_b^T = - r 
    10031005\] 
    1004 When \np{ln_lin}{ln\_lin} \forcode{= .true.}, the value of $r$ used is \np{rn_Uc0}{rn\_Uc0}*\np{rn_Cd0}{rn\_Cd0}. 
    1005 Setting \np{ln_OFF}{ln\_OFF} \forcode{= .true.} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition. 
     1006When \np[=.true.]{ln_lin}{ln\_lin}, the value of $r$ used is \np{rn_Uc0}{rn\_Uc0}*\np{rn_Cd0}{rn\_Cd0}. 
     1007Setting \np[=.true.]{ln_OFF}{ln\_OFF} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition. 
    10061008 
    10071009These values are assigned in \mdl{zdfdrg}. 
    10081010Note that there is support for local enhancement of these values via an externally defined 2D mask array 
    1009 (\np{ln_boost}{ln\_boost}\forcode{=.true.}) given in the \ifile{bfr\_coef} input NetCDF file. 
     1011(\np[=.true.]{ln_boost}{ln\_boost}) given in the \ifile{bfr\_coef} input NetCDF file. 
    10101012The mask values should vary from 0 to 1. 
    10111013Locations with a non-zero mask value will have the friction coefficient increased by 
     
    10431045$C_D$= \np{rn_Cd0}{rn\_Cd0}, and $e_b$ =\np{rn_bfeb2}{rn\_bfeb2}. 
    10441046Note that for applications which consider tides explicitly, a low or even zero value of \np{rn_bfeb2}{rn\_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array 
    1045 (\np{ln_boost}{ln\_boost}\forcode{=.true.}). 
     1047(\np[=.true.]{ln_boost}{ln\_boost}). 
    10461048This works in the same way as for the linear friction case with non-zero masked locations increased by 
    10471049$mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}. 
     
    10551057In the non-linear friction case, the drag coefficient, $C_D$, can be optionally enhanced using 
    10561058a "law of the wall" scaling. This assumes that the model vertical resolution can capture the logarithmic layer which typically occur for layers thinner than 1 m or so. 
    1057 If  \np{ln_loglayer}{ln\_loglayer} \forcode{= .true.}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness): 
     1059If  \np[=.true.]{ln_loglayer}{ln\_loglayer}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness): 
    10581060\[ 
    10591061  C_D = \left ( {\kappa \over {\mathrm log}\left ( 0.5 \; e_{3b} / rn\_{z0} \right ) } \right )^2 
     
    10701072 
    10711073\noindent The log-layer enhancement can also be applied to the top boundary friction if 
    1072 under ice-shelf cavities are activated (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.}). 
     1074under ice-shelf cavities are activated (\np[=.true.]{ln_isfcav}{ln\_isfcav}). 
    10731075%In this case, the relevant namelist parameters are \np{rn_tfrz0}{rn\_tfrz0}, \np{rn_tfri2}{rn\_tfri2} and \np{rn_tfri2_max}{rn\_tfri2\_max}. 
    10741076 
     
    10761078%       Explicit bottom Friction 
    10771079% ------------------------------------------------------------------------------------------------------------- 
    1078 \subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np{ln_drgimp}{ln\_drgimp}\forcode{=.false.})} 
     1080\subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np[=.false.]{ln_drgimp}{ln\_drgimp})} 
    10791081\label{subsec:ZDF_drg_stability} 
    10801082 
    1081 Setting \np{ln_drgimp}{ln\_drgimp} \forcode{= .false.} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 
     1083Setting \np[=.false.]{ln_drgimp}{ln\_drgimp} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 
    10821084 
    10831085At the top (below an ice shelf cavity): 
     
    11371139%       Implicit Bottom Friction 
    11381140% ------------------------------------------------------------------------------------------------------------- 
    1139 \subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np{ln_drgimp}{ln\_drgimp}\forcode{=.true.})} 
     1141\subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np[=.true.]{ln_drgimp}{ln\_drgimp})} 
    11401142\label{subsec:ZDF_drg_imp} 
    11411143 
     
    11701172\label{subsec:ZDF_drg_ts} 
    11711173 
    1172 With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln_drgimp}{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw=.false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln_drgimp}{ln\_drgimp}\forcode{= .true.},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 
     1174With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np[=.false.]{ln_drgimp}{ln\_drgimp} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw=.false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np[=.true.]{ln_drgimp}{ln\_drgimp},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 
    11731175 
    11741176The strategy to handle top/bottom stresses with split-explicit free surface in \NEMO\ is as follows: 
     
    15081510% ================================================================ 
    15091511 
    1510 \biblio 
    1511  
    1512 \pindex 
     1512\onlyinsubfile{\bibliography{../main/bibliography}} 
     1513 
     1514\onlyinsubfile{\printindex} 
    15131515 
    15141516\end{document} 
Note: See TracChangeset for help on using the changeset viewer.