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 11422 for NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO/subfiles/chap_time_domain.tex – NEMO

Ignore:
Timestamp:
2019-08-08T15:40:47+02:00 (5 years ago)
Author:
jchanut
Message:

#1791, merge with trunk

Location:
NEMO/branches/2019/fix_vvl_ticket1791/doc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_vvl_ticket1791/doc

    • Property svn:ignore deleted
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex

    • Property svn:ignore
      •  

        old new  
        1 *.aux 
        2 *.bbl 
        3 *.blg 
        4 *.dvi 
        5 *.fdb* 
        6 *.fls 
        7 *.idx 
        8 *.ilg 
        9 *.ind 
        10 *.log 
        11 *.maf 
        12 *.mtc* 
        13 *.out 
        14 *.pdf 
        15 *.toc 
        16 _minted-* 
         1figures 
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO

    • Property svn:ignore deleted
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO/subfiles/chap_time_domain.tex

    r10501 r11422  
    1111 
    1212% Missing things: 
    13 %  - daymod: definition of the time domain (nit000, nitend andd the calendar) 
     13%  - daymod: definition of the time domain (nit000, nitend and the calendar) 
    1414 
    1515\gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here, 
     
    2222a key feature of an ocean model as it exerts a strong influence on the structure of the computer code 
    2323(\ie on its flowchart). 
    24 In the present chapter, we provide a general description of the \NEMO time stepping strategy and 
     24In the present chapter, we provide a general description of the \NEMO  time stepping strategy and 
    2525the consequences for the order in which the equations are solved. 
    2626 
     
    4040$\rdt$ is the time step; 
    4141and the superscripts indicate the time at which a quantity is evaluated. 
    42 Each term of the RHS is evaluated at a specific time step depending on the physics with which it is associated. 
    43  
    44 The choice of the time step used for this evaluation is discussed below as well as 
     42Each term of the RHS is evaluated at a specific time stepping depending on the physics with which it is associated. 
     43 
     44The choice of the time stepping used for this evaluation is discussed below as well as 
    4545the implications for starting or restarting a model simulation. 
    4646Note that the time stepping calculation is generally performed in a single operation. 
     
    5353is usually not the variable at the after time step; 
    5454but rather it is used to store the time derivative (RHS in \autoref{eq:STP}) prior to time-stepping the equation. 
    55 Generally, the time stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt} modules, 
    56 except when using implicit vertical diffusion or calculating sea surface height in which 
    57 case time-splitting options are used. 
     55The time stepping itself is performed once at each time step where implicit vertical diffusion is computed, \ie in the \mdl{trazdf} and \mdl{dynzdf} modules. 
    5856 
    5957% ------------------------------------------------------------------------------------------------------------- 
     
    6462 
    6563The time stepping used for processes other than diffusion is the well-known leapfrog scheme 
    66 \citep{Mesinger_Arakawa_Bk76}. 
     64\citep{mesinger.arakawa_bk76}. 
    6765This scheme is widely used for advection processes in low-viscosity fluids. 
    6866It is a time centred scheme, \ie the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step. 
     
    8078To prevent it, the leapfrog scheme is often used in association with a Robert-Asselin time filter 
    8179(hereafter the LF-RA scheme). 
    82 This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied by \citet{Asselin_MWR72}, 
     80This filter, first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72}, 
    8381is a kind of laplacian diffusion in time that mixes odd and even time steps: 
    8482\begin{equation} 
     
    8886where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient. 
    8987$\gamma$ is initialized as \np{rn\_atfp} (namelist parameter). 
    90 Its default value is \np{rn\_atfp}~\forcode{= 10.e-3} (see \autoref{sec:STP_mLF}), 
    91 causing only a weak dissipation of high frequency motions (\citep{Farge1987}). 
     88Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:STP_mLF}), 
     89causing only a weak dissipation of high frequency motions (\citep{farge-coulombier_phd87}). 
    9290The addition of a time filter degrades the accuracy of the calculation from second to first order. 
    9391However, the second order truncation error is proportional to $\gamma$, which is small compared to 1. 
    9492Therefore, the LF-RA is a quasi second order accurate scheme. 
    9593The LF-RA scheme is preferred to other time differencing schemes such as predictor corrector or trapezoidal schemes, 
    96 because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme. 
     94because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme.  
    9795When used with the 2nd order space centred discretisation of the advection terms in 
    9896the momentum and tracer equations, LF-RA avoids implicit numerical diffusion: 
     
    107105 
    108106The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes. 
    109 For a tendancy $D_x$, representing a diffusion term or a restoring term to a tracer climatology 
     107For a tendency $D_x$, representing a diffusion term or a restoring term to a tracer climatology 
    110108(when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used : 
    111109\[ 
     
    115113 
    116114This is diffusive in time and conditionally stable. 
    117 The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}: 
     115The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{griffies_bk04}: 
    118116\begin{equation} 
    119117  \label{eq:STP_euler_stability} 
     
    130128 
    131129For the vertical diffusion terms, a forward time differencing scheme can be used, 
    132 but usually the numerical stability condition imposes a strong constraint on the time step. 
    133 Two solutions are available in \NEMO to overcome the stability constraint: 
    134 $(a)$ a forward time differencing scheme using a time splitting technique (\np{ln\_zdfexp}~\forcode{= .true.}) or 
    135 $(b)$ a backward (or implicit) time differencing scheme                   (\np{ln\_zdfexp}~\forcode{= .false.}). 
    136 In $(a)$, the master time step $\Delta$t is cut into $N$ fractional time steps so that 
    137 the stability criterion is reduced by a factor of $N$. 
    138 The computation is performed as follows: 
    139 \begin{alignat*}{2} 
    140   % \label{eq:STP_ts} 
    141   &x_\ast^{t - \rdt}                      &= &x^{t - \rdt} \\ 
    142   &x_\ast^{t - \rdt + L \frac{2 \rdt}{N}} &=   &x_\ast ^{t - \rdt + (L - 1) \frac{2 \rdt}{N}} 
    143                                              + \frac{2 \rdt}{N} \; DF^{t - \rdt + (L - 1) \frac{2 \rdt}{N}} 
    144   \quad \text{for $L = 1$ to $N$} \\ 
    145   &x^{t + \rdt}                           &= &x_\ast^{t + \rdt} 
    146 \end{alignat*} 
    147 with DF a vertical diffusion term. 
    148 The number of fractional time steps, $N$, is given by setting \np{nn\_zdfexp}, (namelist parameter). 
    149 The scheme $(b)$ is unconditionally stable but diffusive. It can be written as follows: 
     130but usually the numerical stability condition imposes a strong constraint on the time step. To overcome the stability constraint, a  
     131backward (or implicit) time differencing scheme is used. This scheme is unconditionally stable but diffusive and can be written as follows: 
    150132\begin{equation} 
    151133  \label{eq:STP_imp} 
     
    157139%%gm 
    158140 
    159 This scheme is rather time consuming since it requires a matrix inversion, 
    160 but it becomes attractive since a value of 3 or more is needed for N in the forward time differencing scheme. 
    161 For example, the finite difference approximation of the temperature equation is: 
     141This scheme is rather time consuming since it requires a matrix inversion. For example, the finite difference approximation of the temperature equation is: 
    162142\[ 
    163143  % \label{eq:STP_imp_zdf} 
     
    183163$c(k)$ and $d(k)$ are positive and the diagonal term is greater than the sum of the two extra-diagonal terms, 
    184164therefore a special adaptation of the Gauss elimination procedure is used to find the solution 
    185 (see for example \citet{Richtmyer1967}). 
     165(see for example \citet{richtmyer.morton_bk67}). 
    186166 
    187167% ------------------------------------------------------------------------------------------------------------- 
     
    191171\label{sec:STP_spg_ts} 
    192172 
    193 ===>>>>  TO BE written....  :-) 
     173The leapfrog environment supports a centred in time computation of the surface pressure, \ie evaluated  
     174at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln\_dynspg\_exp}\forcode{ = .true.}).  
     175This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation  
     176of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface  
     177(\np{ln\_dynspg\_ts}\forcode{ = .true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc  
     178time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of  
     179the overall flowchart, in particular to ensure exact tracer conservation (see \autoref{fig:TimeStep_flowchart}). 
     180 
     181Compared to the former use of the filtered free surface in \NEMO v3.6 (\citet{roullet.madec_JGR00}), the use of a split-explicit free surface is advantageous  
     182on massively parallel computers. Indeed, no global computations are anymore required by the elliptic solver which saves a substantial amount of communication  
     183time. Fast barotropic motions (such as tides) are also simulated with a better accuracy.  
    194184 
    195185%\gmcomment{  
     
    197187\begin{figure}[!t] 
    198188  \begin{center} 
    199     \includegraphics[]{Fig_TimeStepping_flowchart} 
     189    \includegraphics[width=\textwidth]{Fig_TimeStepping_flowchart_v4} 
    200190    \caption{ 
    201191      \protect\label{fig:TimeStep_flowchart} 
    202       Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}. 
    203       The use of a semi -implicit computation of the hydrostatic pressure gradient requires the tracer equation to 
    204       be stepped forward prior to the momentum equation. 
    205       The need for knowledge of the vertical scale factor (here denoted as $h$) requires the sea surface height and 
    206       the continuity equation to be stepped forward prior to the computation of the tracer equation. 
    207       Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here 
    208       (see \autoref{sec:DYN_spg}). 
     192      Sketch of the leapfrog time stepping sequence in \NEMO with split-explicit free surface. The latter combined 
     193       with non-linear free surface requires the dynamical tendency being updated prior tracers tendency to ensure  
     194       conservation. Note the use of time integrated fluxes issued from the barotropic loop  in subsequent calculations  
     195       of tracer advection and in the continuity equation. Details about the time-splitting scheme can be found  
     196       in \autoref{subsec:DYN_spg_ts}. 
    209197    } 
    210198  \end{center} 
     
    219207\label{sec:STP_mLF} 
    220208 
    221 Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the LF-RA scheme in order to 
     209Significant changes have been introduced by \cite{leclair.madec_OM09} in the LF-RA scheme in order to 
    222210ensure tracer conservation and to allow the use of a much smaller value of the Asselin filter parameter. 
    223211The modifications affect both the forcing and filtering treatments in the LF-RA scheme. 
     
    237225The change in the forcing formulation given by \autoref{eq:STP_forcing} (see \autoref{fig:MLF_forcing}) 
    238226has a significant effect: 
    239 the forcing term no longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}. 
     227the forcing term no longer excites the divergence of odd and even time steps \citep{leclair.madec_OM09}. 
    240228% forcing seen by the model.... 
    241 This property improves the LF-RA scheme in two respects. 
     229This property improves the LF-RA scheme in two aspects. 
    242230First, the LF-RA can now ensure the local and global conservation of tracers. 
    243231Indeed, time filtering is no longer required on the forcing part. 
    244 The influence of the Asselin filter on the forcing is be removed by adding a new term in the filter 
     232The influence of the Asselin filter on the forcing is explicitly removed by adding a new term in the filter 
    245233(last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}). 
    246234Since the filtering of the forcing was the source of non-conservation in the classical LF-RA scheme, 
    247 the modified formulation becomes conservative \citep{Leclair_Madec_OM09}. 
     235the modified formulation becomes conservative \citep{leclair.madec_OM09}. 
    248236Second, the LF-RA becomes a truly quasi -second order scheme. 
    249237Indeed, \autoref{eq:STP_forcing} used in combination with a careful treatment of static instability 
    250 (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}), 
    251 the two other main sources of time step divergence, 
     238(\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene})  
     239(the two other main sources of time step divergence), 
    252240allows a reduction by two orders of magnitude of the Asselin filter parameter. 
    253241 
     
    255243$Q^{t + \rdt / 2}$ is the forcing applied over the $[t,t + \rdt]$ time interval. 
    256244This and the change in the time filter, \autoref{eq:STP_RA}, 
    257 allows an exact evaluation of the contribution due to the forcing term between any two time steps, 
     245allows for an exact evaluation of the contribution due to the forcing term between any two time steps, 
    258246even if separated by only $\rdt$ since the time filter is no longer applied to the forcing term. 
    259247 
     
    261249\begin{figure}[!t] 
    262250  \begin{center} 
    263     \includegraphics[]{Fig_MLF_forcing} 
     251    \includegraphics[width=\textwidth]{Fig_MLF_forcing} 
    264252    \caption{ 
    265253      \protect\label{fig:MLF_forcing} 
     
    294282This is done simply by keeping the leapfrog environment (\ie the \autoref{eq:STP} three level time stepping) but 
    295283setting all $x^0$ (\textit{before}) and $x^1$ (\textit{now}) fields equal at the first time step and 
    296 using half the value of $\rdt$. 
     284using half the value of a leapfrog time step ($2 \rdt$).  
    297285 
    298286It is also possible to restart from a previous computation, by using a restart file. 
     
    303291This requires saving two time levels and many auxiliary data in the restart files in machine precision. 
    304292 
    305 Note that when a semi -implicit scheme is used to evaluate the hydrostatic pressure gradient 
    306 (see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to 
    307 be added to the restart file to ensure an exact restartability. 
    308 This is done optionally via the  \np{nn\_dynhpg\_rst} namelist parameter, 
    309 so that the size of the restart file can be reduced when restartability is not a key issue 
    310 (operational oceanography or in ensemble simulations for seasonal forecasting). 
    311  
    312 Note the size of the time step used, $\rdt$, is also saved in the restart file. 
    313 When restarting, if the the time step has been changed, a restart using an Euler time stepping scheme is imposed. 
    314 Options are defined through the  \ngn{namrun} namelist variables. 
     293Note that the time step $\rdt$, is also saved in the restart file. 
     294When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step  
     295is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting  
     296the namelist variable \np{nn\_euler}\forcode{=0}. Other options to control the time integration of the model  
     297are defined through the  \ngn{namrun} namelist variables. 
    315298%%% 
    316299\gmcomment{ 
Note: See TracChangeset for help on using the changeset viewer.