<<

June 1969 439

UDC 551.w8.313:651.611.32

A FINITE-DIFFERENCEAPPROXIMATION OF THEPRIMITIVE EQUATIONS . FOR A HEXAGONAL GRID ON A PLANE

ROBERT SADOURNY and PIERRE MOREL Laboratoire de Mhthorologie Dynamique du C.N.R.S., 92-Bellevue-France

ABSTRACT The hexagonal grid based on a partition of the icosahedron has distinct geometrical qualities for the mapping of a sphere and also presents some indexing difficulties. The applicability of this grid to the primitive equations of is demonstrated, and a finite-difference approximation of these equations is proposed. The basic variables are the mass fluxes from one hexagonal cell to the next through their common boundary. This scheme conserves the total mass, the total , and the total kinetic energy of the fluid as well as the total -squared of a nondivergent flow. A computational test was performed using a hexagonal grid to describe space periodic waves on a nonrotating plane. The systematic variation of total kinetic and potential energy is less than 10-5 after 1,000 time steps.

1. INTRODUCTION energy from the cyclone scale toward very long or short wavelengths. The choice of a particular array of points or grid for The high degree of isotropy of the hexagonal grid makes representing the flow of a fluid on a sphere is not a simple the formulation of an energy- and vorticity-conserving geometrical problem because a sphericalgrid should sat.isfy scheme simpler, infact, than for rectangulargrids, as many conflicting requirement,s. Basically, the grid should shown by Sadourny, Arakawa, and Mintz (1968) for non- be as uniform as possible and should preserve as well as divergent barotropic flow. possible the isotropy of the sphere around any point. In the present work, the space-differencing (advection) A satisfactory grid canbe obtained by mapping the scheme is first derived in the case of nondivergent flow sphere onto a regular icosahedron. The basic grid cell is (section 2);the exact conservation of totalmomentum hexagonal so that all grid points are surrounded by six kinetic energy and squared vorticity is proved. A consis- almost equidistant neighbors, except for 12 vertices of the tent definition of the divergence operator is then introduced icosahedron which have only five neighbors. The resulting (section 3), and a complete finite-diff erence formulation of hexagonal grid (fig. 1) is remarkably uniform and has no the primitivedynamic equations is presented for two- very singular point like the Poles of a Mercator grid. But the hexagonal grid does not allow readily the representa- tion of the flow in terms of zonal and meridional velocity. Indeed, the very conceptof zonal or meridional flow is lost here: a “zonal” component of a vector field traced con- NORTH POLE tinuously from cell to cell around one vertex is found to A turn gradually toward the “meridional” direction (fig. 2). This property is not just a feature of the hexagonal grid but a basic property of any mappingof a curved (spherical) surface onto a plane. To get around thisdifficulty, we will basically represent the spherical flow by mass $uxes be- tween adjacent grid cells. The use of mass fluxes rather than velocity components as the fundamental variables is actuallyimplicit in most space-differencing schemes for numericalintegration of theprimitive fluid dynamics equations. Bryan (1966) showed under very general geo- metrical conditions that flux-form difference schemes con- serveexactly total momentum and total kinetic energy integrated over the whole sphere, a necessary condition to preventnonlinear instability of theiteration process (Lilly, 1965). Suchconservative schemes are now cur- rently used innumerical weather prediction (Kurihara, 1965; Kurihara and Holloway, 1967). Furthermore,Arakawa (1966) showed that onepar- t ticular space-differencing scheme, based on a square grid, SOUTH POLE conserves total momentum, total kinetic energy, and also the integral of the square of the vorticity for nondivergent flow and thereby does not produce spurious flow of kinetic FIGURE1.-Representation of a 362-point hexagonal grid. 348-966 0-69-4

Unauthenticated | Downloaded 09/27/21 01:09 PM UTC 440 MONTHLYWEATHER REVIEW Vol. 97, No. 6

FIGURE3.-Indexing convention for the hexagonal grid. FIQURE2.-Loca.l orientation of maas fluxes around a pentagon on the spherical grid. between point (a) and point (a+ai); u is then the compo- dimensional divergent flow on a plane. A simple applica- nent of the flow velocity perpendicular to the arcof great tion to a barotropic flow with a free surface isworked out circle (a, a+a‘). The velocity field is thus defined on a in section 4, andresults of atest computation are staggered array by three components ul,.uz, and u3 along discussed. the axis Ox,, 0x2, Ox3 perpendicular to the sides of the The modification of the algorithm for pentagonal ver- triangular cells (fig. 4). tices and, in general, the problem of sphericity corrections For simplicity, we discuss in the presentarticle only the in the expression of space derivatives is notdiscussed here cas6 of a regular hexagonal grid made of equal, equilateral and will be the subject of a later communication. triangles. The three axes lie then along the directions 0, 2~13,and 4~13,and the following identities obtain 2. PRIMITIVE DYNAMIC EQUATION FOR NONDIVERGENT FLOW The geometry of the hexagonal grid on a sphere and the indexing convention used for sample computations have been described by Sadourny, Arakawa, and Mintz (1968). Thisleads to a reasonable definition forthe kinetic For convenience, we shall now introduce a new indexing energy K: convention more suitable for mathematical developments. 3 If the index 0 is given to one particular grid point chosen a i=l as origin, the indices (l), (a),(a2) , . . . , (a6)designate the six neighbors; a is the complex number exp(i~/3). We where s is the area of the hexagonal cell. Note that the shall use the following relations: sum of all overlapping hexagons is 3 times the area covered by the grid (hence the factor g). Similarly, the momentum alL(YO=l, inthe direction 02, perpendicular to the grid side (a, a3= - 1, a+af) af=af+l+af-l. (1) is then Figure 3 shows how this convention can be applied to any nonsingularsample of the hexagonal grid. It canbe readily extended to the surrounding cells in a consistent The mean value of the flow vorticity { in a cell can be manner, i.e., the points around grid point (a) are desig- expressed by the circulation of the flow velocity around it natedby indices ,(a+l), (a+a), (a+az), . . . 1 b+a5). divided by the cell area. For consistency, we choose here Any grid-point index (a)is then a linear combination, with a smaller hexagonal cell depicted in figure 5, andthe real integer coefficients, of the indices 1, a, . . . , a5. following finite-difference approximation obtains The flow velocity is to lie defined by mass fluxes be- tween all pairs of neighboring grid points, (a) and for example. The middle of arc (a, a+ai) will be desig- nated by the half-integer index (a+$) so that the flux Consider now thefundamental equation of fluid dy- crossing this arc is namics or more precisely the contribution of horizontal advection to the Eulerian time derivative: F(a, a+&) =dh (a+%) u (a+%)

where h is the density (or the height of the fluid in the case of a divergent barotropic flow> and d is the distance where u is the velocity component along a given direction, Unauthenticated | Downloaded 09/27/21 01:09 PM UTC June 1969 Robert Sadourny and Pierre Morel 441 w i /'\ -

FIGURE4.-Locations for wind components. FIGUREB.-Reprasentation of vorticity at a grid point. andthe vertical advection, Coriolis acceleration, and The first bracket is symmetrical with respect to the inter- source terms are neglected for the time being. For non- change of indices (b) and @+a$). The second bracket is divergent $ow, h is constantand one mayintroduce a antisymmetrical since the same flux across arc (b+al", stream function $ such that b+d+') appears in the expression of J* (b+uj) but in the reverse direction (fig. 7). Thus, the sum on the right-hand kXh V=V$ side of equation (12) cancels exactly with periodic bound- and ary conditions or on a closed surface: F(a,a+at) =$(a+af) --$(a). (8) ap/at=o. Expressing (7) in terms of the stream function, +, it fol- A similar argument shows for each of the three directions lows that Oxi that the contribution of ut components to the total d(hu)/at=J(u,$). (9) kineticenergy is also conserved exactly. Weget from equations (4), (lo), and (llb): J(u,$)is the Jacobian operatorapplied to the scalar fields u and $. This lastrelation is formally identical to the baro- tropic vorticity equation treated by Sadourny, Arakawa, and Mintz (1968). We shall, therefore, use the same finite- 2s difference approximation for the Jacobian operator,i.e., =- 7,[~(b) .~(b+~3][~(b+~~~')-+(b+~"l>]. (13) J* 9b j a(hu)/at=J* (u,+) ( 10) Again, the first bracketis symmetrical with respect to and (b) and @+CY'),andthe sum on theright-hand side cancels exactly in a closed domain. Thetotal kinetic 1 J*b,$)=SF [u(b)+u(b+~31[$(b+al+')-+(b+aJ-31, energy is thus exactly conserved by the advection scheme (11): (114 aK/at=o. or the equivalent form These properties are common to all space-differencing schemes expressed inmomentum flux divergence form J*(U,'$)=2g~U(b+a3[$.b+a'+')-+(b+aJ-l)1.1 (Bryan, 1966). We shall show that the total squared vor- ticity of the flow is also conserved in the case of nondi- (1lb) vergent barotropic flow. In fact it is sufficient to show that Notethat the field u is defined at half-integer points in that case equation (10) isequivalent to the finite- b=u+- ai (see fig. S), whereas thestream functionis difference vorticity equation 2 defined at normal grid points (a+a'). We shall come back ar(a)/at=J*(r,$). (14) to this difficulty later. This finite-difference advection Indeed, using expression (6) of the vorticity together with operator conserves exactly thetotal momentum (5), as equation (IO), we get can be seen with the help of equations (10) and (Ila) :

" hu(b) at 3 b at

-$(a+;+CY"l)l. (15)

Unauthenticated | Downloaded 09/27/21 01:09 PM UTC 442 REVIEWWEATHER MONTHLY Vol. 97, No. 6

FIGURE6.-Wind components used in the momentum advection FIGURE7.-Antisymmetry of the flux between (b) and (bf a'). ,. scheme.

In thisequation, the values of thestream function at This differencing scheme involves equally the six nearest half-integer points must be interpolatedfrom the neighbor- points where the samecomponents of the velocity are ing grid points,viz : defined. By summing the six u-componentsu (a+- around grid point (a),we find that the same advection3 scheme also applies to the circulation around grid points (vorticity). This scheme is, therefore, consistent with the particularform of thebarotropic vorticity equation studiedby Sadourny, Arakawa, and Mintz (1968); this form conserves exactly thetotal vorticity and squared where the definitions (2) and (8) have been used. Thus, vorticity of a nondivergent flow. 3. DIVERGENT FLOW Let us consider now a simple barotropic flow with a free surface, and let h be the variable depth of the (in- compressible) fluid. Thecontinuity equation and the equation of motion along a given direction are ah -+v* (hV)=o (18) Notethat the second termon the right-hand side is at exactly and

Each term J*(u,u) cancels exactly; hence, equation (15) reduces to The momentum advection algorithm developed in the previous section is notyet in agenerally usable form since the stream function still appears in equations (10) and (11). For a moregeneral flow, we shallintroduce instead the corresponding mass flux (dashed segment in fig. 8). Thus,

We have introduced afinite-difference approximation of themomentum flux divergence term V-(huV) of the primitivedynamic equation. The flux form insures the The mass fluxes are only defined normally across triangle . conservation of the total momentum and kinetic energy. sides. The interpolation formula to give mass flux along Unauthenticated | Downloaded 09/27/21 01:09 PM UTC ~ ~~

1'

June 1969 Robert Sadourny and Pierre Morel 443

In fact, the height h is normally defined at integer grid points only. Using linear interpolation to define its value a+ aJ+7 at half-integer points

ah 16 - (a)=- F(a+aj-l, a+a-lf'). at S j=1 To be consistent with equation (21), we shall replace the fluxes on theright-hand side of (23) by linear combinations, O+W+eCi F(a+aj-', a+arf+')=+[F(a+a"', a)+F(a, a+&+') +F(a+d", a+al> +F(a+aj, a+aj+')]. (24) Wenote, however, that. the fluxes throughthe radial segments (F(a,a + a') cancel; the sum on the right-hand side of equation (23)-reduces finallyto

The consistent finite-difference approximation of the di- FIGURE8.-Representation of a mass flux used in momentum ad- vection scheme. vergence of the flow is,therefore, thetotal mass flux through the sides of the hexagonal side (fig. 9) divided the dashed line in figure 8 is found to be the mean value by thesurface of the cell. of the four fluxes across the heavy lines of figure 8, viz: Next we have to consider the exchange between kinetic and potential energy, and specify the finite-difference ap- proximation of the gradient so that total energy will be conserved. From equation (25), theelementary =y@ya+CYj-', a)+F(a,a+aj+l) flux F(a + a5, a + actsupon two height tendencies in the following manner: F(a + ai, a + aj+l) is added +F(a+aj-', a+aj)+F(a+aj, .+aj+') ah(a+aj+a"fl) to s- ah(a) andsubtracted from s +F(a+ai+aj-', a+a"+F(a+ai, a+ai+aj+l) at at Its contribution to thetotal potential energytendency +F(a+ai+a"l, a+af+a3 is thus: +F(a+a"aj, a+af+a'++l)]. (21) In this form, the advectionterm is still defined as the divergence of a mass jux, and the conservation of total momentum obtains even when the depth h isvariable. Concerning the conservation of kinetic energy, we derive "h(~+c~'+af+')]. from equations (4), (IO), and (20) the relation This term can also be understood as the contribution of aj+aj+I to the the at point (.+-) kinetic energy tendency at the samepoint, if the gradient term in equation (19) is written at point (a+&-) in the following manner:

With thisdefinition, the scheme enforces theexchange between potential and kinetic energy without loss. We have seen in section 2 that the second sum on the right-hand side of equation (22) cancels exactly. Conse- 4. COMPUTATIONAL TEST quently, the total kinetic energy will be conserved if and only ifwe use the following finite-difference approxima- As a test case, we have chosen to integrate equations tion of the : (18) and (19) for divergent barotropic flow to simulate the propagation and multiple reflexions of periodic waves in a channel. The channel can be pictured as an equatorial belt around a nonrotating planet (the Coriolis

Unauthenticated | Downloaded 09/27/21 01:09 PM UTC 444 MONTHLYWEATHERREVIEW Vol. 97, No. 6

FIQUREg.-Representation of divergence at a grid point. FIGURElO.-Boundary of the grid in the channel case. acceleration isomitted for the timebeing). Thenorth motions will show a quasi-periodic interchange between and south boundaries .are perfect walls without potentialand kinetic energy Corresponding to the (free slip boundary). The waves propagate in the east- propagation and reflexion of these waves. west direction. The computationaltest was carried out Because the test is intended to verify the conservation in one section of the channel only, and periodic boundary of energy, the use of a nonamplifying time-differencing conditions on the east and west boundaries were assumed, scheme ismandatory. Time integration was, therefore, thereby enforcing an exact space periodicity. carried out with the centered or "leapfrog" scheme: The application of the differencing scheme is straight- forward where the freeslip boundary condition is intro- duced properly, i.e., in a way consistent withthe conserva- tion of all integral constraints. In view of the geometry of except, of course,for the first time step for which the the grid andthe definition of the basic F fluxes, the Euler-backward or Matsuno scheme was used: boundary must be taken on a polygonal line as shown in figure 10. If so, two different classes of boundary fluxes appear in the computation: 1) Flux 'parallel tothe boundary defined at apoint rand (a+- 3 of theboundary. All such fluxes are included asdependent variable and actually computed on each The problem of the one-dimensional freesurface flow time step according to the general scheme (2 1). corresponding to this situation is solved by introducing 2) Flux perpendicular tothe boundary defked at a characteristic lines withslopes point (a+:) of the boundary. All such fluxes are set dxJdt=ufJgfE. equal to zero. Needless to say, all fluxes defined on the other side of The stability criteriumfor time integration is thus: the boundary are also set equal to zero. These specifi- cations, therefore, add up to theelimination of any inflow Ax or outflow of mass, momentum, and kinetic energy across At

2n-x Experiment B differs from experiment A by the size h(z,7~)=104+~0~~sin--+300~sin--. rryL L of the domain, theinitial state, and amore refined starting procedure. The domain considered here includes The initial energy of the system is thus purely potential 20 by 20 grid points with the same grid size d: 100 km. energy. The subsequent integration of the equations of The initial state is defined by the field values

Unauthenticated | Downloaded 09/27/21 01:09 PM UTC June 1969 Robert Sadourny and Pierre Morel 445

KINETIC ENERGY t POTENTIAL ENERGY (RELATIVE VARIATION)

FIGURE11.-Behavior of total kinetic energy with time.

~~ FIGURE12.-Variation of total energy.

7# 2TX “Xsin27# __4Tx h(z,y)=104+103Xsin-XsinL -++OOXsinL L L The variation of total(kinetic+potential) energy is and shown in figure 12. Curve A is drawn using values com- V(x,y) =o. puted every 25 time steps without smoothing to remove the high-frequency oscillation characteristic of the The first time-integration step was performed according centered time-differencing scheme. This smoothing was to amore accurate, second-order approximation con- done for curve B. The systematicvariation of total sisting in : energyappears tobe somewhat less thanin 1,000 a forward integration from t=O to t=X time steps. and ACKNOWLEDGMENTS a Euler-backward step from t=s to t= 1 The basic formulation used here is inspired by the work of A. whenapplied sinusoidalto solutions of equation Arakawa. We want to express our gratitude for his very helpful This second-order scheme hasan amplifica- comments and suggestions. We are also muchindebted tothe dxldt=iwx. Centre National d’Etudes Spatiales of Francefor computing tion coefficient which is very close to 1, facilities. We acknowledge here the good will of the C.N.E.S. computing center personnel.

REFERENCES Arakawa, A., “Computational Design for Long-Term Numerical RESULT Integration of theEquations of FluidMotion: Two Dimen- sional Incompressible Flow Part I.,” Journal of Computational In both cases, the integration of the equationsof motion Physics, Vol. 1, No. 1, Academic Press, New York, Aug. 1966, indicates a quasi-periodic exchange between kinetic and pp. 119-143. potential energy corresponding to thepropagation and Bryan, K., “A Scheme for Numerical Integration of the Equations reflection of the large-scale (order L) waves. The model of Motion on an Irregular Grid Free of Nonlinear Instability,” Monthly Weather Review, Vol. 94, No. 1, Jan. 1966, pp. 39-40. does not include any dissipation process and, consequently, Kurihara, Y., “Numerical Integration of the Primitive Equations nonlinearinteraction between thespectral components on a Spherical Grid,” Monthly Weather Review, Vol. 93, No. 7, represented bythe grid produces a steadilygrowing July 1965, pp. 399-415. high-frequencyspectrum. Although thetotal kinetic Kurihara, Y., and Holloway, J. L., Jr., “Numerical Integration of energy peaks are remarkably constant after several days, a Nine-Level Global Primitive Equations Model Formulated by the Box Method,” MonthlyWeather Review, Vol. 95,No. 8, the large-scale oscillation amplitude decreases signifi- Aug. 1967, pp. 509-530. cantly; whereas, the high-frequency kinetic energy Lilly, D. K., “On the Computational Stability of Numerical (appearingas a practically constant “noise”)increases Solutions of Time-Dependent Non-Linear Geophysical Fluid by a corresponding amount (fig. 11). Dynamics.Problems,” Monthly WeatherReview, Vol.93, No. 1, Thetotal massis exactly conserved exceptfor sys- Jan. 1965, pp. 11-26. Sadourny, R., Arakawa, A., and Minta, Y., “Integration of the tematictruncation errors due to the computer system; NondivergentBarotropic Vorticity EquationWith an Ico- thetruncation errors produce a slightlinear mass loss sahedral-Hexagonal Grid forthe Sphere,” MonthlyWeather which amounts to 10-~after 1,000 time steps. Review, Vol. 96, No. 6, June 1968, pp. 351-356.

[Received September 9, 1968; revised October 2?8,19681

, Unauthenticated | Downloaded 09/27/21 01:09 PM UTC