Index: NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex
===================================================================
--- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex	(revision 11353)
+++ NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex	(revision 11512)
@@ -8,5 +8,5 @@
 \label{apdx:DOMAINcfg}
 
-\minitoc
+\chaptertoc
 \vfill
 \begin{figure}[b]
@@ -25,6 +25,6 @@
 
 This tool will evolve into an independent utility with its own documentation but its
-current manifestation is mostly a wrapper for \NEMO \forcode{DOM} modules more aligned to
-those in the previous versions of NEMO. These versions allowed the user to define some
+current manifestation is mostly a wrapper for \NEMO\ \forcode{DOM} modules more aligned to
+those in the previous versions of \NEMO. These versions allowed the user to define some
 horizontal and vertical grids through additional namelist parameters. Explanations of
 these parameters are retained here for reference pending better documentation for
@@ -32,5 +32,5 @@
 those read by \forcode{DOMAINcfg} via its own \forcode{namelist_ref} and
 \forcode{namelist_cfg} files. Although, due to their origins, these namelists share names
-with those used by NEMO, they are not interchangeable and should be considered independent
+with those used by \NEMO, they are not interchangeable and should be considered independent
 of those described elsewhere in this manual.
 
@@ -43,9 +43,9 @@
 %--------------------------------------------namdom-------------------------------------------------------
 
-\nlst{namdom_domcfg} 
+\nlst{namdom_domcfg}
 %--------------------------------------------------------------------------------------------------------------
 
 The user has three options available in defining a horizontal grid, which involve the
-namelist variable \np{jphgr\_mesh} of the \ngn{namdom} (\forcode{DOMAINcfg} variant only)
+namelist variable \np{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only)
 namelist.
 
@@ -54,47 +54,47 @@
   The coordinates and their first derivatives with respect to $i$ and $j$ are provided
   in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module.
-  This is now the only option available within \NEMO itself from v4.0 onwards.
-\item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 
-  For other analytical grids, the \textit{domhgr.f90} module (\forcode{DOMAINcfg} variant) must be 
-  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO is
-  a better alternative since this is designed to allow simple analytical domains to be 
+  This is now the only option available within \NEMO\ itself from v4.0 onwards.
+\item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below).
+  For other analytical grids, the \mdl{domhgr} module (\texttt{DOMAINcfg} variant) must be
+  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO\ is
+  a better alternative since this is designed to allow simple analytical domains to be
   configured and used without the need for external data files.
 \end{description}
 
-There are two simple cases of geographical grids on the sphere. With 
-\np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 
-with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 
-respectively. Such a geographical grid can be very anisotropic at high latitudes 
-because of the convergence of meridians (the zonal scale factors $e_1$ 
-become much smaller than the meridional scale factors $e_2$). The Mercator 
-grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 
-factors in the same way as the zonal ones. In this case, meridional scale factors 
-and latitudes are calculated analytically using the formulae appropriate for 
-a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 
-at the equator (this applies even when the geographical equator is situated outside 
-the model domain). 
-
-In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 
-longitude and latitude of the south-westernmost point (\np{ppglamt0} 
-and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 
-an approximate starting latitude: the real latitude will be recalculated analytically, 
-in order to ensure that the equator corresponds to line passing through $t$- 
-and $u$-points.  
-
-Rectangular grids ignoring the spherical geometry are defined with 
-\np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 
-Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 
-is linear in the $j$-direction). The grid size is uniform in meter in each direction, 
-and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 
-The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 
-with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 
-and the second $t$-point corresponds to coordinate $gphit=0$. The input 
-variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference 
-latitude for computation of the Coriolis parameter. In the case of the beta plane, 
-\np{ppgphi0} corresponds to the center of the domain. Finally, the special case 
-\np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 
-GYRE configuration, representing a classical mid-latitude double gyre system. 
-The rotation allows us to maximize the jet length relative to the gyre areas 
-(and the number of grid points). 
+There are two simple cases of geographical grids on the sphere. With
+\np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space,
+with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg},
+respectively. Such a geographical grid can be very anisotropic at high latitudes
+because of the convergence of meridians (the zonal scale factors $e_1$
+become much smaller than the meridional scale factors $e_2$). The Mercator
+grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale
+factors in the same way as the zonal ones. In this case, meridional scale factors
+and latitudes are calculated analytically using the formulae appropriate for
+a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing
+at the equator (this applies even when the geographical equator is situated outside
+the model domain).
+
+In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the
+longitude and latitude of the south-westernmost point (\np{ppglamt0}
+and \np{ppgphi0}). Note that for the Mercator grid the user need only provide
+an approximate starting latitude: the real latitude will be recalculated analytically,
+in order to ensure that the equator corresponds to line passing through $t$-
+and $u$-points.
+
+Rectangular grids ignoring the spherical geometry are defined with
+\np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2,
+Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor
+is linear in the $j$-direction). The grid size is uniform in meter in each direction,
+and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively.
+The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero
+with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers,
+and the second $t$-point corresponds to coordinate $gphit=0$. The input
+variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference
+latitude for computation of the Coriolis parameter. In the case of the beta plane,
+\np{ppgphi0} corresponds to the center of the domain. Finally, the special case
+\np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the
+GYRE configuration, representing a classical mid-latitude double gyre system.
+The rotation allows us to maximize the jet length relative to the gyre areas
+(and the number of grid points).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -128,6 +128,6 @@
 the vertical scale factors.  The user must provide the analytical expression of both $z_0$
 and its first derivative with respect to $k$.  This is done in routine \mdl{domzgr}
-through statement functions, using parameters provided in the \ngn{namdom} namelist
-(\forcode{DOMAINcfg} variant).
+through statement functions, using parameters provided in the \nam{dom} namelist
+(\texttt{DOMAINcfg} variant).
 
 It is possible to define a simple regular vertical grid by giving zero stretching
@@ -156,5 +156,5 @@
     \begin{split}
     z_0  (k) = h_{sur} - h_0 \; k &- \; h_1 \; \log  \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\
-                             \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big] 
+                             \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big]
     \end{split}
 \end{gather}
@@ -177,5 +177,5 @@
 \end{equation}
 
-This formulation decreases the self-generated circulation into the ice shelf cavity 
+This formulation decreases the self-generated circulation into the ice shelf cavity
 (which can, in extreme case, leads to numerical instability). This is now the recommended formulation for all configurations using v4.0 onwards. The analytical derivation of thicknesses is maintained for backwards compatibility.
 
@@ -200,9 +200,9 @@
 The resulting depths and scale factors as a function of the model levels are shown in
 \autoref{fig:DOMCFG_zgr} and given in \autoref{tab:DOMCFG_orca_zgr}.
-Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist.
+Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \nam{cfg} namelist.
 
 Rather than entering parameters $h_{sur}$, $h_0$, and $h_1$ directly, it is possible to
 recalculate them.  In that case the user sets \np{ppsur}~$=$~\np{ppa0}~$=$~\np{ppa1}~$=
-999999$., in \ngn{namcfg} namelist, and specifies instead the four following parameters:
+999999$., in \nam{cfg} namelist, and specifies instead the four following parameters:
 \begin{itemize}
 \item
@@ -309,5 +309,5 @@
 
 Three options are possible for defining the bathymetry, according to the namelist variable
-\np{nn\_bathy} (found in \ngn{namdom} namelist (\forcode{DOMAINCFG} variant) ):
+\np{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ):
 \begin{description}
 \item[\np{nn\_bathy}\forcode{ = 0}]:
@@ -322,5 +322,5 @@
   The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at
   each grid point of the model grid.
-  The bathymetry is usually built by interpolating a standard bathymetry product (\eg ETOPO2) onto
+  The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto
   the horizontal ocean mesh.
   Defining the bathymetry also defines the coastline: where the bathymetry is zero,
@@ -352,5 +352,5 @@
 \end{description}
 %%%
- 
+
 % -------------------------------------------------------------------------------------------------------------
 %        z-coordinate with constant thickness
@@ -386,6 +386,6 @@
 thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$.
 
-This has to be kept in mind when specifying values in \ngn{namdom} namelist
-(\forcode{DOMMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps.
+This has to be kept in mind when specifying values in \nam{dom} namelist
+(\texttt{DOMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps.
 
 For example, with \np{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean
@@ -405,7 +405,7 @@
 %------------------------------------------nam_zgr_sco---------------------------------------------------
 %
-\nlst{namzgr_sco_domcfg} 
+\nlst{namzgr_sco_domcfg}
 %--------------------------------------------------------------------------------------------------------------
-Options are defined in \ngn{namzgr\_sco} (\forcode{DOMAINcfg} only).
+Options are defined in \nam{zgr\_sco} (\texttt{DOMAINcfg} only).
 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from
 the product of a depth field and either a stretching function or its derivative, respectively:
@@ -430,5 +430,5 @@
 but care must be taken to ensure that the vertical stretch used is appropriate for the application.
 
-The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true
+The original default \NEMO\ s-coordinate stretching is available if neither of the other options are specified as true
 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}).
 This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}:
@@ -555,5 +555,5 @@
 \label{subsec:DOMCFG_zgr_star}
 
-This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.
+This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site.
 
 \biblio
