Changeset 11622 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex
- Timestamp:
- 2019-10-01T13:10:55+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex
r11599 r11622 13 13 14 14 {\footnotesize 15 \begin{tabular x}{\textwidth}{l||X|X}16 Release & Author(s) & Modifications\\15 \begin{tabular}{l||l|l} 16 Release & Author(s) & Modifications \\ 17 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 18 {\em 4.0} & {\em J\'{e}r\^{o}me Chanut and Tim Graham} & {\em Review } \\ 19 {\em 3.6} & {\em Christian \'{E}th\'{e} } & {\em Update } \\ 20 {\em $\leq$ 3.4} & {\em Gurvan Madec } & {\em First version} \\ 21 \end{tabular} 23 22 } 24 23 … … 26 25 27 26 % Missing things: 28 % - daymod: definition of the time domain (nit000, nitend and the calendar) 29 30 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here, 31 would help ==> to be added} 32 33 Having defined the continuous equations in \autoref{chap:MB}, we need now to choose a time discretization, 27 % - daymod: definition of the time domain (nit000, nitend and the calendar) 28 29 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which 30 could be referred to here, would help ==> to be added} 31 32 Having defined the continuous equations in \autoref{chap:MB}, 33 we need now to choose a time discretization, 34 34 a key feature of an ocean model as it exerts a strong influence on the structure of the computer code 35 35 (\ie\ on its flowchart). 36 In the present chapter, we provide a general description of the \NEMO\ 36 In the present chapter, we provide a general description of the \NEMO\ time stepping strategy and 37 37 the consequences for the order in which the equations are solved. 38 38 … … 47 47 \end{equation} 48 48 where $x$ stands for $u$, $v$, $T$ or $S$; 49 RHS is the Right-Hand-Side of the corresponding time evolution equation;49 RHS is the \textbf{R}ight-\textbf{H}and-\textbf{S}ide of the corresponding time evolution equation; 50 50 $\rdt$ is the time step; 51 51 and the superscripts indicate the time at which a quantity is evaluated. 52 Each term of the RHS is evaluated at a specific time stepping depending on the physics with which it is associated. 52 Each term of the RHS is evaluated at a specific time stepping depending on 53 the physics with which it is associated. 53 54 54 55 The choice of the time stepping used for this evaluation is discussed below as well as 55 56 the implications for starting or restarting a model simulation. 56 57 Note that the time stepping calculation is generally performed in a single operation. 57 With such a complex and nonlinear system of equations it would be dangerous to let a prognostic variable evolve in58 time for each term separately.58 With such a complex and nonlinear system of equations it would be dangerous to 59 let a prognostic variable evolve in time for each term separately. 59 60 60 61 The three level scheme requires three arrays for each prognostic variable. … … 62 63 The third array, although referred to as $x_a$ (after) in the code, 63 64 is usually not the variable at the after time step; 64 but rather it is used to store the time derivative (RHS in \autoref{eq:TD}) prior to time-stepping the equation. 65 The 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. 65 but rather it is used to store the time derivative (RHS in \autoref{eq:TD}) 66 prior to time-stepping the equation. 67 The time stepping itself is performed once at each time step where 68 implicit vertical diffusion is computed, 69 \ie\ in the \mdl{trazdf} and \mdl{dynzdf} modules. 66 70 67 71 %% ================================================================================================= … … 69 73 \label{sec:TD_leap_frog} 70 74 71 The time stepping used for processes other than diffusion is the well-known leapfrog scheme72 \citep{mesinger.arakawa_bk76}.75 The time stepping used for processes other than diffusion is 76 the well-known \textbf{L}eap\textbf{F}rog (LF) scheme \citep{mesinger.arakawa_bk76}. 73 77 This scheme is widely used for advection processes in low-viscosity fluids. 74 It is a time centred scheme, \ie\ the RHS in \autoref{eq:TD} is evaluated at time step $t$, the now time step. 78 It is a time centred scheme, \ie\ the RHS in \autoref{eq:TD} is evaluated at 79 time step $t$, the now time step. 75 80 It may be used for momentum and tracer advection, pressure gradient, and Coriolis terms, 76 81 but not for diffusion terms. 77 82 It is an efficient method that achieves second-order accuracy with 78 83 just one right hand side evaluation per time step. 79 Moreover, it does not artificially damp linear oscillatory motion nor does it produce instability by80 amplifying the oscillations.84 Moreover, it does not artificially damp linear oscillatory motion 85 nor does it produce instability by amplifying the oscillations. 81 86 These advantages are somewhat diminished by the large phase-speed error of the leapfrog scheme, 82 and the unsuitability of leapfrog differencing for the representation of diffusion and Rayleigh damping processes. 87 and the unsuitability of leapfrog differencing for the representation of diffusion and 88 Rayleigh damping processes. 83 89 However, the scheme allows the coexistence of a numerical and a physical mode due to 84 90 its leading third order dispersive error. 85 91 In other words a divergence of odd and even time steps may occur. 86 To prevent it, the leapfrog scheme is often used in association with a Robert-Asselin time filter 87 (hereafter the LF-RA scheme). 88 This filter, first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72}, 92 To prevent it, the leapfrog scheme is often used in association with 93 a \textbf{R}obert-\textbf{A}sselin time filter (hereafter the LF-RA scheme). 94 This filter, 95 first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72}, 89 96 is a kind of laplacian diffusion in time that mixes odd and even time steps: 90 97 \begin{equation} … … 99 106 However, the second order truncation error is proportional to $\gamma$, which is small compared to 1. 100 107 Therefore, the LF-RA is a quasi second order accurate scheme. 101 The LF-RA scheme is preferred to other time differencing schemes such as predictor corrector or trapezoidal schemes, 102 because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme. 103 When used with the 2nd order space centred discretisation of the advection terms in 108 The LF-RA scheme is preferred to other time differencing schemes such as 109 predictor corrector or trapezoidal schemes, because the user has an explicit and simple control of 110 the magnitude of the time diffusion of the scheme. 111 When used with the 2$^nd$ order space centred discretisation of the advection terms in 104 112 the momentum and tracer equations, LF-RA avoids implicit numerical diffusion: 105 diffusion is set explicitly by the user through the Robert-Asselin 106 filter parameter andthe viscosity and diffusion coefficients.113 diffusion is set explicitly by the user through the Robert-Asselin filter parameter and 114 the viscosity and diffusion coefficients. 107 115 108 116 %% ================================================================================================= … … 110 118 \label{sec:TD_forward_imp} 111 119 112 The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes. 120 The leapfrog differencing scheme is unsuitable for 121 the representation of diffusion and damping processes. 113 122 For a tendency $D_x$, representing a diffusion term or a restoring term to a tracer climatology 114 123 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used : … … 119 128 120 129 This is diffusive in time and conditionally stable. 121 The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{griffies_bk04}: 130 The conditions for stability of second and fourth order horizontal diffusion schemes are 131 \citep{griffies_bk04}: 122 132 \begin{equation} 123 133 \label{eq:TD_euler_stability} … … 128 138 \end{cases} 129 139 \end{equation} 130 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is the mixing coefficient. 140 where $e$ is the smallest grid size in the two horizontal directions and 141 $A^h$ is the mixing coefficient. 131 142 The linear constraint \autoref{eq:TD_euler_stability} is a necessary condition, but not sufficient. 132 143 If it is not satisfied, even mildly, then the model soon becomes wildly unstable. 133 The instability can be removed by either reducing the length of the time steps or reducing the mixing coefficient. 144 The instability can be removed by either reducing the length of the time steps or 145 reducing the mixing coefficient. 134 146 135 147 For the vertical diffusion terms, a forward time differencing scheme can be used, 136 but usually the numerical stability condition imposes a strong constraint on the time step. To overcome the stability constraint, a 137 backward (or implicit) time differencing scheme is used. This scheme is unconditionally stable but diffusive and can be written as follows: 148 but usually the numerical stability condition imposes a strong constraint on the time step. 149 To overcome the stability constraint, a backward (or implicit) time differencing scheme is used. 150 This scheme is unconditionally stable but diffusive and can be written as follows: 138 151 \begin{equation} 139 152 \label{eq:TD_imp} … … 145 158 %%gm 146 159 147 This scheme is rather time consuming since it requires a matrix inversion. For example, the finite difference approximation of the temperature equation is: 160 This scheme is rather time consuming since it requires a matrix inversion. 161 For example, the finite difference approximation of the temperature equation is: 148 162 \[ 149 163 % \label{eq:TD_imp_zdf} … … 165 179 \end{align*} 166 180 167 \autoref{eq:TD_imp_mat} is a linear system of equations with an associated matrix which is tridiagonal. 168 Moreover, 169 $c(k)$ and $d(k)$ are positive and the diagonal term is greater than the sum of the two extra-diagonal terms, 181 \autoref{eq:TD_imp_mat} is a linear system of equations with 182 an associated matrix which is tridiagonal. 183 Moreover, $c(k)$ and $d(k)$ are positive and 184 the diagonal term is greater than the sum of the two extra-diagonal terms, 170 185 therefore a special adaptation of the Gauss elimination procedure is used to find the solution 171 186 (see for example \citet{richtmyer.morton_bk67}). … … 175 190 \label{sec:TD_spg_ts} 176 191 177 The leapfrog environment supports a centred in time computation of the surface pressure, \ie\ evaluated 178 at \textit{now} time step. This refers to as the explicit free surface case in the code (\np[=.true.]{ln_dynspg_exp}{ln\_dynspg\_exp}). 179 This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation 180 of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface 181 (\np[=.true.]{ln_dynspg_ts}{ln\_dynspg\_ts}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc 182 time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of 183 the overall flowchart, in particular to ensure exact tracer conservation (see \autoref{fig:TD_TimeStep_flowchart}). 184 185 Compared 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 186 on massively parallel computers. Indeed, no global computations are anymore required by the elliptic solver which saves a substantial amount of communication 187 time. Fast barotropic motions (such as tides) are also simulated with a better accuracy. 192 The leapfrog environment supports a centred in time computation of the surface pressure, 193 \ie\ evaluated at \textit{now} time step. 194 This refers to as the explicit free surface case in the code 195 (\np[=.true.]{ln_dynspg_exp}{ln\_dynspg\_exp}). 196 This choice however imposes a strong constraint on the time step which 197 should be small enough to resolve the propagation of external gravity waves. 198 As a matter of fact, one rather use in a realistic setup, 199 a split-explicit free surface (\np[=.true.]{ln_dynspg_ts}{ln\_dynspg\_ts}) in which 200 barotropic and baroclinic dynamical equations are solved separately with ad-hoc time steps. 201 The use of the time-splitting (in combination with non-linear free surface) imposes 202 some constraints on the design of the overall flowchart, 203 in particular to ensure exact tracer conservation (see \autoref{fig:TD_TimeStep_flowchart}). 204 205 Compared to the former use of the filtered free surface in \NEMO\ v3.6 (\citet{roullet.madec_JGR00}), 206 the use of a split-explicit free surface is advantageous on massively parallel computers. 207 Indeed, no global computations are anymore required by the elliptic solver which 208 saves a substantial amount of communication time. 209 Fast barotropic motions (such as tides) are also simulated with a better accuracy. 188 210 189 211 %\gmcomment{ 190 \begin{figure} [!t]212 \begin{figure} 191 213 \centering 192 214 \includegraphics[width=0.66\textwidth]{Fig_TimeStepping_flowchart_v4} 193 215 \caption[Leapfrog time stepping sequence with split-explicit free surface]{ 194 216 Sketch of the leapfrog time stepping sequence in \NEMO\ with split-explicit free surface. 195 The latter combined with non-linear free surface requires the dynamical tendency being196 updated prior tracers tendency to ensure conservation.217 The latter combined with non-linear free surface requires 218 the dynamical tendency being updated prior tracers tendency to ensure conservation. 197 219 Note the use of time integrated fluxes issued from the barotropic loop in 198 220 subsequent calculations of tracer advection and in the continuity equation. … … 203 225 204 226 %% ================================================================================================= 205 \section{Modified Leap frog -- Asselin filter scheme}227 \section{Modified LeapFrog -- Robert Asselin filter scheme (LF-RA)} 206 228 \label{sec:TD_mLF} 207 229 208 Significant changes have been introduced by \cite{leclair.madec_OM09} in the LF-RA scheme in order to 209 ensure tracer conservation and to allow the use of a much smaller value of the Asselin filter parameter. 230 Significant changes have been introduced by \cite{leclair.madec_OM09} in 231 the LF-RA scheme in order to ensure tracer conservation and to 232 allow the use of a much smaller value of the Asselin filter parameter. 210 233 The modifications affect both the forcing and filtering treatments in the LF-RA scheme. 211 234 212 In a classical LF-RA environment, the forcing term is centred in time,213 \ie\ it is time-stepped over a $2 \rdt$ period:235 In a classical LF-RA environment, 236 the forcing term is centred in time, \ie\ it is time-stepped over a $2 \rdt$ period: 214 237 $x^t = x^t + 2 \rdt Q^t$ where $Q$ is the forcing applied to $x$, 215 and the time filter is given by \autoref{eq:TD_asselin} so that $Q$ is redistributed over several time step. 238 and the time filter is given by \autoref{eq:TD_asselin} so that 239 $Q$ is redistributed over several time step. 216 240 In the modified LF-RA environment, these two formulations have been replaced by: 217 241 \begin{gather} … … 222 246 - \gamma \, \rdt \, \lt( Q^{t + \rdt / 2} - Q^{t - \rdt / 2} \rt) 223 247 \end{gather} 224 The change in the forcing formulation given by \autoref{eq:TD_forcing} (see \autoref{fig:TD_MLF_forcing}) 225 has a significant effect: 226 the forcing term no longer excites the divergence of odd and even time steps \citep{leclair.madec_OM09}. 248 The change in the forcing formulation given by \autoref{eq:TD_forcing} 249 (see \autoref{fig:TD_MLF_forcing}) has a significant effect: 250 the forcing term no longer excites the divergence of odd and even time steps 251 \citep{leclair.madec_OM09}. 227 252 % forcing seen by the model.... 228 253 This property improves the LF-RA scheme in two aspects. 229 254 First, the LF-RA can now ensure the local and global conservation of tracers. 230 255 Indeed, time filtering is no longer required on the forcing part. 231 The influence of the Asselin filter on the forcing is explicitly removed by adding a new term in the filter232 (last term in \autoref{eq:TD_RA} compared to \autoref{eq:TD_asselin}).256 The influence of the Asselin filter on the forcing is explicitly removed by 257 adding a new term in the filter (last term in \autoref{eq:TD_RA} compared to \autoref{eq:TD_asselin}). 233 258 Since the filtering of the forcing was the source of non-conservation in the classical LF-RA scheme, 234 259 the modified formulation becomes conservative \citep{leclair.madec_OM09}. 235 Second, the LF-RA becomes a truly quasi 260 Second, the LF-RA becomes a truly quasi-second order scheme. 236 261 Indeed, \autoref{eq:TD_forcing} used in combination with a careful treatment of static instability 237 262 (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}) … … 245 270 even if separated by only $\rdt$ since the time filter is no longer applied to the forcing term. 246 271 247 \begin{figure} [!t]272 \begin{figure} 248 273 \centering 249 274 \includegraphics[width=0.66\textwidth]{Fig_MLF_forcing} … … 271 296 \end{listing} 272 297 273 The first time step of this three level scheme when starting from initial conditions is a forward step274 (Euler time integration):298 The first time step of this three level scheme when starting from initial conditions is 299 a forward step (Euler time integration): 275 300 \[ 276 301 % \label{eq:TD_DOM_euler} 277 302 x^1 = x^0 + \rdt \ \text{RHS}^0 278 303 \] 279 This is done simply by keeping the leapfrog environment (\ie\ the \autoref{eq:TD} three level time stepping) but 304 This is done simply by keeping the leapfrog environment 305 (\ie\ the \autoref{eq:TD} three level time stepping) but 280 306 setting all $x^0$ (\textit{before}) and $x^1$ (\textit{now}) fields equal at the first time step and 281 307 using half the value of a leapfrog time step ($2 \rdt$). … … 286 312 running the model for $2N$ time steps in one go, 287 313 or by performing two consecutive experiments of $N$ steps with a restart. 288 This requires saving two time levels and many auxiliary data in the restart files in machine precision. 314 This requires saving two time levels and many auxiliary data in 315 the restart files in machine precision. 289 316 290 317 Note that the time step $\rdt$, is also saved in the restart file. 291 When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step 292 is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting 293 the namelist variable \np[=0]{nn_euler}{nn\_euler}. Other options to control the time integration of the model 294 are defined through the \nam{run}{run} namelist variables. 318 When restarting, if the time step has been changed, or 319 one of the prognostic variables at \textit{before} time step is missing, 320 an Euler time stepping scheme is imposed. 321 A forward initial step can still be enforced by the user by 322 setting the namelist variable \np[=0]{nn_euler}{nn\_euler}. 323 Other options to control the time integration of the model are defined through 324 the \nam{run}{run} namelist variables. 325 295 326 \gmcomment{ 296 327 add here how to force the restart to contain only one time step for operational purposes … … 298 329 add also the idea of writing several restart for seasonal forecast : how is it done ? 299 330 300 verify that all namelist para rmeters are truly described331 verify that all namelist parameters are truly described 301 332 302 333 a word on the check of restart ..... … … 309 340 \label{subsec:TD_time} 310 341 311 Options are defined through the 342 Options are defined through the\nam{dom}{dom} namelist variables. 312 343 \colorbox{yellow}{add here a few word on nit000 and nitend} 313 344 314 345 \colorbox{yellow}{Write documentation on the calendar and the key variable adatrj} 315 346 316 add a description of daymod, and the model cal andar (leap-year and co)317 318 } 347 add a description of daymod, and the model calendar (leap-year and co) 348 349 } %% end add 319 350 320 351 \gmcomment{ % add implicit in vvl case and Crant-Nicholson scheme
Note: See TracChangeset
for help on using the changeset viewer.