Ocean Modelling 32 (2010) 132–142

Contents lists available at ScienceDirect

Ocean Modelling

journal homepage: www.elsevier.com/locate/ocemod

A ‘‘vortex in cell” model for quasi-geostrophic, shallow water dynamics on the sphere

A. Mohammadian *, John Marshall

Department of Earth, Atmospheric and Planetary Science, Massachusetts Institute of Technology, Cambridge, MA, USA article info abstract

Article history: The vortex in cell (VIC) method has been found to be an attractive computational choice for solving a Received 15 July 2009 number of fluid dynamical problems. The Lagrangian advection of particles leads to stability of the Received in revised form 29 December 2009 method even for long time steps. Moreover, conservation of particle properties, such as potential vortic- Accepted 4 January 2010 ity, can be enshrined at the heart of the numerical procedure. In this paper we describe a numerical Available online 1 February 2010 implementation of the VIC method for a reduced , quasi-geostrophic model and make use of its novel aspects to explore the interaction of and on the sphere. The Lagrangian advection Keywords: of particles is performed using a fourth order Runge–Kutta method and the stream-function is obtained Geostrophic turbulence by the inversion of potential using an underlying Eulerian grid. The scheme is tested in the sim- Reduced gravity Lagrangian ulation of Rossby and Rossby–Haurwitz waves. Encouraging results are obtained for various radii of Vortex in cell deformations corresponding to both the atmosphere and ocean. Quasi-geostrophic Ó 2010 Elsevier Ltd. All rights reserved.

1. Introduction been rarely used in our field. Hence our interest in exploring them here. Here we experiment with algorithms for numerical solution of a Many variants of vortex methods have been employed in the quasi-geostrophic system in which the fluid is represented by a wider computational literature. Their common feature is that the large number of discrete particles whose potential vorticities are vorticity is represented by ‘‘elements” (e.g. point vortices or using treated as the primary variable. Various numerical approaches a chosen basis function), which are tracked in the domain using are available for solution of vorticity-stream function equations, Lagrangian methods, an elegant and robust way to treat the non- to which the quasi-geostrophic system belongs. These include fi- linear advection terms. The main idea in vortex methods is to com- nite difference, finite volume, finite element, Lagrangian/semi- pute the trajectories of the particles, advect the point vortices, and Lagrangian, spectral and vortex methods. Among these, spectral compute the flow field based on the new position of the vortices. and vortex methods are most commonly used for turbulence stud- Inspired by the method of computing the flow field from point vor- ies where a low level of numerical damping and oscillatory behav- tices, two main groups of vortex methods may be identified. In the ior is crucial. In direct numerical simulations (DNS) Cottet et al. first, sometimes called the ‘grid-free’ vortex method, the flow field (2002) showed that the ‘vortex in cell’ (VIC) method exhibits good is directly obtained from the point vortices using the Biot–Savat results at large and intermediate scales, whilst avoiding accumula- law (see, for example Lakkis and Ghoniem, 2009; Huang et al., tion of energy at the end of spectrum in under-resolved cases. 2009). This approach becomes computationally prohibitive as the Spectral methods are not well suited to the study of domains in number of particles becomes very large, since the velocity field act- the presence of boundaries where Legendre-type polynomials are ing on each point vortex is induced by all other point vortices. usually used which are very expensive. Vortex methods, on the However, fast methods may reduce the cost of this step to other hand, have proved useful in study of a wide range of turbu- O(NlogN)orO(N), where N is the number of elements. In the sec- lent flows and domains: computational cost is only slightly in- ond approach, known as the ‘vortex in cell’ (VIC) method and orig- creased in the presence of boundaries (Cottet and Koumoutsakos, inally developed by Christiansen (1973), the flow field is obtained 2000; Cottet et al., 2002). Despite offering a natural way of model- by solving a Poisson equation using an underlying Eulerian grid (as ing oceanic and atmospheric flows, however, vortex methods have sketched in Fig. 1). The VIC method has been widely used in the simulation of complex fluid dynamical problems. Liu and Doorly (1999) used it successfully for cavity flows driven by impulsively-started * Corresponding author. E-mail addresses: [email protected], [email protected] (A. and oscillating lids, including vortex/wall interactions. Ould-Salihi Mohammadian). et al. (2000) showed that the VIC method, with appropriate

1463-5003/$ - see front matter Ó 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.ocemod.2010.01.001 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 133 y

Free slip wall Particles Δx Δ y

Eulerian grid x

Periodic boundary Periodic boundary

Free slip wall

Fig. 1. The ‘vortex in cell’ method follows the trajectories, and computes the potential vorticity of discrete particles as they move over an underlying Eulerian grid. To compute particle trajectories, the vorticity on particles is interpolated to the Eulerian grid. This gridded vorticity is then inverted for the stream-function, from which the velocity is computed and interpolated back to the particle positions. This interpolated velocity is then used to compute new particle positions.

interpolation schemes and exploiting domain decomposition, are analytical solutions. In Section 5 we apply the model to the study more effective than pure finite difference approaches for turbu- of the interaction of geostrophic turbulence and Rossby waves on lent flows. Liu (2001) employed VIC for three-dimensional model- the sphere. Some concluding remarks complete the study. ing of boundary layers under the impact of a . Kudela and Regucki (2002) used VIC for simulation of leapfrogging phe- 2. Continuous equations for a QG shallow water layer nomenon for two rings with the same . Cottet and Pon- cet (2003) used the VIC method for simulation of wall-bounded The quasi-geostrophic equations representing the evolution of a turbulent flows with a body-fitted grid. Uchiyama and Naruse shallow-water layer may be written in vorticity-stream function (2004) employed VIC to model free turbulent two-phase flows form as and concluded that it was computationally less expensive than the grid-free vortex method. Cocle et al. (2008) combined VIC 2 w Q ¼ f þ r w 2 ð1Þ and parallel fast multipole methods for efficient domain decom- Ld position simulations of instability of vortex rings and space- DQ ¼af ð2Þ developing at very high resolution. Further applications Dt of VIC can be found in the references of the above-mentioned 2 studies. where f ¼ r w is relative vorticity, Q is potential vorticity, f is the The objective of this study is to explore VIC as a method of solu- Coriolis parameter, w is the stream-function, a is a dissipation coef- w= 2 tion of a reduced gravity, quasi-geostrophic model on the sphere ficient and Ld is the radius of deformation. The term Ld in Eq. (1) is and evaluate its performance in simulating fundamental geophys- a representation of vortex stretching. Eq. (2) states that in the ab- ical phenomena such as Rossby waves and turbulence in the atmo- sence of dissipation, potential vorticity remains constant following sphere and ocean. A main feature of the model is that, in the a particle. As we shall see, this property is at the core of the vortex absence of dissipation, the potential vorticity of particles is con- in cell method. served (by construction) as in the continuous system. Moreover, The material derivative in (2) is defined as the Lagrangian transport of the particles eliminates difficulties in D @ @ @ ¼ þ ux þ uy ð3Þ the representation of advection such as nonlinear instabilities Dt @t @x @y and time step restrictions associated with Eulerian methods. Other aspects of the VIC method includes the possibility of direct control where ux and uy are, respectively, the zonal (eastward) and merid- on generation and dissipation of vortices (for example in the repre- ional (northward) velocity components of the flow in the rotating sentation of baroclinic instabilities by eddies, see Sections 5 and 6) coordinate system. The velocity field u ¼ðux; uyÞ can be expressed straightforward modeling of a mean background flow as explained in terms of particle positions and the stream-function thus: below, and availability of trajectories at no extra cost (useful for Dx Dy @w @w estimation of diffusivity). As illustrated herein, the VIC meth- ðux; uyÞ¼ ; ¼ ; ð4Þ Dt Dt @y @x od can be successfully employed in the modeling of QG systems resulting in an efficient and accurate tool particularly in oceano- Eqs. (1), (2) along with (4) constitute the heart of our model. That is, graphic applications where boundaries play a central role. given the initial potential vorticity of particles, the stream-function This paper is organized as follows. In Section 2 the quasi-geo- is obtained by solving the elliptic equation (1), particle trajectories strophic equations that will be solved are presented. Section 3 pre- are computed using (4) to displace particles to their new position, sents the VIC method and describes computational details for and the particle potential vorticities are updated using Eq. (2). particle tracking and interpolation. In Section 4, Rossby and Ross- In spherical coordinates, changes in latitude ðdhÞ and longitude by–Haurwitz test cases are studied and the results compared with ðdkÞ are given by 134 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142

dy 2-7. Interpolate intermediate relative vorticity of particles dh ¼ ð5Þ R fp to grid points fc : dx 2-8. Invert relative vorticity w ¼ r2f: dk ¼ ð6Þ c R cosðhÞ 2-9. Compute the flow field u ¼ r?w: 2-10. Using the fourth order RK method, advect the particles where R is the radius of the sphere and dx, dy are changes in dis- from the position xn1 in the flow field u for a full tance along latitude and longitude circles, respectively. Hence the time interval Dt , to obtain the new position of parti- components (in rad/s) in k and h directions, respec- cles xn, where xn ¼ RK4ðxn1; u; DtÞ: tively, are given by 2-11. Compute the potential vorticity Q n as Q n ¼ Q n1 Dk ux 1 @w Dtaf. uk ¼ ¼ ¼ ð7Þ Dt R cosðhÞ R @h 2-12. Compute the relative vorticity fn of the particles at the n Dh uy 1 @w new position fn ¼ Q n f w , where f and wn are, h L2 u ¼ ¼ ¼ ð8Þ d Dt R R cosðhÞ @k respectively, the Coriolis parameter and stream func- In spherical coordinates, the elliptic equation relating f and w tion at the new position of particles xn. takes the following form: 2 It should be mentioned that since we use a latitude–longitude 2 1 @ w 1 @ @w f ¼ r w ¼ 2 2 þ 2 cosðhÞ ð9Þ grid, our gird converges at high latitudes. However, time-step size R cos2ðhÞ @k R cosðhÞ @h @h can remain large because the advection is performed using a Note that the numerical algorithm in spherical coordinates is ex- Lagrangian method. Indeed, our main constraint in choosing actly the same as in Cartesian coordinates except for geometric fac- time-step size is accuracy. Therefore, in order to benefit from the tors in the calculation of trajectories and inversion of the vorticity stability of the scheme for large time-step sizes, we use a fourth or- field. This greatly simplifies the numerical algorithm for integration der scheme to calculate trajectories. Splitting methods can also be of the above system. Our algorithm is described in the next section. used. However, note that RK4 is efficient because we do not invert the vorticity field at each stage of RK4. Moreover, interpolation of 3. Numerical procedure using VIC the velocity field is not computationally expensive because a first order method is sufficient (see below). As represented schematically in Fig. 1, the VIC method lays down an Eulerian grid, seeds it with particles endowed with poten- 3.2. Interpolation method tial vorticity (pv) and advects those particles around. The pv on the particles is interpolated to the grid, where it is inverted for the cur- Interpolation is needed at various stages of the numerical meth- rents. The currents are then interpolated back from the grid to the od to transfer information from the Eulerian grid to particles and particles allowing their position to be stepped forward in time. The vice versa. The following methods are employed. details of the algorithm we have devised and implemented is now described in detail. 3.2.1. Interpolation of velocity field from the Eulerian grid to particles As explained above, a first order accurate scheme (Christiansen, 1973) was employed to interpolate the velocity field from the 3.1. Algorithm Eulerian grid to particles. Consider the particle k at the position The algorithm used for numerical integration from t ¼ 0to k k ðx ; y Þ¼ ði þ dxÞDx; ðj þ dyÞDy ð11Þ t ¼ nDt, where Dt is the time-step size, is summarized here. A sche- p p matic layout of the model is shown in Fig. 1. In the following, the where Dx and Dy are the Eulerian grid sizes in x and y directions, notation xn RK4 xn1; un; Dt indicates that xn is the new position ¼ ð Þ respectively. The velocity at the point ðxk; ykÞ is computed as of the particles, initially at xn1, computed using the flow field un over p p k k k k k a time interval Dt by a RK4 method. uðxp; ypÞ¼A1 uði; jÞþA2 uði þ 1; jÞþA3 uði; j þ 1Þ þ Ak uði þ 1; j þ 1Þð12Þ 1. Initialize model with m particles in each cell and initialize 4 0 their relative vorticity fp . The subscript p refers to particles. where

In the results presented here we set m ¼ 9. k k 2. Given the initial position x0 and initial relative vorticity of A1 ¼ð1 dxÞð1 dyÞ; A2 ¼ dxð1 dyÞð13Þ particles f0, for n =1–N do: k k p A3 ¼ð1 dxÞdy; A4 ¼ dx dy ð14Þ n1 2-1. Interpolate relative vorticity of particles fp to grid n1 points fc (the subscript c refers to grid points). 2 n1 3.2.2. Interpolation of f or Q f from particles to the Eulerian grid 2-2. Invert relative vorticity, w ¼ r fc . 2-3. Compute the flow field, u ¼ r?w. Since the Coriolis parameter f can be exactly computed at the 2-4. Using the fourth order RK method, advect the particles position of particles, we do not interpolate the potential vorticity from the position xn1 in the flow field u for a half Q from particles to the Eulerian grid. Instead we may interpolate time interval Dt ¼ Dt , to obtain the intermediate either Q f or relative vorticity f. The interpolation of f is compu- 2 w n1 tationally more expensive because the quantity 2 is known on the position of particles x , where x ¼ RK4ðx ; u ; Dt Þ: Ld 2-5. Compute the intermediate potential vorticity Q using Eulerian grid and must be interpolated first to the position of par- ticles to compute the relative vorticity of point vortices. However, Q ¼ Q n1 Dtafn1 ð10Þ as shown in the following, for the oceanic regimes where f is typ- w ically much smaller than 2, interpolation of Q f leads to consid- 2-6. Compute the relative vorticity f of the particles at the Ld erable error in the vorticity field. It is thus necessary to interpolate w new position f ¼ Q f 2 , where f and w are, Ld f rather than Q f . respectively, the Coriolis parameter and stream func- Interpolation from particles to the Eulerian grid is typically tion at the intermediate position of particles x. done using the so-called area method (Appendix A). However, we A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 135 found that this can lead to inaccuracies in the phase speed of algorithm is used to solve the linear system (using ADI precondi- 2 Rossby waves. Instead we use an ‘inverse distance’ method to tioning). For oceanic cases where Ld is small, the term w=Ld is dom- interpolate from particles to the Eulerian grid, as follows. The main inant and thus the algorithm converges within a few iterations. idea is that the vorticity of each particle in our method is an approximation of the vorticity of the fluid at that point and by 3.4. Boundary conditions advection of particles we are indeed using a Lagrangian method. The particles in our method are not Dirac Delta point vortices as Free slip boundary conditions are assumed for the northern and in grid-free vortex methods. The spatial distribution of vorticity southern boundaries of the spherical domain, i.e. the meridional of the fluid can therefore be approximated using any averaging velocity is set to zero at those boundaries. Thus, particles are not method based on the known vorticity at the position of particles. allowed to leave the domain through the southern and northern We chose to use the ‘inverse distance’ interpolation method be- boundaries. The periodic boundary conditions in the zonal direc- cause the gain in accuracy from using higher order methods was tion is implemented as follows. Each particle that leaves the left justified compared to simply increasing the resolution of the grid. or right boundary, reenters the domain from the other side. In or- We consider an Eulerian grid point at the position ðiDx; jDyÞ. Let der to simplify the interpolation procedure, ghost cells are consid- N be the number of particles for which (see Fig. 1) ered at the left and right boundaries and particles are copied in the k ghost cells from the corresponding cells in the other side. This ði 1ÞDx < xp < ði þ 1ÞDx; k ¼ 1; ...; N ð15Þ greatly simplifies the computations since a unique interpolation j 1 Dj < yk < j 1 Dy; k 1; ...; N 16 ð Þ p ð þ Þ ¼ ð Þ procedure is employed for all Eulerian grid points.

Then, fij, the relative vorticity at the Eulerian grid point ði; jÞ, is com- puted as 4. Tests of the numerical method P N k k k¼1f =s fij ¼ P ð17Þ In this section, several numerical experiments are presented to N 1=sk k¼1 evaluate the performance of the algorithm described in the previous where sk is the distance of the particle k from the Eulerian grid point section. We simulate the propagation of Rossby waves on a b-plane

ði; jÞ and on a sphere in barotropic (Ld ¼1) and baroclinic (finite Ld) rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi  cases. We also describe how to prescribe mean flows and study their 2 2 k k k influence on the evolution of the point vortices. Both a b-plane chan- s ¼ xp iDx þ yp jDy ð18Þ nel and spherical coordinate are implemented. The spherical model uses a latitude–longitude grid, where latitude ranges from 80 to 3.2.3. Interpolation of the stream function from the Eulerian grid to 80° and latitude from 0° to 360°. particles The velocity field on the Eulerian grid is obtained by a second 4.1. Rossby waves on the b-plane order central difference scheme as We first consider barotropic Rossby waves on a b-plane in a k wði; j þ 1Þwði; j 1Þ u ði; jÞ¼ 2 ð19Þ periodic domain of size L L, and thus set w=Ld ¼ 0. The equation 2R cosðhjÞDh of potential vorticity (2) in this case is reduced to wði þ 1; jÞwði 1; jÞ uhði; jÞ¼ ð20Þ @f 2R2 cosðh ÞDk þ Jðw; fÞ¼bv ð22Þ j @t A free slip boundary condition is employed at northern and south- A solution of (22) is the Rossby given by ern boundaries. The velocity on the Eulerian grid is then interpolated to the parti- w ¼ a sinðkx xtÞ sin ly ð23Þ w cles as described in Section 3.2.1. The accuracy of interpolating 2 Ld with the frequency from the Eulerian grid to particles is found to be crucial for oceanic bk parameters and thus a high order accurate interpolation scheme is x ¼ 2 2 ð24Þ needed. Here, an efficient interpolation is employed in which the k þ l two-dimensional interpolation is preformed using a sequence of The vorticity in this case takes the following form one-dimensional cubic interpolations. Precisely, first wðði þ dxÞ 2 2 Dx; kDyÞ, k ¼ j 1; ...; j þ 2 is computed using a cubic Lagrange f ¼ðk þ l Þw ð25Þ interpolation of wði 1; kÞ, wði; kÞ, wði þ 1; kÞ and wði þ 2; kÞ in the and so u rf ¼ 0. Thus, Eq. (23) is a solution of the full nonlinear sys- zonal direction (see Appendix A). Finally, a meridional cubic interpo- tem. Here, we initialize the system using (23) with k ¼ l ¼ 4p=L and lation is performed on wðði þ d ÞDx; kDyÞ, k ¼ j 1; ...; j þ 2to 5 x amplitude a ¼ 5:1 10 m2=s. An Eulerian mesh with 400 grid point compute wðði þ dxÞDx; ðj þ dyÞDyÞ. in each direction is employed. The initial condition and the numerical result (presented as a Hovmöller diagram) is shown in Fig. 2. As can be 3.3. Inversion of elliptic operator on Eulerian grid seen the model can readily simulate the movement of the Rossby wave with an accurate phase speed. Comparisons of analytical and A centered second order five-point finite difference scheme is numerical solutions for the Rossby wave at t ¼ 2p=x with used to discretize the elliptic equation (1) as 100 100 , 200 200 grid and 400 400 grids are shown in Fig. 3. wði þ 1; jÞ2wði; jÞþwði 1; jÞ As can be seen, the numerical error in phase speed at the coarse grid fði; jÞ¼ 2 2 2 (100 100) becomes vanishingly small as the grid is refined. R cos ðhjÞDk It should be mentioned that we have experimented with the cosðhjþ1=2Þðwði; j þ 1Þwði; jÞÞ cosðhj1=2Þðwði; jÞwði; j 1ÞÞ þ ð21Þ number of particles required to seed the cells and found that at least R2 cosðh ÞDh2 j one particle should be in each cell at all times. Should a cell become The resulting system may be solved using a variety of available di- devoid of particles, new ones can be introduced at the center of that rect or iterative methods. Here, a preconditioned conjugate gradient cell. The vorticity of the new particles is obtained using a cubic 136 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142

Fig. 2. Left: Initial Rossby waves at t ¼ 0. Colors show stream-function in 105 m2=s. Horizontal and vertical axes represent distance in 106 m . Right: Hovmöller diagram at y ¼ 5 106 m. Horizontal axis is distance in 106 m and vertical axes is time in days. The bold dashed line represents analytical slope.

2 2

1.5 1.5

1 1

0.5 0.5

0 0

-0.5 -0.5

-1 -1

-1.5 -1.5

-2 -2 0024682 4 6 8 002462 4 6

2 100

1.5 75

1 50

0.5 25

0 0

-0.5 -25

-1 -50

-1.5 -75

-2 -100 002462 4 6 002462 4 6

Fig. 3. Comparison of analytical and numerical solutions for the Rossby wave at t ¼ 2p=x. Horizontal axes represent distance in 106 m. Squares show the numerical result and continuous curves show analytical solution. Top left: Stream-function in 105 m2=s with a 100 100 grid; top right: stream-function in 105 m2=s with a 200 200 grid; bottom left: stream-function in 105 m2=s with a 400 400 grid; bottom right: relative vorticity (in 108 s1) with the 400 400 grid. interpolation from the Eulerian grid. Note that this is consistent with calculate vorticity at the Eulerian grid from particles. In the calcula- our interpretation of particles and our interpolation method used to tions shown here, we began with nine particles in each cell. A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 137

4.2. Rossby waves on the sphere test solution (since Jðw; fÞ¼0) for validation of our numerical tech-

nique when the radius of deformation Ld is not zero. We choose 7 The second numerical experiment deals with Rossby waves on Ld ¼ 1000 km as a typical atmospheric case and set a ¼ 4:1 10 the sphere. The Coriolis parameter in this case is given by m2=s. Numerical results at time t ¼ 2p=x are presented in Fig. 4b. No visible noise or damping is observed which confirms the accuracy f ¼ 2X cos h ð26Þ of the model for atmospheric parameters. where X ¼ 2p day1 is the angular velocity of Earth’s rotation. The 2 Rossby wave solution now has the following form 4.2.1.2. Ocean. In the previous test cases, the quantity f w=Ld was w ¼a sin h cosm h cosðmk xtÞð27Þ interpolated from particles to the Eulerian grid using a linear scheme and yielded satisfactory results. In the oceanic case, how- with a frequency given by ever, we find that such a simple approach is not sufficiently accu- 2mX x ¼ ð28Þ rate. We consider a typical oceanic case with Ld ¼ 100 km and ð1 þ mÞð2 þ mÞ a ¼ 106 m2=s. Note the phase speed in this cases is 100 times Again we note that u rf ¼ 0 and so the above solution also slower than the atmospheric test. Thus, numerical modeling of satisfies the nonlinear equations. First, we set w=Ld ¼ 0 and choose the oceanic case is much more demanding since small numerical Rossby wave number m ¼ 4, as suggested by Williamson et al. errors can accumulate during such slow dynamics. Results using 2 (1992). An Eulerian mesh with, respectively, 304 and 128 grid linear interpolation of f w=Ld are shown in Fig. 4.c and reveals points in the zonal and meridional directions is employed. Numer- unacceptable numerical noise. This is because the relative vorticity 2 ical results are shown in Fig. 4a demonstrating that the model can f is now much smaller than w=Ld and errors in the interpolation of 2 successfully simulate the propagation of Rossby waves on the w=Ld lead to spurious values of f. To overcome this problem, we sphere. choose to interpolate the relative vorticity from particles to the Eulerian grid and then add in the vortex stretching term after 4.2.1. Effects of a finite deformation radius interpolation. 4.2.1.1. Atmosphere. We now repeat the last test but this time turn This leads to a considerable improvement even with a linear on the w=Ld term to represent the effect of vortex stretching. We interpolation (not shown). We found that a cubic interpolation of 2 leave it to the reader to verify that the Rossby–Haurwitz solution w=Ld from the Eulerian grid to particles worked well—see Fig. 4d. is still valid but now with a phase speed given by Note that due to the structured form of the Eulerian grid, a high or- 2 der accurate interpolation from the Eulerian grid to particles is less 2mX þ bmR X x ¼ ð29Þ expensive than the high order accurate interpolation from particles ð1 þ mÞð2 þ mÞ to the Eulerian grid. Comparisons of analytical and numerical solu- with tions for the Rossby–Haurwitz wave with cubic interpolation of f 2 for the case Ld ¼ 100 km at t ¼ 2p=x are presented in Fig. 5 which b ¼ ð30Þ shows that the model can well simulate the wave. Finally, note that L2ð1 þ mÞð2 þ mÞþR2 d noise in the vorticity field is filtered in the inversion of potential That is, the Rossby–Haurwitz wave is slowed down in the presence of vorticity and smooth results are obtained for stream function and a finite deformation radius. This furnishes us with a good nonlinear potential vorticity (not shown).

8 1 8 1 Fig. 4. (a) Relative vorticity (in 10 s ) for the case w=Ld ¼ 0att ¼ 2p=x (i.e. after one Rossby wave cycle). (b) Relative vorticity (in 10 s ) for the case Ld ¼ 1000 km at 8 1 2 8 1 t ¼ 2p=x. (c) Relative vorticity (in 10 s ) with linear interpolation of f w=Ld for the case Ld ¼ 100 km at t ¼ 2p=x. (d) Relative vorticity (in 10 s ) with cubic interpolation of f for the case Ld ¼ 100 km at t ¼ 2p=x. 138 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142

30 4 Numerical Numerical 25 Exact Exact 3 20

15 2

10 1 5

0

ζ 0 ψ -5 -1 -10

-15 -2

-20 -3 -25

-30 -4 0 100 200 300 0 100 200 300 Latitude Latitude

Fig. 5. Comparison of analytical and numerical solutions for the Rossby–Haurwitz wave with cubic interpolation of f for the case Ld ¼ 100 km at t ¼ 2p=x. Horizontal axes represent latitude is degrees. Right: Stream-function in 105 m2=s. Left: Relative vorticity (in 108 s1).

5. VIC in the presence of mean flows -150 -100 -50 0 50 100 (a) 60 We now describe how to represent the evolution of point vorti- ces in the presence of a background mean flow and associated 40 modifications to the large-scale potential vorticity gradients. For simplicity, here the mean flow is assumed to be zonal and only 20 vary in the meridional direction: u u y ; 0 31 ¼ð ð Þ ÞðÞ 0 The zonal flow is associated with a mean potential vorticity gradient -20 @Q @2u u ¼ b þ ð32Þ @y @y2 2 -40 Ld The evolution of the potential vorticity following the particles is -60 then governed by the equation (written out here in the absence of -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 forcing and dissipation):

DQ 0 @Q ¼v0 ð33Þ Dt @y (b) 60 where Q 0 is the pv of the particle measured relative to the back- ground and 40

D @ ¼ þðu þ u0Þr Dt @t 20 is the rate of change following the particle, taking into account the presence of the mean flow. Note that now meridional flow across 0 large-scale gradients in Q, rather than just b, leads to rates of change 0 of Q . -20 The above is implemented in the context of VIC as follows. The advection of particles is done as before using a fourth order RK 0 0 @Q -40 method but this time using the velocity ðu þ u Þ. The term v @y is treated as a source term and added to the potential vorticity of particles at both steps of the second order RK time marching -60 scheme. 0.00 0.05 0.10 0.15 0.20 0.25 The dispersion relation of Rossby waves propagating on the Fig. 6. (a) Meridional sections of the mean flow, u, (the thick curve) and mean flow is given by 0 1 instantaneous zonal velocity, u þ u0, (thin dashed curve, along a chosen longitude). The scale in m=s is along the lower horizontal axis. Note that u is zero everywhere 2 Q y except in two bands where it is equal to bL . The meridional distribution of mean x ¼ k@u A ð34Þ d 2 2 1 potential vorticity Q (thick curve) and instantaneous total potential vorticity, k þ l þ 2 0 Ld Q þ Q (thin curve, along the same longitude as chosen to plot the instantaneous u) is also plotted. The scale is on the upper horizontal axis in 106 s1. (b) Rossby wave

Note that on (large) scales much greater than Ld, Eq. (34) reduces to phase speed (dashed thick curve) and urms (thin curve). The vertical axis is latitude (neglecting curvature effects in Q y) and the horizontal axis is velocity in m=s. A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 139

2 u x ¼kbLd ð35Þ Q y ¼ b þ 2 ¼ 0: ð37Þ Ld i.e., curiously, and as is well known, long Rossby waves are oblivious to mean flow (u) effects. The u and Q of the initial state is shown by the thick black lines in In order to study the interaction of mean flow and particles in Fig. 4. the context of our VIC model, we set up a mean flow on the sphere To represent the growth and decay of baroclinic turbulence on which is zero everywhere except in two narrow bands in the this mean flow we make direct use of the particles and randomly southern hemisphere. Inside these bands, the mean flow is set to initialize their vorticity thus:

2 2 u ¼bLd ð36Þ f w=Ld ¼ rf so that the potential vorticity gradients vanish within the bands where f ¼ 105 s1, r is a random number between 0.5 and 0.5. thus: The decay of the turbulence thus generated is represented by

Fig. 7. Instantaneous total potential vorticity, Q þ Q 0,in106 s1.

Fig. 8. (a) Rossby wave phase speed, cRossby, inferred from the propagation of altimetric signals and urms inferred from surface drifter observations (see Tulloch et al. for more details). (b) cRossby and urms from the VIC model. 140 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142

2 damping the f w=Ld on particles toward zero with an e-folding scales resolvable in the model and their subsequent decay. Particle timescale set to 1 year. When the modulus (normalized by its initial trajectories are readily plotted, as are the stream function and vortic- value) becomes smaller than a threshold (chosen to be a factor 1=e ity of their associated flow field on the Eulerian grid. 2 of the initial value in the corresponding latitude), f w=Ld is reset Recently Tulloch et al. (2009) have argued that the nature of the according to the above rule with random signed vorticity. The lati- interaction between geostrophic turbulence and Rossby waves in tude ranges from 65 to 65° hereafter. the ocean depends on whether there is a matching between turbu- The (gridded) total instantaneous potential vorticity ðQ þ Q 0Þ lent and Rossby wave timescales. The interaction between turbu- resulting from the deployment of 1.3 million point vortices is lence and waves was explored in the barotropic context by shown in Fig. 7 after a period of 20 years in the case Ld ¼ 80 km. Rhines (1975) (the so-called Rhines effect) and Vallis and Maltrud As is clearly observed, in the southern hemisphere the potential (1993), and in a (first-mode) baroclinic context applied to the gas vorticity is well mixed inside the bands and a strong gradient is ob- by Theiss (2004, 2006) and Smith (2004). The central idea served between the two bands. A highly nonlinear regime is also is that, as eddies grow in scale in the inverse cascade, their time- observed in the northern hemisphere. Note that here the circula- scale slows, and when this timescale matches the frequency of tion spontaneously organises itself in to eastward and westward Rossby waves with the same spatial scale, turbulent energy may jets: the eastward flowing jets tend to enhance pv gradients and be converted into waves. Tulloch et al. (2009) argue that just such the westward flowing jets tend to weaken, and indeed often a phenomenon controls the interplay of turbulence and waves in slightly reverse them. the ocean. As shown by the observations plotted in Fig. 8a, at

Fig. 6b shows urms, the rms particle speed relative to the mean low latitudes the phase speed of first baroclinic mode Rossby

flow, as a function of latitude, along with the Rossby wave phase waves (cRossby) far exceeds turbulent velocity scales (urms), whereas speed, cRossby, given by Eq. (35). We see that at all latitudes, save for the reverse is true at high latitudes. Thus, one might expect turbu- the region of the bands, the nonlinearity parameter urms=cRossby > 1. lence to generate waves at low latitudes, but not at high latitudes This, of course, is consistent with our observation in Fig. 7 that the where there is no matching of time scales. Q field is strongly distorted by the presence of intense vortices, To represent the marked increase in long Rossby wave phase particularly at high latitudes. speed as the equator is approached, we specify a meridional varia-

tion in Ld in Eq. (1) (small at high latitudes becoming large at low 2 6. Interaction of waves and turbulence on the sphere latitudes) to yield a plausible variation in bLd. Note that in contrast to Fig. 5, cRossby becomes very large (capped at 50 cm/s) as the equa- In our final illustration of the VIC method, we apply it to the inter- tor is approached. action of waves and turbulence in the ocean, a problem which can ni- As before, to represent the growth and decay of baroclinic cely exploit the dual (vortex, grid) aspects of the numerical turbulence, the vorticity on particles are randomly initialized approach. The ability to impose rules on the time rate of change of but according to a slightly different recipe. Since Ld is small at 2 2 vorticity on discrete particles is again used to simulate the growth high latitudes, the term f w=Ld is dominated by w=Ld. Hence 2 (by baroclinic instability) of geostrophic turbulence on the smallest if a spatially uniform random amplitude for f w=Ld is specified,

Fig. 9. Stream function plotted in units of 104 m2=s. To reveal the nature of the flow outside the tropical belt, an insert is drawn using a different contour interval. A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 141

w becomes increasingly small at high latitudes (as Ld decreases) 7. Conclusions leading to a low level of eddy kinetic energy at high latitudes. This is contrary to observations. Instead we randomly initialize A vortex in cell model for quasi-geostrophic, shallow water 2 f w=Ld thus: dynamics on the sphere has been presented. It was shown that special attention must be paid to the interpolation of data from particles to the Eulerian grid and vice versa, particularly for mod- f w=L2 ¼ raf d eling of slow oceanic dynamics. Numerical experiments were per- formed to evaluate the performance of the model in simulation of where f ¼ 105 s1, r is a random number between 0:5 and 0:5, Rossby waves on the sphere and encouraging results were ob- and a ¼ Ld=Ld is a tuning factor which is larger than unity if Ld is tained for both oceanic and atmospheric problems. Stability, accu- less than Ld, a reference deformation radius. This enables us to rate Lagrangian modeling of the advection of vorticity and control the meridional distribution of eddy kinetic energy, bring- conservation of potential vorticity, leads to an accurate and effi- ing it in to broad accord with the observations. A reference Ld set cient tool for the study of the interaction of waves, vortices and equal to 150 km was found to work well. mean flows in the presence of boundaries. Figs. 8b and 9 show results in which, as before, 1.3 million To illustrate the potential applications of this new tool which particles were employed on the sphere. For the parameters de- exploit the particle/grid duality of the numerical method, we de- scribed above, at latitudes outside a tropical band of 20 , urms scribed two experiments in which baroclinic instability was rep- drops below cRossby. In the tropical band the turbulence generates resented by introducing a vorticity charge–discharge cycle to waves: the flow becomes organized in to large-scale Rossby parameterize the growth and decay of pv anomalies associated waves that propagate westward at the long Rossby wave phase with the instability. In the first application we prescribed mean speed. Outside the tropical band, by contrast, no such organiza- flows and mean pv gradients and observed the evolution of vor- tion is observed and the flow is dominated by the turbulent tices on this background flow. In the second application we stud- wandering of vortices—see insert in Fig. 9. This is very clear on ied the interaction of waves and turbulence on the sphere in the inspection of the trajectory of individual particles in the tropical case where, as is observed, the deformation radius becomes large and high latitude bands shown in Fig. 10. and hence first baroclinic Rossby waves propagate very fast, as

20 a

10

0

-10

-20 0 100 200 300

50 b

40

30

20 160 180 200

Fig. 10. Particle trajectories (a) in the equatorial band and (b) in high latitudes. Horizontal and vertical axes represent longitude and latitude, respectively. 142 A. Mohammadian, J. Marshall / Ocean Modelling 32 (2010) 132–142 the equator is approached. We found that turbulence generates References waves in the tropical band where cRossby > urms, but not at higher latitudes where the reverse is true. Christiansen, J.P., 1973. Numerical simulation of hydrodynamics by the method of point vortices. Journal of Computational Physics 13, 363–379. Finally, it should be said that extension to more than one layer Cocle, R., Winckelmans, G., Daeninck, G., 2008. Combining the vortex-in-cell and and introduction of geometrical constraints (coasts and islands) in parallel fast multipole methods for efficient domain decomposition simulations. the context of VIC is no more complicated than in standard quasi- Journal of Computational Physics 227, 9091–9120. geostrophic models. Cottet, G.-H., Koumoutsakos, P., 2000. Vortex Methods: Theory and Practice. Cambridge University Press, Cambridge, UK. Cottet, G.-H., Michaux, B., Ossia, S., VanderLinden, G., 2002. A comparison of spectral and vortex methods in three-dimensional incompressible flows. Journal of Acknowledgements Computational Physics 175, 702–712. Cottet, G.-H., Poncet, P., 2003. Advances in direct numerical simulations of 3D wall- We thank the Physical Oceanography program of the US bounded flows by Vortex-in-Cell methods. Journal of Computational Physics 193, 136–158. National Science Foundation for support of this study. It is part of Huang, M.-J., Chen, L.-C., Su, H.-X., 2009. A fast resurrected core-spreading vortex our contribution to the DIMES experiment. method with no-slip boundary conditions. Journal of Computational Physics 228 (6), 1916–1931. Kudela, H., Regucki, P., 2002. The vortex-in-cell method for the study of three- dimensional vortex structures. In: Bajer, K., Moffatt, H.K. (Eds.), Tubes, Sheets Appendix A. The area and cubic Lagrange interpolation methods and Singularities in . Kluwer Academic Publishers, The Netherlands, pp. 49–54. In the area method, a vorticity of magnitude unity is credited to Lakkis, I., Ghoniem, A., 2009. A high resolution spatially adaptive vortex method for separating flows. Part I: Two-dimensional domains. Journal of Computational the four surrounding grid points by (see, e.g. Christiansen, 1973; Physics 228 (2), 491–515. Liu and Doorly, 1999) Liu, C.H., Doorly, D.J., 1999. Velocity–vorticity formulation with vortex particle-in- cell method for incompressible viscous flow simulation. Part I: Formulation and validation. Numerical Heat Transfer Part B 35, 251–275. fði; jÞ¼A1; fði þ 1; jÞ¼A2 ð38Þ Liu, C.H., 2001. A three-dimensional vortex particle-in-cell method for vortex fði; j þ 1Þ¼A3; fði þ 1; j þ 1Þ¼A4 ð39Þ motions in the vicinity of a wall. International Journal for Numerical Methods in Fluids 37, 501–523. Ould-Salihi, M.L., Cottet, G.-H., El Hamraoui, M., 2000. Blending finite-difference and and is superimposed for all particles. The coefficients A1 to A4 are vortex methods for incompressible flow computations. SIAM Journal of given in (13), (14). A weighting factor should be also applied based Scientific Computing 22 (5), 1655–1674. on the initial number of particles in each cell. Rhines, P.B., 1975. Waves and turbulence on a b-plane. Journal of Fluid Mechanics 69, 417–443. In the cubic Lagrange interpolation method, given f ðx1Þ; f ðx2Þ; Smith, K.S., 2004. A local model for planetary atmospheres forced by small-scale f ðx3Þ and f ðx4Þ, the function f ðxÞ is approximated as convection. Journal of Atmospheric Sciences 61, 1420–1433. Theiss, J., 2004. Equatorward energy cascade, critical latitude, and the f ðxÞ¼c1f ðx1Þþc2f ðx2Þþc3f ðx3Þþc4f ðx4Þð40Þ predominance of cyclonic vortices in geostrophic turbulence. Journal of Physical Oceanography 34, 1663–1678. Theiss, J., 2006. A generalized Rhines effect on storms on . Geophysical where Research Letters 33, L08. 809. Tulloch, R., Marshall, J., Smith, K.S., 2009. Interpretation of the propagation of ðx x Þðx x Þðx x Þ surface altimetric observations in terms of planetary waves and geostrophic c ¼ 2 3 4 ð41Þ 1 x x x x x x turbulence. Journal of Geophysical Research 114, C02005. doi:10.1029/ ð 1 2Þð 1 3Þð 1 4Þ 2008JC005055. ðx x Þðx x Þðx x Þ Uchiyama, T., Naruse, M., 2004. Numerical simulation for gas-particle two-phase c ¼ 1 3 4 ð42Þ 2 ðx x Þðx x Þðx x Þ free turbulent flow based on vortex in cell method. Powder Technology 142, 2 1 2 3 2 4 193–208. ðx x1Þðx x2Þðx x4Þ Vallis, G.K., Maltrud, M.E., 1993. Generation of mean flows and jets on a beta plane c3 ¼ ð43Þ and over topography. Journal of Physical Oceanography 23, 1346–1362. ðx3 x1Þðx3 x2Þðx3 x4Þ Williamson, D.L., Drake, J.B., Hack, H.J., Jakob, R., Swarztrauber, P.N., 1992. A ðx x1Þðx x2Þðx x3Þ standard test set for numerical approximations to the shallow water equations c4 ¼ ð44Þ in spherical geometry. Journal of Computational Physics 102, 211–224. ðx4 x1Þðx4 x2Þðx4 x3Þ