Resolving the horizontal direction of internal tide generation

The mixing induced by breaking internal gravity waves is an important contributor to the ocean’s energy budget, shaping, inter alia, nutrient supply, water mass transformation and the large-scale overturning circulation. Much of the energy input into the internal wave field is supplied by the conversion of barotropic tides at rough bottom topography, which hence needs to be described realistically in internal gravity wave models and mixing parametrisations based thereon. A new semi-analytical method to describe this internal wave forcing, calculating not only the total conversion but also the direction of this energy flux, is presented. It is based on linear theory for variable stratification and finite depth, that is, it computes the energy flux into the different vertical modes for two-dimensional, subcritical, small-amplitude topography and small tidal excursion. A practical advantage over earlier semi-analytical approaches is that the new one gives a positive definite conversion field. Sensitivity studies using both idealised and realistic topography allow the identification of suitable numerical parameter settings and corroborate the accuracy of the method. This motivates the application to the global ocean in order to better account for the geographical distribution of diapycnal mixing induced by low-mode internal gravity waves, which can propagate over large distances before breaking. The first results highlight the significant differences of energy flux magnitudes with direction, confirming the relevance of this more detailed approach for energetically consistent mixing parametrisations in ocean models. The method used here should be applicable to any physical system that is described by the standard wave equation with a very wide field of sources.

The mixing induced by breaking internal gravity waves is an important contributor to the ocean's energy budget, shaping, inter alia, nutrient supply, water mass transformation and the large-scale overturning circulation. Much of the energy input into the internal wave field is supplied by the conversion of barotropic tides at rough bottom topography, which hence needs to be described realistically in internal gravity wave models and mixing parametrisations based thereon. A new semi-analytical method to describe this internal wave forcing, calculating not only the total conversion but also the direction of this energy flux, is presented. It is based on linear theory for variable stratification and finite depth, that is, it computes the energy flux into the different vertical modes for two-dimensional, subcritical, small-amplitude topography and small tidal excursion. A practical advantage over earlier semi-analytical approaches is that the new one gives a positive definite conversion field. Sensitivity studies using both idealised and realistic topography allow the identification of suitable numerical parameter settings and corroborate the accuracy of the method. This motivates the application to the global ocean in order to better account for the geographical distribution of diapycnal mixing induced by low-mode internal gravity waves, which can propagate over large distances before breaking. The first results highlight the significant differences of energy flux magnitudes with direction, confirming the relevance of this more detailed approach for energetically consistent mixing parametrisations in ocean models. The method used here should be applicable to any physical system that is described by the standard wave equation with a very wide field of sources.
Key words: internal waves, topographic effects

Introduction
Besides wind-driven upwelling in the Southern Ocean, interior mixing has been identified as a major contributor to maintaining the global ocean circulation (e.g. Munk & Wunsch 1998;Talley 2013, and references therein). Much of the mixing energy is contained in the internal wave field, and up to half of the internal wave energy is estimated to stem from tidal flow over abyssal topography (Egbert & Ray 2001;Wunsch & Ferrari 2004). This tidal forcing is anisotropic, because the energy conversion from the tides to the internal waves depends on the shape of the topography and the orientation of the tidal ellipse. The theoretical framework typically employed to describe the internal tide field is that of vertical eigenmodes. Especially the low-mode internal tides, which have a higher energy content and larger scales than the higher modes, are important for large-scale ocean dynamics. They can propagate over thousands of kilometres away from their generation sites before their energy dissipates and contributes to turbulent mixing (Olbers 1983).
Existing (semi-)analytical models of internal tide generation typically do not resolve the directional dependence of the generated energy flux (e.g . Bell 1975b;Nycander 2005;Falahat et al. 2014b) and if they do, they describe the modal structure of the internal tide field only in approximate form (Vic et al. 2018). To close this gap and to help improve mixing parametrisations based on internal wave dynamics, we here present a new semi-analytical method to calculate both the horizontal direction and the magnitude of the energy flux from the barotropic tide into the different vertical modes, taking the full vertical structure of the stratification into account.
Tidal energy conversion can also be simulated with three-dimensional ocean models (e.g. Niwa & Hibiya 2004;Zilberman et al. 2009;Arbic, Wallcraft & Metzger 2010;Müller et al. 2012). However, it is not straightforward to diagnose the generation of internal waves, and even less so its angular distribution, from such simulations. For example, computing the energy flux through a vertical test surface gives the net flux, but does not differentiate between the fluxes passing through the surface from different directions. Further drawbacks are the high computational cost required for global simulations with high-resolution topography, so that in practice only the first few modes can be resolved, and the need to parametrise where and how baroclinic tidal energy dissipates, which happens on spatial scales too small to be resolved in global ocean models. This motivates the semi-analytical treatment of the internal tide generation problem. One of the first to follow this approach was Bell (1975a,b), who computed the energy conversion into linear internal waves radiating away from the seafloor in a manner consistent with the Wentzel-Kramers-Brillouin (WKB) approximation, i.e. for waves that vary on smaller vertical scales than the scales of variation of the background stratification. The underlying assumptions which render the problem analytically tractable are that the topographic heights are small compared to the vertical wavelength of the waves and that the topographic slopes are much smaller than the slope of the tidal beam. By decomposing the wave field into vertical normal modes, Llewellyn Smith & Young (2002, hereafter LSY02) extended this method to arbitrary stratification. They found that the main effect of finite compared to infinite depth is that conversion rates are suppressed for horizontal topographic scales larger than the horizontal wavelength of the first internal wave mode. Using the WKB approximation, they moreover showed that the properties of the stratification relevant for the energy conversion are the buoyancy frequency's vertical average, N, and its value at the bottom, N B . For dN/dz = 0, these WKB solutions for the eigenfunctions, wavenumbers and conversion rates are exact for all modes (LSY02); for the weak variations of N(z) observed in the ocean interior, they provide a reasonable description of the conversion field except for the lowest modes (Zarroug, Nycander & Döös 2010).
Calculations of the energy conversion rate in the global ocean building on these results were performed for example by Egbert, Ray & Bills (2004), Nycander (2005) Resolving the horizontal direction of internal tide generation 383 and Falahat et al. (2014b). Egbert et al. (2004) implemented a computationally less expensive, approximate version of the convolution integral derived by LSY02 in a hydrostatic shallow-water model, showing that the modelled tidal elevations could reproduce those estimated from altimetry data with a root-mean-square (r.m.s.) error of 5 cm. Nycander (2005) introduced a filter to the expression of Bell (1975a,b), thereby suppressing internal tide radiation from long topographic scales in line with the findings by LSY02. The total conversion rates were in good agreement with the numbers found by Egbert & Ray (2001) from satellite altimetry data; the more detailed evaluation performed by Green & Nycander (2013), testing different wave drag parametrisations in a barotropic tidal model, confirmed the positive assessment of the method. Further support of the semi-analytical approach was given by the reasonable correlation between microstructure measurements of turbulent kinetic energy dissipation rates and energy conversion rates calculated using a variation of Nycander's formalism (Falahat et al. 2014a). Falahat et al. (2014b), on the other hand, based their global calculations on the approach by LSY02 and solved the vertical eigenvalue problem for the first 10 internal tide modes. They compared their results to those of Nycander (2005) and found that the two methods diverged most strongly in the upper ocean, with the global integrals of the energy conversion rate differing by 16 %. In idealised test cases, taking the full vertical structure of the stratification into account led to more accurate results than the WKB-based method of Nycander (2005), which considers N B rather than N(z).
Our objective is to describe the directional dependence of the tidal energy conversion. Recently, Vic et al. (2018) calculated the direction of the energy conversion over the northern Mid-Atlantic Ridge based on the formulation of St Laurent & Garrett (2002), which is an approximation of the expression of Bell (1975b) in the limit of small tidal excursion and involves a first-order correction for the finite ocean depth based on the assumption of an exponential buoyancy frequency profile. Here, we instead take the full vertical structure into account by following the vertical-mode treatment of LSY02. We calculate the energy conversion as an integral over the energy flux instead of, as done by Nycander (2005) and Falahat et al. (2014b), an integral over the energy sources. Apart from providing information on the direction, another, practical, advantage of the new method is that the energy flux is positive definite, whereas integrating over the energy sources can produce negative conversion rates (e.g. Falahat et al. 2014b) and hence requires further treatment before it can be used, for example, as source term in internal wave models.
Our new method is based on the assumptions of a bounded source region and a horizontally constant tidal velocity. These assumptions are not valid for an entire ocean basin, and we thus propose to subdivide the seafloor into overlapping circular patches. By multiplying the topography within each patch by a Gaussian, the effect of the remote topography on the conversion rates is neglected and the far-field expression, which is proportional to the Fourier-transformed topography within the patch, is locally valid. Considering each patch in turn, the energy conversion for the entire ocean floor can be calculated.
The derivation of the relevant equations is described in § 2. In § 3, we explain the numerical implementation of the method for large-scale calculations. In § 4, we discuss the evaluation of the method based on idealised test cases, which allows the identification of suitable parameter settings, such as the overlap of neighbouring patches. The energy conversion for a region of realistic topography is presented in § 5 before offering a summary and conclusions in § 6. The focus of this paper is on the introduction of the new method and its evaluation; global calculations of the angular energy flux into vertical modes using realistic topography, tidal velocities and stratification will be presented in a follow-up publication.

Derivation of the energy flux
LSY02 derive the expression for the energy conversion into vertical normal modes for an ocean of non-uniform finite depth with the ocean bottom at depth z B = −H + h(x, y), where H is a constant. They make the following approximations. First, the topography is assumed to be weak, so that the bottom boundary condition can be applied at the flat bottom z = −H, which requires that topographic slopes ∇h are much less than the slope of the tidal beam ('subcritical topography') and that the height of the topography is smaller than the vertical wavelength of the internal waves. Second, the tidal excursion is assumed to be small compared to the horizontal scale of the topography, L, i.e. U 0 /(ωL) 1, so that advective effects of the barotropic tide can be neglected. Here, U 0 is the amplitude of the tidal velocity and ω the fundamental tidal frequency. Third, they use the hydrostatic approximation, which is justified as long as ω/N 1.
Internal wave disturbances induced by tidal flow over rough bottom topography can be described by the linearised hydrostatic Boussinesq equations, which LSY02 projected onto vertical normal modes defined by the following eigenvalue problem: Here, c m is the mode-m internal tide phase speed, which is related to the horizontal wavenumber κ m , the Coriolis frequency f and the tidal frequency ω as The eigenfunctions satisfy the following orthogonality condition: 0 −H a n (z)a m (z)N 2 (z) dz = fc m ξ m δ mn , where ξ m is a non-dimensional normalisation constant which we set to unity without loss of generality. The eigenfunctions a m (z) link the horizontal modal fields to their corresponding three-dimensional counterparts, e.g. for the perturbation pressure p (see LSY02, equations 22 and 23): where a m = da m /dz. In this paper bold-face variables represent two-dimensional horizontal vectors and tensors, e.g. the coordinate vector r = (x, y), whose modulus is denoted by r = |r|, and the corresponding unit vector in the radial direction, r =x cos φ +ŷ sin φ, involving the eastward and northward unit vectorsx andŷ, respectively. The modal pressure p m (r, t) and the tidal velocity u(t) are assumed to have a sinusoidal time dependence with complex amplitudes P m and U, respectively: where Re denotes the real part. For the normal-mode decomposition described above, the modal conversion rate was identified by LSY02 (see their equation 28) as where the angle brackets denote the time average over a period, A the area including the topographic sources, dx dy the area element and ∇ = (∂/∂x, ∂/∂y). The variable ζ m is a dimensionless quantity related to the vertical derivative of the eigenfunctions as Note that, for constant stratification, (2.1) can be solved analytically and LSY02 derived the following inhomogeneous Helmholtz equation for the modal pressure amplitude P m (see their equation 33): with the source function where σ m,0 is real. Equation (2.10) is the starting point for our derivation of a new method to resolve the direction of the energy flux into the different internal tide modes. Note that this equation arises in many physical situations, e.g. atmospheric lee-wave generation or Lighthill radiation, so that our novel approach to solving (2.10) is in fact not limited to the phenomenon of oceanic internal tides. We first derive an energy equation from (2.10) by multiplication with P * , the complex conjugate of P: where we have dropped the subscript 'm' for the sake of brevity. Taking the imaginary part Im, this reduces to ∇ · Im{P * ∇P} = Im{P * σ }.
(2.13) This step is motivated by the comparison of (2.10) and (2.12) to the time-dependent form of the standard two-dimensional forced wave equation and the resultant energy conservation equation (see appendix A). The left-hand side of (2.13) can then be identified as the divergence of the energy flux, but only up to a real multiplicative coefficient B given below, which relates the modal pressure amplitude P to wave energy.
In consequence, the energy source density s is given by s = B Im{P * σ } (2.14) and the energy flux F is related to the pressure according to The energy conversion can then be computed either as the integral over the source density, (2.16) or as the integral of the energy flux across a closed curve γ around the source region A, Previous studies (e.g. Falahat et al. 2014b) invoked (2.16) to calculate the energy conversion. In order to resolve the horizontal direction of the energy flux we instead have to rely on (2.17). Both methods require solving (2.10) for the pressure, which can be accomplished following a standard Green's function approach: (2.19) The Green's function G describes the radiation from a point source and is given by where H 1 0 denotes the Hankel function of the first kind of order zero, and J and Y are Bessel functions of the first and second kind, respectively. The Green's function has the property where the δ-function originates from the term Y 0 in (2.20), and the term J 0 in (2.20) ensures that the energy flux is directed away from the origin, as can be verified by inserting G(κ|r|) into (2.15). When the pressure field is evaluated at a point far away from all sources, the asymptotic expansion of the Hankel transform can be used in (2.19). As a result, the pressure field can be approximated as where the tilde denotes the Fourier transform and k is the two-dimensional wavenumber vector (see appendix B for details of the derivation). Inserting (2.23) into (2.15) leads to the following expression for the farfield energy flux: whose magnitude is the same on opposite sides of the sources because ofσ * 0 (k) = σ 0 (−k). Expressing the radial unit vector in terms of the Cartesian counterparts, r =x cos φ +ŷ sin φ, underlines that this expression is indeed the directional energy flux in terms of the horizontal angle φ. Following (2.17), the total energy conversion becomes The same expression can also be obtained by using (2.19) and (2.20) in (2.16) and exploiting symmetry: This equation was used by Falahat et al. (2014b) to compute the global energy conversion. It can be rewritten by means of the following known expression for the Fourier transform of the Bessel function J 0 : which leads indeed to the same expression as (2.26). The difference is that the first derivation based on the approximate Hankel function is more explicit in requiring that the expression be evaluated far away from the source region (note that both approaches make use of the radiation condition; see also appendix B).

Implementation
The numerical implementation is based on (2.25). The flux magnitude F = |F| can be written as with the symmetric tensor F. Pollmann, J. Nycander, C. Eden and D. Olbers The advantage of writing the energy flux as in (3.1) is that the tidal velocity is treated separately, so that, for example, the spring-neap tidal cycle can be taken into account by letting the tidal amplitude U vary slowly in time. Tensor R can be thought of as a drag tensor (Green & Nycander 2013), which can be transformed into Cartesian coordinates usingrr shows that the directional energy flux depends on the Fourier transform of the topography in polar coordinates. An apparently straightforward approach would be to first calculate the Fourier transform of the topography in Cartesian coordinates and then interpolate it onto a polar grid in spectral space. Simple tests comparing (2.17) and (2.16) for idealised topography such as top-hat or Gaussian seamounts, however, demonstrate that the interpolation of the Fourier-transformed topography requires a very high spatial resolution. A more practicable alternative, in terms of both accuracy and computational speed, is to calculate the Fourier transform in polar coordinates. Baddour (2009) showed that taking the two-dimensional Fourier transform of a function in polar coordinates is, after appropriate scaling, equivalent to first determining its Fourier series expansion in the angular direction and then calculating the nth-order Hankel transform of the radial variable. This implies that the transform needs to be calculated for one specific wavenumber only instead of all of them, which additionally reduces the computational expense. In consequence, the implementation involves the following steps.
(i) Interpolation to a polar grid. The topography h(x, y) is on the Cartesian grid represented by a bivariate spline, which is then evaluated at the polar grid points. This gives h(r, φ).

(ii) Calculation of angular modes. A Fourier expansion (fast Fourier transform, FFT)
of h(r, φ) in the φ-direction is performed to compute the angular modes h n (r), where n is the angular mode number: (3.4) (iii) Hankel transform. We are interested in the Fourier-transformed angular modes h n (k). As shown by Baddour (2009), these are related to the angular modes calculated in step (ii), h n (r), through the Hankel transform: This integral is solved using numerical quadrature (Simpson's rule) for the specific wavenumber k = κ. This can be evaluated at β = φ.
In the real ocean, the sources are not confined to small, bounded regions, nor are the tidal velocity amplitude U or the horizontal wavenumber κ constant in space (or time), as assumed in the derivation of (2.10). Therefore, the far-field expression derived in the previous section cannot be applied directly. The same problem arises when computing the energy conversion as the integral over the source density using (2.27), as was done by Falahat et al. (2014b). They dealt with this issue by truncating the Bessel function in the integral after a certain number of zero crossings, effectively neglecting the influence of topography far away from the point at which the conversion is calculated. In the same spirit, we only consider the topography in a certain area around the point of interest to be relevant for the energy conversion. To that end, we subdivide the topography into overlapping circular patches of radius r p . In each of these circles, identified by indices i, j and centred at r i,j , the topography is multiplied by a Gaussian and interpolated onto a polar grid, which is also centred at r i,j : This 'screened' topography h i,j (r) is hence confined to a region of length scale r G and we can therefore, if r G is small enough, apply the far-field expression for each patch individually, choosing different values for κ and U in the different patches. In other words, for each patch, we follow steps (i)-(iv) and calculate the angular energy flux rF i,j based on (3.1) and (3.2), thereby covering the entire ocean floor. Note that multiplying the topography by a Gaussian is a tapering to avoid sharp cutoffs at the patch boundary, not a smoothing that removes small topographic scales. The mean angular flux density per unit area at the patch centre, is obtained by normalising the energy flux by the effective patch area a i,j , where the square in the integral accounts for the quadratic dependence of the energy conversion on the screened topography. The procedure is illustrated in figure 1. For the numerical implementation, the following parameters have to be set: (i) f l = r p /r G , the size of the patch relative to that of the Gaussian; (ii) f κ = κr G , the size of the Gaussian itself relative to the wavenumber for which the conversion is calculated; (iii) f p = r G /dx c , the extent to which neighbouring patches overlap, relating the Gaussian width r G to the patch centre spacing dx c ; and (iv) the resolution of the polar grid in each patch, dr = r p /n r and dφ = 2π/n φ , where n r is the number of points in the radial direction and n φ is the number of points in the angular direction -the parameter n φ thus determines the resolution of the angular energy flux F.
Suitable parameter settings are determined in convergence tests using idealised topography, which are presented in the following section. Illustration of the method. The topography is given on a Cartesian grid with spacing dx and dy (small points). The total domain is subdivided into circular patches of radius r p , whose centres are spaced at a distance of dx c and dy c (larger points). In each patch, the topography is interpolated onto a polar grid and multiplied by a Gaussian, whose width (standard deviation) is given by r G . The numerical parameters which have to be set are: (1) the patch size relative to that of the Gaussian, controlled by the parameter f l = r p /r G ; (2) the size of the Gaussian relative to the wavenumber for which the conversion is calculated, controlled by the parameter f κ = κr G ; (3) the grid spacing dx c and dy c relative to the Gaussian width, i.e. to what extent the effective patch area πr 2 G overlaps (shaded areas), controlled by the parameter f p = r G /dx c ; and (4) the resolution of the polar grid within each patch, dr = r p /n r and dφ = 2π/n φ , where n r and n φ denote the number of grid points in the radial and angular directions.

Tests with idealised topography
The basic evaluation of the method achieved through the comparison of (2.17), describing the conversion as the integrated energy flux, and (2.16), defining the conversion in terms of the integrated source density, showed that for top-hat and stretched Gaussian topographies, the two solutions for the conversion rate agree well. For a more detailed evaluation and in order to determine the numerical parameters introduced in the previous section, we focus on the so-called 'witch of Agnesi' profile, for which it is possible to calculate the conversion rate analytically. This idealised topography is described as where Λ denotes the topographic length scale (half-width of the ridge) and h 0 the maximum ridge height. Tidal currents flowing across this idealised topography will generate parallel wavetrains propagating away from the ridge in the x-directionbuoyancy oscillations and propagating internal gravity waves can only originate from flow across, not along, the topographic obstacle. Thus, the orientation of the tidal ellipse strongly affects the magnitude of the energy conversion for approximately one-dimensional topography, and in this case, the conversion per unit length in the y-direction (W m −1 ) is a function of the zonal velocity component only (see e.g. Falahat et al. 2014b): with the Fourier transform of the topography, We follow Falahat et al. (2014b) and set h 0 = 100 m, H = 4 km, f = 8 × 10 −5 s −1 , the mean seawater density to ρ 0 = 1040 kg m −3 , the tidal frequency corresponding to that of the M 2 -tide, ω = 1.4 × 10 −4 s −1 , and the tidal amplitude to U 0 = 4 cm s −1 . The ridge is located at the centre of a domain which extends 4000 km in each direction with a grid spacing of dx = dy = 1 km. For topographic scales Λ = (2.5, 5, 10, 20) km, the underlying assumptions of weak topography and small tidal excursion are met.
The numerical solution C num comparable to the analytical solution of the energy conversion in (4.2), C an , is obtained by integrating D i,j over all angles and across the ridge, replacing the integrals by simple sums: which is the same for any choice of j = 1, . . . , ny c for reasons of symmetry. In order to determine suitable choices of the numerical parameters, we compare C num,ny c /2 = C num and C an for the different topographic scales Λ and different horizontal wavenumbers κ given above. We first consider the case of uniform stratification with N = 9.02 × 10 −4 s −1 , so that κ m = m × 0.1 km −1 (see (2.9)). The resolution of the polar grid is set such that, at the outer patch boundary, the resolution is the same as that of the Cartesian grid, i.e. n r = r p /dx and n φ = 2πn r . For most test cases, this is a much higher resolution than necessary for reproducing the analytical solution within 1 %, but we keep it that high in order not to lose any information -as shown by Nycander (2005), insufficient resolution of topography is the most important error source in real applications. Figure 2 shows the convergence of the numerical solution towards the analytical one (see (4.2)) for a topographic scale of Λ = 5 km, using increasing values of the Gaussian width, the patch size relative to that of the Gaussian and the patch overlap. The latter is described as the ratio of Gaussian width r G to the patch centre spacing dx c , which is related to the area overlap relative to the effective patch area, O p , according to and 2. These threshold values are hence chosen as the reference settings for the following simulations. Note that we do not explore the three-dimensional parameter space, but keep two parameters fixed at their reference value while varying the third. In the following step, these reference settings are evaluated for the different values of the ridge width Λ given above (see figure 3a). These test cases show that, for wider ridges, the proportion of energy flux into the first vertical mode increases -for Λ = 20 km, the only mode carrying a significant amount of energy is the first one. Moreover, these tests demonstrate that the agreement with the analytical solution is very good except for scenarios with very low conversion rates. Setting Λ = 20 km, the analytical solutions decrease below 0.002 W m −1 as κ 0.3 km −1 and the corresponding numerical solutions deviate by more than 10 % from the analytical values. Very low energy conversion rates are hence typically overestimated by this method, but fortunately of minor importance for the energy budget of the internal tide field. Conversion rates above 0.002 W m −1 , on the other hand, are reproduced within 10 %, and rates above 0.2 W m −1 within 1 %, mostly better. As depicted in figure 3(a), the total energy conversion is considerably higher than 0.2 W m −1 for the four different ridge length scales. For relevant energy conversion rates, the proposed method with standard settings f κ = 20, f l = 2.5 and f p = 0.8 is thus confirmed for this idealised topography with constant stratification and a ridge width Λ varying between 2.5 km and 20 km.
This also holds true for vertically variable stratification (see figure 3b). In this case, the full eigenvalue problem given in (2.1) has to be solved, which is done numerically following the method described by Chelton et al. (1998). We use an N-profile from the WOCE Global Climatology (Koltermann, Gouretski & Jancke 2011) -this profile was downloaded from the eWOCE website maintained by R. Schlitzer at the Alfred Wegener Institute for Polar and Marine Research, Bremerhaven, Germany -from 25 • N, 43 • W, which is characterised by a bottom value of N B = 3.77 × 10 −4 s −1 and shown in the inset of figure 3(b). We adjust the Coriolis parameter to a representative value of f = 6 × 10 −5 s −1 and keep the other parameters at the values listed above. As already observed for the test cases with constant stratification, the energy flux into higher modes decreases for wider ridges. It is interesting to note that in this idealised case with one-dimensional topography, there is a clear relation between ridge width and wavelength λ = 2π/κ of maximum energy conversion: λ(C max ) = 4πΛ. This explains why the maximum conversion is observed for lower modes when increasing Λ and is a useful relation to determine the Gaussian width for the 'witch of Agnesi' profile. It is less useful, however, for calculations with realistic topography, which is characterised by many different topographic length scales. As illustrated in figure 3(b), the numerical solution reproduces the analytical one well as long as conversion rates are higher than 0.001 W m −1 . Deviations from the analytical solution by more than 10 % are found for modes higher than (15, 17, 9, 4), i.e. the critical wavenumber is κ crit = (0.75, 0.80, 0.46, 0.23) km −1 for Λ = (2.5, 5, 10, 20) km. The corresponding conversion rates amount to C an = (0.001, 1.34 × 10 −5 , 1.45 × 10 −4 , 6.32 × 10 −4 ) W m −1 and are hence much lower than the total energy conversion into the lower modes with κ < κ crit . In conclusion, the new method based on circular patches and using the standard settings defined above accounts well for the bulk of the energy converted into baroclinic tides at a one-dimensional ridge.
If there is more than one ridge, wave interference may significantly change the total conversion (e.g. Karimpour et al. 2017;Zhang et al. 2017). In order to illustrate how the new method can capture this and to shed light on the relevance of the parameter r G , we consider a double ridge system defined as FIGURE 4. Analytical and numerical energy conversion per unit length in the y-direction (see (4.2) and (4.4), respectively) into modes 1-5 for a double ridge system of two 'witch of Agnesi' peaks in the x-direction as defined in (4.6). The stratification is assumed to be constant, using κ m = m × 0.1 km −1 , r G = 20/κ m and Λ = 5 km. The other parameter settings are the same as for the single ridge and constant stratification.
that is, two 'witch of Agnesi' ridges with a peak separation distance x 0 . The analytical solution for the conversion rate is given by (4.2) with the Fourier-transformed topography adjusted toh (4.7) Figure 4 shows the total conversion into the first five internal tide modes with κ m = m × 0.1 km −1 . The internal tides interfere constructively or destructively, depending on peak separation distance, which leads to an oscillating behaviour. The agreement between the numerical and analytical solutions decreases as the distance between the ridge peaks is increased. For very large ridge distances, the numerical solution is equal to twice the conversion of one isolated ridge (i.e. (4.1) -note the factor of two difference between (4.1) and (4.6) for x 0 = 0). Focusing on the conversion maxima obtained for x 0 = 2nπ/κ m , n = 0, 1, 2, 3 . . . , the numerical solution reproduces the analytical one for the different individual modes within 10 % as long as x 0 < r G (not shown). The parameter r G can thus be thought of as representing the correlation length scale of internal tides: only the interaction between waves generated by topographic features located within a distance r G from each other is taken into account. In consequence, calculations for more complex topography should use sufficiently large patch radii and a patch centre distance dx c and dy c smaller than r G in order to correctly represent the effect of wave interference on conversion rate estimates.

Energy conversion for a region of realistic topography
In order to determine suitable numerical parameter settings for realistic topography, we choose a region of interesting topography that involves no land points and is large enough to incorporate a reasonable number of circular patches for a variety of parameters: spanning 30.85-55.83 • W and 10.83-35.83 • N, it covers an area of 2.78 × 10 3 km in latitudinal and 2.55 × 10 3 km in longitudinal direction (at the centre at approximately 23 • N) over the Mid-Atlantic Ridge (MAR). In order to avoid boundary effects, the domain is on all sides extended by approximately 500 km, in which the bathymetric height is tapered by a sin 2 function to the average value at the respective side, and another approximately 900 km of this constant average (refer to figure 8 for an illustration of the topography, where much of the surrounding taper was cropped). The topographic elevation was taken from Becker et al. (2009) with a resolution of 30 arcsec, which corresponds to 0.93 km at the equator. Within each patch, the topography is now tapered towards the average topography h i,j over the patch, instead of towards zero, by multiplication with a Gaussian. That is, (3.7) is replaced by We set f = 6 × 10 −5 s −1 and reduce n φ to n φ = n r to save computational time. This step is justified by the observation that, in various test cases, this reduced angular resolution leads to conversion rates within 0.01 % (0.001 %) for constant (variable) stratification from the results obtained for n φ = 2πn r . All the other parameters are kept as before, i.e. the tidal velocity is U = (0.04, 0) m s −1 , the mean seawater density is ρ 0 = 1040 kg m −3 and the tidal frequency corresponds to that of the M 2 -tide, ω = 1.4 × 10 −4 s −1 . Owing to the lack of an analytical reference solution, suitable numerical parameters are determined by successively increasing their values until the total energy conversion saturates. This form of convergence test is made possible by the tapering of the topography at the boundary of the region. Figure 5 shows these sensitivity studies both for constant and for vertically variable stratification. Here, the total energy conversion into one vertical mode is considered, that is, we take the sum of (4.4) over all j = 1, . . . , ny c and multiply by the corresponding dy c : Note that here dx c is a function of j, as it varies with latitude. In the first case, we set N = 9.02 × 10 −4 s −1 with κ = κ 1 = 0.1 km −1 and the reference settings f l = 2.75, f κ = 25 and f p = 1.25 (that is, n xc = n yc = 29 or O p = 0.5). In the second case, we use the N-profile from 25 • N, 43 • W (see figure 3b) and show the convergence of the numerical solution for κ = κ 2 ≈ 0.1 km −1 with reference settings of f l = 2.75, f κ = 25 and f p = 1.25 (that is, n xc = n yc = 28 or O p = 0.5). The influence of variable stratification is evident, with lower total energy conversion rates observed in the scenario with N = N(z) due to the differences mainly in ζ m . The smallest variations are seen when varying the patch overlap, which almost disappear for f p = r G /dx c higher than unity. For increasing f l and f κ , the total conversion smoothly increases until it saturates for f l 2.5 and f κ 25. These threshold values are confirmed in simulations with f κ = 15 as the reference value (figure 5b,c). Setting f κ = 15 rather than f κ = 25 reduces the patch radius from 724 km to 434 km (from 688 km to 413 km for constant stratification), but gives a total conversion already within 3 % of the asymptotic value shown in figure 5(a). While larger patches imply larger correlation length scales r G , they also render the   assumption of constant tidal velocity and horizontal wavenumber within the patch less realistic. Moreover, the spatial structure of the energy flux is best resolved for smaller patch sizes, i.e. smaller values of f κ . This is illustrated in figure 6, where the zonally integrated energy flux density is shown as a function of latitude, demonstrating that increasing the patch radius effectively smooths this field. Consequently, there is a trade-off between angular and spatial resolution of the energy flux. Choosing a larger value of f κ leads to a higher number of angular modes n φ and hence a better resolution of the direction of the energy flux at each individual patch centre. At the same time, this leads to a coarser spatial resolution of the energy flux. This trade-off and the fact that, in the real ocean, sources of different length scales abound, render it difficult to decide on a universal value for f κ . Since the focus of this study is on the evaluation of our new method, we set f κ = 25; for realistic applications, a smaller value appears more appropriate. It is reassuring to see that even for half of our standard value the total conversion is close to the saturation result (figure 5a). The reference settings determined in this sensitivity analysis can be further evaluated in a comparison with the total conversion rate calculated by following the approach of Falahat et al. (2014b). This is essentially a comparison between the right-hand side of (2.13), the basis of (2.27) which was used by Falahat et al. (2014b), and the left-hand side of (2.13), on which our direction resolving method is based. We exactly follow the method of Falahat et al. (2014b) and calculate the conversion rate at each topography grid point, i.e. at a resolution of 1/120 • . Two calculations are performed: first, the Bessel function in the integral is truncated after 13 zero crossings, then after 14. The conversion rate at the specific topography point is taken as the average of these two results. The sum of all conversion rates (positive and occasionally negative) Resolving the horizontal direction of internal tide generation  figure 8, scaled by its respective maximum in this specific patch, for these two cases, where colours correspond to those in the legend and zero degrees is eastward. Note that only the total conversion in the entire area is expected to converge for ever larger numerical parameters, while the directional variation of the energy flux in a specific patch is not.
in the entire MAR domain amounts to C = 1.1647 × 10 10 W for constant stratification and to C = 2.1883 × 10 8 W for variable stratification. The corresponding results using our method equal C = 1.0224 × 10 10 W and C = 1.7641 × 10 8 W, respectively, i.e. 88 % and 81 % of the results following the approach of Falahat et al. (2014b).
Considering that both methods rely on setting a correlation length scale -in the form of f κ for our approach and the number of zero crossings of the Bessel function for that of Falahat et al. (2014b) -and remain somewhat sensitive to that choice, an agreement within 10-20 % seems acceptable. A more detailed comparison is presented in figure 7, where the spatial distribution of the conversion is shown. Following the approach of Falahat et al. (2014b) (figure 7b), the conversion field has a much higher resolution than that based on the patch method (figure 7a) and consequently reveals much more detail of the spatial variability. But it also features a large number of negative values, which is impracticable when the conversion field is to be used as a source function in internal wave models. One possibility to obtain a positive definite field is to average the conversion onto a coarser grid, e.g. the patch centre grid. The resultant conversion field (figure 7c) is in reasonable agreement with that obtained using the patch method, but some negative values remain (marked white in the figure).    -4.0 -4.2 -4.4 -4.6 -4.8 -5.0 -5.2 -5.4 -5.6 -5.8 -6.0 log 10 (C) (1/W m -2 ) -4. 0 -4.2 -4.4 -4.6 -4.8 -5.0 -5.2 -5.4 -5.6 -5.8 -6 Another possibility is to smooth the conversion field (not shown). Using r G = 262 km as a smoothing length scale, the agreement with figure 7(a) is very good but the conversion field still becomes negative occasionally, while using a smoothing scale of r p = 724 km results in a positive definite conversion field, but also in an overly smooth one, with very little spatial variation left. This emphasises an important advantage of the patch-based method: while previous approaches like that of Falahat et al. (2014b) require some a posteriori treatment of the conversion field before it can be used as an internal wave source function, involving some ad hoc choices of smoothing or averaging length scales, the patch method provides a ready-to-use positive definite conversion field because it includes this averaging in a systematic way, relating the corresponding length scale to the local internal tide wavenumber. The directional energy flux density for this realistic topography is presented in figure 8 for the mode-3 internal tide with κ 3 = 0.14 km −1 . The inset in the top right corner illustrates that, at each patch centre, the energy flux density is shown in a polar coordinate frame, in which both the direction (eastward corresponds to an angle of φ = 0) and the magnitude (i.e. the distance along the radial axis) can be represented. If the energy flux density were the same in all directions, this manner of presentation would show a circle at the patch centre in question. Circles, however, are observed at no location; on the contrary, in many patches the energy flux occurs mainly in one direction. This underlines the necessity to explicitly model these variations of the energy flux direction in order to realistically implement the tidal forcing in internal gravity wave models. Based on the sensitivity study shown in figure 5, the numerical parameters are set to f p = 1.25, f κ = 25 and f l = 2.75. The Gaussian width hence amounts to 185 km and the total patch radius to 509 km. With a zonal tidal ellipse with U = (4, 0) cm s −1 , the energy flux is somewhat larger west of the MAR than east of it, especially near the southern and northern boundaries of the domain. In the northwestern corner of the domain, sharp topography gradients lead to very high conversion rates, but this is at least to some degree an artefact of the tapering. Energy conversion for ˚3 = 0.14 km -1 (W m -2 ) 2000 2500 3000 FIGURE 8. Energy conversion for variable stratification and realistic topography. At each patch centre, the energy flux density D (see (3.8)), scaled by the maximum energy flux observed in the patch circled in red, is shown as a function of angle as illustrated in the polar coordinate plot inset in the top right corner. The magnitude of D is represented by the distance from the coordinate system's centre along the radial axis, which produces a circle for patches in which the energy flux is the same in all directions. The underlying topography is represented in colour, with red lines delimiting the untapered topography at the centre of the domain (the resolution of the topography input used in the calculations is 15 times higher in each dimension than in this figure). Note that the 900 km of constant topography, which were added on each side of the tapered topography to ensure a smooth decrease of the conversion rates at the boundaries, was cropped here for clarity. The stratification is assumed to be horizontally constant, taking the same vertical profile from 25 • N, 43 • W as used before, and we use U = (4, 0) cm s −1 , f = 6 × 10 −5 s −1 and n φ = 551. The energy conversion is shown for the mode-3 internal wave with κ 3 = 0.14 km −1 , setting f κ = 25, f l = 2.75 and f p = 1.25 (n xc = n yc = 39 or O p = 0.5). The red circle at 23 • N, 43 • W identifies the patch whose energy flux is shown in the polar coordinate plot and which is analysed in more detail in figure 9.
northward and northeastward orientations of the tidal ellipse. For modes 1, 3 and 4, the sensitivity study to the parameter f κ was repeated, showing that, for mode 1, f κ should be reduced to f κ = 13, while for modes 3 and 4, the previous setting of f κ = 25 is suitable, too. For mode 5 (not shown) the corresponding threshold value was also determined as f κ = 25, which suggests that this numerical parameter indeed converges towards a common value for all but the first mode. The orientation of the tidal ellipse influences both the magnitude and the direction of the energy conversion density. The lowest conversion rates are observed for zonal and the highest for meridional orientation, respectively. This can be attributed to the orientation of the bottom topography in this patch: at locations where the topography is predominantly zonal (e.g. in the northwestern corner of the domain), the energy 400 F. Pollmann, J. Nycander, C. Eden and D. Olbers  FIGURE 9. Effect of tidal velocity on energy conversion. The energy conversion density D (see (3.8)) at a patch centred on the MAR (23 • N, 43 • W, denoted by a red circle in figure 8) is shown as a function of direction for the first four modes. For each mode, the tidal velocity is varied between U x = (u, 0), U y = (0, u) and U xy = (u/ √ 2, u/ √ 2) with u = 4 cm s −1 . To differentiate between these three velocity scenarios, a vertical offset of 1.5 × 10 −5 W m −2 (mode 1) or 2 × 10 −3 W m −2 (modes 2-4) is introduced. Note also the different y-axis scaling for mode 1. The other parameter settings are as in the previous figure except for the Gaussian width, which was set to f κ = (13, 25, 25, 25) for modes 1 to 4, which are characterised by wavenumbers κ = (0.046, 0.095, 0.135, 0.178) km −1 .
conversion is much higher for meridional than for zonal flow and peaks in the direction of the tidal flow (not shown). In the patch analysed in figure 9, there are strong signals also in directions other than that of the tidal flow, highlighting the complexity of the topography in that area. In any event, there is no energy flux in the direction orthogonal to that of the tidal flow.

Summary and conclusions
A new method to calculate both the magnitude and direction of tidally forced internal gravity waves is presented. The main difference from previously applied schemes is that the energy conversion is derived from the far-field energy flux instead of an integral over the sources. This offers the noteworthy advantage that the conversion rate is positive definite, in contrast to integrating over the energy sources, which can produce negative values (e.g. Zilberman et al. 2009;Falahat et al. 2014b). Negative conversion rates can be attributed to the influence of remote internal tides (e.g. Kurapov et al. 2003;Kelly & Nash 2010) and are thus not unrealistic, but nevertheless present a problem when using the conversion rate estimates as external source in internal wave models used, for example, to parametrise mixing -Falahat et al. (2014b), for example, had to average their results over some area to obtain positive values (see also figure 7). The underlying assumptions of this semi-analytical method, based on the vertical-mode treatment of LSY02, involve, for example, that the source regions should be bounded (to allow the application of the radiation condition) and that the tidal velocity be constant, which do not hold for global calculations using realistic bathymetry. In consequence, the method is implemented by considering individual, overlapping circular patches, in which the topography is multiplied by a Gaussian centred at the circle's centre in order to smoothly decrease the influence of the remote topography. The energy flux from each patch is then calculated by computing the Fourier spectrum of the topography within the patch.
This approach introduces some numerical parameters: the size of the patches, the size of the Gaussian and the extent to which neighbouring patches overlap. Convergence tests based on idealised and realistic topography permit the identification of suitable parameter settings, showing that the patch radius should be at least 2.5 times the Gaussian standard deviation r G , which itself should be slightly larger than the patch centre spacing dx c . For mode numbers higher than one, the parameter f κ (the product of r G and the wavenumber κ) should be around 25.
The choice of the Gaussian width r G relative to the wavenumber is the most difficult one. The effect of multiplying the topography with a Gaussian is that coherent interaction such as wave interference is neglected on length scales larger than r G . In the ocean, factors such as nonlinear effects or inhomogeneities caused by eddies impede coherent interaction over large distances (e.g. Olbers 1983), and, ideally, the size of the Gaussian r G should reflect this correlation length scale. The natural correlation scale, which possibly varies in both space and time, is, however, too poorly understood to be of practical use for the numerical parameter choices. Instead, we performed test simulations with increasing r G until the total energy conversion saturated. There is however a trade-off between numerical convergence and the applicability of the assumption that wavenumber and tidal velocity can be considered constant within each patch. For realistic applications, a smaller value than the one chosen in this study, which focuses on the evaluation of the new method, might be more appropriate; it is therefore reassuring to see that already half of our standard setting of f κ = 25 produces acceptable conversion rates. The sensitivity tests performed in this study serve as a rough guideline for the choice of this numerical parameter, but it seems that such tests would have to be repeated for different regions of the global ocean, depending on the details of the topography and the stratification.
The effects of natural decorrelation could also be accounted for by including a linear damping in (2.10) instead of considering circular patches of limited size. This might be physically more appealing, but implies that the total flux decreases exponentially away from the sources, so that the far-field expression cannot be used and integration over the energy sources remains as the only possibility to calculate the conversion. In consequence, linear damping is no real alternative for the present purpose.
Another source of uncertainty stemming from the application of linear theory is the inherent assumption of subcritical topography. In the global ocean, however, some regions are characterised by supercritical slopes and the results obtained from linear theory are hence biased (see e.g. Holloway & Merrifield (1999), Nycander (2006, Pétrélis, Llewellyn Smith & Young (2006) and Garrett & Kunze (2007), and references therein, for descriptions of how the criticality of topographic slopes affects internal wave generation). The conversion rate in the subcritical domain is known to scale quadratically with the steepness parameter where α is the slope of the tidal beam and < 1 characterises the subcritical regime (e.g. Khatiwala 2003). The dependence in the supercritical regime is not known, but numerical and analytical studies suggest that the conversion rate saturates for > 1 (Khatiwala 2003;Nycander 2006;Balmforth & Peacock 2009), so that the application of linear theory to supercritical topography possibly overestimates the conversion rates. In consequence, Melet et al. (2013) proposed to correct for supercriticality by dividing the conversion rates by 2 wherever was larger than unity. Following this approach, we calculate the steepness parameter on the fine topographic grid (1/120 • resolution), approximating the gradients by forward differences. If, in a 1.75 • circle around each patch centre point (corresponding approximately to the Gaussian width for the scenario depicted in figure 8), at least 1 % (2 %) of the steepness parameter estimates exceed a value of unity, the correction proposed by Melet et al. (2013) is applied. The correction factor is calculated as the squared average of all steepness parameter estimates in the 1.75 • circle in question that exceed unity. This correction is only implemented for untapered topography and affects 77 (17) out of the 319 patches depicted in figure 8. The total conversion rate in the entire domain is decreased by around 6 % (1 %). Since the majority of topography taken into account for the computation of the energy conversion shown in figure 8 is subcritical -less than 1 % of all the steepness parameter values are larger than unity -the uncertainty due to the application of linear theory to supercritical slopes is in this case, at least based on the simple approach by Melet et al. (2013), very small. In other areas of the global ocean or in a global integral, however, this uncertainty might be more prominent (both Nycander (2005) and Falahat et al. (2014b) find that approximately half of the energy conversion into internal tides stems from supercritical slopes). The applicability of linear theory also requires that the vertical topographic scales be small compared to the depth of the water column and that the tidal excursion U 0 /(ωL) be small. Owing to the interplay of many different topographic scales (not all of which are necessarily resolved by the topography product used) on the real ocean floor, it is not straightforward to determine a single representative length scale. Since we use a fixed tidal velocity amplitude of 0.04 m s −1 and a tidal frequency of ω = 1.4 × 10 −4 s −1 , the smallness of the tidal excursion parameter requires that topographic length scales be larger than 285 m. Because topographic features of length scale Λ most efficiently force internal tides of comparable wavelength (LSY02), this criterion translates into requiring that wavenumbers be smaller than 22 km −1 , which is fulfilled in the scenarios discussed here.
Finally, it has to be noted that the resolution of the topography grid (SRTM30_PLUS; Becker et al. 2009) is artificially high in many parts of the deep ocean, where only satellite data with an average resolution of 10 km are available and have been interpolated onto the much finer SRTM30_PLUS grid. In consequence, small-scale roughness, typically in the form of abyssal hills, is not resolved and the associated energy conversion is not accounted for (see e.g. Carter et al. (2008) and Zilberman et al. (2009) for how topographic smoothing decreases conversion rates). Blending the SRTM30_PLUS dataset with the abyssal hill spectral model proposed by Goff & Jordan (1988), Melet et al. (2013) estimated that, globally, the typically unresolved seafloor roughness leads to an additional 0.1 TW of energy conversion into the internal tide field. This amounts to roughly 10 % of the energy conversion due to the topography resolved in standard products such as SRTM30_PLUS; calculations based on the latter alone hence capture the bulk of the global energy conversion but underestimate it slightly. As Melet et al. (2013) found this fraction to vary regionally, global calculations of internal tide generation as well as subsequent breaking and mixing might rely on including a spectral model like that of Goff & Jordan (1988) for the small-scale roughness (e.g. Goff & Arbic 2010;Li & Mei 2014;Guo & Holmes-Cerfon 2016), noting, however, that such models involve further uncertainties themselves.
The proposed method with the standard settings identified in the scenarios tested here yields results in very good agreement with analytical solutions for idealised test cases. This motivates the application to realistic ocean bathymetry (recognising, however, the caveats discussed above). The results for the North Atlantic (see figure 8) underline that the magnitude of the energy flux varies substantially with direction. Klymak, Legg & Pinkel (2010) observe that modes with eigenspeeds higher than that of the tidal velocity (modes 1-66 in the scenario in figure 8) radiate away from their generation site and contribute to the remote mixing in the ocean's interior, whose vertical distribution significantly impacts the ocean's state and dynamics (Samelson 1998;Zhang, Schmitt & Huang 1999;Melet et al. 2013). It is therefore crucial for the consistency and reliability of ocean general circulation models to take the direction of the tidally generated internal gravity waves into account in internal wave-based mixing parametrisations. Naturally, the next step will be the application of the method presented here to global ocean bathymetry with realistic and horizontally variable tidal velocities and stratification to produce a database that can serve as an input for internal gravity wave models such as IWAM (Müller & Natarov 2003) or IDEMIX (Olbers & Eden 2013).