Gravity wave propagation in a nonisothermal atmosphere with height varying background wind
 We derive a gravity wave propagation equation for a compressible and non-isothermal atmosphere with a variable background wind profile. Impact of all the gradient terms on the vertical wavenumber depends only on the intrinsic horizontal phase velocity and the background atmosphere. For the background wind variation, any one of the linear first order derivative, second order derivative and the square of the first order derivative terms can be the dominant term under different conditions. For temperature variation, only the linear first order derivative is important for waves having a slow intrinsic horizontal phase velocity. Our equation indicates that the effect of wind shear on the vertical wavenumber is opposite to that predicted by the Taylor-Goldstein equation, which assumes an incompressible fluid. We also derive an expression for the amplitude of the vertical wind perturbation.
 Study of gravity waves is an important topic in atmospheric sciences. All gravity wave theories are based on the fundamental principles of momentum, energy and mass conservation. However, due the complexity of the real atmosphere, linear approximations are needed to obtain analytical solutions. Taylor  and Goldstein  formulated the theory for an incompressible fluid having a vertical variation in the background horizontal velocity. The Taylor-Goldstein equation is widely applied to the lower and middle atmosphere. The theory presented by Hines  is for a compressible, isothermal and windless atmosphere. The case of a non-isothermal atmosphere with a constant wind is discussed by Einaudi and Hines  as well as by Beer . Advances on gravity wave theories and comparison with observations are summarized in a review paper by Fritts and Alexander . Despite numerous publications on gravity waves, a linear theory considering a compressible atmosphere with height varying temperature and background wind is not found in the literature. In the following, we present analytical results of gravity wave propagation in a compressible atmosphere having a vertical variation in both background wind and temperature.
2. Wave Propagation Equation
 The atmosphere we assume is inviscid and irrotational but compressible with the background temperature and wind having a vertical variation. The equations of motion, energy and mass conservation are [e.g., Beer, 1974; Fritts and Alexander, 2003]
In the above equations, U, p, ρ are wind velocity vector, pressure and density, respectively. Parameters c = and g are the speed of sound and gravitational constant, respectively. γ is the adiabatic index, and H = kT/(mg) is the scale height, where k is the Boltzmann's constant, T is the temperature and m is the mean molecular weight. Using subscript “0” and “1” for background and perturbed parameters, respectively, and further letting Uo = (Ux0, Uy0, 0) be the background wind and u1 = (u, v, w) be the perturbed velocity in the Cartesian coordinate with upward being positive, the linearized equations for small perturbations are
We will seek wave solutions of the following form:
where kx and ky are the two horizontal wavenumbers, which are assumed to be constants.
 With the assumption of equation (3), reduction of variables from the linear equations will lead to the following coupled equations between p and the vertical perturbed velocity w:
where Ω = ω − U0 • k is the Doppler shifted angular frequency, k = kx + ky with ^ indicating unit vector. From equation (4), we obtain the following differential equation governing the vertical wind motion:
In the above equations, ωg ≡ (γ − 1)1/2g/c is the Brunt-Vaisalla frequency, and k = ∣k∣. Equation (5) is reduced to the Taylor-Goldstein equation [e.g., Nappo, 2002, p. 29] if there is no temperature variation and γ = ∞. The general expression for w is reduced to that for a temperature varying atmosphere given by Beer [1974, p. 65] if U0 does not vary with height.
 Equation (5) can be rewritten into a standard wave-equation of the form
Defining the intrinsic horizontal phase velocity in the frame of the background wind as vϕ ≡ , and vd2 ≡ c2 − vϕ2, we have the dispersion relation for an atmosphere with varying temperature and background wind as
 Quantity q in the above can be largely interpreted as the vertical wavenumber. Although the dispersion relation, equation (9), is a cumbersome equation, it is easily simplified to other known dispersion relations under more restricted assumptions. By letting U0 = 0 and = 0, the q2 expression is the dispersion relation derived by Hines  for a windless isothermal atmosphere. It is reduced to the Taylor-Goldstein equation if there is no temperature variation and γ = ∞ [e.g., Nappo, 2002]. We further note that the signs of ( • )2 and ()2 terms are negative. This is consistent with the fact that gravity waves cannot propagate freely at discontinuous boundaries. Otherwise, when ( • )2 or ()2 is very large, as at a discontinuous boundary, q2 could be positive, signifying a freely propagating wave.
 In order for the linear theory to be applicable, the atmosphere needs to be stable. In the middle and lower atmosphere, stable conditions require ∣∣ < 2ωg ∼ 0.04/s and − < ∼10°K/km ∼ 0.01 K/m, which leads to ∣∣ < ∼0.3. In order to estimate the second order derivatives, we assume that the background wind and temperature are sinusoidal functions of altitude with a vertical wavelength larger than a couple of scale heights. The dispersion relation for waves having a slow horizontal intrinsic phase velocity (vϕ < 0.5c), applicable to most of the airglow observations in the mesosphere [Hecht, 2004], is simplified to
 Since = − • , we can rewrite equation (10a) in terms of vϕ as
 At even smaller intrinsic horizontal phase velocity (vϕ < 0.2c), the square term can be omitted. Note that q2 + k2 is the total wavenumber, and it depends on the instrinsic horizontal phase velocity and the state of the background atmosphere. The background wind affects the wave propagation characteristics through its effect on phase velocity. For brevity, we will use “phase velocity” to mean “intrinsic horizontal phase velocity”, vϕ from here on.
 Plane wave solution requires that q be independent of altitude z. Strict independence is difficult under the assumption that background wind and temperature are both varying with z. Nevertheless, if the atmospheric variation in temperature and background wind is relatively small in a vertical wavelength, the so-called WKB solution of equation (7) is
where wo is a constant and z0 is a reference height. In the following discussion, we will assume the above equation is applicable and q is largely independent of z.
 It is of interest to point out that function f, as expressed in equation (6a), determines how the wave amplitude changes under the condition that q2 is larger than 0 and not a strong function of z. With the definition of vd2 given in the above, the expression for f can be expressed as,
The amplitude of the vertical wind perturbation as a function of z becomes
 It is well understood that the exponential increase in amplitude (e) is to balance the atmospheric density change. Our result shows that the vertical wind amplitude has a relatively simple expression for height varying background wind and temperature as well. If the total effect of the temperature and background wind variation makes a weak function of altitude, the vertical wind amplitude, as in an isothermal and windless atmosphere, grows exponentially. Gravity waves cannot have a vertical velocity component at a (horizontal) phase velocity of the speed of the sound. This is the same conclusion that one can draw from the gravity wave polarization relations and it is a characteristic of the Lamb waves.
 To see how vertical wavenumber q is affected by the height variation of the background wind and temperature, let us assume = 0.15, = 0.02/s, which are approximately half of the values before instability occurs in the mesosphere. (Since it is only the projection of the background wind in the direction of wave propagation that matters, we will assume that background wind is aligned with the propagation direction in the ensuing discussion.) Let us further assume that the background wind and temperature are sinusoidal functions of height with a vertical wavelength of 30 km. This puts values of and at 3.1 × 10−5m−1 and 4.2 × 10−6m−1s−1, respectively. Using these values and assuming H = 6 km and g = 9.5 ms−2, we plot how each term in equation (9) varies with the phase velocity in Figures 1a and 1b. In order for a gravity wave to freely propagate in the vertical direction, q2 needs to be larger than zero. The solid black line is the first term in equation (9), which is the square of the total wavenumber in the absence of temperature or wind gradient. The dotted line is the second term in equation (9) by assuming a horizontal wavelength of 40 km and its sign is always negative. The terms associated with ()2 and ()2 are always negative as well. The linear 1st and 2nd derivative terms can be either positive or negative.
 For the conditions given above, we see, from Figure 1a, that the term dominates the and ()2 terms for small phase velocities. In order for the (wind) shear term to be about the same as the curvature term, the equivalent vertical wavelength of the background wind needs to be longer than 2πHγ/(2 − γ), which is about 15H for γ = 1.4. The ()2 term dominates when the phase velocity exceeds 0.6c. The shear term dominates only when is small and the background wavelength is very large. With < 0.02/s, a gravity wave having a horizontal wavelength larger than 20 km (corresponding to k2 < 10−7 m−2) will likely be able to propagate with a real vertical number in the region where the phase velocity is smaller than 0.2c. For the given conditions, a gravity wave having a phase velocity larger than 0.4c is likely evanescent since the ()2 term, which is always negative, exceeds .
 In Figure 1b, we see that the linear variation of the scale height (or equivalently temperature) dominates other temperature variation related terms when the phase velocity is below 0.5c. In a stable atmosphere and with vϕ < 0.5c, dominance of the term over ()2 and () terms is always true. Under the same condition, term will also dominate the term as long as the equivalent vertical wavelength of the background temperature is larger than about one scale height.
 In the above, we discussed how the height gradients of temperature and background wind affect q2. Plane wave solution, equation (11), depends on the condition that the magnitude of the following second order residue, R2, is much smaller than unity [Einaudi and Hines, 1970]:
In terms of q2, this condition is
One can take the first and second order derivatives of equation (9) and substitute them into equation (15) to see how the temperature and background wind variations affect the above condition. Such an exercise for a general case involving both temperature and wind variations will produce complicated equations. Einaudi and Hines  discussed the case of temperature variation in detail. Here we consider the isothermal atmosphere with ∣∣ ≪ 1 and the second order derivative negligible. For this simplified case, the condition in equation (15) becomes
 Finally, we note that Taylor-Goldstein equation is often used to discuss gravity wave propagation and ducting. Since it is derived under the assumption of an incompressible atmosphere (γ = ∞), it is of interest to compare it with our result here for a compressible atmosphere. Taylor-Goldstein equation [e.g., Nappo, 2002] is
With = 0 and vϕ2 ≪ c2, our equation for a compressible atmosphere is
Using γ = 1.4, our equation becomes,
We see that the Taylor-Goldstein equation is only valid at slow phase velocities for a compressible atmosphere. For vϕ2 ≪ c2, in addition to the fact that the ωg definition depends on γ, the shear terms are opposite in sign and the magnitude of the shear term in the Taylor-Goldstein equation is about twice of our result. If the shear term ever plays a significant role in modifying the propagating characteristics of a gravity wave, past quantitative conclusions drawn from Taylor-Goldstein equation are likely incorrect.
 The work presented in this paper is supported by NSF grants ATM-0337245 and ATM-0535459. We thank the reviewers for their careful readings of the manuscript and constructive comments.