{'fraction_non_alphanumeric': 0.026427610936799642, 'fraction_numerical': 0.009538323621694307, 'mean_word_length': 4.523469994058229, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Reflection and transmission of gravity waves at non-uniform stratification layers

The present study focuses on the interaction of gravity waves in the atmosphere with the tropopause. As the vertical extent of the latter is small compared to the density scale height, wave propagation is described by the Taylor-Goldstein equation as derived from the linearised Boussinesq approximation. Of particular interest in the construction of gravity wave parameterisations for the upper atmosphere are the transmission and reflection properties of the tropopause as these determine the upward fluxes of energy and momentum carried by internal waves. A method is presented that decomposes internal waves explicitly into upward and downward propagating contributions, thus giving direct access to transmission and reflection coefficients of finite regions of non-uniform stratification in a stationary atmosphere. The scheme utilizes a piecewise constant approximation for the background stratification and matches up- and downward propagating plane wave solutions in each layer through physically meaningful coupling conditions. As a result, transmission and reflection coefficients follow immediately.


Introduction
Gravity waves arise from fluid displacements in a vertically stably stratified medium, in which the buoyancy acts as restoring force. This includes, to a large part, also the earth's atmosphere. The propagation of atmospheric gravity waves has been the subject of a number of earlier studies. One of the first investigations goes back to Scorer (1949), who focused on orographically generated waves and how they can be trapped in the lee of a mountain ridge.
An important characteristic of gravity waves is the ability to transport energy horizontally as well as vertically. Eliassen and Palm (1961) analysed waves carrying energy upward and downward in the context of orographically excited gravity waves that reflect from vertically varying stratification and wind. They used a piecewise-constant approximation for both stratification and wind and found local solutions. These were matched at the discontinuities of the approximation. The calculations were carried out for a twoand a three-layer atmosphere. The multi-layer method to be introduced below is also based on these concepts.
By a similar approach Danielsen and Bleck (1970) examined mountain waves and approximated key atmospheric parameters by piecewise exponential functions, which allowed them to solve the governing equations by combinations of Bessel functions. Sutherland and Yewchuck (2004) attended to the topic again and scrutinised the phenomenon of wave tunnelling, which describes the energy transport over a finite layer of decreased, or even vanishing, stratification. They undertook a mathematical analysis as well as laboratory experiments to support their findings. Brown and Sutherland (2007) expanded the theory by allowing for shear flow over an unstratified layer. Both scenarios were later examined numerically by Nault and Sutherland (2007) who provided numerical solutions for plane wave transmission in arbitrary stratification and wind. As a concrete example, they performed simulations for an atmospheric stratification and wind profile that was observed over Jan Mayen island.
Diffraction through a slit and back-reflection from a slope is covered by Mercier et al. (2008), mainly through experimental work. To keep track of the direction of the wave propagation, they use a demodulation of the measured wave signal. Bühler (2009) uses a method similar to that introduced by Eliassen and Palm (1961) for the two-dimensional shallow water equations with water depth that changes only with one of the spatial coordinates. It is approximated by a piecewise-constant depth which allows for explicit solutions in each of those layers.
The main focus of the present work is on the transmission and reflection of gravity waves at confined regions of non-uniform stratification. The governing equations are the linearised Boussinesq equations, which can be combined into a single equation for one of the dynamic variables. Since this "Taylor-Goldstein equation" does not allow for explicit solutions in general, we use a piecewise-constant approximation of the stratification with finitely many layers to generate an analytically accessible approximate solution from which we can compute the transmission and reflection of gravity waves. In each layer of constant stratification an explicit solution is constructed as a superposition of upward-and downward-travelling plane waves. These are matched at the discontinuities of the piecewise-constant approximation of the background rendering the perturbations of vertical wind and pressure continuous across these interfaces. Conservation of energy is used to derive a transmission coefficient.
By a reformulation, we find a new set of differential equations that describes the limit of an infinite number of discrete layers. These limit equations are solved numerically. The resulting transmission coefficients are then compared with those calculated for a finite number of layers. For an increasing number of layers, the solution is found to converge to the limit solutions with second order accuracy. Yet, even for a moderate number of layers the results turn out to be rather accurate, and this allows for very efficient computational estimates of the transmission and reflection properties of tropopause-like layers in the atmosphere. Another advantage of the presented method is its ability to keep track of upward and downward propagating waves locally in arbitrary stratification profiles. Moreover, an extension of this method to a solver for non-stationary wave packets has been achieved, and this is the topic of the companion paper (Puetz and Klein , 2018).
The present paper is structured as follows. In section 2 we present the method developed to analytically compute a transmission coefficient. Numerical computations are pursued in section 3 to provide evidence of the correctness of the method as well as an error analysis. We show results for selected stratification profiles in section 4. Section 5 summarizes results from numerical solutions of the full Boussinesq equations to further back up our theoretical findings. In section 6, we discuss further extensions as well as limitations of the method. In particular, the adaptation to shear layers and wave packets is of special interest for further studies.

Multi-layer method
We are interested in wave propagation through the tropopause. The latter is characterised by sharp changes in the stratification and also by strong jet winds. Above and below the tropopause, we have almost uniform stratification. The extent of the tropopause is small compared to the density scale height. Therefore, as we only focus on the propagation through this rather shallow area, we can apply the Boussinesq approximation.
The starting points for our investigation are the two-dimensional inviscid Boussinesq equations with small amplitudes and an atmosphere at rest. If we linearise these equations, they can be written as a single equation for one of the dynamic variables (see for example Sutherland (2010)), here done for the vertical velocity w: where N is the Brunt-Väisälä frequency, t denotes time and x and z are the horizontal and vertical coordinates. As long as N does not depend on x and t, the equation admits horizontally and temporally periodic solutions, i.e., By convention, we consider only ω > 0 and focus on k > 0, i.e., the phase velocity points in the positive x-direction. This is no restriction, since the case k < 0 is completely symmetric to k > 0. The partial differential equation (1) then can be transformed into the ordinary differential equation This actually corresponds to a Fourier transformation of equation (1) in the horizontal and time coordinates and the resulting equation is widely known as the Taylor-Goldstein equation, which cannot be solved explicitly for non-constant Brunt-Väisälä frequency N . But since we are only interested in a confined region within which N is varying, we can approximate N in this region by a piecewise constant function.
To be more precise, we are given a function where z b , z t are the bottom and top of the tropopause, respectively (or any region of interest in general), N b , N t are constant values of N in the bottom and top layer, respectively, and N c is a (continuous) function of z with N c (z b ) = N b and N c (z t ) = N t . Next we partition the continuous part into a piecewise-constant function. This allows us to find explicit solutions in each layer. This method is neither new nor ground-breaking, but the way we use it to compute wave transmission strikes a new path. Moreover, as we will see later, we will gain structural insights into the solution and we are able to give numerical evidence that justifies the ansatz, despite its simplicity. Let J be a positive integer. For now, J is fixed. Define an equidistant grid of J points from z b to z t : and set N 1 := N (z 1 ), N J+1 := N (z J ) and This can be understood as a piecewise functioñ where I j = [z j−1 , z j ) for j = 2, . . . , J, I 1 the troposphere region z < z b and I J+1 the stratosphere region z ≥ z t . In each single level, we are able to state the Taylor-Goldstein equation, but now N takes a constant value. In particular, for the level I j , we have the equation Each layer admits explicit plane wave solutions of the form where is the vertical wave number and A j , B j are the amplitudes of the upward and downward propagating wave, respectively. Equation (10) is basically the transformed Boussinesq internal gravity wave dispersion relation. The representation we use for the wave in equation (9) corresponds to the Hilbert transform method for internal gravity wave analysis by Mercier et al. (2008). Although they were the first to apply this technique in the analysis of observational data, it goes all the way back to the classical works of Eliassen and Palm (1961) and Booker and Bretherton (1967), who use this representation of plane waves in their theoretical setups. From a mathematical point of view, this demodulation is a rather natural approach to transform a real valued signal into a complex-valued one. The original real signal then corresponds to the real part of the complex one, in this case the right-hand side of equation (9). This representation has the advantage of tracking upward-and downward-propagating waves. In Mercier et al. (2008), however, it is necessary that the stratification is uniform or at most slowly changing. With the multilayer method we are going to introduce, we will be able to keep track of upward-and downward-propagating waves also in non-uniform background that can change strongly over a fraction of the wavelength. To the best of our knowledge, this is the first technique that is capable of providing this information by construction. In the upcoming computation steps, we will work with the Hilbert representation. To obtain the physical solution, we can always take the real part of what we computed. It is important to note that the wave amplitude of the real solution is not computed by taking the real part of the complex amplitude, but also using the imaginary part. That said, a non-vanishing imaginary part of the amplitude basically acts like a phase shift of a cosine. Going back to the multi-layer approach, the solution indexed by 1 references the solution below the tropopause while the solution indexed by J + 1 corresponds to the solution above it. In particular, the amplitude A 1 belongs to the incident wave, while A J+1 is the amplitude of the transmitted wave and B 1 the one of the reflected wave. Since we are assuming a uniform stratification above the tropopause, there shall be no reflection from upper layers. Hence there is no wave hitting the tropopause from above, i.e., B J+1 = 0. This is a radiation condition which we are going to use later.
We need to clarify the way we use the indices on the variables that depend on the levels I j . All those variables depend implicitly on the (fixed) number J, i.e. for J 1 = J 2 , for example N , where the superscript now reflects the dependence on the number of levels. To be precise and keep the variables comparable, one could index them by j J or superscripting them with the number of steps. But since this is not only cumbersome in writing and reading but also does not provide further benefit (most of the time, we are interested in the variables indexed with 1 and J + 1), we omit this dependence but keep it in mind.
To obtain a solution over the whole domain, we have to match the local solutions at the interfaces in a proper way. Physically meaningful conditions require that the vertical wind speed and the pressure are continuous across the interface (see also Drazin and Reid (1981)). By using the polarisation relations in a Boussinesq fluid (see, e.g., Achatz et al. (2010) for details), the conditions are equivalent to the requirement that w j and w j = dw j dz are continuous at the interfaces, i.e., A single pair of the form (11) gives us two equations for the four unknowns A j , B j , A j+1 , B j+1 . Hence we are able to derive a recurrence relation where the matrix M j is of the form The particular matrix entries are given by For later reference, we introduce the * -operation which changes the sign of the argument of the exp-function, i.e., As long as m j and m j+1 are real-valued, this corresponds to complex conjugation. Imaginary values for m occur only when the waves are encountering a region of decreased stratification, where N < ω. We will see later that these cases are harder to deal with when trying to find a limit for an increasing number of layers, hence they have to be treated very carefully. We can state a relation like equation (12) for all j = 1, . . . , J and combine them to obtain a chain of equations: We have to be careful about the order of the matrix multiplication, since it is in general not commutative. Now we need to recall what the different amplitudes with their respective indices represent. A J+1 is the transmitted wave, A 1 is the incident wave and B J+1 = 0, i.e., there is no downward propagating wave in the uppermost layer. To compute a transmission coefficient, we have to relate A 1 and A J+1 . We have where M k,l are the entries of M . Solving the equation system for A 1 and A J+1 shows that To compute a meaningful transmission coefficient, we need to find a quantity that is conserved over the whole domain. Since we did not allow for dissipation or background horizontal wind in the equations, wave energy (sometimes called perturbation energy) is conserved. It consists of kinetic and potential energy. Moreover, we are in a horizontally periodic domain, so it is convenient to have a look at the horizontally averaged energy Here ρ b is the background density and A w is the amplitude of the vertical wind. The unit of E is energy per unit volume, therefore the correct term would be energy density. Energy can be derived from this expression by integrating over a fixed control volume. But since there is no danger of confusion, we stick to the term "energy" for E . The conservation equations for kinetic and potential energy can be derived directly from the Boussinesq equations. Horizontal averaging and adding the equations yield where F z = c gz E is the vertical wave energy flux and c gz = ∂ω ∂m denotes the vertical component of the group velocity. A full derivation of the above equations can be found in chapter 3.4 of Sutherland (2010).
The average energy at a fixed location does not change in time, since we assumed the solution to be periodic in time. The remaining term, namely basically says that the vertical mean wave energy flux is constant. Again, we use the work of Sutherland (2010) to find out that this flux for a Boussinesq wave in uniform stratification is given by where α = arctan( m k ) is the angle between the wave vector and the horizontal. Using the identities and the internal gravity wave dispersion relation we obtain that Since we have a region with uniform stratification below and above the tropopause, we can compare the upward energy fluxes in both of those regions. Recall that ω and k are chosen to be constant. Moreover, we made the assumption that the density does not vary too much over the tropopause, so that we take a reference value 0 for both regions. The transmission coefficient is then defined as the ratio of the upward energy flux above and below the tropopause In a similar fashion we can define a reflection coefficient, which compares the upward flux with the downward flux below the tropopause: By conservation of vertical energy flux, given by equation (22), we have that

Limit behaviour
This section is devoted to the investigation of an increasing number of layers, eventually tending to infinity. First, we have a view on how the transmission coefficients for a given parameter set change when the number of layers is altered. Then, we will be able to derive an expression for the number of layers tending to infinity, which results in a reformulation of equation (3) in a set of variables that allows the distinction between up-and downward propagating wave modes. This immediately gives rise to transmission and reflection coefficients for an infinite number of layers. We also investigate how quick the multi-layer method converges to this limit.
It should be mentioned that the multi-layer method itself can be used to construct an approximate solution to equation (3). When reformulating equation (3) to a first-order system, where one of the variables corresponds to the first derivative of the solution, the multi-layer method with the corresponding matching conditions (11) can be written as a one-step method, similar what is done in Lara (2004), where also a proof of convergence is given. This puts the multi-layer method on mathematically solid ground.

Behaviour with increasing discretisation levels
Our first step towards showing that the method is convergent with increasing number of layers is to have a look at how the transmission coefficient is influenced by this very number, again denoted by J. As a reference setup, we take a stratification profile that increases linearly from a value A visualisation of the profile can be seen in the right panel of figure 4. Our computation domain in this investigation covers a frequency range from 0 to nearly N b and a wavelength range from 100∆ z to about ∆ z . The results for various values of J can be seen in figure 1. The images show a colour plot of the transmission coefficient, where the x-axis corresponds to frequency and y-axis to horizontal wavelength. Here, we are not interested in the interpretation of the images in themselves, but rather in the transition from small to large J. As one can see, except for the case J = 4 (upper left panel), one can barely spot any difference in the pictures. This leads to the hypothesis that the method converges to a certain limit for increasing J, and from what we see qualitatively, this convergence seems to be pretty fast. The next step will be to find the limit.

Limit solution
Unfortunately, finding the limit has turned out to be much harder than anticipated. Since the matrices M j have complex entries, there seems to be no closed formula for because most known formulas blow up because of the non-vanishing imaginary part (under certain conditions, we managed to find a formula, but in general, these conditions cannot be fulfilled). Hence, a new approach was needed. The idea is to reformulate the limit process as a differential equation for a vector consisting of the amplitudes for the upward and downward propagating wave. We know that the depth of each layer is h = ∆z J , so the limit process J → ∞ can also be seen as ∆z J → 0 or h → 0. Moreover, the j-indexed variables A j , B j , m j are approximations of their continuous counterparts at z j . In fact, they are approximations at z j + h 2 , which goes to z j in the limit h → 0. Also, a reformulation such that e.g. m j = m(z j ) gives the same result. By using the recurrence relation (12) we can write where I is the 2-by-2-identity matrix. Dividing now by h and taking the limit h → 0, the left-hand side converges to the z-derivative of the amplitudes. Using the short-hand for the vector of amplitudes, we have This is now a differential equation for the amplitudes in A. If we want to have any chance of solving it (either analytically or numerically), we have to execute the limit process This is done component-wise. The upper-left entry of the matrix inside the limit in (35) is With a similar computation for the off-diagonal entry The full derivation for the limit in equations (36) and (37) can be found in the appendix. The respective limits for the starred entries yield the same except for a replacement of i by −i. Hence the differential equation for the amplitudes is This equation can only be solved analytically if M(z 1 )M(z 2 ) = M(z 2 )M(z 1 ) holds for all z 1 , z 2 in the integration domain. Unfortunately, this is in general not true for arbitrary stratification profiles. What we do know, however, is that if the functions are analytic over the interval [z b , z t ], equation (38) has a unique analytic solution for arbi- See, for example, Teschl (2012) for the theory on complex ODEs. It is easy to check that this is the case for stratification profiles and wave parameters such that there is no reflection layer, i.e. a point z r where N (z r ) = ω.
Although securing the existence of solutions, finding analytic or even explicit expressions for them will be a nearly hopeless undertaking. Another approach to finding at least approximate solutions are power series methods. Since analytic functions on an open subset coincide locally with a convergent power series (see , e.g., Stalker (1998) for details), we can make a power series ansatz for the solution of equation (38). In order to do so, we extend [z b , z t ] to an open subset of the complex numbers, in which M is still analytic. But although the matrix has no singularities for real values, it has some for certain complex numbers, which drastically restricts the radius of convergence of the power series solution to a value that is not guaranteed to be large enough to cover the whole region of interest. However, it would be possible to partition the interval into smaller segments and finding the power series solution in each segment, but this procedure is very tedious and still only yields a solution up to a certain precision. We will see in the upcoming error analyses that the multi-layer method yields very accurate results notwithstanding that it is a much easier-to-apply technique. Hence, the evaluation of equation (38) will be done numerically. This leaves us with another challenge. If the stratification profile contains a reflection layer z r such that N (z r ) = ω, the entries of the coefficient matrix M tend to infinity, because m(z r ) = 0. By regarding equation (38) as a system of complex differential equations, the point z r is an isolated singularity. At first sight, it seemed to us that the singularity is a first order pole, since functions of the form f f , where f has a zero of any order at some point z 0 do have a first order pole at z 0 . Unfortunately, the extra terms that are prevalent in the coefficients, i.e. im (z)z and exp(−2im(z)z) involve square roots, which results in f and g not being holomorphic in a punctured disk around z r , since the complex square root has two branches and therefore it is only holomorphic in a disk with one half-axis removed. Therefore, all theorems about existence and structure of solutions can not be applied. Existing research in this case, such as Sutherland and Yewchuck (2004), who investigate propagation of gravity waves through a layer of sudden reduced or vanishing stratification, suggest some sort of "wave tunnelling" (a term coined by the comparison to quantum tunnelling of electrons in quantum physics) through this region, dependent on the wavelength of the incident wave. The findings from our multi-layer method confirm those results also for continuous transitions to a lower value of the Brunt-Väisälä frequency (see section 4.2). Hence, an intensive investigation of the behaviour of gravity waves near reflection layers would require a scale analysis for different regimes of vertical wavelengths. This task is taken on by the authors, but lies outside the scope of this paper.

Error analysis
This subsection is dedicated to the numerical integration of equation (38). To this end, proper boundary conditions are needed. Since we are interested in waves that are initially travelling upwards and encountering a non-uniform stratification over a confined region and eventually reaching a region of uniform stratification again, we require that there is only a wave incident on the non-uniform region from below. Hence, above this region, there is no wave that is travelling downwards. Moreover, we are only interested in ratios between the incident and the transmitted wave. Therefore we are free to choose the value of the incident or the transmitted wave, since the equation is linear.
To be more precise, if z t is the top of the non-uniform region, then we take the boundary conditions We want to analyse the error between the limit solution and the multi-layer solution, which will give strong evidence of the correctness of our method. As model setup, we again choose the linearly increasing profile (31). Our analysis consists of two parts. The first one is an error computation over a large domain of wave numbers and frequencies while keeping the number of discretisation levels constant at J = 512 to show that the error is small over the whole wave number-frequency-domain. The second one chooses several specific points in this domain and tracks the error for an increasing number of levels J, up to J = 10 5 .
The results of the first part can be seen in figure 2. The pictures show the transmission coefficient for a certain domain of wavelengths and frequencies, similar to figure 1. But we  (31) . The mean slope of the different plots is nearly the same, namely µ ≈ −2. This means that the relative error decreases quadratically with the number of steps.
are still not interested in the meaning of the pictures on their own but in the comparison of both. For the left sub-figure, we derived the transmission coefficient from the multilayer method with J = 512 levels, the right panel shows the transmission coefficient computed from solving equation (38) numerically. It is impossible to spot any difference between the two frames. Computing the relative error yields the estimate max ω,λx For the second analysis, we fix specific wave parameters, i.e, a pair (λ x,0 , ω 0 ) of wavelength and frequency, and analyse how the relative error develops for increasing J. In particular, we perform the calculation for three different wavelength-frequency-pairs. We choose ω 0 = N b √ 2 for all three cases and have a look at the wavelengths ∆ z , 2∆ z and 10∆ z . The results can be seen in figure 3.
We computed the relative error of the limit solution and the discrete solution for several numbers of layers J, that were logarithmically spaced between 10 1 and 10 5 . For any two adjacent points, we computed the slope in the log-log diagram and for every wavelength, the mean and the standard deviation of all computed slopes. We found the mean slopes to be µ a = −2.0050 ± 0.0314, µ b = −2.0073 ± 0.0533 and µ c = −2.0269 ± 0.1184, where the indices correspond to the respective sub-plots of figure 3. For case c, the last few values are around the tolerance of the numerical scheme, hence there are somewhat larger fluctuations. But nonetheless, we observe that in all three test cases, the error decreases quadratically with the number of steps, until the error reaches the region where the tolerance of the scheme and the machine precision prevent a more precise computation. Even for a coarse discretisation with J = 100 layers, the relative error is about 10 −5 . Based on this, we will use J = 128 layers for the forthcoming computations. This guarantees fast run times as well as results that are sufficiently accurate.

Results
In this section, we present some results that are obtained for several stratification profiles. First, we focus on the linearly increasing profile we already used for some model computations. Afterwards, we show that the model also supports wave tunnelling that was already described by Sutherland and Yewchuck (2004). At the end, we present results for a profile that has characteristics of a real tropopause. All profiles share a common structure, namely that we have a region of non-constant stratification of depth ∆ z that has a region of constant stratification with value N b below and with value N t above it. This is about what we can observe in the atmosphere: The stratification changes rapidly in the tropopause and is nearly constant in the free troposphere and the stratosphere. We will focus on a frequency range from 0 to N b , since waves with frequencies larger than N b are evanescent. The wavelength spectrum differs in the various examples but ranges in general from ∆ z to 100∆ z . We use a parameter space of 300 horizontal wave numbers and 300 frequencies, resulting in a total of 90000 grid points. The number of layers equals 128. The computations are performed on the first author's office computer with a standard Intel ® Core™ i7-3770 CPU and 8 GB RAM. The software we used is Matlab. The computation times lie within a range of 70 to 80 seconds when computed on a single core. Compared to the numerical method of Nault and Sutherland (2007), who need about 1 day to simulate 300 × 300 parameters on a "typical desktop computer" at that time, this is a decrease in computation time by a factor of about 1000. Even when considering the slightly higher clock rate and RAM, the multi-layer method is much more efficient.

Linear increase
The first case for which we will present results is the case of the linearly increasing stratification, as we defined earlier in equation (31). We focus on three regimes of horizontal wavelengths: comparable to ∆ z , longer than ∆ z and shorter than ∆ z . Recall that we are using the Boussinesq approximation, hence ∆ z , as it is also the scale of variation of N , is small compared to the density scale height H ρ . So wavelengths that are small and comparable to ∆ z are also small compared to H ρ . This is the regime where the classical WKB theory is applicable. Ray theory, that is based on WKB assumptions, predicts perfect transmission for those waves in a linearly increasing profile and this is exactly what we are able to find. Even for large horizontal wavelengths, the transmission is high, at least up to a certain point. As we can see in figure 4, there is stronger reflection when we are moving to the right and to the bottom in the figure, that means that the wave frequency gets closer to the lower value N b and the horizontal wavelength (and eventually the vertical wavelength) is growing. Figure 4 grants us a closer view into the area of interest, together with some additional information. The solid lines are lines of constant vertical wavelength, which are determined by the gravity wave dispersion relation (10) (they are hyperbolas in the frequency-wave number-space). We see that the vertical wavelength increases by moving to the right and to the bottom in our domain. If the vertical wavelength exceeds ∆ z by about an order of magnitude, waves start to transmit worse and worse. Waves whose wavelengths are small, or at least comparable to the scale of variation in the Brunt-Väisälä-frequency, adapt smoothly to those changes and have a high transmission, while for waves with large wavelengths, the change still happens abruptly. Waves that have frequencies close to the Brunt-Väisälä frequency are almost purely horizontal and in the limit of ω → N b for fixed λ x , the transmission eventually gets zero. This seems reasonable, since there is no vertical wave structure and hence no vertical energy transport. In the limit λ x → ∞ (or equivalently k → 0) for fixed ω < N b , we can find a closed formula for the matrix product in (16) and hence a formula for the amplitude ratio, which coincides with the classical transmission coefficient of a two-layer model: Figure 5: The figure shows the transmission coefficients for a profile that has a region of decreased stratification. We see that waves, whose frequency is larger than 0.5N b can transmit, if their wavelength is long compared to the region of decreased stratification.
where the indices describe incident and transmitted wave properties respectively. We adapt the slightly different notation of a transmission coefficient as the ratio of the wave amplitudes due to the classical work that was done in this area, e.g., by Eliassen and Palm (1961). An analytic execution of these limits can be found in the appendix.

Wave tunneling
We consider now a case where the stratification drops from some N b to a value N d < N b and eventually increases again back to N b : In the example we present, z d 1 − z b = 0.2∆ z = z t − z d 2 and N d = 0.5N b . The results found for this case are very different from what the classical theory tells us. Ray theory predicts that waves reflect totally from a layer, where ω ≥ N . However, when there is only a finite small region where ω ≥ N holds, wave propagation through this region is possible under certain conditions. Sutherland and Yewchuck (2004) described this phenomenon for a sharp drop to a weak or even vanishing stratification, and our results show that tunnelling also exists in the case of a "smooth" transition. In figure 5, one can see the transmission coefficient for profile (42). In this particular example, ray theory predicts that every wave with frequency ω ≥ 0.5N b would fully reflect from this layer, but we can observe that if the wavelength is large compared to the extent of the region with weak stratification, it is possible to obtain high wave transmission. As already mentioned in section 3, this case is hard to deal with analytically and numerically. As we will see later in section 5, numerical computations of the full Boussinesq equations show the existence of wave tunnelling (although there are some other difficulties with this case). Moreover, there are lab experiments, for example by Sutherland and Yewchuck (2004), to further support these findings. However, the limit ODE found in section 3 cannot be solved numerically due to a singularity in the coefficients. Although there is no evidence that the results are incorrect, the results should mathematically still be taken with a grain of salt.

Realistic tropopause profile
Since we are ultimately interested in the behaviour of atmospheric gravity waves and their interaction with the tropopause, we now want to consider a "realistic" tropopause profile. The stratification is constant with a value N b below the tropopause. At the temperature inversion layer, the Brunt-Väisälä frequency has a very sharp increase to a peak value N p , almost like a jump, followed by a relaxation to a value N t with N b < N t < N p that is the constant value of the stratification in the stratosphere. We realize this by a piecewise-defined continuous function: where a = Np−Nt The values were chosen such that the profile is continuous at z p and z t and differentiable at z t . In the example we show here, the values were set to be z p − z t = 0.1∆ z , N p = 3N b and N t = 2N b . The profile as well as results for the transmission coefficient can be seen in figure 6.
For the limits ω → N b for fixed λ x and λ x → ∞ for fixed ω, we have the exact same behaviour as in the linearly increasing case, which is no surprise, since in the first limit, we still have no vertical energy flux and in the second limit we again approach the twolayer model. The rest of the picture however gives some interesting insights. By making the sharp increase asymptotically thin, i.e., making it a (discontinuous) jump, we obtain, for wavelengths comparable to ∆ z , a composition of the transmission coefficient for a two-layer model (that describes the jump) and the one for the smooth profile that follows after the jump. Figure 6: Values for the transmission coefficient for a tropopause profile that can bee seen in the right panel. In the limit for long waves, the transmission coefficient approaches again the two-layer solution. For moderately long waves, we can see a combination of 2 effects: The sharp increase, which is almost like a jump and blocks a part of the waves and the smooth relaxation afterwards that has high transmission. We also observe that in the classical WKB regime, the transmission is still very high

Numerical simulations
In this section, results for transmission coefficients retrieved from numerical simulations of atmospheric motion are presented, discussed and compared to the results from the multi-layer method introduced above. We use two different models to tighten the theoretical findings. The first one is EU-LAG, a Eulerian/semi-Lagrangian fluid solver described in Prusa et al. (2008), the second one is PincFloit (Pseudo-incompressible flow solver with implicit turbulence model), which was developed by Rieper et al. (2013).

Model setup
The calculations are done on a two-dimensional x-z-domain with periodic boundaries in x-direction. Both models, EULAG and PincFloit, are run in Boussinesq mode and are set up in the following way in order to resemble the scenarios for wave transmission discussed above the most. An absorption layer is located at the bottom of the domain, where the flow is relaxed towards a state that is here chosen to be a plane wave field which oscillates in space and time. In order to do this properly, the Brunt-Väisälä frequency needs to be constant in this sponge layer. This results in the excitation of a plane wave that can propagate freely above the sponge layer that covers the lowest 40% of the domain, until it eventually reaches a region of non-uniform stratification, the tropopause, which is defined as in the three cases discussed in section 4, where it gets reflected and partially transmitted. The reflected part gets soaked up by the bottom sponge while the transmitted part travels in a stratospheric region, i.e. a region where N is again constant before getting damped away by the top sponge. This sponge covers the last 20% of the domain.
The initial wave amplitude has to be chosen very small, since the theoretical work uses the linearised Boussinesq equations. Moreover, the waves should not break during the simulations. Hence we initialise the amplitude as where a < 1 is a parameter denoting to what percentage the threshold of static instability b s = N 2 b m b , found in, e.g., Achatz et al. (2010) is reached. The quantities of the wave field on the bottom layer can be derived via the polarisation relations for Boussinesq waves, which can be found in, e.g., Achatz et al. (2010) or Sutherland (2010).
The top sponge is just an absorption layer, which damps the wave and relaxes to a steady, hydrostatic background.
The region of non-uniform stratification starts at 60% of the domain and is in general resolved with 100 grid points. For this value, the theoretical results are very acurate (absolute error is smaller than 10 −5 , as seen in section 3.3). In the reflection layer case, we changed the size of the tropopause rather than the wavelength since we wanted to simulate large ratios between wavelength and tropopause depth, so it was more efficient to shrink the extent of the tropopause.

EULAG
The fluid solver EULAG, described by Prusa et al. (2008), is used in the Boussinesq framework (anelastic setup with special choice for the hydrostatic basic state in density ρ 0 and in potential temperature θ 0 , namely constant). The calculations are done on a two-dimensional model domain that extends up to 8500 m in the vertical and has a horizontal width ranging from 1000 m to 3000 m, depending on the wavelength that is prescribed. The resolution is chosen to be around 10 m in x and z direction. The vertical extent of the domain is limited by the Boussinesq assumption to a value below which the basic state profiles remain physically meaningful.
The transmission coefficient for each time step t is calculated as The transmitted amplitude A 1 is determined by finding the maximum absolute vertical wind speed in a layer above the region of interest (stratosphere: w ss ) while the amplitude A 0 is retrieved from a reference simulation with constant stratification and taken as the maximum absolute vertical wind speed w ts just below the tropopause altitude. The depth of these regions is roughly 1 km for the cases shown here. This is sufficient since horizontal and vertical wavelengths are small enough to ensure a maximum or minimum in this box. Since we expect a static situation for the transmission of a plane wave through a layer of non-uniform stratification, the simulations are done up to a simulation time of 15 h when the simulated flow has stabilized and shows little temporal variation in the quantities of interest. We then take the mean value of T C for the T C calculated at simulation times 8 h, 9 h, 10 h, ..., 15 h.

PincFloit
PincFloit has a built-in switch for a Boussinesq atmosphere, i.e. constant background density, but due to extensions implemented by Bölöni et al. (2016), it is possible to have a non-constant profile for the Brunt-Väisälä frequency. Hence it was an easy task to implement the test cases of this manuscript into the solver. Moreover, as can be seen for example in Bölöni et al. (2016) and Schlutow et al. (2017), PincFloit gives very robust results in simulations of atmospheric gravity waves. The model domain covers 10000 m in the vertical and one wavelength in the horizontal direction, which lies between 1000 m and 3000 m. The vertical resolution is 10 m, and the horizontal resolution is 25 m.
In all simulated runs, we could observe a stable steady state for several hours of simulation time, which allows us a very good computation of the transmission coefficient. The formula for the computation is, of course, the same as for the EULAG simulations, the choice of incident and transmitted amplitude however is a little bit different. Nonetheless, no method is superior over the other and both yield equally good results. As initial amplitude, we take the mean amplitude of the excited wave in the middle of the bottom sponge layer, as transmitted amplitude we take the mean amplitude of the wave in the stratospheric region, i.e. between 7000 and 8000 m. Moreover, the transmitted amplitude is computed every 10 min of simulated time and the transmission coefficient is taken as mean over all computed values after reaching the steady state.

Results
In this section we show exemplary simulations that cover a portion of the information obtained in the transmission coefficient figures (see figures 4, 5 and 6) that have been presented before, as well as snapshots of the wave field after reaching a steady state. This gives a better intuition for wave transmission and reflection.  Table 1: Comparison of the transmission coefficients for profile from figure 4 with a dimensional tropopause depth of 1000 m for different horizontal and vertical wavelength (also in m). We can see that there is a very good accordance of the values from the multi-layer method and the ones computed with PincFloit and EULAG simulations.

Linear increase
In table 1, we see the comparison of the transmission coefficients obtained from the multilayer method on one hand and from the numerical simulations of PincFloit and EULAG on the other hand. In general, the values from both methods are in good agreement with the theoretical results. Generally speaking, the numerical transmission coefficients are a bit lower than the theoretical ones. This has two reasons. The first one is numerical dissipation which causes a slight decrease of the amplitude over the course of the domain. This is because the wave is initialised in the bottom part of the domain and then freely propagates upward. The second reason is concerned with the method we compute incident and reflected amplitude. Due to the nature of the sponge, there are some fluctuations in the initialised wave amplitude and hence also in the transmitted amplitude. We take care of this by averaging over a larger area, but this produces minor errors in the value for the transmission coefficient. Plots of the simulated wind field however show that there is little to no reflection at the tropopause in the cases from table 1, hence the transmission seems to be even closer to the theoretically predicted values.

Wave tunnelling
The simulation setup in this case uses fixed values for horizontal and vertical wavelength, but changes the depth of the tropopause, as this is numerically more convenient. Technically, we have the same wave frequency, but change the ratio between horizontal/vertical wavelength and tropopause depth, so this corresponds to a vertical slice in the left panel of figure 5. By choosing λ x = λ z , as we did here, this results in a frequency ω = 1  Table 2: Comparison of the transmission coefficients for profile from figure 5 with fixed vertical and horizontal wavelengths λ z = λ x and varying tropopause depth ∆ z . This corresponds to a vertical cut along ω ≈ 0.7 in the left panel of figure  5. As one would expect from the theory, waves almost fully reflect, when the tropopause is comparable in size to their wavelength, but they transmit very good for a thin tropopause. Both models are able to capture this phenomenon very accurately. There is only a slight alternation visible below the tropopause and comparable amplitudes can be observed above and below the tropopause. This suggests a high transmission. In the right panel, the tropopause depth is 500 m. A strongly alternating pattern can be found below the tropopause. Together with the low the amplitudes in the stratosphere, this signifies that most of the wave is reflected. In both panels, the axes are normalised by 1000 m.
is very high for a short tropopause, we get almost full reflection when it grows in size. Snapshots of the steady state for a high transmission and low transmission case can be seen in figure 8. It gives a very good comparison between the two cases as we can clearly see the differently pronounced alternating patterns as well as the disparity in the stratospheric amplitudes. Table 3 shows a comparison of values for the transmission coefficient obtained from the multi-layer method and values computed from PincFloit and EULAG simulations. As in the two other cases, we can see a very good agreement between theory and numerics. These cases were particularly interesting since there is only a partial reflection of the wave. Both codes were able to reproduce this phenomenon. A snapshot of how a wave field looks like in this case can be seen in figure 9.  Table 3: Comparison of the transmission coefficients for profile from figure 6 with a dimensional tropopause depth of 1000 m for different horizontal and vertical wavelength (also in m). We can see that there is a very good accordance of the values from the multi-layer method and the ones computed from the simulations.

Conclusions
The simulations deliver very accurate results. The qualitative as well as the quantitative behaviour could be reproduced in every single of the atmospheric test cases with different parameters. Even wave tunnelling could be observed. This leads to the conclusion that the multi-layer method is capable of predicting the transmission and reflection of gravity waves on a satisfying level. Since the computation is very fast and efficient, this could find use as a black box in numerical weather models, whose resolution is in general too coarse to resolve all gravity wave structures. The prediction of how much of the wave energy transmits through the tropopause can lead to a better parametrisation of gravity waves in the middle and upper atmosphere, and could also explain why some of the waves that are supposed to have broken at a certain height are still present and stable. Moreover, stronger temperature inversions in the tropopause lead to larger wave reflection with a corresponding downdraught of energy which could affect the tropospheric balance.

Further discussion
This section is dedicated to limitations as well as the possible extensions of the model. Since we are using the Boussinesq approximation, there are clearly some bounds on the applicability in case the fluid density is changing significantly. But there is also room for improvement and generalisation. Background wind is an important factor in the atmosphere as well as wave packets, i.e. locally confined wave movements whose envelope is moving with the group velocity.

Limitations
Waves with a frequency higher than the Brunt-Väisälä frequency are evanescent. However, we have seen in Section 4.2 that if the region over which the waves are evanescent is small compared to the wavelengths, the waves can survive and eventually propagate again. Hence one would expect a similar behaviour if waves are excited with a frequency higher than the Brunt-Väisälä frequency, but after a short extent reach a region where it gets and stays larger than their own frequency. Although there is nothing that speaks against this hypothesis, our approach as it is presented here, is not capable of reproducing this effect. We are assuming an infinitely extended domain of constant stratification above and below the non-uniform region and that incident waves come from "far away". Hence a wave that is initially evanescent will completely vanish (i.e. amplitude A = 0) when reaching the non-uniform region.
A workaround for this would be to assume a stratification profile that has an infinite bottom layer that allows for wave propagation with a certain frequency ω 0 , followed by a jump to a confined region where the Brunt-Väisälä frequency is smaller than ω 0 , which in turn is succeeded by the profile we are interested in. The relevant amplitude for the transmission coefficient computation would then be the upward amplitude in the confined region of reduced stratification. This is possible since the multi-layer method keeps track of upward and downward propagating wave amplitudes.

Extensions
Including background wind All previous computations are done for an atmosphere at rest. The case with background wind can be more difficult, since not wave energy, but rather wave action is conserved. However, since we are interested in the wave action fluxes, the formula for the transmission coefficient does not change. We have to distinguish two different cases: constant and non-constant background wind.
In the case of constant background wind U = U 0 ≡ const., the results are pretty much the same as with no background wind, except that one has to use the intrinsic frequencŷ ω = ω − kU 0 instead of the extrinsic frequency ω (which are in fact equal if there is no background wind). Waves can then propagate forω ∈ (0, N b ). Apart from that small change, the multi-layer method, as it is presented here, can be applied without further modification.
If the background wind is changing with height, it will have an impact on the vertical propagation of the gravity waves just as much as the non-uniform stratification has. In this case, we have to take into account the change in absolute frequency over the shear region as well as the curvature of the mean background wind, which is the rate of change of the shear. Moreover, we can have reflection layers, similar to the case of weakening stratification, and also a new phenomenon, called critical layers, arises. They occur at locations where the absolute frequency vanishes, i.e., when the horizontal phase speed matches the background wind speed. Around critical layers, non-linear effects become more and more important. For example, wave-mean flow interaction, where the wave deposits energy to or draws it from the mean flow, is an important factor that our approach does not account for. But apart from critical layers, which are also an issue in direct numerical simulations, the implementation of non-constant background wind is possible, but will be postponed to a companion paper Puetz and Klein (2018).

Wave packets
Wave packets are an important part of atmospheric gravity wave analysis, since a longlasting source of wave generation, such as steady flow over a mountain ridge, is a rare event. A wave packet can be seen as an amplitude-modulated plane wave, with almost compact support, i.e., the envelope vanishes or approaches zero outside a specific region. Mathematically, this can be described as the superposition of infinitely many plane waves with different wave numbers. They destructively interfere almost everywhere except for a confined region in which the interference is constructive. Fourier transformation can be used to break the wave packet down into the different wave numbers with respective amplitudes and phase shifts.
It is possible to apply the method introduced in this paper to wave packets by approximating them as a superposition of finitely many plane waves with corresponding amplitudes. Since it is not only about applying the multi-layer method for some selected wave parameters, but also requires some additional set-up, we will not include the details here. Alongside the inclusion of background wind, this will be the main issue of a companion paper Puetz and Klein (2018).

Conclusions
We developed a method with which we can compute the transmission of gravity waves through a finite region of non-uniform stratification by modelling this region as a multilayer fluid which has a uniform stratification in each layer. The solutions we found for each layer were matched across the fluid interfaces and we were able to relate incident and transmitted wave. The method is applicable to any stratification profile. Moreover, it is able to keep track of the upward and downward propagating wave amplitude at any point in the domain.
We were also able to find the limit for the number of layers tending to infinity, leading us to a system of ordinary differential equations for the amplitudes of upward and downward propagating wave. For stratification profiles not including a reflection layer, this ODE system could be solved numerically in a very efficient way by using a basic integration scheme. An error analysis showed that the multi-layer method converges to the limit solution.
Numerical simulations of the full Boussinesq equations were carried out to support our theoretical findings. We found the results of the simulations to be in good agreement to the predictions from the multi-layer method.
provision of PincFloit. therefore det M 1 = 0. Since the determinant is multiplicative, the determinant of the matrix product (16) is 0, and by the definition of the transmission coefficient (28), the transmission is also 0.
For the second limit, we write and consider the matrix entries (14) In a similar fashion, we follow that If we assume now, that there is no reflection layer, i.e. m j ∈ R for all j, then the matrices M j := lim k→0 M j are real and symmetric. Hence the product of any two matrices of this kind is again symmetric. We have a closer look at M j M j−1 . The diagonal entries arec The relation between the amplitudes is the same as in (19), i.e.
which is the same expression as (41).