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_LDF.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_LDF.tex

    r11578 r11582  
    11\documentclass[../main/NEMO_manual]{subfiles} 
     2 
     3\onlyinsubfile{\makeindex} 
    24 
    35\begin{document} 
     
    2426(see the \nam{tra_ldf}{tra\_ldf} and \nam{dyn_ldf}{dyn\_ldf} below). 
    2527Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 
    26 Griffies's implementation, which is used if \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.true.}, 
     28Griffies's implementation, which is used if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}, 
    2729is described in \autoref{apdx:TRIADS} 
    2830 
     
    4042\subsection[No lateral mixing (\forcode{ln_traldf_OFF} \& \forcode{ln_dynldf_OFF})]{No lateral mixing (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF} \& \protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF})} 
    4143 
    42 It is possible to run without explicit lateral diffusion on tracers (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF}\forcode{=.true.}) and/or 
    43 momentum (\protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF}\forcode{=.true.}). The latter option is even recommended if using the 
    44 UBS advection scheme on momentum (\np{ln_dynadv_ubs}{ln\_dynadv\_ubs}\forcode{=.true.}, 
     44It is possible to run without explicit lateral diffusion on tracers (\protect\np[=.true.]{ln_traldf_OFF}{ln\_traldf\_OFF}) and/or 
     45momentum (\protect\np[=.true.]{ln_dynldf_OFF}{ln\_dynldf\_OFF}). The latter option is even recommended if using the 
     46UBS advection scheme on momentum (\np[=.true.]{ln_dynadv_ubs}{ln\_dynadv\_ubs}, 
    4547see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes. 
    4648 
    4749\subsection[Laplacian mixing (\forcode{ln_traldf_lap} \& \forcode{ln_dynldf_lap})]{Laplacian mixing (\protect\np{ln_traldf_lap}{ln\_traldf\_lap} \& \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})} 
    48 Setting \protect\np{ln_traldf_lap}{ln\_traldf\_lap}\forcode{=.true.} and/or \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap}\forcode{=.true.} enables 
     50Setting \protect\np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap} and/or \protect\np[=.true.]{ln_dynldf_lap}{ln\_dynldf\_lap} enables 
    4951a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 
    5052Laplacian and Bilaplacian operators for the same variable. 
    5153 
    5254\subsection[Bilaplacian mixing (\forcode{ln_traldf_blp} \& \forcode{ln_dynldf_blp})]{Bilaplacian mixing (\protect\np{ln_traldf_blp}{ln\_traldf\_blp} \& \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp})} 
    53 Setting \protect\np{ln_traldf_blp}{ln\_traldf\_blp}\forcode{=.true.} and/or \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp}\forcode{=.true.} enables 
     55Setting \protect\np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp} and/or \protect\np[=.true.]{ln_dynldf_blp}{ln\_dynldf\_blp} enables 
    5456a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 
    5557We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 
     
    107109%gm%  caution I'm not sure the simplification was a good idea! 
    108110 
    109 These slopes are computed once in \rou{ldf\_slp\_init} when \np{ln_sco}{ln\_sco}\forcode{=.true.}, 
    110 and either \np{ln_traldf_hor}{ln\_traldf\_hor}\forcode{=.true.} or \np{ln_dynldf_hor}{ln\_dynldf\_hor}\forcode{=.true.}. 
     111These slopes are computed once in \rou{ldf\_slp\_init} when \np[=.true.]{ln_sco}{ln\_sco}, 
     112and either \np[=.true.]{ln_traldf_hor}{ln\_traldf\_hor} or \np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}. 
    111113 
    112114\subsection{Slopes for tracer iso-neutral mixing} 
     
    164166\item[$s$- or hybrid $s$-$z$- coordinate: ] 
    165167  in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 
    166   the Griffies scheme is used (\np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.true.}; 
     168  the Griffies scheme is used (\np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}; 
    167169  see \autoref{apdx:TRIADS}). 
    168170  In other words, iso-neutral mixing will only be accurately represented with a linear equation of state 
    169   (\np{ln_seos}{ln\_seos}\forcode{=.true.}). 
     171  (\np[=.true.]{ln_seos}{ln\_seos}). 
    170172  In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:LDF_slp_iso} 
    171173  will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. 
     
    222224To overcome this problem, several techniques have been proposed in which the numerical schemes of 
    223225the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 
    224 Griffies's scheme is now available in \NEMO\ if \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:TRIADS}. 
     226Griffies's scheme is now available in \NEMO\ if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}; see \autoref{apdx:TRIADS}. 
    225227Here, another strategy is presented \citep{lazar_phd97}: 
    226228a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of 
     
    326328The way the mixing coefficients are set in the reference version can be described as follows: 
    327329 
    328 \subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20, -30} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20, -30})} 
     330\subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np[=-20, -30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=-20, -30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    329331 
    330332Mixing coefficients can be read from file if a particular geographical variation is needed. For example, in the ORCA2 global ocean model, 
     
    332334decreases linearly to $A^l$~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}. 
    333335Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of ORCA2 and ORCA05. 
    334 The provided fields can either be 2d (\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20}, \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20}) or 3d (\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-30},  \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-30}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 
     336The provided fields can either be 2d (\np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}, \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}) or 3d (\np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t},  \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 
    335337 
    336338%-------------------------------------------------TABLE--------------------------------------------------- 
     
    340342    \hline 
    341343    Namelist parameter                       & Input filename                               & dimensions & variable names                      \\  \hline 
    342     \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20}      & \forcode{eddy_viscosity_2D.nc }            &     $(i,j)$         & \forcode{ahmt_2d, ahmf_2d}  \\  \hline 
    343     \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20}           & \forcode{eddy_diffusivity_2D.nc }           &     $(i,j)$         & \forcode{ahtu_2d, ahtv_2d}    \\   \hline 
    344     \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-30}      & \forcode{eddy_viscosity_3D.nc }            &     $(i,j,k)$          & \forcode{ahmt_3d, ahmf_3d}  \\  \hline 
    345     \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-30}      & \forcode{eddy_diffusivity_3D.nc }           &     $(i,j,k)$         & \forcode{ahtu_3d, ahtv_3d}    \\   \hline 
     344    \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}     & \forcode{eddy_viscosity_2D.nc }            &     $(i,j)$         & \forcode{ahmt_2d, ahmf_2d}  \\  \hline 
     345    \np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}           & \forcode{eddy_diffusivity_2D.nc }           &     $(i,j)$           & \forcode{ahtu_2d, ahtv_2d}    \\   \hline 
     346    \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}        & \forcode{eddy_viscosity_3D.nc }            &     $(i,j,k)$          & \forcode{ahmt_3d, ahmf_3d}  \\  \hline 
     347    \np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}     & \forcode{eddy_diffusivity_3D.nc }           &     $(i,j,k)$         & \forcode{ahtu_3d, ahtv_3d}    \\   \hline 
    346348  \end{tabular} 
    347349  \caption{Description of expected input files if mixing coefficients are read from NetCDF files} 
     
    350352%-------------------------------------------------------------------------------------------------------------- 
    351353 
    352 \subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=0} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=0})} 
     354\subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np[=0]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=0]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    353355 
    354356If constant, mixing coefficients are set thanks to a velocity and a length scales ($U_{scl}$, $L_{scl}$) such that: 
     
    366368 $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}, \np{rn_Ld}{rn\_Ld} and \np{rn_Lv}{rn\_Lv}. 
    367369 
    368 \subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=10} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=10})} 
     370\subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np[=10]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=10]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    369371 
    370372In the vertically varying case, a hyperbolic variation of the lateral mixing coefficient is introduced in which 
     
    373375This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users. 
    374376 
    375 \subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=20} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=20})} 
     377\subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np[=20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    376378 
    377379In that case, the horizontal variation of the eddy coefficient depends on the local mesh size and 
     
    398400\colorbox{yellow}{CASE \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} = 21 to be added} 
    399401 
    400 \subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=30} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=30})} 
     402\subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np[=30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    401403 
    402404The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 
     
    404406the magnitude of the coefficient. 
    405407 
    406 \subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=31} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=31})} 
     408\subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np[=31]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=31]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    407409In that case, the eddy coefficient is proportional to the local velocity magnitude so that the Reynolds number $Re =  \lvert U \rvert  e / A_l$ is constant (and here hardcoded to $12$): 
    408410\colorbox{yellow}{JC comment: The Reynolds is effectively set to 12 in the code for both operators but shouldn't it be 2 for Laplacian ?} 
     
    418420\end{equation} 
    419421 
    420 \subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=32})} 
     422\subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np[=32]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    421423 
    422424This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a 
     
    505507} 
    506508 
    507 When  \citet{gent.mcwilliams_JPO90} diffusion is used (\np{ln_ldfeiv}{ln\_ldfeiv}\forcode{=.true.}), 
     509When  \citet{gent.mcwilliams_JPO90} diffusion is used (\np[=.true.]{ln_ldfeiv}{ln\_ldfeiv}), 
    508510an eddy induced tracer advection term is added, 
    509511the formulation of which depends on the slopes of iso-neutral surfaces. 
     
    512514and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $s$-coordinates. 
    513515 
    514 If isopycnal mixing is used in the standard way, \ie\ \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.false.}, the eddy induced velocity is given by: 
     516If isopycnal mixing is used in the standard way, \ie\ \np[=.false.]{ln_traldf_triad}{ln\_traldf\_triad}, the eddy induced velocity is given by: 
    515517\begin{equation} 
    516518  \label{eq:LDF_eiv} 
     
    536538\colorbox{yellow}{CASE \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} = 21 to be added} 
    537539 
    538 In case of setting \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{ = .true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. 
     540In case of setting \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. 
    539541 
    540542% ================================================================ 
     
    554556%-------------------------------------------------------------------------------------------------------------- 
    555557 
    556 If  \np{ln_mle}{ln\_mle}\forcode{=.true.} in \nam{tra_mle}{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
     558If  \np[=.true.]{ln_mle}{ln\_mle} in \nam{tra_mle}{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
    557559 
    558560\colorbox{yellow}{TBC} 
    559561 
    560 \biblio 
    561  
    562 \pindex 
     562\onlyinsubfile{\bibliography{../main/bibliography}} 
     563 
     564\onlyinsubfile{\printindex} 
    563565 
    564566\end{document} 
Note: See TracChangeset for help on using the changeset viewer.