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 1831 for branches/DEV_r1826_DOC/DOC/TexFiles/Chapters/Chap_MISC.tex – NEMO

Ignore:
Timestamp:
2010-04-12T16:59:59+02:00 (14 years ago)
Author:
gm
Message:

cover, namelist, rigid-lid, e3t, appendices, see ticket: #658

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1826_DOC/DOC/TexFiles/Chapters/Chap_MISC.tex

    r1225 r1831  
    22% Chapter Ñ Miscellaneous Topics 
    33% ================================================================ 
    4 \chapter{Miscellaneous Topics (xxx)} 
     4\chapter{Miscellaneous Topics} 
    55\label{MISC} 
    66\minitoc 
    77 
     8\newpage 
     9$\ $\newline    % force a new ligne 
     10 
    811% ================================================================ 
    912% Representation of Unresolved Straits 
     
    1215\label{MISC_strait} 
    1316 
    14 % In climate modeling, it is often necessary to allow water masses that are separated by land to exchange properties. This situation arises in models when the grid mesh is too coarse to resolve narrow passageways that in reality provide crucial connections between water masses. For example, coarse grid spacing typically closes off the Mediterranean from the Atlantic at the Straits of Gibraltar. In this case, it is important for climate models to include the effects of salty water entering the Atlantic from the Mediterranean. Likewise, it is important for the Mediterranean to replenish its supply of water from the Atlantic to balance the net evaporation occurring over the Mediterranean region.  
    15 % Same problem occurs as soon as important straits are not properly resolved by the mesh. For example it arises in ORCA 1/4\r{} in several straits of the Indonesian archipelago (Ombai, Lombok...). 
    16 % We describe here the three methods that can be used in \NEMO to handle such improperly resolved straits.  
    17 %The problem is resolved here by allowing the mixing of tracers and mass/volume between non-adjacent water columns at nominated regions within the model. Momentum is not mixed. The scheme conserves total tracer content, and total volume (the latter in $z*$- or $s*$-coordinate), and maintains compatibility between the tracer and mass/volume budgets.   
    18  
    19 % Note: such changes are so specific to a given configuration that no attempt has been made to set them in a generic way. Nevertheless, an example of how they can be set up is given in the ORCA2 configuration (\key{ORCA_R2}). 
     17In climate modeling, it often occurs that a crucial connections between water masses 
     18is broken as the grid mesh is too coarse to resolve narrow straits. For example, coarse  
     19grid spacing typically closes off the Mediterranean from the Atlantic at the Strait of  
     20Gibraltar. In this case, it is important for climate models to include the effects of salty  
     21water entering the Atlantic from the Mediterranean. Likewise, it is important for the  
     22Mediterranean to replenish its supply of water from the Atlantic to balance the net  
     23evaporation occurring over the Mediterranean region. This problem occurs even in  
     24eddy permitting simulations. For example, in ORCA 1/4\r{} several straits of the Indonesian  
     25archipelago (Ombai, Lombok...) are much narrow than even a single ocean grid-point. 
     26 
     27We describe briefly here the three methods that can be used in \NEMO to handle  
     28such improperly resolved straits. The first two consist of opening the strait by hand  
     29while ensuring that the mass exchanges through the strait are not too large by  
     30either artificially reducing the surface of the strait grid-cells or, locally increasing  
     31the lateral friction. In the third one, the strait is closed but exchanges of mass,  
     32heat and salt across the land are allowed. 
     33Note that such modifications are so specific to a given configuration that no attempt  
     34has been made to set them in a generic way. However, examples of how  
     35they can be set up is given in the ORCA 2\r{} and 0.5\r{} configurations (search for  
     36\key{ORCA\_R2} or \key{ORCA\_R05} in the code). 
    2037 
    2138% ------------------------------------------------------------------------------------------------------------- 
     
    2542\label{MISC_strait_hand} 
    2643 
    27 $\bullet$ reduced scale factor, also called partially open face (Hallberg, personnal communication 2006) 
    28 %also called partially open cell  or partial closed cells 
    29  
    30 $\bullet$ increase of the viscous boundary layer thickness by local increase of the fmask value at the coast 
    31  
    32 \colorbox{yellow}{Add a short description of scale factor changes staff and fmask increase} 
    33  
     44$\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement  
     45with the true mean width of the strait. (Fig.~\ref{Fig_MISC_strait_hand}). 
     46This technique is sometime called "partially open face" or "partially closed cells". 
     47The key issue here is only to reduce the faces of $T$-cell ($i.e.$ change the value  
     48of the horizontal scale factors at $u$- or $v$-point) but not the volume of the $T$-cell. 
     49Indeed, reducing the volume of strait $T$-cell can easily produce a numerical  
     50instability at that grid point that would require a reduction of the model time step. 
     51The changes associated with strait management are done in \mdl{domhgr},  
     52just after the definition or reading of the horizontal scale factors.  
     53 
     54$\bullet$ increase of the viscous boundary layer thickness by local increase of the  
     55fmask value at the coast (Fig.~\ref{Fig_MISC_strait_hand}). This is done in  
     56\mdl{dommsk} together with the setting of the coastal value of fmask  
     57(see Section \ref{LBC_coast}) 
    3458 
    3559%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    5175% Cross Land Advection  
    5276% ------------------------------------------------------------------------------------------------------------- 
    53 \subsection{Cross Land Advection (\textit{tracla} module)} 
     77\subsection{Cross Land Advection (\mdl{tracla})} 
    5478\label{MISC_strait_cla} 
    55  
    5679%--------------------------------------------namcla-------------------------------------------------------- 
    5780\namdisplay{namcla}  
     
    6083\colorbox{yellow}{Add a short description of CLA staff here or in lateral boundary condition chapter?} 
    6184 
     85%The problem is resolved here by allowing the mixing of tracers and mass/volume between non-adjacent water columns at nominated regions within the model. Momentum is not mixed. The scheme conserves total tracer content, and total volume (the latter in $z*$- or $s*$-coordinate), and maintains compatibility between the tracer and mass/volume budgets.   
     86 
    6287% ================================================================ 
    6388% Closed seas 
    6489% ================================================================ 
    65 \section{Closed seas} 
     90\section{Closed seas (\mdl{closea})} 
    6691\label{MISC_closea} 
     92 
     93\colorbox{yellow}{Add here a short description of the way closed seas are managed} 
    6794 
    6895 
     
    81108model configuration while having a small computer memory requirement.  
    82109It can also be used to easily test specific physics in a sub-domain (for example,  
    83 see \citep{Madec1996} for a test of the coupling used in the global ocean  
     110see \citep{Madec_al_JPO96} for a test of the coupling used in the global ocean  
    84111version of OPA between sea-ice and ocean model over the Arctic or Antarctic  
    85112ocean, using a sub-domain). In the standard model, this option does not  
     
    120147\label{MISC_1D} 
    121148 
    122 The 1D model option simulates a stand alone water column within the 3D \NEMO  
    123 system. It can be applied to the ocean alone or to the ocean-ice system and can  
    124 include passive tracers or a biogeochemical model. It is set up by defining the  
    125 \key{cfg\_1d} CPP key. This 1D model is a very useful tool  \textit{(a)} to learn  
    126 about the physics and numerical treatment of vertical mixing processes ; \textit{(b)}  
    127 to investigate suitable parameterisations of unresolved turbulence (wind steering,  
    128 langmuir circulation, skin layers) ; \textit{(c)} to compare the behaviour of different  
    129 vertical mixing schemes  ; \textit{(d)} to perform sensitivity studies on the vertical  
    130 diffusion at a particular point of the ocean global domain ; \textit{(d)} to produce  
    131 extra diagnostics, without the large memory requirement of the full 3D model. 
    132  
    133 The methodology is based on the use of the zoom functionality (see  
    134 \S\ref{MISC_zoom}), with some extra routines. There is no need to define a new  
    135 mesh, bathymetry, initial state or forcing, since the 1D model will use those of the  
    136 configuration it is a zoom of.  
     149The 1D model option simulates a stand alone water column within the 3D \NEMO system.  
     150It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers  
     151or a biogeochemical model. It is set up by defining the \key{cfg\_1d} CPP key.  
     152The 1D model is a very useful tool   
     153\textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes ;  
     154\textit{(b)} to investigate suitable parameterisations of unresolved turbulence (wind steering,  
     155langmuir circulation, skin layers) ;  
     156\textit{(c)} to compare the behaviour of different vertical mixing schemes  ;  
     157\textit{(d)} to perform sensitivity studies on the vertical diffusion at a particular point of an ocean domain ;  
     158\textit{(d)} to produce extra diagnostics, without the large memory requirement of the full 3D model. 
     159 
     160The methodology is based on the use of the zoom functionality over the smallest possible  
     161domain : a 3 x 3 domain centred on the grid point of interest (see \S\ref{MISC_zoom}),  
     162with some extra routines. There is no need to define a new mesh, bathymetry,  
     163initial state or forcing, since the 1D model will use those of the configuration it is a zoom of.  
     164The chosen grid point is set in par\_oce.F90 module by setting the jpizoom and jpjzoom  
     165parameters to the indices of the location of the chosen grid point. 
    137166 
    138167% ================================================================ 
     
    145174%-------------------------------------------------------------------------------------------------------------- 
    146175 
    147 % Steven update just bellow...   not sure it  is what I vant to say 
    148 %Searching an equilibrium state with an ocean model requires repeated very long time  
    149 %integrations (each of a few thousand years for a global model). Due to the size of  
    150 Searching an equilibrium state with an ocean model requires very long time  
    151 integration (a few thousand years for a global model). Due to the size of  
    152 the time step required for numerical stability (less than a  
    153 few hours), this usually requires a large elapsed time. In order to overcome  
    154 this problem, \citet{Bryan1984} introduces a technique that is intended to accelerate  
     176Searching an equilibrium state with an global ocean model requires a very long time  
     177integration period (a few thousand years for a global model). Due to the size of  
     178the time step required for numerical stability (less than a few hours),  
     179this usually requires a large elapsed time. In order to overcome this problem,  
     180\citet{Bryan1984} introduces a technique that is intended to accelerate  
    155181the spin up to equilibrium. It uses a larger time step in  
    156 the thermodynamic evolution equations than in the dynamic evolution  
     182the tracer evolution equations than in the momentum evolution  
    157183equations. It does not affect the equilibrium solution but modifies the  
    158184trajectory to reach it. 
    159185 
    160186The acceleration of convergence option is used when \np{nn\_acc}=1. In that case,  
    161 $\Delta t=rdt$ is the time step of dynamics while $\widetilde{\Delta t}=rdttra$ is the  
    162 tracer time-step. Their values are set from the \np{rdt} and \np{rdttra}  namelist  
    163 parameters. The set of prognostic equations to solve becomes: 
     187$\Delta t=rn\_rdt$ is the time step of dynamics while $\widetilde{\Delta t}=rdttra$ is the  
     188tracer time-step. the former is set from the \np{rn\_rdt} namelist parameter while the latter 
     189is computed using a hyperbolic tangent profile and the following namelist parameters :  
     190\np{rn\_rdtmin}, \np{rn\_rdtmax} and \np{rn\_rdth}. Those three parameters correspond  
     191to the surface value the deep ocean value and the depth at which the transition occurs, respectively.  
     192The set of prognostic equations to solve becomes: 
    164193\begin{equation} \label{Eq_acc} 
    165194\begin{split} 
     
    183212$\widetilde{ \Delta t}$ implies that the heat and salt contents are no longer  
    184213conserved due to the vertical coupling of the ocean level through both  
    185 advection and diffusion. 
    186 % first mention of depth varying tilda-delta-t!   and namelist parameter associated to that are to be described 
    187  
     214advection and diffusion. Therefore \np{rn\_rdtmin} = \np{rn\_rdtmax} should be 
     215a more clever choice. 
    188216 
    189217% ================================================================ 
     
    202230$\bullet$ Vector and memory optimisation: 
    203231 
    204 \key{vectopt\_loop} enables internal loop collapse, a very efficient way to increase  
    205 the length of vector calculations and thus speed up the model on vector computers. 
     232\key{vectopt\_loop} enables the internal loops to collapse. This is very  
     233a very efficient way to increase the length of vector calculations and thus  
     234to speed up the model on vector computers. 
    206235  
    207236% Add here also one word on NPROMA technique that has been found useless, since compiler have made significant progress during the last decade. 
     
    209238% Add also one word on NEC specific optimisation (Novercheck option for example) 
    210239 
    211 \key{vectopt\_memory} has been introduced in order to reduce the memory  
    212 requirement of the model. This is obviously done at the cost of increasing the  
    213 CPU time requirement, since it suppress intermediate computations which would  
    214 have been saved in in-core memory. This feature has not been intensively used.  
    215 In fact, currently it is only implemented for the TKE physics, in which,  when  
    216 \key{vectopt\_memory} is defined, the coefficients used for horizontal smoothing  
    217 of $A_v^T$ and $A_v^m$ are no longer computed once and for all. This reduces  
    218 the memory requirement by three 2D arrays. 
     240\key{vectopt\_memory} is an obsolescent option. It has been introduced in order  
     241to reduce the memory requirement of the model at a time when in-core memory 
     242were rather limited. This is obviously done at the cost of increasing the CPU  
     243time requirement, since it suppress intermediate computations which would have  
     244been saved in in-core memory. Currently it is only used in the old implementation  
     245of the TKE physics (\key{tke\_old}) where,  when \key{vectopt\_memory}  
     246is defined, the coefficients used for horizontal smoothing of $A_v^T$ and $A_v^m$  
     247are no longer computed once and for all. This reduces the memory requirement by three  
     2483D arrays. This option will disappear in the next \NEMO release. 
    219249 
    220250  
     
    231261management. When defined, this key forces the activation of all options and  
    232262CPP keys. For example, all tracer and momentum advection schemes are called!  
    233 There is therefore no physical meaning associated with the model results.  
     263Therefore the model results have no physical meaning.  
    234264However, this option forces both the compiler and the model to run through  
    235265all the \textsc{Fortran} lines of the model. This allows the user to check for obvious  
    236266compilation or execution errors with all CPP options, and errors in namelist options. 
    237267 
    238 3- \key{esopa} (to be rename key\_nemo) : which is another option for model  
    239 management. When defined, this key forces the activation of all options and CPP keys.  
    240 For example, all tracer and momentum advection schemes are called! There is  
    241 therefore no physical meaning associated with the model results. However, this option  
    242 forces both the compiler and the model to run through all the Fortran lines of the model.  
    243 This allows the user to check for obvious compilation or execution errors with all CPP  
    244 options, and errors in namelist options. 
    245  
    246 4- last digit comparison (\np{nbit\_cmp}). In an MPP simulation, the computation of  
     2684- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of  
    247269a sum over the whole domain is performed as the summation over all processors of  
    248270each of their sums over their interior domains. This double sum never gives exactly  
     
    251273mono-processor and multi-processor runs give exactly the same results.  
    252274 
    253 $\bullet$  Benchmark (\np{nbench}). This option defines a benchmark run based on  
     275$\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on  
    254276a GYRE configuration in which the resolution remains the same whatever the domain  
    255277size. This allows a very large model domain to be used, just by changing the domain  
     
    261283% Elliptic solvers (SOL) 
    262284% ================================================================ 
    263 \section{Elliptic solvers (SOL directory)} 
     285\section{Elliptic solvers (SOL)} 
    264286\label{MISC_sol} 
    265287%--------------------------------------------namdom------------------------------------------------------- 
     
    267289%-------------------------------------------------------------------------------------------------------------- 
    268290 
    269 The computation of the surface pressure gradient with a rigid lid assumption  
    270 requires the computation of $\partial_t \psi$, the time evolution of the  
    271 barotropic streamfunction. $\partial_t \psi$ is the solution of an elliptic  
    272 equation \eqref{Eq_PE_psi} for which three solvers are available: a  
    273 Successive-Over-Relaxation scheme (SOR), a preconditioned conjugate gradient  
    274 scheme(PCG) \citep{Madec1988, Madec1990} and a Finite Elements Tearing and  
    275 Interconnecting scheme (FETI) \citep{Guyon_al_EP99, Guyon_al_CalPar99}.  
     291When the filtered sea surface height option is used, the surface pressure gradient is  
     292computed in \mdl{dynspg\_flt}. The force added in the momentum equation is solved implicitely. 
     293It is thus solution of an elliptic equation \eqref{Eq_PE_flt} for which two solvers are available:  
     294a Successive-Over-Relaxation scheme (SOR) and a preconditioned conjugate gradient  
     295scheme(PCG) \citep{Madec_al_OM88, Madec_PhD90}. The solver is selected trough the 
     296the value of \np{nn\_solv} (namelist parameter).  
     297 
    276298The PCG is a very efficient method for solving elliptic equations on vector computers.  
    277299It is a fast and rather easy method to use; which are attractive features for a large  
     
    280302a search for an optimal parameter as in the SOR method. However, the SOR has  
    281303been retained because it is a linear solver, which is a very useful property when  
    282 using the adjoint model of \NEMO. The FETI solver is a very efficient method on  
    283 massively parallel computers. However, it has never been used since OPA 8.0.  
    284 The current version in \NEMO should not even successfully go through the  
    285 compilation phase.  
    286  
    287 The surface pressure gradient is computed in \mdl{dynspg}. The solver used  
    288 (PCG or SOR) depending on the value of \np{nsolv} (namelist parameter).  
    289 At each time step the time derivative of the barotropic streamfunction is  
    290 the solution of \eqref{Eq_psi_total}. Introducing the following coefficients: 
    291  
    292 \begin{equation}  
     304using the adjoint model of \NEMO. 
     305 
     306At each time step, the time derivative of the sea surface height at time step $t+1$  
     307(or equivalently the divergence of the \textit{after} barotropic transport) that appears  
     308in the filtering forced is the solution of the elliptic equation obtained from the horizontal  
     309divergence of the vertical summation of \eqref{Eq_PE_flt}.  
     310Introducing the following coefficients: 
     311\begin{equation}  \label{Eq_sol_matrix} 
    293312\begin{aligned} 
    294 &C_{i,j}^{NS} &&= \frac{e_{2v}(i,j)}{\left( H_v (i,j) e_{1v} (i,j)\right)}\\ 
    295 &C_{i,j}^{EW} &&= \frac{e_{1u}(i,j)}{\left( H_u (i,j) e_{2u} (i,j)\right)}\\ 
    296 &B_{i,j} &&= \delta_i \left( e_{2v}M_v \right) - \delta_j \left( e_{1u}M_u \right)\\ 
     313&c_{i,j}^{NS}  &&= {2 \Delta t }^2 \; \frac{H_v (i,j) \; e_{1v} (i,j)}{e_{2v}(i,j)}              \\ 
     314&c_{i,j}^{EW} &&= {2 \Delta t }^2 \; \frac{H_u (i,j) \; e_{2u} (i,j)}{e_{1u}(i,j)}            \\ 
     315&b_{i,j} &&= \delta_i \left[ e_{2u}M_u \right] - \delta_j \left[ e_{1v}M_v \right]\ ,   \\ 
    297316\end{aligned} 
    298317\end{equation} 
    299  
    300318the five-point finite difference equation \eqref{Eq_psi_total} can be rewritten as: 
    301  
    302 \begin{multline} \label{Eq_solmat} 
    303 C_{i+1,j}^{NS} {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i+1,j} + \; 
    304 C_{i,j+1}^{EW}{   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j+1} + \; 
    305 C_{i,j}    ^{NS} {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i-1,j} + \; 
    306 C_{i,j}    ^{EW}{   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j-1}\\ 
    307 -\left(C_{i+1,j}^{NS} + C_{i,j+1}^{EW} + C_{i,j}^{NS} + C_{i,j}^{EW} \right)   {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j}  =  B_{i,j} 
    308 \end{multline} 
     319\begin{equation}  \label{Eq_solmat} 
     320\begin{split} 
     321       c_{i+1,j}^{NS} D_{i+1,j}  + \;  c_{i,j+1}^{EW} D_{i,j+1}    
     322  +   c_{i,j}    ^{NS} D_{i-1,j}   + \;  c_{i,j}    ^{EW} D_{i,j-1}                                          &    \\ 
     323  -    \left(c_{i+1,j}^{NS} + c_{i,j+1}^{EW} + c_{i,j}^{NS} + c_{i,j}^{EW} \right)   D_{i,j}  &=  b_{i,j} 
     324\end{split} 
     325\end{equation} 
    309326\eqref{Eq_solmat} is a linear symmetric system of equations. All the elements of  
    310327the corresponding matrix \textbf{A} vanish except those of five diagonals. With  
     
    315332\eqref{Eq_solmat}, is a vector. 
    316333 
     334Note that in the linear free surface case, the depth that appears in \eqref{Eq_sol_matrix} 
     335does not vary with time, and thus the matrix can be computed once for all. In non-linear free surface  
     336(\key{vvl} defined) the matrix have to be updated at each time step. 
     337 
    317338% ------------------------------------------------------------------------------------------------------------- 
    318339%       Successive Over Relaxation 
    319340% ------------------------------------------------------------------------------------------------------------- 
    320 \subsection{Successive Over Relaxation \np{nsolv}=2} 
     341\subsection{Successive Over Relaxation (\np{nn\_solv}=2, \mdl{solsor})} 
    321342\label{MISC_solsor} 
    322343 
    323 Let us introduce the four cardinal coefficients: $A_{i,j}^S = C_{i,j}^{NS}/D_{i,j}\,$,  
    324 $A_{i,j}^W = C_{i,j}^{EW}/D_{i,j}\,$, $A_{i,j}^E = C_{i,j+1}^{EW}/D_{i,j}\,$ and $A_{i,j}^N = C_{i+1,j}^{NS}/D_{i,j}\,$, and define  
    325 $\tilde B_{i,j} = B_{i,j}/D_{i,j}\,$, where $D_{i,j} = C_{i,j}^{NS}+ C_{i+1,j}^{NS} + C_{i,j}^{EW} + C_{i,j+1}^{EW} $ (i.e. the diagonal of  
    326 \textbf{A}). (VII.5.1) can be rewritten as: 
    327  
    328 \begin{multline} \label{Eq_solmat_p} 
    329     A_{i,j}^{N}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i+1,j   }  
    330 +\,A_{i,j}^{E}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i    ,j+1}       \\ 
    331 +\,A_{i,j}^{S}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i-1 ,j    }  
    332 +\,A_{i,j}^{W} {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i    ,j-1}   
    333                -  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j} = \tilde B_{i,j} 
    334 \end{multline} 
    335  
    336 The SOR method used is an iterative method. Its algorithm can be summarised  
    337 as follows [see \citet{Haltiner1980} for a further discussion]: 
     344Let us introduce the four cardinal coefficients:  
     345\begin{align*} 
     346a_{i,j}^S &= c_{i,j    }^{NS}/d_{i,j}     &\qquad  a_{i,j}^W &= c_{i,j}^{EW}/d_{i,j}       \\ 
     347a_{i,j}^E &= c_{i,j+1}^{EW}/d_{i,j}    &\qquad   a_{i,j}^N &= c_{i+1,j}^{NS}/d_{i,j}    
     348\end{align*} 
     349where $d_{i,j} = c_{i,j}^{NS}+ c_{i+1,j}^{NS} + c_{i,j}^{EW} + c_{i,j+1}^{EW}$  
     350(i.e. the diagonal of the matrix). \eqref{Eq_solmat} can be rewritten as: 
     351\begin{equation}  \label{Eq_solmat_p} 
     352\begin{split} 
     353a_{i,j}^{N}  D_{i+1,j} +\,a_{i,j}^{E}  D_{i,j+1} +\, a_{i,j}^{S}  D_{i-1,j} +\,a_{i,j}^{W} D_{i,j-1}  -  D_{i,j} = \tilde{b}_{i,j} 
     354\end{split} 
     355\end{equation} 
     356with $\tilde b_{i,j} = b_{i,j}/d_{i,j}$. \eqref{Eq_solmat_p} is the equation actually solved  
     357with the SOR method. This method used is an iterative one. Its algorithm can be  
     358summarised as follows (see \citet{Haltiner1980} for a further discussion): 
    338359 
    339360initialisation (evaluate a first guess from previous time step computations) 
    340361\begin{equation} 
    341 \left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^0 = 2{\left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^t} - {\left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^{t-1}} 
     362D_{i,j}^0 = 2 \, D_{i,j}^t - D_{i,j}^{t-1} 
    342363\end{equation} 
    343364iteration $n$, from $n=0$ until convergence, do : 
    344 \begin{multline}  
    345 R_{i,j}^n 
    346 = A_{i,j}^{N}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i+1,j}^n  
    347 +\,A_{i,j}^{E}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j+1} ^n     \\ 
    348 +\,A_{i,j}^{S}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i-1,j} ^{n+1} 
    349 +\,A_{i,j}^{W} {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j-1} ^{n+1}   
    350                    -  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j}^n - \tilde B_{i,j} 
    351 \end{multline} 
    352 \begin{equation}  
    353      {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j} ^{n+1} 
    354   = {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j} ^{n} 
    355   + \omega \;R_{i,j}^n 
     365\begin{equation} \label{Eq_sor_algo} 
     366\begin{split} 
     367R_{i,j}^n  = &a_{i,j}^{N} D_{i+1,j}^n       +\,a_{i,j}^{E}  D_{i,j+1} ^n          
     368         +\, a_{i,j}^{S}  D_{i-1,j} ^{n+1}+\,a_{i,j}^{W} D_{i,j-1} ^{n+1} 
     369                 -  D_{i,j}^n - \tilde{b}_{i,j}                                           \\ 
     370D_{i,j} ^{n+1}  = &D_{i,j} ^{n}   + \omega \;R_{i,j}^n      
     371\end{split} 
    356372\end{equation} 
    357373where \textit{$\omega $ }satisfies $1\leq \omega \leq 2$. An optimal value exists for  
     
    359375adjusted empirically for each model domain (except for a uniform grid where an  
    360376analytical expression for \textit{$\omega$} can be found \citep{Richtmyer1967}).  
    361 The value of $\omega$ is set using \textit{sor}, a \textbf{namelist} parameter.  
     377The value of $\omega$ is set using \np{rn\_sor}, a \textbf{namelist} parameter.  
    362378The convergence test is of the form: 
    363379\begin{equation} 
    364 \delta = \frac{\sum\limits_{i,j}{R_{i,j}^n}{R_{i,j}^n}}{\sum\limits_{i,j}{ \tilde B_{i,j}^n}{\tilde B_{i,j}^n}} \leq \epsilon 
     380\delta = \frac{\sum\limits_{i,j}{R_{i,j}^n}{R_{i,j}^n}} 
     381                    {\sum\limits_{i,j}{ \tilde{b}_{i,j}^n}{\tilde{b}_{i,j}^n}} \leq \epsilon 
    365382\end{equation} 
    366383where $\epsilon$ is the absolute precision that is required. It is recommended  
    367 that a value smaller or equal to $10^{-3}$ is used for $\epsilon$ since larger  
    368 values may lead to numerically induced basin scale barotropic oscillations. In fact,  
    369 for an eddy resolving configuration or in a filtered free surface case, a value three  
    370 orders of magnitude smaller than this should be used. The precision is specified by  
    371 setting \textit{eps} (\textbf{namelist parameter}). In addition, two other tests are  
    372 used to halt the iterative algorithm. They involve the number of iterations and the  
    373 modulus of the right hand side. If the former exceeds a specified value, \textit{nmax}  
    374 (\textbf{namelist parameter}), or the latter is greater than $10^{15}$, the whole  
    375 model computation is stopped and the last computed time step fields are saved  
    376 in the standard output file. In both cases, this usually indicates that there is something  
    377 wrong in the model configuration (an error in the mesh, the initial state, the input forcing,  
     384that a value smaller or equal to $10^{-6}$ is used for $\epsilon$ since larger  
     385values may lead to numerically induced basin scale barotropic oscillations.  
     386The precision is specified by setting \np{rn\_eps} (\textbf{namelist} parameter).  
     387In addition, two other tests are used to halt the iterative algorithm. They involve  
     388the number of iterations and the modulus of the right hand side. If the former  
     389exceeds a specified value, \np{nn\_max} (\textbf{namelist} parameter),  
     390or the latter is greater than $10^{15}$, the whole model computation is stopped  
     391and the last computed time step fields are saved in a abort.nc NetCDF file.  
     392In both cases, this usually indicates that there is something wrong in the model  
     393configuration (an error in the mesh, the initial state, the input forcing,  
    378394or the magnitude of the time step or of the mixing coefficients). A typical value of  
    379 $nmax$ is a few hundred when $\epsilon = 10^{-6}$, increasing to a few  
     395$nn\_max$ is a few hundred when $\epsilon = 10^{-6}$, increasing to a few  
    380396thousand when $\epsilon = 10^{-12}$. 
    381397The vectorization of the SOR algorithm is not straightforward. The scheme 
    382398contains two linear recurrences on $i$ and $j$. This inhibits the vectorisation.  
    383 Therefore it has been rewritten as: 
    384  
    385 \begin{multline}  
     399\eqref{Eq_sor_algo} can be been rewritten as: 
     400\begin{equation}  
     401\begin{split} 
    386402R_{i,j}^n 
    387 = A_{i,j}^{N}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i+1,j}^n  
    388 +\,A_{i,j}^{E}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j+1} ^n     \\ 
    389 +\,A_{i,j}^{S}  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i-1,j} ^{n} 
    390 +\,A_{i,j}^{W} {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j-1} ^{n}  
    391                    -  {   \left(  \frac{\partial \psi}{\partial t } \right)    }_{i,j}^n - \tilde B_{i,j} 
    392 \end{multline} 
    393  
    394 \begin{equation} 
    395 R_{i,j}^n = R_{i,j}^n - \omega \;A_{i,j}^{S}\; R_{i,j-1}^n 
    396 \end{equation} 
    397  
    398 \begin{equation} 
    399 R_{i,j}^n = R_{i,j}^n - \omega \;A_{i,j}^{W}\; R_{i-1,j}^n 
    400 \end{equation} 
    401  
    402 The SOR method is very flexible and can be used under a wide  
    403 range of conditions, including irregular boundaries, interior boundary  
    404 points, etc. Proofs of convergence, etc. may be found in the standard  
    405 numerical methods texts for partial differential equations. 
     403= &a_{i,j}^{N}  D_{i+1,j}^n +\,a_{i,j}^{E}  D_{i,j+1} ^n 
     404 +\,a_{i,j}^{S}  D_{i-1,j} ^{n}+\,_{i,j}^{W} D_{i,j-1} ^{n} -  D_{i,j}^n - \tilde{b}_{i,j}      \\ 
     405R_{i,j}^n = &R_{i,j}^n - \omega \;a_{i,j}^{S}\; R_{i,j-1}^n                                             \\ 
     406R_{i,j}^n = &R_{i,j}^n - \omega \;a_{i,j}^{W}\; R_{i-1,j}^n 
     407\end{split} 
     408\end{equation} 
     409This technique slightly increases the number of iteration required to reach the convergence, 
     410but this is largely compensated by the gain obtained by the suppression of the recurrences. 
     411 
     412Another technique have been chosen, the so-called red-black SOR. It consist in solving successively  
     413\eqref{Eq_sor_algo} for odd and even grid points. It also slightly reduced the convergence rate 
     414but allows the vectorisation. In addition, and this is the reason why it has been chosen, it is able to handle the north fold boundary condition used in ORCA configuration ($i.e.$ tri-polar global ocean mesh). 
     415 
     416The SOR method is very flexible and can be used under a wide range of conditions,  
     417including irregular boundaries, interior boundary points, etc. Proofs of convergence, etc.  
     418may be found in the standard numerical methods texts for partial differential equations. 
    406419 
    407420% ------------------------------------------------------------------------------------------------------------- 
    408421%       Preconditioned Conjugate Gradient 
    409422% ------------------------------------------------------------------------------------------------------------- 
    410 \subsection{Preconditioned Conjugate Gradient} 
     423\subsection{Preconditioned Conjugate Gradient  (\np{nn\_solv}=1, \mdl{solpcg}) } 
    411424\label{MISC_solpcg} 
    412  
    413 \begin{flushright} 
    414 (\textit{nbsfs=1}, \textbf{namelist parameter}) 
    415 \end{flushright} 
    416425 
    417426\textbf{A} is a definite positive symmetric matrix, thus solving the linear  
     
    448457 
    449458initialisation : 
    450  
    451459\begin{equation*}  
    452 \textbf{x}^0 = \left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^0 = 2{\left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^t} - {\left(  \frac{\partial \psi}{\partial t } \right)_{i,j}^{t-1}} 
    453 , \text{the initial guess } 
     460\begin{split} 
     461\textbf{x}^0 &= D_{i,j}^0   = 2 D_{i,j}^t - D_{i,j}^{t-1}       \quad, \text{the initial guess }     \\ 
     462\textbf{r}^0 &= \textbf{d}^0 = \textbf{b} - \textbf{A x}^0       \\ 
     463\gamma_0 &= \langle{ \textbf{r}^0 , \textbf{r}^0} \rangle 
     464\end{split} 
    454465\end{equation*} 
    455466 
    456 \begin{equation*} 
    457 \textbf{r}^0 = \textbf{d}^0 = \textbf{b} - \textbf{A x}^0 
    458 \end{equation*} 
    459 \begin{equation*} 
    460 \gamma_0 = \langle{ \textbf{r}^0 , \textbf{r}^0} \rangle 
    461 \end{equation*} 
    462467iteration $n,$ from $n=0$ until convergence, do : 
    463  
    464468\begin{equation}  
    465469\begin{split} 
    466470\text{z}^n& = \textbf{A d}^n \\ 
    467 \alpha_n &= \gamma_n \langle{ \textbf{z}^n , \textbf{d}^n} \rangle \\ 
     471\alpha_n &= \gamma_n / \langle{ \textbf{z}^n , \textbf{d}^n} \rangle \\ 
    468472\textbf{x}^{n+1} &= \textbf{x}^n + \alpha_n \,\textbf{d}^n \\ 
    469473\textbf{r}^{n+1} &= \textbf{r}^n - \alpha_n \,\textbf{z}^n \\ 
     
    476480 
    477481The convergence test is: 
    478  
    479482\begin{equation} 
    480483\delta = \gamma_{n}\; / \langle{ \textbf{b} , \textbf{b}} \rangle \leq \epsilon 
    481484\end{equation} 
    482485where $\epsilon $ is the absolute precision that is required. As for the SOR algorithm,  
    483 the whole model computation is stopped when the number of iterations, $nmax$, or  
     486the whole model computation is stopped when the number of iterations, \np{nn\_max}, or  
    484487the modulus of the right hand side of the convergence equation exceeds a  
    485488specified value (see \S\ref{MISC_solsor} for a further discussion). The required  
    486489precision and the maximum number of iterations allowed are specified by setting  
    487 $eps$ and $nmax$ (\textbf{namelist parameters}). 
     490\np{rn\_eps} and \np{nn\_max} (\textbf{namelist} parameters). 
    488491 
    489492It can be demonstrated that the above algorithm is optimal, provides the exact  
    490493solution in a number of iterations equal to the size of the matrix, and that  
    491494the convergence rate is faster as the matrix is closer to the identity matrix, 
    492 $i.e.$ its eigenvalues are closer to 1. Therefore, it is more efficient to solve a  
    493 better conditioned system which has the same solution. For that purpose, we  
    494 introduce a preconditioning matrix \textbf{Q} which is an approximation of  
    495 \textbf{A} but much easier to invert than \textbf{A}, and solve the system: 
     495$i.e.$ its eigenvalues are closer to 1. Therefore, it is more efficient to solve  
     496a better conditioned system which has the same solution. For that purpose,  
     497we introduce a preconditioning matrix \textbf{Q} which is an approximation  
     498of \textbf{A} but much easier to invert than \textbf{A}, and solve the system: 
    496499\begin{equation} \label{Eq_pmat} 
    497500\textbf{Q}^{-1} \textbf{A x} = \textbf{Q}^{-1} \textbf{b} 
     
    502505${\langle{ \textbf{a} , \textbf{b}} \rangle}_Q = \langle{ \textbf{a} , \textbf{Q b}} \rangle$, and  
    503506if $\textbf{\~{b}} = \textbf{Q}^{-1}\;\textbf{b}$ and $\textbf{\~{A}} = \textbf{Q}^{-1}\;\textbf{A}$  
    504 are substituted to \textbf{b} and \textbf{A} \citep{Madec1988}.  
     507are substituted to \textbf{b} and \textbf{A} \citep{Madec_al_OM88}.  
    505508In \NEMO, \textbf{Q} is chosen as the diagonal of \textbf{ A}, i.e. the simplest form for  
    506509\textbf{Q} so that it can be easily inverted. In this case, the discrete formulation of  
     
    508511right hand side are computed independently from the solver used. 
    509512 
    510 % ------------------------------------------------------------------------------------------------------------- 
    511 %       FETI 
    512 % ------------------------------------------------------------------------------------------------------------- 
    513 \subsection{FETI} 
    514 \label{MISC_solfeti} 
    515  
    516 FETI is a powerful solver that was developed by Marc Guyon  \citep{Guyon_al_EP99,  
    517 Guyon_al_CalPar99}. It has been converted from Fortan 77 to 90, but never  
    518 successfully tested after that.  
    519  
    520 Its main advantage is to save a lot of CPU time when compared to the SOR or PCG  
    521 algorithms. However, its main drawback is that the solution is dependent on the  
    522 domain decomposition chosen. Using a different number of processors, the solution  
    523 is the same at the precision required, but not the same at the computer precision.  
    524 This make it hard to debug.   
    525  
    526 % ------------------------------------------------------------------------------------------------------------- 
    527 %       Boundary Conditions --- Islands 
    528 % ------------------------------------------------------------------------------------------------------------- 
    529 \subsection{Boundary Conditions --- Islands (\key{islands})} 
    530 \label{MISC_solisl} 
    531  
    532 The boundary condition used for both recommended solvers is that the time  
    533 derivative of the barotropic streamfunction is zero along all the coastlines.  
    534 When islands are present in the model domain, additional computations must  
    535 be performed to determine the barotropic streamfunction with the correct boundary  
    536 conditions. This is detailed below. 
    537  
    538 The model does not have specialised code for islands. They must instead be  
    539 identified to the solvers by the user via bathymetry information, i.e. the $mbathy$  
    540 array should equal $-1$ over the first island, $-2$ over the second, ... , $-N$ over  
    541 the $N^{th}$ island. The model determines the position of island grid-points and  
    542 defines a closed contour around each island which is used to compute the circulation  
    543 around each one. The closed contour is formed from the ocean grid-points which  
    544 are the closest to the island. 
    545  
    546 First, the island barotropic streamfunctions $\psi_n$ are computed using the SOR  
    547 or PCG scheme (they are solutions of \eqref{Eq_solmat} with the right-hand side  
    548 equal to zero and with $\psi_n = 1$ along the island $n$ and $\psi_n = 0$ along  
    549 the other coastlines) (Note that specifying $1$ as boundary condition on an island  
    550 for $\psi$ is equivalent to defining a specific right hand side for \eqref{Eq_solmat}).  
    551 The requested precision of this computation can be very high since it is only  
    552 performed once. The absolute precision, $epsisl$, and the maximum number of  
    553 iterations allowed, $nmisl$, are the \textbf{namelist parameters} used for this  
    554 computation. Their typical values are $epsisl = 10^{-10}$ and $nmisl = 4000$.  
    555 Then the island matrix A is computed from \eqref{Eq_PE_psi_isl_matrix} and  
    556 inverted. At each time step, $\psi_0$, the solution of \eqref{Eq_solmat} with $\psi = 0$  
    557 along all coastlines, is computed using either SOR or PCG. (It should 
    558 be noted that the first guess of this computation remains as usual except that  
    559 $\partial_t \psi_0$ is used, instead of $\partial_t \psi$. Indeed we are  
    560 computing $\partial_t \psi_0$ which is usually very different from $\partial_t \psi$.) 
    561 Then, it is easy to find the time evolution of the barotropic streamfunction on each  
    562 island and to deduce $\partial_t \psi$, and to use it to compute the surface pressure  
    563 gradient. Note that the value of the barotropic streamfunction itself is also computed  
    564 as the time integration of $\partial_t \psi$ for further diagnostics. 
    565  
    566513% ================================================================ 
    567514% Diagnostics 
    568515% ================================================================ 
    569 \section{Diagnostics } 
     516\section{Diagnostics (DIA, IOM)} 
    570517\label{MISC_diag} 
    571518 
     
    577524 
    578525%to be updated with Seb documentation on the IO 
    579 \amtcomment{  
     526 
    580527The model outputs are of three types: the restart file, the output listing,  
    581528and the output file(s). The restart file is used internally by the code when  
     
    592539the $ocean.output$ file. The information is printed from within the code on the  
    593540logical unit $numout$. To locate these prints, use the UNIX command  
    594 "$grep -i numout^*$" in the source code directory. 
    595  
    596 In the standard configuration, the user will find the model results in two  
    597 output files containing values for every time-step where output is demanded:  
    598 a \textbf{VO} file containing all the three dimensional fields in logical unit  
    599 $numwvo$, and a \textbf{SO} file containing all the two dimensional (horizontal)  
    600 fields in logical unit $numwso$. These outputs are defined in the $diawri.F$  
    601 routine. The default and user-selectable diagnostics are described in {\S}III-12-c. 
    602  
    603 The default output (for all output files apart from the restart file) is 32 bits binary  
    604 IEEE format, compatible with the Vairmer software (see the Climate Modelling  
    605 and global Change team WEB server at CERFACS: http://www.cerfacs.fr).  
    606 The model's reference directory also contains a visualisation tool based on  
    607 \textbf{NCAR Graphics} (http://ngwww.ucar.edu). If a user has access to the  
    608 NCAR software, he or she can copy the \textbf{LODMODEL/UTILS/OPADRA}  
    609 directory from the reference and, following the \textbf{README}, create  
    610 graphical outputs from the model's results. 
    611 } 
     541"\textit{grep -i numout}" in the source code directory. 
     542 
     543In the standard configuration, the user will find the model results in  
     544NetCDF files containing mean values (or instantaneous values if  
     545\key{diainstant} is defined) for every time-step where output is demanded. 
     546These outputs are defined in the \mdl{diawri} module.  
     547When defining \key{dimgout}, the output are written in DIMG format, 
     548an IEEE output format. 
     549 
     550Since version 3.2, an I/O server has been added which provides more 
     551flexibility in the choice of the fields to be output as well as how the  
     552writing work is distributed over the processors in massively parallel 
     553computing. It is activated when \key{dimgout} is defined. 
    612554 
    613555% ------------------------------------------------------------------------------------------------------------- 
     
    635577%       On-line Floats trajectories 
    636578% ------------------------------------------------------------------------------------------------------------- 
    637 \subsection{On-line Floats trajectories} 
     579\subsection{On-line Floats trajectories (FLO)} 
    638580\label{FLO} 
    639581%--------------------------------------------namflo------------------------------------------------------- 
     
    669611- the meridional heat and salt transports and their decomposition (\mdl{diamfl}) 
    670612 
    671 - the surface pressure (\mdl{diaspr}) 
     613In addition, a series of diagnostics has been added in the \mdl{diaar5}.  
     614They corresponds to outputs that are required for AR5 simulations  
     615(see Section \ref{MISC_steric} below for one of them).  
     616Activating those outputs requires to define the \key{diaar5} CPP key. 
     617 
     618 
     619 
     620% ================================================================ 
     621% Steric effect in sea surface height 
     622% ================================================================ 
     623\section{Steric effect in sea surface height} 
     624\label{MISC_steric} 
     625 
     626 
     627Changes in steric sea level are caused when changes in the density of the water  
     628column imply an expansion or contraction of the column. It is essentially produced  
     629through surface heating/cooling and to a lesser extent through non-linear effects of  
     630the equation of state (cabbeling, thermobaricity...). 
     631Non-Boussinesq models contain all ocean effects within the ocean acting  
     632on the sea level. In particular, they include the steric effect. In contrast,  
     633Boussinesq models, such as \NEMO, conserve volume, rather than mass,  
     634and so do not properly represent expansion or contraction. The steric effect is  
     635therefore not explicitely represented. 
     636This approximation does not represent a serious error with respect to the flow field  
     637calculated by the model \citep{Greatbatch_JGR94}, but extra attention is required 
     638when investigating sea level, as steric changes are an important  
     639contribution to local changes in sea level on seasonal and climatic time scales. 
     640This is especially true for investigation into sea level rise due to global warming.  
     641 
     642Fortunately, the steric contribution to the sea level consists of a spatially uniform  
     643component that can be diagnosed by considering the mass budget of the world  
     644ocean \citep{Greatbatch_JGR94}.  
     645In order to better understand how global mean sea level evolves and thus how 
     646the steric sea level can be diagnosed, we compare, in the following, the  
     647non-Boussinesq and Boussinesq cases. 
     648 
     649Let denote  
     650$\mathcal{M}$ the total mass of liquid seawater ($\mathcal{M}=\int_D \rho dv$),  
     651$\mathcal{V}$ the total volume of seawater ($\mathcal{V}=\int_D dv$),  
     652$\mathcal{A}$ the total surface of the ocean ($\mathcal{A}=\int_S ds$),  
     653$\bar{\rho}$ the global mean seawater (\textit{in situ}) density ($\bar{\rho}= 1/\mathcal{V} \int_D \rho \,dv$), and 
     654$\bar{\eta}$ the global mean sea level ($\bar{\eta}=1/\mathcal{A}\int_S \eta \,ds$). 
     655 
     656A non-Boussinesq fluid conserves mass. It satisfies the following relations: 
     657\begin{equation} \label{Eq_MV_nBq}  
     658\begin{split}  
     659\mathcal{M} &=  \mathcal{V}  \;\bar{\rho}       \\ 
     660\mathcal{V} &=  \mathcal{A}  \;\bar{\eta}  
     661\end{split} 
     662\end{equation} 
     663Temporal changes in total mass is obtained from the density conservation equation : 
     664\begin{equation}  \label{Eq_Co_nBq} 
     665\frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 
     666\end{equation} 
     667where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass  
     668exchanges with the other media of the Earth system (atmosphere, sea-ice, land).  
     669Its global averaged leads to the total mass change  
     670\begin{equation}  \label{Eq_Mass_nBq} 
     671\partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 
     672\end{equation} 
     673where $\overline{\textit{emp}}=\int_S \textit{emp}\,ds$ is the net mass flux  
     674through the ocean surface. 
     675Bringing \eqref{Eq_Mass_nBq} and the time derivative of \eqref{Eq_MV_nBq}  
     676together leads to the evolution equation of the mean sea level 
     677\begin{equation} \label{Eq_ssh_nBq} 
     678  \partial_t \bar{\eta} =  \frac{\overline{\textit{emp}}}{ \bar{\rho}}  
     679               - \frac{\mathcal{V}}{\mathcal{A}}  \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 
     680\end{equation} 
     681The first term in equation \eqref{Eq_ssh_nBq} alters sea level by adding or  
     682subtracting mass from the ocean.  
     683The second term arises from temporal changes in the global mean  
     684density; $i.e.$ from steric effects.  
     685 
     686In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$  
     687appears multiplied by the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations).  
     688In particular, the mass conservation equation, \eqref{Eq_Co_nBq}, degenerates into  
     689the incompressibility equation: 
     690\begin{equation}  \label{Eq_Co_Bq} 
     691\frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) =  \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 
     692\end{equation} 
     693and the global average of this equation now gives the temporal change of the total volume, 
     694\begin{equation}  \label{Eq_V_Bq} 
     695  \partial_t \mathcal{V} =   \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o}  
     696\end{equation} 
     697Only the volume is conserved, not mass, or, more precisely, the mass which is conserved is the  
     698Boussinesq mass, $\mathcal{M}_o = \rho_o \mathcal{V}$. The total volume (or equivalently   
     699the global mean sea level) is altered only by net volume fluxes across the ocean surface,   
     700not by changes in mean mass of the ocean: the steric effect is missing in a Boussinesq fluid. 
     701  
     702Nevertheless, following \citep{Greatbatch_JGR94}, the steric effect on the volume can be  
     703diagnosed by considering the mass budget of the ocean.  
     704The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface  
     705mass flux must be compensated by a spatially uniform change in the mean sea level due to  
     706expansion/contraction of the ocean \citep{Greatbatch_JGR94}. In others words, the Boussinesq  
     707mass, $\mathcal{M}_o$, can be related to $\mathcal{M}$, the  total mass of the ocean seen  
     708by the Boussinesq model, via the steric contribution to the sea level, $\eta_s$, a spatially  
     709uniform variable, as follows: 
     710\begin{equation}  \label{Eq_M_Bq} 
     711   \mathcal{M}_o  =  \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A}  
     712\end{equation} 
     713Any change in $\mathcal{M}$ which cannot be explained by the net mass flux through  
     714the ocean surface is converted into a mean change in sea level. Introducing the total density  
     715anomaly, $\mathcal{D}= \int_D d_a \,dv$, where $d_a= (\rho -\rho_o ) / \rho_o$   
     716is the density anomaly used in \NEMO (cf. \S\ref{TRA_eos}) in \eqref{Eq_M_Bq} 
     717leads to a very simple form for the steric height: 
     718\begin{equation}  \label{Eq_steric_Bq} 
     719   \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D}  
     720\end{equation} 
     721 
     722The above formulation of the steric height of a Boussinesq ocean requires four remarks. 
     723First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 
     724$i.e.$ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. We do not 
     725recommend that. Indeed, in this case $\rho_o$ depends on the initial state of the ocean.  
     726Since $\rho_o$ has a direct effect on the dynamics of the ocean (it appears in the pressure  
     727gradient term of the momentum equation) it is definitively not a good idea when  
     728inter-comparing experiments.  
     729We better recommend to fixe once for all $\rho_o$ to $1035\;Kg\,m^{-3}$. This value is a  
     730sensible choice for the reference density used in a Boussinesq ocean climate model since,  
     731with the exception of only a small percentage of the ocean, density in the World Ocean  
     732varies by no more than 2$\%$ from this value (\cite{Gill1982}, page 47). 
     733 
     734Second, we have assumed here that the total ocean surface, $\mathcal{A}$, does not 
     735change when the sea level is changing as it is the case in all global ocean GCMs  
     736(wetting and drying of grid point is not allowed).  
     737   
     738Third, the discretisation of \eqref{Eq_steric_Bq} depends on the type of free surface 
     739which is considered. In the non linear free surface case, $i.e.$ \key{vvl} defined, it is 
     740given by 
     741\begin{equation}  \label{Eq_discrete_steric_Bq} 
     742   \eta_s =  - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} } 
     743                  { \sum_{i,\,j,\,k}         e_{1t} e_{2t} e_{3t} }  
     744\end{equation} 
     745whereas in the linear free surface, the volume above the \textit{z=0} surface must be explicitly taken  
     746into account to better approximate the total ocean mass and thus the steric sea level: 
     747\begin{equation}  \label{Eq_discrete_steric_Bq} 
     748   \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 } 
     749                     {\sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}           e_{1t}e_{2t} \eta }  
     750\end{equation} 
     751 
     752The fourth and last remark concerns the effective sea level and the presence of sea-ice. 
     753In the real ocean, sea ice (and snow above it)  depresses the liquid seawater through  
     754its mass loading. This depression is a result of the mass of sea ice/snow system acting  
     755on the liquid ocean. There is, however, no dynamical effect associated with these depressions  
     756in the liquid ocean sea level, so that there are no associated ocean currents. Hence, the  
     757dynamically relevant sea level is the effective sea level, $i.e.$ the sea level as if sea ice  
     758(and snow) were converted to liquid seawater \citep{Campin_al_OM08}. However, 
     759in the current version of \NEMO the sea-ice is levitating above the ocean without  
     760mass exchanges between ice and ocean. Therefore the model effective sea level 
     761is always given by $\eta + \eta_s$, whether or not there is sea ice present. 
     762 
     763In AR5 outputs, the thermosteric sea level is demanded. It is steric sea level due to  
     764changes in ocean density arising just from changes in temperature. It is given by: 
     765\begin{equation}  \label{Eq_thermosteric_Bq} 
     766   \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 
     767\end{equation} 
     768where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. 
     769 
     770Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs 
     771the \key{diaar5} defined to be called. 
     772 
Note: See TracChangeset for help on using the changeset viewer.