Index: branches/UKMO/nemo_v3_6_STABLE_copy/DOC/TexFiles/Chapters/Chap_DOM.tex
===================================================================
--- branches/UKMO/nemo_v3_6_STABLE_copy/DOC/TexFiles/Chapters/Chap_DOM.tex	(revision 5780)
+++ branches/UKMO/nemo_v3_6_STABLE_copy/DOC/TexFiles/Chapters/Chap_DOM.tex	(revision 6436)
@@ -1,4 +1,4 @@
 % ================================================================
-% Chapter 2 � Space and Time Domain (DOM)
+% Chapter 2 ——— Space and Time Domain (DOM)
 % ================================================================
 \chapter{Space Domain (DOM) }
@@ -138,5 +138,5 @@
 and $f$-points, and its divergence defined at $t$-points:
 \begin{eqnarray}  \label{Eq_DOM_curl}
- \nabla \times {\rm {\bf A}}\equiv &
+ \nabla \times {\rm{\bf A}}\equiv &
       \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right)  &\ \mathbf{i} \\ 
  +& \frac{1}{e_{2u}\,e_{3uw}} \ \left( \delta_{k+1/2} \left[e_{1u}\,a_1  \right] -\delta_{i +1/2} \left[e_{3w}\,a_3 \right] \right)  &\ \mathbf{j} \\
@@ -183,6 +183,6 @@
 Let $a$ and $b$ be two fields defined on the mesh, with value zero inside 
 continental area. Using integration by parts it can be shown that the differencing 
-operators ($\delta_i$, $\delta_j$ and $\delta_k$) are anti-symmetric linear 
-operators, and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$, 
+operators ($\delta_i$, $\delta_j$ and $\delta_k$) are skew-symmetric linear operators, 
+and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$, 
 $\overline{\,\cdot\,}^{\,k}$ and $\overline{\,\cdot\,}^{\,k}$) are symmetric linear 
 operators, $i.e.$
@@ -364,5 +364,5 @@
 For both grids here,  the same $w$-point depth has been chosen but in (a) the 
 $t$-points are set half way between $w$-points while in (b) they are defined from 
-an analytical function: $z(k)=5\,(i-1/2)^3 - 45\,(i-1/2)^2 + 140\,(i-1/2) - 150$. 
+an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. 
 Note the resulting difference between the value of the grid-size $\Delta_k$ and 
 those of the scale factor $e_k$. }
@@ -425,5 +425,5 @@
 
 The choice of the grid must be consistent with the boundary conditions specified 
-by the parameter \np{jperio} (see {\S\ref{LBC}).
+by \np{jperio}, a parameter found in \ngn{namcfg} namelist (see {\S\ref{LBC}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -481,5 +481,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-The choice of a vertical coordinate, even if it is made through a namelist parameter, 
+The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters, 
 must be done once of all at the beginning of an experiment. It is not intended as an 
 option which can be enabled or disabled in the middle of an experiment. Three main 
@@ -494,9 +494,10 @@
 bathymetry or $s$-coordinate (hybrid and partial step coordinates have not 
 yet been tested in NEMO v2.3). If using $z$-coordinate with partial step bathymetry
-(\np{ln\_zps}~=~true), ocean cavity beneath ice shelves can be open (\np{ln\_isfcav}~=~true).
+(\np{ln\_zps}~=~true), ocean cavity beneath ice shelves can be open (\np{ln\_isfcav}~=~true) 
+and partial step are also applied at the ocean/ice shelf interface. 
 
 Contrary to the horizontal grid, the vertical grid is computed in the code and no 
 provision is made for reading it from a file. The only input file is the bathymetry 
-(in meters) (\ifile{bathy\_meter}) 
+(in meters) (\ifile{bathy\_meter}). 
 \footnote{N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the 
 \ifile{bathy\_meter} file, so that the computation of the number of wet ocean point 
@@ -540,5 +541,5 @@
 
 Three options are possible for defining the bathymetry, according to the 
-namelist variable \np{nn\_bathy}: 
+namelist variable \np{nn\_bathy} (found in \ngn{namdom} namelist): 
 \begin{description}
 \item[\np{nn\_bathy} = 0] a flat-bottom domain is defined. The total depth $z_w (jpk)$ 
@@ -548,10 +549,14 @@
 domain width at the central latitude. This is meant for the "EEL-R5" configuration, 
 a periodic or open boundary channel with a seamount. 
-\item[\np{nn\_bathy} = 1] read a bathymetry. 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 
+\item[\np{nn\_bathy} = 1] read a bathymetry and ice shelf draft (if needed).
+ 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 
 ($e.g.$ ETOPO2) onto the horizontal ocean mesh. Defining the bathymetry also 
 defines the coastline: where the bathymetry is zero, no model levels are defined 
 (all levels are masked).
+
+The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters)
+ at each grid point of the model grid. This file is only needed if \np{ln\_isfcav}~=~true. 
+Defining the ice shelf draft will also define the ice shelf edge and the grounding line position.
 \end{description}
 
@@ -610,4 +615,16 @@
 (Fig.~\ref{Fig_zgr}).
 
+If the ice shelf cavities are opened (\np{ln\_isfcav}=~true~}), the definition of $z_0$ is the same. 
+However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to:
+\begin{equation} \label{DOM_zgr_ana}
+\begin{split}
+ e_3^T(k) &= z_W (k+1) - z_W (k)   \\
+ e_3^W(k) &= z_T (k)   - z_T (k-1) \\
+\end{split}
+\end{equation}
+This formulation decrease the self-generated circulation into the ice shelf cavity 
+(which can, in extreme case, leads to blow up).\\
+
+ 
 The most used vertical grid for ORCA2 has $10~m$ ($500~m)$ resolution in the 
 surface (bottom) layers and a depth which varies from 0 at the sea surface to a 
@@ -721,5 +738,5 @@
 usually 10\%, of the default thickness $e_{3t}(jk)$).
 
- \colorbox{yellow}{Add a figure here of pstep especially at last ocean level }
+\gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level }  }
 
 % -------------------------------------------------------------------------------------------------------------
@@ -860,23 +877,35 @@
 gives the number of ocean levels ($i.e.$ those that are not masked) at each 
 $t$-point. mbathy is computed from the meter bathymetry using the definiton of 
-gdept as the number of $t$-points which gdept $\leq$ bathy. 
+gdept as the number of $t$-points which gdept $\leq$ bathy.
 
 Modifications of the model bathymetry are performed in the \textit{bat\_ctl} 
 routine (see \mdl{domzgr} module) after mbathy is computed. Isolated grid points 
-that do not communicate with another ocean point at the same level are eliminated.
+that do not communicate with another ocean point at the same level are eliminated.\\
+
+As for the representation of bathymetry, a 2D integer array, misfdep, is created. 
+misfdep defines the level of the first wet $t$-point. All the cells between $k=1$ and $misfdep(i,j)-1$ are masked. 
+By default, misfdep(:,:)=1 and no cells are masked.
+
+In case of ice shelf cavities (\np{ln\_isfcav}~=~true), modifications of the model bathymetry and ice shelf draft in 
+the cavities are performed through the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked: 
+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 have a 2-level water column 
+(i.e. two unmasked levels). If the incompatibility is too strong (i.e. need to dig more than one cell), the entire water column is masked.\\ 
 
 From the \textit{mbathy} array, the mask fields are defined as follows:
 \begin{align*}
-tmask(i,j,k) &= \begin{cases}   \; 1&   \text{ if $k\leq mbathy(i,j)$  }    \\
-                                                \; 0&   \text{ if $k\leq mbathy(i,j)$  }    \end{cases}     \\
+tmask(i,j,k) &= \begin{cases}   \; 0&   \text{ if $k < misfdep(i,j) $ } \\
+                                \; 1&   \text{ if $misfdep(i,j) \leq k\leq mbathy(i,j)$  }    \\
+                                \; 0&   \text{ if $k > mbathy(i,j)$  }    \end{cases}     \\
 umask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i+1,j,k)	\\
 vmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j+1,k)	\\
 fmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i+1,j,k)	\\
-                   & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k)
+                   & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\
+wmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1) 
 \end{align*}
 
-Note that \textit{wmask} is not defined as it is exactly equal to \textit{tmask} with 
-the numerical indexing used (\S~\ref{DOM_Num_Index}). Moreover, the 
-specification of closed lateral boundaries requires that at least the first and last 
+Note, wmask is now defined. It allows, in case of ice shelves, 
+to deal with the top boundary (ice shelf/ocean interface) exactly in the same way as for the bottom boundary. 
+
+The specification of closed lateral boundaries requires that at least the first and last 
 rows and columns of the \textit{mbathy} array are set to zero. In the particular 
 case of an east-west cyclical boundary condition, \textit{mbathy} has its last 
