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 2211 – NEMO

Changeset 2211


Ignore:
Timestamp:
2010-10-12T12:08:06+02:00 (14 years ago)
Author:
sga
Message:

NEMO branch DEV_r1826_DOC
Edits to STP chapter.

File:
1 edited

Legend:

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

    r2164 r2211  
    2222Having defined the continuous equations in Chap.~\ref{PE}, we need now to choose  
    2323a time discretization. In the present chapter, we provide a general description of the \NEMO  
    24 time stepping strategy and its consequences for the order in which the equations are 
     24time stepping strategy and the consequences for the order in which the equations are 
    2525solved. 
    2626 
     
    4040corresponding time evolution equation; $\rdt$ is the time step; and the  
    4141superscripts indicate the time at which a quantity is evaluated. Each term of the  
    42 RHS is evaluated at a specific time step(s) depending on the physics with which  
     42RHS is evaluated at a specific time step depending on the physics with which  
    4343it is associated.  
    4444 
    4545The choice of the time step used for this evaluation is discussed below as  
    46 well as the implications in terms of starting or restarting a model  
    47 simulation. Note that the time stepping is generally performed in a one step  
     46well as the implications for starting or restarting a model  
     47simulation. Note that the time stepping calculation is generally performed in a single  
    4848operation. With such a complex and nonlinear system of equations it would be  
    4949dangerous to let a prognostic variable evolve in time for each term separately. 
    5050 
    51 The three level scheme requires three arrays for each prognostic variables.  
    52 For each variable $x$ there is $x_b$ (before) and $x_n$ (now). The third array,  
     51The three level scheme requires three arrays for each prognostic variable.  
     52For each variable $x$ there is $x_b$ (before), $x_n$ (now) and $x_a$. The third array,  
    5353although referred to as $x_a$ (after) in the code, is usually not the variable at  
    5454the after time step; but rather it is used to store the time derivative (RHS in  
    5555\eqref{Eq_STP}) prior to time-stepping the equation. Generally, the time  
    56 stepping is performed once at each time step in \mdl{tranxt} and \mdl{dynnxt}  
    57 modules, except for implicit vertical diffusion or sea surface height when  
    58 time-splitting options are used. 
     56stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt}  
     57modules, except when using implicit vertical diffusion or calculating sea surface height  
     58in which case time-splitting options are used. 
    5959 
    6060% ------------------------------------------------------------------------------------------------------------- 
     
    6464\label{STP_leap_frog} 
    6565 
    66 The time stepping used for non-diffusive processes is the well-known leapfrog 
    67 scheme \citep{Mesinger_Arakawa_Bk76}. It is a time centred scheme, $i.e.$  
     66The time stepping used for processes other than diffusion is the well-known leapfrog 
     67scheme \citep{Mesinger_Arakawa_Bk76}.  This scheme is widely used for advection  
     68processes in low-viscosity fluids. It is a time centred scheme, $i.e.$  
    6869the RHS in \eqref{Eq_STP} is evaluated at time step $t$, the now time step.  
    69 It is only used for non-diffusive terms, that is momentum and tracer advection,  
    70 pressure gradient, and Coriolis terms. This scheme is widely used for advective  
    71 processes in low-viscosity fluids. It is an efficient method that achieves  
     70It may be used for momentum and tracer advection,  
     71pressure gradient, and Coriolis terms, but not for diffusion terms. 
     72It is an efficient method that achieves  
    7273second-order accuracy with just one right hand side evaluation per time step.  
    7374Moreover, it does not artificially damp linear oscillatory motion nor does it produce  
    7475instability by amplifying the oscillations. These advantages are somewhat diminished  
    7576by the large phase-speed error of the leapfrog scheme, and the unsuitability  
    76 of leapfrog differencing for the representation of diffusive and Rayleigh  
     77of leapfrog differencing for the representation of diffusion and Rayleigh  
    7778damping processes. However, the scheme allows the coexistence of a numerical  
    7879and a physical mode due to its leading third order dispersive error. In other words a  
    7980divergence of odd and even time steps may occur. To prevent it, the leapfrog scheme  
    80 is often used in association with a Robert-Asselin time filter (thereafter the LF-RA scheme).  
     81is often used in association with a Robert-Asselin time filter (hereafter the LF-RA scheme).  
    8182This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied  
    8283by \citet{Asselin_MWR72}, is a kind of laplacian diffusion in time that mixes odd and  
     
    8788where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin  
    8889coefficient. $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter).  
    89 Its default value is \textit{now} (see \S~\ref{STP_mLF}) \np{rn\_atfp}=$10^{-3}$,  
     90Its default value is \np{rn\_atfp}=$10^{-3}$ (see \S~\ref{STP_mLF}),  
    9091causing only a weak dissipation of high frequency motions (\citep{Farge1987}).  
    91 The addition of a time filter does, nevertheless, degrade the accuracy of the  
     92The addition of a time filter degrades the accuracy of the  
    9293calculation from second to first order. However, the second order truncation  
    9394error is proportional to $\gamma$, which is small compared to 1. Therefore,  
    9495the LF-RA is a quasi second order accurate scheme. The LF-RA scheme  
    95 has been preferred to other time differencing schemes such as  
     96is preferred to other time differencing schemes such as  
    9697predictor corrector or trapezoidal schemes, because the user has an explicit  
    9798and simple control of the magnitude of the time diffusion of the scheme.  
    98 In association with the 2nd order centred space discretisation of the  
    99 advective terms in the momentum and tracer equations, it avoids implicit  
    100 numerical diffusion in both the time and space discretisations of the  
    101 advective term: they are both set explicitly by the user through the Robert-Asselin  
    102 filter parameter and the viscous and diffusive coefficients. 
     99When used with the 2nd order space centred discretisation of the  
     100advection terms in the momentum and tracer equations, LF-RA avoids implicit  
     101numerical diffusion: diffusion is set explicitly by the user through the Robert-Asselin  
     102filter parameter and the viscosity and diffusion coefficients. 
    103103 
    104104% ------------------------------------------------------------------------------------------------------------- 
     
    109109 
    110110The leapfrog differencing scheme is unsuitable for the representation of  
    111 diffusive and damping processes. For a tendancy $D_x$, representing a  
    112 diffusive term or a restoring term to a tracer climatology  
     111diffusion and damping processes. For a tendancy $D_x$, representing a  
     112diffusion term or a restoring term to a tracer climatology  
    113113(when present, see \S~\ref{TRA_dmp}), a forward time differencing scheme 
    114114 is used : 
     
    117117\end{equation}  
    118118 
    119 This is diffusive in time and conditionally stable. For example, the  
     119This is diffusive in time and conditionally stable. The  
    120120conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}: 
    121121\begin{equation} \label{Eq_STP_euler_stability} 
     
    134134 
    135135For the vertical diffusion terms, a forward time differencing scheme can be  
    136 used, but usually the numerical stability condition implies a strong  
     136used, but usually the numerical stability condition imposes a strong  
    137137constraint on the time step. Two solutions are available in \NEMO to overcome  
    138138the stability constraint: $(a)$ a forward time differencing scheme using a  
    139139time splitting technique (\np{ln\_zdfexp}=.true.) or $(b)$ a backward (or implicit)  
    140 time differencing scheme by \np{ln\_zdfexp}=.false.). In $(a)$, the master  
     140time differencing scheme (\np{ln\_zdfexp}=.false.). In $(a)$, the master  
    141141time step $\Delta $t is cut into $N$ fractional time steps so that the  
    142 stability criterion is reduced by a factor of $N$. The computation is done as  
     142stability criterion is reduced by a factor of $N$. The computation is performed as  
    143143follows: 
    144144\begin{equation} \label{Eq_STP_ts} 
     
    152152\end{equation} 
    153153with DF a vertical diffusion term. The number of fractional time steps, $N$, is given  
    154 by setting \np{n\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
     154by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
    155155stable but diffusive. It can be written as follows: 
    156156\begin{equation} \label{Eq_STP_imp} 
     
    159159 
    160160This scheme is rather time consuming since it requires a matrix inversion,  
    161 but it becomes attractive since a splitting factor of 3 or more is needed  
    162 for the forward time differencing scheme. For example, the finite difference  
     161but it becomes attractive since a value of 3 or more is needed for N in 
     162the forward time differencing scheme. For example, the finite difference  
    163163approximation of the temperature equation is: 
    164164\begin{equation} \label{Eq_STP_imp_zdf} 
     
    168168\end{equation} 
    169169where RHS is the right hand side of the equation except for the vertical diffusion term.  
     170\sgacomment{why change from T to u in the following equation?} 
    170171We rewrite \eqref{Eq_STP_imp} as: 
    171172\begin{equation} \label{Eq_STP_imp_mat} 
     
    179180\end{align*} 
    180181 
    181 \eqref{Eq_STP_imp_mat} is a linear system of equations which associated  
    182 matrix is tridiagonal. Moreover, $c(k)$ and $d(k)$ are positive and the diagonal  
     182\eqref{Eq_STP_imp_mat} is a linear system of equations with an associated  
     183matrix which is tridiagonal. Moreover, $c(k)$ and $d(k)$ are positive and the diagonal  
    183184term is greater than the sum of the two extra-diagonal terms, therefore a special  
    184185adaptation of the Gauss elimination procedure is used to find the solution  
     
    198199\includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_TimeStepping_flowchart.pdf} 
    199200\caption{Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}.  
    200 The use of semi-implicit computation of the hydrostatic pressure gradient requires 
    201 the tracer equation to be step forward prior to the momentum equation.  
    202 The need of the knowledge of the vertical scale factor (here denoted as $h$) 
    203 requires the sea surface height and the continuity equation to be step forward 
     201The use of a semi-implicit computation of the hydrostatic pressure gradient requires 
     202the tracer equation to be stepped forward prior to the momentum equation.  
     203The need for knowledge of the vertical scale factor (here denoted as $h$) 
     204requires the sea surface height and the continuity equation to be stepped forward 
    204205prior to the computation of the tracer equation. 
    205 Note that how the surface pressure gradient $\nabla p_s$ is evaluated is not represented here  
     206Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here  
    206207(see \S~\ref{DYN_spg}). } 
    207208\end{center}   \end{figure} 
     
    212213by introducing a semi-implicit computation of the hydrostatic pressure gradient term 
    213214\citep{Brown_Campana_MWR78}. Instead of evaluating the pressure at $t$, a linear  
    214 combination of $t-\rdt$, $t$ and $t+\rdt$ is used (see \S~\ref{DYN_hpg_imp}).   
    215 This technique, controlled by \np{nn\_dynhpg\_rst} namelist parameter, does not  
    216 require a significant additional computational coast when tracers and thus density  
    217 is time stepped before the dynamics, a choice made in \NEMO  
     215combination of values at $t-\rdt$, $t$ and $t+\rdt$ is used (see \S~\ref{DYN_hpg_imp}).   
     216This technique, controlled by the \np{nn\_dynhpg\_rst} namelist parameter, does not  
     217introduce a significant additional computational cost when tracers and thus density  
     218is time stepped before the dynamics. This time step ordering is used in \NEMO  
    218219(Fig.\ref{Fig_TimeStep_flowchart}). 
    219220 
     
    225226as the Forward-Backward scheme used in MOM \citep{Griffies_al_OS05} and more  
    226227efficient than the LF-AM3 scheme (leapfrog time stepping combined with a third order 
    227 Adams-Moulthon interpolation for the predictor phase) used in ROMS  
     228Adams-Moulton interpolation for the predictor phase) used in ROMS  
    228229\citep{Shchepetkin_McWilliams_OM05}.  
    229230 
    230 In fact, this technique is efficient when the physical phenomenum that  
    231 controls the time-step is internal gravity waves (IGWs). Indeed, it is  
     231In fact, this technique is efficient when the physical phenomenon that  
     232limits the time-step is internal gravity waves (IGWs). Indeed, it is  
    232233equivalent to applying a time filter to the pressure gradient to eliminate high  
    233234frequency IGWs. Obviously, the doubling of the time-step is achievable only  
    234235if no other factors control the time-step, such as the stability limits associated  
    235236with advection, diffusion or Coriolis terms. For example, it is useless in low resolution 
    236 global ocean configurations as inertial oscillations in vicinity of the North Pole  
    237 are the limiting factor of the time step. It is also often useless in very high  
    238 resolution configurations where the strong currents and small grid cells exert  
     237global ocean configurations, since inertial oscillations in the vicinity of the North Pole  
     238are the limiting factor for the time step. It is also often useless in very high  
     239resolution configurations where strong currents and small grid cells exert  
    239240the strongest constraint on the time step. 
     241\sgacomment{ not sure "useless" is the right word here. "valueless", "inefficient"?} 
    240242 
    241243 
     
    247249 
    248250Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the  
    249 LF-RA scheme in order to ensure the tracer conservation and to allow the use of  
    250 a much smaller value of the Asselin filter parameter. The modifications concern  
    251 both the forcing and filtering treatment in the LF-RA scheme. 
     251LF-RA scheme in order to ensure tracer conservation and to allow the use of  
     252a much smaller value of the Asselin filter parameter. The modifications affect  
     253both the forcing and filtering treatments in the LF-RA scheme. 
    252254 
    253255In a classical LF-RA environment, the forcing term is centred in time, $i.e.$  
    254256it is time-stepped over a $2\rdt$ period:  $x^t  = x^t + 2\rdt Q^t $ where $Q$  
    255 is the forcing applied on $x$, and the filter is given by \eqref{Eq_STP_asselin}.  
     257is the filtered forcing applied to $x$, and the filter is given by \eqref{Eq_STP_asselin}.  
    256258In the modified LF-RA environment, these two formulations have been replaced by: 
    257259\begin{align}  
     
    261263           - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]                          \label{Eq_STP_RA} 
    262264\end{align} 
     265\sgacomment{Q(t)=f(x(t-dt),x(t),x(t+dt)), Q(t-dt/2)?} 
    263266 
    264267The change in the forcing formulation given by \eqref{Eq_STP_forcing}  
    265 (see Fig.\ref{Fig_MLF_forcing}) has a paramount effect: the forcing term no  
     268(see Fig.\ref{Fig_MLF_forcing}) has a significant effect: the forcing term no  
    266269longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}.  
    267 This property allows to improve the LF-RA scheme in two aspects.  
     270This property improves the LF-RA scheme in two respects.  
    268271First, the LF-RA becomes a truly quasi-second order scheme. Indeed,  
    269 \eqref{Eq_STP_forcing} used in combination with a careful treatment of the static  
    270 instabilities (\S\ref{ZDF_evd}) and of the TKE physics (\S\ref{ZDF_tke_ene}), 
    271 the two main other sources of time step divergence, allows a reduction by two order  
     272\eqref{Eq_STP_forcing} used in combination with a careful treatment of static  
     273instability (\S\ref{ZDF_evd}) and of the TKE physics (\S\ref{ZDF_tke_ene}), 
     274the two other main sources of time step divergence, allows a reduction by two orders  
    272275of magnitude of the Asselin filter parameter.  
    273276Second, the LF-RA can now ensure the local and global conservation of tracers. 
    274 Indeed, the time filtering is no more required on the forcing part. The influence of  
     277Indeed, time filtering is no longer required on the forcing part.  
     278\sgacomment{ but Q is described above as the forcing part!} The influence of  
    275279the forcing in the Asselin filter can be removed by adding a new term in the filter 
    276280(last term in \eqref{Eq_STP_RA} compared to \eqref{Eq_STP_asselin}). Since  
     
    282286in the time filter, \eqref{Eq_STP_RA}, allows an exact evaluation of the  
    283287contribution due to the forcing term between any two time steps,  
    284 even if separated by only $\rdt$ as the time filter is no more applied on the 
     288even if separated by only $\rdt$ since the time filter is no longer applied to the 
    285289forcing term. 
    286290 
     
    294298%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    295299 
     300\sgacomment{two methods in caption sound the same} 
    296301 
    297302% ------------------------------------------------------------------------------------------------------------- 
     
    309314   x^1 = x^0 + \rdt \ \text{RHS}^0 
    310315\end{equation} 
    311 This is done simply by keeping the leapfrog environment but setting at the first time step 
    312 only both a half $\rdt$ and the equality of all \textit{before} and \textit{now} fields. 
     316This is done simply by keeping the leapfrog environment but setting all $x^0$ (\textit{before}) 
     317and $x^{1/2}$ (\textit{now}) fields equal at the first time step. 
    313318 
    314319It is also possible to restart from a previous computation, by using a  
     
    322327Note that when a semi-implicit scheme is used to evaluate the hydrostatic pressure  
    323328gradient (see \S\ref{DYN_hpg_imp}), an extra three-dimensional field has to be  
    324 added in the restart file to ensure an exact restartability. This is done only optionally  
    325 via the namelist parameter \np{nn\_dynhpg\_rst}, so that a reduction of the size of  
    326 restart file can be obtained when the restartability is not a key issue (operational  
    327 oceanography or ensemble simulation for seasonal forcast). 
     329added to the restart file to ensure an exact restartability. This is done optionally  
     330via the namelist parameter \np{nn\_dynhpg\_rst}, so that the size of the 
     331restart file can be reduced when restartability is not a key issue (operational  
     332oceanography or in ensemble simulations for seasonal forecasting). 
    328333 
    329334Note the size of the time step used, $\rdt$, is also saved in the restart file.  
    330335When restarting, if the the time step has been changed, a restart using an Euler time  
    331 stepping is imposed.  
     336stepping scheme is imposed.  
    332337%%% 
    333338\gmcomment{ 
Note: See TracChangeset for help on using the changeset viewer.