1.Guangzhou Institute of Tropical and Marine Meteorology/Key Laboratory of Regional Numerical Weather Prediction, Guangzhou 510640, China 2.National Meteorological Center, Beijing 100081, China Manuscript received: 2020-05-06 Manuscript revised: 2020-09-14 Manuscript accepted: 2020-11-10 Abstract:Construction of high-order difference schemes based on Taylor series expansion has long been a hot topic in computational mathematics, while its application in comprehensive weather models is still very rare. Here, the properties of high-order finite difference schemes are studied based on idealized numerical testing, for the purpose of their application in the Global/Regional Assimilation and Prediction System (GRAPES) model. It is found that the pros and cons due to grid staggering choices diminish with higher-order schemes based on linearized analysis of the one-dimensional gravity wave equation. The improvement of higher-order difference schemes is still obvious for the mesh with smooth varied grid distance. The results of discontinuous square wave testing also exhibits the superiority of high-order schemes. For a model grid with severe non-uniformity and non-orthogonality, the advantage of high-order difference schemes is inapparent, as shown by the results of two-dimensional idealized advection tests under a terrain-following coordinate. In addition, the increase in computational expense caused by high-order schemes can be avoided by the precondition technique used in the GRAPES model. In general, a high-order finite difference scheme is a preferable choice for the tropical regional GRAPES model with a quasi-uniform and quasi-orthogonal grid mesh. Keywords: high-order difference scheme, dispersion, uniform, orthogonal, computational efficiency 摘要:基于泰勒展开构造高阶精度有限差分方案很早就成为了计算数学界的热门话题,但是它在成熟的数值天气预报模式中仍然很少被应用。为了将高阶精度有限差分方案应用于GRAPES(Global/Regional Assimilation and Prediction System)模式,本文通过理想试验对高阶精度有限差分方案的相关性质进行了分析。一维重力波的线性分析结果表明,在高阶精度差分方案下不同跳点网格方案的影响很小。一维平流试验结果表明:对于网格距离缓慢变化的非均匀网格,高阶差分方案的改进效果仍然十分明显,不连续方波试验的结果也表明了高阶方案的优越性。在地形追随坐标系下的二维质量平流试验结果表明,当模式网格的非均匀性和非正交性变得很明显时,高阶方案的改进效果变得不是很明显。通过在GRAPES模式中采用预条件技术,可以有效地避免高阶方案引起计算量增加的问题。总而言之,对于准均匀和准正交网格的热带区域GRAPES模式来说,发展基于高阶精度有限差分方案的动力框架是一种可行的选择。 关键词:高阶精度差分方案, 频散, 非均匀, 正交性, 计算效率
HTML
--> --> -->
2. Equations of high-order finite difference schemes The equations for finite difference schemes with 2nd-, 4th- and 6th-order accuracy are displayed in Table 1 (for details of derivation, see Appendix A). The number of grid points used in the computational stencil increases from three to seven with the accuracy raised from 2nd to 6th order, so it is an important issue to deal with the computational efficiency problem for application of high-order finite difference schemes.
Notes: $ f $ represents an arbitrary function, and $ \Delta x $ represents grid length in discretization.
Table1. Difference schemes with 2nd-, 4th- and 6th-order accuracy for the first derivative under unstaggered and staggered grids.
The Fourier analysis of error for difference schemes for first- and second-derivative approximation under an unstaggered grid is shown in Fig. 1 (for the detailed process of derivation, see Appendix B). The improvement of the higher-order schemes in resolving short waves is significant, especially from 2nd- to 4th-order accuracy. Figure1. Fourier analysis of error for the first derivative approximation with different schemes under an unstaggered grid.
-->
4.1. Test with a smooth wave solution
When the initial value is set as $ u\left(x,0\right)= A{\rm{sech}}\left(kx\right) $, the true solution of Eq. (11) can be written as $ u\left(x,t\right)= A{\rm{sech}} $$ \left[k(x+\alpha t)\right] $, where A is a parameter defined as a constant, and $ {\rm{sech}} $ means the hyperbolic secant function (Li, 2012). This equation describes the translational motion of a solitary wave being advected to the left, and the choice of the inverse hyperbolic secant function was based on the consideration of testing the high-order scheme with a modal, smooth solution. The parameters are set as follows: A = 1.0, k = 0.5, $ \alpha $ = 2.0, $ x\in \left[-40,20\right] $, and an Euler scheme is adopted for time integration with the timestep $ \Delta t $ =1×10?3. Three sets of grid configuration are designed as follows to assess the performance of high-order schemes under the non-uniform grid: Uniform grid: Nonuniform grid ? 1: Nonuniform ? grid ? 2: The grid spacing is gradually reduced in Non-uniform-grid-1 from left to right, while the opposite is the case in Non-uniform-grid-2. As shown in Fig. 3, the dissipation and phase errors of the nonuniform and uniform grid are very close to each other, which implies that the dissipation and dispersion properties of higher-order difference schemes will not be degenerated by the weak uniformity of grids. The improvement from the 2nd-order scheme to the 4th-order scheme is most obvious, while the difference between the 4th-order scheme and the 6th-order scheme is very small. This is consistent with the result of Fourier analysis in section 2. The results of the tests for nonuniform-grid-1 and nonuniform-grid-2 are very similar to each other, which also supports the conclusion that weak non-uniformity will not influence the performance of high-order difference schemes. Figure3. Numerical test of the one-dimensional advection equation at t = 10 s in (a) a uniform grid, (b) non-uniform grid-1, and (c) non-uniform grid-2.
In general, the higher-order difference scheme are still effective for the non-uniform grid if the variation of grid distance is smooth, so they are applicable for the longitude–latitude grid of the GRAPES model and the non-uniform vertical difference process.
2 4.2. Test with a square wave solution -->
4.2. Test with a square wave solution
To study the performance of high-order difference schemes under more discontinuous conditions, a square wave test was further performed. In the square wave test, the initial value of the one-dimensional advection equation [Eq. (11)] was set as The parameters were set the same as in section 4.1, and the advection test was performed under a uniform grid. Figure 4 shows the simulated square signals at t = 1 s. The overshoot and undershoot noise were alleviated by the higher-order (4th- and 6th-order) schemes. This implies that the advantages of high-order schemes can be extended to the non-modal solutions, although the theoretical analysis is difficult. Figure4. The result of the square test at t = 1 s.
6. Influence on the computational efficiency based on the forecast equation of the GRAPES model The numbers of grids used in the calculation stencil will be increased if higher-order finite difference schemes are applied, so it is an important issue to consider the influence of high-order difference schemes on the computational efficiency for large-scale computation in operational NWP models. In this section, the stencils for the 2nd- and 4th-order difference scheme are compared based on the forecast equations of the GRAPES model, and the influence on the actual computational efficiency is discussed. The dynamic equation of the GRAPES model under a spherical coordinate system can be written as (Chen and Shen, 2006) where ${u_{n + 1}}$,${v_{n + 1}}$,${\hat w_{n + 1}}$,$\theta _{n + 1}^{'}$, and $\Pi _{n + 1}^{'}$ denote the forecasted three-dimensional wind components, perturbed potential temperature and perturbed non-dimensional pressure at the n + 1 timestep, respectively. The symbols λ and φ are the longitude and latitude, respectively, and $\hat z$ is the height in the terrain-following vertical coordinate. ${\xi _{x1}}$,${\xi _{x2}}$ and ${\xi _{x3}}$$(x = u,v, $$ \hat w,{\theta ^{'}},{\Pi ^{'}})$ are grid metric coefficients, while ${\xi _{x0}}(x = u,v,\hat w, $$ {\theta ^{'}},{\Pi ^{'}})$ is changed every time-step. ${D_3}$ is the three-dimensional divergence term, and ${A_\Pi }$ is the time discretization term. Equations (14)–(18) can be transformed to a Helmholtz equation of $\Pi $(which is the stencil of the GRAPES model) under the 2nd-order difference scheme: where ${B_1}$–${B_{19}}$ are the coefficients of 19 grids of the stencil. If the 4th-order scheme is used for horizontal discretization, the Helmholtz equation contains 47 grids (the detail derivation process is omitted): The generalized conjugate residual (GCR) method is used to solve the Helmholtz equation in the GRAPES model. To accelerate the speed of convergence, a preconditioned algorithm is applied to simplify the coefficient matrix. According to the fact that the coefficients at points ($i,j,k$), ($i,j,k - 1$) and ($i,j,k + 1$) are an order of magnitude larger than other points, the preconditioned matrix only retains these three points’ coefficients and then it becomes a segmented tridiagonal matrix (e.g., Xue and Chen, 2008, pp. 132–136). The magnitude of coefficients at 47 points under the 4th-order scheme are displayed in Table 2, and we also find that the coefficients at points ($i,j,k$), ($i,j,k - 1$) and ($i,j,k + 1$) are an order of magnitude larger than other points. As a result, the preconditioned matrix is the same as the 2nd-order scheme, which implies that the time used to solving the Helmholtz equation will not be increased, and so a higher-order difference scheme is a feasible choice for the GRAPES model.