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