Articles | Volume 44, issue 2
https://doi.org/10.5194/angeo-44-655-2026
https://doi.org/10.5194/angeo-44-655-2026
Regular paper
 | 
28 Jul 2026
Regular paper |  | 28 Jul 2026

A numerical model for solving the linearized gravity-wave equations by a multilayer method

Alexandru Doicu, Dmitry S. Efremenko, and Thomas Trautmann
Abstract

We developed a numerical model for solving the linearized gravity-wave equations using a multilayer approach that explicitly accounts for viscosity, thermal conduction, and ion drag. The solution strategy is based on a matrix-exponential formalism and comprises two classes of methods: global matrix methods and scattering matrix methods. The model supports both single-frequency waves and time-dependent wave packets. Particular emphasis is placed on the global matrix method, which exploits the structured form of the multilayer system to achieve high computational efficiency while maintaining numerical accuracy. Numerical experiments demonstrate that all methods yield identical accuracy, although the global matrix method is significantly more efficient than the scattering matrix method, especially for time-dependent wave packets. The impact of ion drag on wave characteristics is quantified within this framework. The implementation is freely available as open-source code at https://github.com/AlexandruDoicu/Gravity-Waves (last access: 1 June 2026) and https://doi.org/10.5281/zenodo.21410453 (Doicu and Efremenko2026).

Share
1 Introduction

Time-step methods (Liu et al.2013; Heale et al.2014; Fritts et al.2015) are commonly used to solve fully nonlinear sets of governing equations for upper-atmospheric gravity waves, thereby allowing the modeling of wave breaking, secondary wave generation, and weakly nonlinear effects. However, as compared to linear methods for gravity waves (Midgley and Liemohn1966; Volland1969a, b; Francis1973; Yeh and Liu1974; Klostermeyer1972, 1980; Knight et al.2024) they are computationally expensive. In Pütz et al. (2019) it was found that a time-step model took several hours to run, while a linear method only took several seconds. In this regard, linear methods are more suitable for analyzing measured data.

The linearized equations can be transformed into a linear system of ordinary differential equations with variable coefficients that depend on the background atmospheric parameters and their height derivatives. (The atmospheric parameters are assumed to be horizontally uniform but vertically varying.) A common technique for integrating the linearized equations is the multilayer method first applied by Pfeffer and Zarichny (1962). In this method, the atmosphere is divided into a sequence of thin layers, and in each layer, a linear system of ordinary differential equations with constant coefficients is solved. The analytic wave solutions in neighboring layers are matched by the continuity condition of the variables across the interface. There are two methods for deriving a linear system of ordinary differential equations with constant coefficients. These approaches are referred to as the physical multilayer method and the numerical multilayer method. It is worth noting that Hines (1973) used the terms standard and nonstandard multilayer methods, respectively, for these two approaches.

  1. In the physical multilayer method, the atmospheric parameters, and in particular, the temperature and wind velocity, are assumed to be constant within each layer (Midgley and Liemohn1966; Volland1969a, b; Francis1973; Yeh and Liu1974). As a result of the piecewise constant approximation, the height derivatives of the atmospheric parameters are zero within each layer.

  2. In the numerical multilayer method, the coefficients as a whole are approximated by their values in the middle of the layer (Klostermeyer1972). As a result, the height derivatives of the atmospheric parameters (approximated by their values in the middle of the layers) are also included in the resulting system of equations.

The criticism of physical multilayer methods by Hines (1973) concerns whether the equations describing the state variables in a layer are physically realistic. He concluded that it is impossible to find the appropriate variables when either (i) the viscosity and the wind velocity are nonzero or (ii) the thermal conductivity and the temperature height derivative are nonzero. However, as mentioned by Knight et al. (2022), Hines' concern about the physical meaning of the state variables is not relevant for a numerical multilayer method. The reason is that in a purely mathematical context, it is sufficient to prove that the method, converges to a correct solution in the infinitesimally thin layer limit. A justification of this result, based on a matrix–exponential representation for the solution, can be found in Klostermeyer (1980).

According to Volland (1969a), a layer is said to be isothermal if the background temperature is constant, and homogeneous if the kinematic viscosity is constant. In the simplified windless-atmosphere model considered by Midgley and Liemohn (1966); Volland (1969a, b); Francis (1973); Yeh and Liu (1974), the gradients of the background temperature and kinematic viscosity are neglected. In this case, the dispersion relation, associated to the system of ordinary differential equations, separates into three pairs of ascending and descending gravity-wave, viscosity-wave, and thermal conduction-wave modes. The viscosity-wave and thermal conduction-wave modes are also referred to as dissipative modes. The main distinction between the two pairs of dissipative modes and the pair of gravity-wave modes is that the latter have smaller vertical wavenumber imaginary parts. This means that ascending gravity-wave modes do not decrease in amplitude as rapidly with increasing altitude as dissipative modes. On the other hand, the assumption of locally constant kinematic viscosity is unrealistic as discussed in Knight et al. (2019). If one assumes instead that the dynamic viscosity is constant within each layer, it is generally not possible to distinguish between ascending and descending modes for certain wavenumbers, frequencies, and background parameters (Knight et al.2022, 2019, 2021). In this context, Knight et al. (2022) explained that the problem of distinguishing ascending from descending modes is related to the problematic branch points of the root functions giving the vertical wavenumber as a function of complex frequency. Along this line, the authors proposed a technique called imaginary frequency shift to assist in achieving this separation.

The inclusion of dissipative modes in a linearized model produces a numerical swamping (Maeda1985) in which certain descending modes grow so rapidly in the upward direction that numerical overflow occurs when the system of differential equation is subject to lower and upper boundary conditions. Several methods have been proposed to reduce numerical swamping.

  1. Midgley and Liemohn (1966) employed an iterative method that can be regarded as a Gauss–Seidel group iteration. However, the Gauss–Seidel iteration may fail to converge in certain situations, in particular when gravity and dissipative modes become strongly coupled, as discussed in Volland (1969a, b). Klostermeyer (1980) avoids this difficulty by introducing the concept of a transfer matrix, which relates the wave amplitudes at different altitude levels and provides a more robust framework for treating such coupling.

  2. Volland (1969b) applied the scattering matrix formalism to a three-layer atmosphere assuming (i) abrupt changes in variables at the interfaces between the different layers and (ii) that certain background parameters remain constant in the lower and upper layers. Knight et al. (2019) also formulated the problem in terms of scattering matrices which are closely related to the reflection and transmission matrices appearing in seismology (Pérez-Álvarez and García-Moliner2004). However, in contrast to Volland, the authors used a more rigorous approach, i.e., a sequence of composed scattering matrices instead of just a one stand-alone scattering matrix.

  3. Maeda (1985) defined numerical swamping as the annihilation of linear independence among supposedly independent solutions. To address this challenge and obtain a comprehensive set of special solutions that are linearly independent, he utilized a technique developed by Inoue and Horowitz (1966).

In radiative transfer, it is also necessary to solve a linear system of ordinary differential equations with constant coefficients. This arises by transforming the continuous dependence of radiance on direction into a dependence on a discrete set of directions. The standard methods for solving the linear system of ordinary differential equations are the discrete ordinate method (Stamnes1986; Wick1943; Chandrasekhar1960; Stamnes and Swanson1981) and the matrix operator method (Plass et al.1973; Kattawar et al.1973; van de Hulst1963; Nakajima and Tanaka1986). In the classical discrete ordinate method, the solution to these equations is expressed as a linear combination of characteristic solutions of the discretized problem. Conversely, the matrix operator method focuses on numerical computations of reflection and transmission matrices. Both methods can be formulated using the matrix exponential formalism. In the framework of the so called discrete ordinate method with matrix exponential, Doicu and Trautmann (2009a, b) designed stable numerical algorithms for computing the radiance field in a multi-layered atmosphere, while in the framework of the matrix operator method with matrix exponential, Budak et al. (2011, 2012) provided explicit and stable representations for the reflection and transmission matrices. A consistent overview of the matrix exponential description of radiative transfer can be found in Efremenko et al. (2017).

The main purpose of this article is to apply radiative transfer techniques to solve the linearized gravity-wave equations. As a prototype, we will consider the equations that describe gravity waves in the ionosphere, and that include viscosity, thermal conduction, and ion drag. In principle, a full wave model for the ionosphere comprises the hydrodynamic equations for the neutral atmosphere and the ionospheric equations. These two sets of equations are coupled through the ion drag, and should be solved together. However, to simplify the analysis, we decouple the two sets of equations by adopting a fast field-aligned diffusion approximation, which may be viewed as a generalization of an approximation originally proposed by Klostermeyer (1972).

Our paper is organized as follows. In Sect. 2, we present the derivation of the matrix exponential solution of the linearized equations, while Sect. 3 describes stable numerical methods for computing the complex amplitudes (hereafter referred to simply as amplitudes) of the characteristic solution in a stratified atmosphere. Section 4, which is largely inspired by the works of Knight et al. (2019, 2021, 2022, 2024), addresses the computation of the perturbed quantities for both harmonic and non-harmonic source functions, that is, for single-frequency waves and time-dependent wave packets. The concepts of causality and the imaginary frequency shift, which are rigorously treated in Knight et al. (2019, 2021, 2022), are also briefly discussed. Aspects of the numerical implementation are addressed in Sect. 5, and representative simulation results are presented in Sect. 6. Additional theoretical issues are discussed in the Appendices. Appendix A contains the linearized hydrodynamic equations for the neutral atmosphere and the derivation of the underlying system of differential equations. Appendix B outlines the linearized ionospheric equations and discusses the assumptions employed to decouple the hydrodynamic and ionospheric systems. Appendix C describes methods for computing grid-point values of the state vector in a stratified atmosphere. Appendix D addresses several implementation issues, including a practical, albeit heuristic, approach for determining the imaginary frequency shift.

2 Matrix exponential solution of the linearized equations

To design a full wave model for the ionosphere, we use the hydrodynamic equations for the neutral atmosphere and the ionospheric equations. In a linearized (perturbation) method, a quantity f is expressed as

(1) f = f 0 + f ,

where f0 and f are the unperturbed (background) and the perturbed quantity, respectively. The perturbations are assumed to be small so that it is justified to neglect all terms of higher than the first order.

Concretely, we solve the linearized hydrodynamic equations for the neutral atmosphere together with the linearized ion continuity and momentum equations. The linearized neutral-atmosphere equations are solved under the following assumptions:

  • A1.

    The geographic and geomagnetic coordinates are identical.

  • A2.

    The wave propagates in the meridional plane (the x-coordinate is positive southwards while the z-coordinate is positive upwards), i.e.,

    (2) f = f ( x , z , t ) .
  • A3.

    All background (unperturbed) quantities vary only in the z-direction, i.e.,

    (3) f 0 = f 0 ( z ) ,

    while all perturbations vary harmonically in time and the x-direction, i.e.,

    (4) f = f ( x , z , t ) = f ( z ) e j ( ω t - k x x ) ,

    where ω is the angular frequency and kx the horizontal wavenumber. Note that in some gravity-wave studies, the opposite sign convention for frequency and horizontal wavenumber is used (e.g. Knight et al.2025).

The linearization model is described in Appendix A. It provides a general framework that accounts for the altitude derivatives of the background velocity u0, temperature T0, density scale height Hρ, and dynamic viscosity μ0. Apart from the ion-drag terms, the formulation follows a structure similar to those employed by Vadas and Nicolls (2012) and Knight et al. (2024).

The computation of the ion-drag force and ion-drag heating is presented in Appendix B. The ion-drag terms are introduced in an approximate manner, with the explicit aim of decoupling the hydrodynamic and ion equation systems. To this end, we adopt the following assumptions:

  • B1.

    In the ion continuity equation, the perturbed production and loss terms are neglected.

  • B2.

    In the ion momentum equation, ion inertia and ion–ion collisions are neglected, and only transport parallel to the magnetic field lines is retained. Under these assumptions, the ion momentum equation reduces to the ambipolar diffusion equation.

  • B3.

    To decouple the ion continuity equation from the diffusion equation, fast field-aligned diffusion is assumed, meaning that the field-aligned diffusion is sufficiently strong for the relative ion perturbation and the perturbed diffusion velocity to remain nearly constant along a magnetic field line.

The linearized equations lead to a linear system of ordinary differential equations, written in matrix form as

(5) 1 k x d e d z = A e ,

where

(6) e = [ u ^ , w ^ , T ^ , U ^ , W ^ , T ^ ] T

is the state vector, and A is the propagation matrix with altitude-independent elements within a thin atmospheric layer (whose expressions follow from Eqs. A41A46 of Appendix A). In general, the unknowns (the hat quantities in Eq. 6) are defined through the relation

(7) f ( z ) = C ( z ) f ^ ( z ) ,

where f is defined by Eq. (4), and C is a known quantity that ensures that f^ is dimensionless and that may or may not depend on altitude (here, we indicate that C depend on z). Specifically, for the background velocity u0=(u0,0,0), and the perturbed velocity u=(u,0,w), we have (cf. Eqs. A39 and A40 of Appendix A)

(8)u(z)=ω0kxu^(z),(9)w(z)=ω0kxw^(z),(10)T(z)=T0(z)T^(z),

and

U^=du^dz,W^=dw^dz,T^=dT^dz.

where ω0 is a reference frequency.

If (λn,vn) is an eigenpair of the matrix A, i.e., Avn=λnvn for n=1,,N, where N=dim(e), the general solution of Eq. (5) is a linear combination of the characteristic solutions exp (kxλnz)vn, that is,

e(z)=n=1Nanekxλnzvn=v1,vNekxλ1z00ekxλNza1aN(11)=Vdiag[ekxλnz]a,

where

(12) V = [ v 1 , , v N ] , diag [ e k x λ n z ] = e k x λ 1 z 0 0 e k x λ N z ,

and a=[a1,,aN]T. At z=0, we have e(0)=Va; thus,

(13) a = V - 1 e ( 0 ) ,

implying (cf. Eq. 11),

(14) e ( z ) = V diag [ e k x λ n z ] V - 1 e ( 0 ) = e k x A z e ( 0 ) ,

and conversely,

(15) e ( 0 ) = V diag [ e - k x λ n z ] V - 1 e ( z ) = e - k x A z e ( z ) .

From the theory of gravity waves within an isothermal, nondissipative atmosphere, it is generally known that the amplitude of an ascending modes increases like exp[z/(2Ha)], where Ha is the atmospheric scale height (Hines1960). This is necessary to keep the wave energy constant in an atmosphere where the pressure decreases exponentially with height. In this regard, we define the vertical wavenumber kzn through the relation

(16) diag [ e k x λ n z ] = diag [ e z / ( 2 H a ) e - j k z n z ] ,

yielding

(17) λ n = - j k x k z n + 1 2 α ,

and conversely,

(18) k z n = j k x λ n - 1 2 α ,

where α=1/(kxHa). The characteristic equation det(A-λIN)=0 has N=6 solutions. As shown in Appendix A, for a constant kinematic viscosity the solutions occur in pairs and correspond to (i) ascending and descending gravity-wave modes, (ii) ascending and descending viscosity-wave modes, and (iii) ascending and descending thermal-conduction wave modes (Volland1969b; Francis1973). In that appendix, this pairing is explicitly demonstrated by deriving the dispersion relation for the special case of an isothermal (constant background temperature), homogeneous (constant kinematic viscosity), and windless atmosphere without ion drag. This solution classification is made according to the imaginary part of the vertical wavenumber kzn. In the more realistic case of a constant background dynamic viscosity, it is generally not possible to define ascending and descending modes as corresponding pairs (see Eq. A52 in Appendix A). However, in our model we will use the same rule as in the case of a homogeneous atmosphere, even though the traditional concept of classifying waves in pairs is no longer applicable. Specifically, we compute kzn for n=1,,N by means of Eq. (18), and order the set {kzn}n=1N, and accordingly, {λn}n=1N, such that

(19) Im ( k z 3 ) Im ( k z 2 ) Im ( k z 1 ) Im ( k z 4 ) Im ( k z 5 ) Im ( k z 6 ) .

By convention, (i) the pairs (kz1=kz1+,λ1=λ1+) and (kz4=kz1-,λ4=λ1-) will correspond to ascending and descending gravity-wave modes, respectively, (ii) the pairs (kz2=kz2+,λ2=λ2+) and (kz5=kz2-,λ5=λ2-) to ascending and descending viscosity-wave modes, respectively, and (iii) the pairs (kz3=kz3+,λ3=λ3+) and (kz6=kz3-,λ6=λ3-) to ascending and descending thermal conduction-wave modes, respectively. Thus, the vertical wavenumber is an auxiliary quantity that is used only to identify the different modes. According to the notation introduced above, {λm+}m=1M, where M=N/2 is the number of modes, is the set of eigenvalues defining ascending modes, and {λm-}m=1M is the set of eigenvalues defining descending modes. Because Re(λn)=Im(kzn)/kx+α/2, it is obvious that we can put aside the concept of vertical wavenumber when identifying the different wave modes. We can simply order the set {λn}n=1N, such that

(20) Re ( λ 3 ) Re ( λ 2 ) Re ( λ 1 ) Re ( λ 4 ) Re ( λ 5 ) Re ( λ 6 ) ,

and use the same classification rule as above. A commonly cited interpretation of condition (20) is that, for increasing z, the exponential term exp(kxλnz) will tend to be damped more for ascending modes than for descending modes; conversely, for decreasing z, the roles of ascending and descending modes are reversed. However, such a classification of upgoing and downgoing roots (e.g., Volland1969b and related works) was primarily heuristic and lacked a rigorous theoretical justification. By contrast, the approach of Knight et al. (2019), which is discussed in Sect. 4, introduces additional constraints beyond condition (20) that are explicitly related to causality and is therefore grounded in theoretical considerations rather than heuristic arguments.

To highlight the different wave modes, we organize the state vector e(z) as

e(z)=e+(z)+e-(z)=m=1Mam+ekxλm+zvm++m=1Mam-ekxλm-zvm-(21)=[V+,V-]diag[ekxλm+z]0M0Mdiag[ekxλm-z]a+a-,

where the eigenvector vm± corresponds to the eigenvalue λm±,

(22)V=[V+,V-],V±=[v1±,,vM±],(23)a=a+a-,a±=a1±aM±,

and 0M is the zero matrix of dimension M×M. Some useful relations are listed below

  1. From Eq. (13), we find

    (24)a+=[IM,0M]a=[IM,0M]V-1e(0),(25)a-=[0M,IM]a=[0M,IM]V-1e(0),

    where IM is the identity matrix of dimension M×M.

  2. From Eq. (21), that is,

    (26) e ± ( z ) = m = 1 M a m ± e k x λ m ± z v m ± = V ± diag [ e k x λ m ± z ] a ± ,

    we deduce that

    (27) e ± ( 0 ) = V ± a ± .
  3. From Eq. (14), we obtain

    (28) e + ( z ) = T + e ( 0 ) ,

    where

    (29) T + = V diag [ e k x λ m + z ] 0 M 0 M 0 M V - 1 ,

    while from Eq. (15), we find

    (30) e - ( 0 ) = T - e ( z ) ,

    where

    (31) T - = V 0 M 0 M 0 M diag [ e - k x λ m - z ] V - 1 .
3 Solution of the linearized equations for a stratified atmosphere

Consider an equidistant discretization of the atmosphere, i.e., z^i=zmin+(i-1)Δz^ for i=1,,2L+1. A layer l, where l=1,,L and L is the number of layers, is bounded from below and from above by the grid points zl=z^2l-1 and zl+1=z^2l+1, respectively, and its center is located at the grid point zl=z^2l. The atmosphere extends from zmin=z1=z^1 to zmax=zL+1=z^2L+1=zmin+L(2Δz^). We adopt a numerical multilayer method (Klostermeyer1972; Knight et al.2022, 2019), and approximate the altitude dependent matrix A in each layer l by its value at the layer center, i.e., Al=A(zl). The eigenpairs of the propagation matrix Al are denoted by (λnl,vnl) for n=1,,N. The matrix differential equation (5) can be solved either (i) in terms of the amplitudes al, l=1,,L of the characteristic solutions, or (ii) in terms of the grid-point values el=e(zl), l=1,,L of the state vector e(z). In the following we present the method based on the amplitude of the characteristic solutions, whereas the second method is described in Appendix C.

In the layers l and l+1, the solutions are given by (cf. Eq. 11)

(32) e l ( z ) = V l diag [ e k x λ n l ( z - z l ) ] a l , z l z z l + 1 ,

and

(33) e l + 1 ( z ) = V l + 1 diag [ e k x λ n , l + 1 ( z - z l + 1 ) ] a l + 1 , z l + 1 z z l + 2 ,

respectively. The continuity condition at the interface z=zl+1,

(34) e l ( z l + 1 ) = e l + 1 ( z l + 1 ) ,

gives

(35) V l - 1 V l + 1 a l + 1 = diag [ e k x λ n , l Δ l ] a l ,

where Δl=zl+1-zl. To obtain a stable system of equations, we define a scaling matrix Kl1 with entries

(36) [ K l 1 ] n n = e - k x λ n l Δ l , 1 , Re ( λ n l ) > 0 Re ( λ n l ) 0 ,

and a second scaling matrix Kl0 by

(37) K l 0 = K l 1 diag [ e k x λ n l Δ l ] ,  i.e.,  [ K l 0 ] n n = 1 , e k x λ n l Δ l , Re ( λ n l ) > 0 Re ( λ n l ) 0 .

Multiplying Eq. (35) from the left with Kl1 yields the continuity equation

(38) A l , l + 1 1 a l + 1 - A l , l + 1 0 a l = 0 2 M , l = 1 , , L - 1 ,

where 02M is the 2M-dimensional zero vector, and

(39)Al,l+11=Kl1(Vl-1Vl+1),(40)Al,l+10=Kl0.

The scaling matrices Kl1 and Kl0 prevent a possible blow-up of the exponential terms for Re(λnl)>0 and Re(λnl)≤0, respectively. Such scaling techniques are standard in radiative transfer theory and are commonly used to obtain stable numerical algorithms for computing the radiance field in multilayered atmospheres (Doicu and Trautmann2009a, b).

Actually, we have L−1 continuity equations imposed at the levels z2,,zL for the L unknowns a1,,aL. The two missing equations are obtained from the lower and upper boundary conditions.

  1. At the lower boundary, i.e., at z=z1(=zmin), we assume that only the ascending wave modes transport energy upward. In this regard, we impose that in the layer l=1, we have a1,l=1+=s=finite, and that the rest of am,l=1+ are zero, that is, am,l=1+=0 for m≠1 (Klostermeyer1972). Note that a1,l=1+ is the amplitude of the ascending gravity-wave modes, while the condition am,l=1+=0 for m≠1 means that the amplitudes of the ascending viscosity-wave and thermal conduction-wave modes are assumed to be zero. In this case, the boundary condition for ascending modes is

    el=1+(z1)=u^l=1+(z1)w^l=1+(z1)T^l=1+(z1)U^l=1+(z1)W^l=1+(z1)T^l=1+(z1)(41)=m=1Mam,l=1+vm,l=1+=sv1,l=1+.

    Excluding for the moment the scale factor s, we express the boundary condition for amplitudes,

    (42) a l = 1 + = a 1 , l = 1 + a 2 , l = 1 + a M , l = 1 + = i 1  with  i 1 = 1 0 ,

    in matrix form as

    (43) [ I M , 0 M ] a 1 = [ I M , 0 M ] a 1 + a 1 - = i 1 ,

    where in general, al0±=al=l0±, for l0=1,,L. The boundary condition (41) is a modal (eigenvector-based) boundary condition, which imposes that the state at z1 is exactly aligned with a chosen eigenmode. In this way, a pure mode is injected into the system.

  2. A reasonable upper boundary condition is that there is no downgoing energy at great altitudes, so that the amplitudes of all descending wave modes must be zero at the upper boundary (Klostermeyer1972). In this regard, we impose am,l=L-=0 for all m=1,,M, in which case, in the layer L, the boundary condition for descending modes is

    (44) e l = L - ( z ) = m = 1 M a m , l = L - e k x λ m , l = L - ( z - z L ) v m , l = L - = 0 2 M

    for all zLzzL+1. In matrix form, the boundary condition for amplitudes

    (45) a l = L - = a 1 , l = L - a 2 , l = L - a M , l = L - = 0 M

    is written as

    (46) [ 0 M , I M ] a L = [ 0 M , I M ] a L + a L - = 0 M .

Comments.

  1. The scaling matrices defined by Eqs. (36) and (37) do not take into account a classification of the wave modes as ascending and descending (as defined by Eq. 20). Consequently, the continuity equation (38) do not account for this classification, and the only equations in which it is necessary to distinguish between ascending and descending modes are the boundary condition equations (43) and (46). From this point of view, the method is similar to finite-difference methods (Lindzen and Kuo1969; Hickey et al.1998, 2009).

  2. The eigenvectors are not uniquely defined and may be scaled by an arbitrary nonzero complex factor. When the LAPACK routine ZGEEV (Anderson et al.1999) is used, the eigenvectors are returned with a built-in normalization, namely unit Euclidean norm together with a fixed phase convention. In the present work, following Knight et al. (2022), we normalize the eigenvectors with respect to a selected nonzero component q, i.e., assuming [vn]q≠0,

    (47) [ v n ] j 1 [ v n ] q [ v n ] j , j = 1 , , N ,

    where [x]q denotes the qth component of the vector x. With this normalization, the selected qth component of the eigenvector is set equal to unity, i.e., [vn]q=1.

  3. An alternative type of lower boundary condition was proposed by Knight et al. (2022, 2019). In this approach, the lower boundary condition for ascending modes is prescribed in terms of M values b1,k, k=1,,M, according to (compare with Eq. 41)

    (48) d k - 1 e l = 1 + d z k - 1 ( z 1 ) q = b 1 , k , k = 1 , , M .

    In the present context, this refers to the first M components, corresponding to u^ (q=1), w^ (q=2), and T^ (q=3). In Eq. (48), k denotes the derivative order, and in the case M=3, we have explicitly,

    el=1+(z1)q=b1,1,del=1+dz(z1)q=b1,2,(49)d2el=1+dz2(z1)q=b1,3.

    Note that Eq. (48) generalizes Eq. (2.19) in Knight et al. (2022), which is formulated for the first state variable rather than for an arbitrary state variable. Using the relation

    (50) d k - 1 e l = 1 + d z k - 1 ( z 1 ) = m = 1 M a m , l = 1 + ( k x λ m , l = 1 + ) k - 1 v m , l = 1 + , k = 1 , , M ,

    and selecting the qth component as that used in the normalization condition (47) ([vm,l=1+]q=1), we find

    (51) d k - 1 e l = 1 + d z k - 1 ( z 1 ) q = m = 1 M a m , l = 1 + ( k x λ m , l = 1 + ) k - 1 ,

    We are led to the Vandermonde system of equations

    (52) m = 1 M [ B ] k m a m , l = 1 + = b 1 , k , k = 1 , M ,

    where B is a matrix with entries

    (53) [ B ] k m = ( k x λ m , l = 1 + ) k - 1 , k , m = 1 , , M .

    Setting b1=[b1,1,,b1,M]T, we consider the boundary condition for amplitudes

    (54) a 1 + = B - 1 b 1 ,

    that is (compare with Eq. 43)

    (55) [ I M , 0 M ] a 1 = B - 1 b 1 .

    For the choice b1,k=0 with k≥2, the first component of the boundary-value vector b1 can be identified with the scale factor s, that is, s=b1,1. Consequently, for a unit scale factor and M=3, we have b1=[1,0,0]T, and provided that the eigenvalues λ1,l=1+, λ2,l=1+, and λ3,l=1+ are distinct. the solutions of the Vandermonde system of equation (52) are

    (56) a 1 , l = 1 + = λ 2 , l = 1 + λ 3 , l = 1 + ( λ 2 , l = 1 + - λ 1 , l = 1 + ) ( λ 3 , l = 1 + - λ 1 , l = 1 + )

    with analogous formulas for a2,l=1+ and a3,l=1+, obtained by cyclic permutation of the indices. The boundary condition (49) is a localized condition that prescribes the value of a single state variable while enforcing vanishing slope and curvature at the boundary. It effectively acts as an external driver applied to one variable and is appropriate for non-harmonic source functions. Note that this form of the lower boundary condition is used in the statement of Theorem 1 in Knight et al. (2019). For causality considerations, boundary conditions must be expressed in terms of state variables rather than modal amplitudes, since modes are defined in the frequency domain. The boundary condition defined by Eq. (49) is appropriate when the dissipative eigenvalues remain of moderate magnitude, so that the amplitudes obtained from the Vandermonde system can be computed accurately. For very small kinematic viscosity, corresponding to altitudes below 100 km, the atmosphere is nearly inviscid, and the dissipative eigenvalues may become very large in magnitude. Under these conditions, the dissipative-mode amplitudes, which are obtained from expressions containing differences of eigenvalues in the denominator (see Eq. 56), may become highly sensitive to roundoff errors. Consequently, the computed dissipative-mode amplitudes may attain unrealistically large values, even though the physical dissipation is negligible. As discussed in Sect. 4.3 of Knight et al. (2021), a more robust alternative in such situations is to use the modal boundary condition described in Item 1 above. Specifically, the dissipative-mode amplitudes are set to zero at the lower boundary, a2,l=1+=a3,l=1+=0, and only the ascending gravity-wave mode is retained, a1,l=1+=s. In contrast to Eq. (49), this approach does not require the specification of the first and second derivatives of a state variable at the lower boundary and avoids the numerical ill-conditioning associated with large dissipative eigenvalues.

Starting from the continuity equation (38), we will determine the amplitudes al by using two solution methods, namely, (i) the so-called global matrix method with matrix exponential and (ii) the scattering matrix method.

3.1 Global matrix method with matrix exponential

The continuity equations (38), and the boundary conditions (43) and (46) for a unit scale factor, are assembled into a system of equations for the stratified atmosphere, i.e.,

(57) A a = b ,

where

(58)A=[0M,IM]000AL-1,L1-AL-1,L00000A121-A120000[IM,0M],(59)a=aLaL-1a2a1, and b=0M02M02Mi1.

For the lower boundary condition (55), i1 in Eq. (59) should be replaced by B−1b1, where, for a unit scale factor, b1=[1,0,0]T. The matrix 𝔸 has 3M−1 subdiagonals and 3M−1 superdiagonals (excluding the main diagonal) and can therefore be stored in banded form and treated using standard band-matrix techniques. To solve the resulting banded system of linear equations, we employed the LAPACK routines ZGBTRF and ZGBTRS (Anderson et al.1999). The routine ZGBTRF performs an LU factorization with partial pivoting of the complex band matrix, and ZGBTRS subsequently uses this factorization to solve the linear system for the prescribed right-hand side. In this approach, the inverse of the full system matrix is not computed explicitly, which improves the computational efficiency.

After solving Eq. (57), we compute the state vector as

(60) e l = e ( z l ) = u ^ ( z l ) w ^ ( z l ) T ^ ( z l ) U ^ ( z l ) W ^ ( z l ) T ^ ( z l ) = V l a l , l = 1 , , L ,

and the wave amplitudes by means of the relation

(61) f ( z ) = C ( z ) f ^ ( z ) ,

where f stands for u, w, and T. The ascending and descending solution modes are computed by using Eq. (27), that is,

(62) e l ± = V l ± a l ± , l = 1 , , L .

3.2 Scattering matrix method

We consider the continuity equation (38) and partition the matrices Al,l+1i, with i=0,1, as

(63) A l , l + 1 i = [ A l , l + 1 i ] 11 [ A l , l + 1 i ] 12 [ A l , l + 1 i ] 21 [ A l , l + 1 i ] 22 .

Further, we define the scattering matrix at the interface between the layers l and l+1 (in fact, at the layer grid point zl+1), Sl,l+1 through the relation

(64) a l - a l + 1 + = S l , l + 1 a l + a l + 1 - ,

where

(65) S l , l + 1 = R l , l + 1 + T l , l + 1 - T l , l + 1 + R l , l + 1 - ,

and Rl,l+1± and Tl,l+1± with dim(Rl,l+1±)=dim(Tl,l+1±)=M×M, are the reflection and transmission matrices, respectively. In analogy with radiative transfer theory (e.g., Budak et al.2011, 2012), Eq. (64) is referred to as the interaction principle equation at the interface (l,l+1). It shows that the scattering matrix Sl,l+1 relates the amplitudes al- and al+1+ of the waves leaving the interface with the amplitudes al+ and al+1- of the waves entering the interface. From Eqs. (38) and (64), we find

(66) R l , l + 1 + T l , l + 1 - T l , l + 1 + R l , l + 1 - = [ A l , l + 1 0 ] 12 - [ A l , l + 1 1 ] 11 [ A l , l + 1 0 ] 22 - [ A l , l + 1 1 ] 21 - 1 × - [ A l , l + 1 0 ] 11 [ A l , l + 1 1 ] 12 - [ A l , l + 1 0 ] 21 [ A l , l + 1 1 ] 22 .

We organize the computational process as an upward recurrence using the concept of a “stack”. The stack Sl0l with l0<l, is a group of interfaces characterized by the interaction principle equation

(67) a l 0 - a l + = R l 0 l + T l 0 l - T l 0 l + R l 0 l - a l 0 + a l - ,

where the matrices Rl0l± and Tl0l± are obtained through a successive application of the interaction principle equation at the interfaces (l0,l0+1), (l0+1,l0+2),,(l-1,l). Adding a new layer l+1, and taking into account that at the interface (l,l+1), the reflection and transmission matrices are Rl,l+1± and Tl,l+1±, respectively, we find that the interaction principle equation for the stack Sl0,l+1, is

(68) a l 0 - a l + 1 + = R l 0 , l + 1 + T l 0 , l + 1 - T l 0 . l + 1 + R l 0 . l + 1 - a l 0 + a l + 1 - ,

where Rl0,l+1± and Tl0,l+1± are computed recursively by using of the “adding formulas”

(69)Rl0,l+1+=Rl0l++Tl0l-(IM-Rl,l+1+Rl0l-)-1Rl,l+1+Tl0l+,(70)Tl0,l+1-=Tl0l-(IM-Rl,l+1+Rl0l-)-1Tl,l+1-,(71)Tl0,l+1+=Tl,l+1+(IM-Rl0l-Rl,l+1+)-1Tl0l+,Rl0,l+1-=Rl,l+1-+Tl,l+1+(IM-Rl0l-Rl,l+1+)-1(72)×Rl0l-Tl,l+1-,

for l=l0+1,,L-1. Note that Eqs. (69)–(72) are mathematically equivalent to Eqs. (4.30)–(4.33) in Knight et al. (2019). The procedure is initialized with Rl0,l0+1±=Rl0,l0+1± and Tl0,l0+1±=Tl0,l0+1±, and is repeated until the last interface is added to the stack. For the stack 𝒮1L, the interaction principle equation is

(73) a 1 - a L + = R 1 L + T 1 L - T 1 L + R 1 L - a 1 + a L - ,

and from the boundary conditions for amplitudes (42) and (45), that is, from the relations a1+=i1 and aL-=0M, respectively, we find

(74) a 1 - = R 1 L + a 1 +  and  a L + = T 1 L + a 1 + .

For the lower boundary condition (55), a1+ in Eq. (74) is given by a1+= B−1b1, where, for a unit scale factor, b1=[1,0,0]T. To restore the entire set of amplitude vectors al, we consider the interaction principle equations for the stacks 𝒮1l and 𝒮lL, yielding

(75)al+=(IM-R1l-RlL+)-1T1l+a1+,(76)al-=RlL+al+,

for l=L-1,,1. The state vector and the wave amplitudes are then computed by using Eqs. (60) and (61), respectively. In contrast to the previous method, this approach requires a clear differentiation between ascending and descending modes as defined by Eq. (20).

4 Source function

In the derivation so far, the amplitude vector is uniquely defined up to a multiplicative factor, namely the scale factor s. Accordingly, the general solution can be written as as=sa, where, here and in what follows, the subscript “s” indicates the dependence on s. Since as satisfies the equation 𝔸as=sb (cf. Eq. 57), the scale factor can be interpreted as a source factor. The source factor is constant in the case of a harmonic (monochromatic) source function, corresponding to a single-frequency wave, but is time dependent for a non-harmonic source function, corresponding to a time-dependent wave packet. In this section, we describe the computation of the perturbed quantities for both harmonic and non-harmonic source functions. We also present a brief overview of the causality condition and the imaginary frequency shift introduced by Knight et al. (2019), and latter extended and applied in Knight et al. (2021, 2022, 2024, 2025). Although it would be sufficient to simply refer to these works, we include a short discussion here because the underlying mathematical structure provides valuable insight into the method.

4.1 Non-harmonic source (time-dependent wave packet)

If the source term is not purely harmonic in time (i.e., it cannot be written as a single factor exp (jωt)), the perturbed quantity f(x,z,t) is not a single-frequency wave with a specified angular frequency ω. In this case, the equations are treated in the frequency domain by considering the Fourier transform in time (Knight et al.2019, 2021, 2022). This is defined by

(77) F ( x , z , ω ) = - f ( x , z , t ) e - j ω t d t = F [ f ( x , z , t ) ] ( x , z , ω )

and its inverse by

(78) f ( x , z , t ) = 1 2 π - F ( x , z , ω ) e j ω t d ω = F - 1 [ F ( x , z , ω ) ] ( x , z , t ) .

Applying the Fourier transform and introducing the transformed variables according to

(79) F f t ( x , z , t ) ( x , z , ω ) = j ω F ( x , z , ω ) ,

together with

(80) F ( x , z , ω ) = F ( z , ω ) e - j k x x

as the counterpart of Eq. (A32) (in which the exponential term exp (jωt) is absorbed into f(z)), together with

(81) F ( z , ω ) = C ( z ) F ^ ( z , ω )

as the counterpart of Eq. (7), we are led to the system of differential equations (A41)–(A46) of Appendix A (or equivalently, to the matrix differential equation 5), but with F^(z,ω) replacing f^(z).

In the following, we assume that the lower boundary conditions are expressed in terms of state variables. This assumption excludes the low-viscosity regime in which the dissipative eigenvalues become excessively large and the modal boundary condition discussed above is preferred. Under this assumption, we consider at the lower boundary z1 the following localized boundary conditions

fsq0(x,z1,t)=Cq0(z1)s(x,t),fsq0z(x,z1,t)=0,(82)2fsq0z2(x,z1,t)=0,

where q0 takes the values 1, 2, and 3 for the horizontal velocity, vertical velocity, and temperature, respectively. In Eq. (82), the source function is given by

(83) s ( x , t ) = A s ( t ) e - j k x x ,

with 𝒜 denoting the scalar source amplitude and s(t) its prescribed time dependence. In our implementation, the time-dependent part of the source function is chosen as

(84) s ( t ) = e j ω 0 ( t - t 0 ) e - ( t - t 0 ) 2 2 σ t 2

with the Fourier transform

(85) S ( ω ) = 2 π σ ω e - j ω t 0 e - ( ω - ω 0 ) 2 2 σ ω 2 ,

where ω0 is the reference frequency (the central frequency in the Fourier spectrum), t0 is the time at which the source function is maximum, and σt and σω=1/σt are the standard deviations in the time and frequency domains, respectively. The amplitude of the source function 𝒜 is specified by imposing the normalization condition:

(86) | Re { f s q 0 ( x = 0 , z 1 , t 0 ) } | = f b q 0 ,

where fbq0>0 is a prescribed physical amplitude. This condition ensures that the perturbation component q0 attains the amplitude fbq0 at the lower boundary z1 and at the reference time t=t0, corresponding to the maximum of the source envelope. The real part is used because the perturbations are represented in complex form, whereas the physical observables are real-valued quantities. The absolute value is introduced because fbq0 represents a prescribed physical amplitude and is therefore positive by definition. The normalization condition thus prescribes the magnitude of the perturbation at the reference point. For example, in the case q0=1, fbq0 may be chosen as a fraction of the maximum horizontal velocity of neutrals in the south direction over the altitude range, whereas in the case q0=3, fbq0 may be chosen as a fraction of the maximum temperature of neutrals over the altitude range.

Applying the Fourier transform to Eq. (82) and using Eqs. (80) and (81), we obtain the following boundary conditions in the frequency domain (note that 𝒜S(ω) is the Fourier transform of 𝒜s(t)):

F^sq0(z1,ω)=AS(ω),F^sq0z(z1,ω)=0,(87)2F^sq0z2(z1,ω)=0.

Comparing Eqs. (87) and (49), we see that the latter corresponds to the choice b1,2=b1,3=0. In this case, the source factor s=b1,1 can be identified with 𝒜S(ω). Following the approach used in Sect. 3, we introduce the quantities F^q(z,ω)=e(z,ω)q, q=1,2,3, where e(z,ω) denotes the solution of the differential equation (5) for a unit source factor in the frequency domain (i.e., for b1=[1,0,0]T). The perturbed quantity fsq(x,z,t) is then obtained by applying the inverse transform (78) to

(88) F s q ( x , z , ω ) = A S ( ω ) e - j k x x C q ( z ) F ^ q ( z , ω ) ,

that is,

(89) f s q ( x , z , t ) = 1 2 π - F s q ( x , z , ω ) e j ω t d ω = A f q ( z , t ) e - j k x x ,

where

(90) f q ( z , t ) = C q ( z ) 2 π - S ( ω ) F ^ q ( z , ω ) e j ω t d ω .

For S(ω) as above, fq(z,t) can be written as

(91) f q ( z , t ) = C q ( z ) 2 π - S ( ω ) F ^ q ( z , ω ) e j ω ( t - t 0 ) d ω ,

with

(92) S ( ω ) = 2 π σ ω e - ( ω - ω 0 ) 2 2 σ ω 2 .

The computation of F^q(z,ω) can be performed using any of the methods presented in Sect. 3. The computed quantity is fq(z,t), the amplitude 𝒜>0, is determined from the normalization condition (86) as

(93) A = f b q 0 | Re { f q 0 ( z 1 , t 0 ) } | ,

and the perturbed quantity fsq(x,z,t) is computed from Eq. (89).

4.2 Monochromatic source (single-frequency wave)

The case of a monochromatic source is obtained as a special case of the above approach by choosing

(94) s ( t ) = e j ω 0 t ,

whose Fourier transform is

(95) S ( ω ) = - s ( t ) e - j ω t d t = - e - j ( ω - ω 0 ) t d t = 2 π δ D ( ω - ω 0 ) ,

where δD denotes the Dirac delta distribution and the equality is understood in the sense of distributions.

The lower boundary conditions in the time domain are specified as

fsq0(x,z1,t)=12πCq0(z1)s(x,t),fsq0z(x,z1,t)=0,(96)2fsq0z2(x,z1,t)=0,

with

(97) s ( x , t ) = A s ( t ) e - j k x x = A e j ( ω 0 t - k x x ) .

Applying the Fourier transform with respect to time yields a forcing term proportional to δD(ωω0), showing that the excitation is concentrated at the single frequency ω0. Consequently, the frequency-domain problem is solved only at the excitation frequency ω0. The corresponding harmonic amplitude at the lower boundary is prescribed to be 𝒜, while the first and second vertical derivatives vanish, i.e.,

(98)F^sq0(z1,ω0)=A,F^sq0z(z1,ω0)=0,(99)2F^sq0z2(z1,ω0)=0.

Again, by comparing Eqs. (99) and (49), we see that the source factor s=b1,1 can be identified with 𝒜. In this regard, let F^q(z,ω0)=[e(z,ω0)]q, q=1,2,3, where e(z,ω0) denotes the solution of the differential equation (5) for a unit source factor in the frequency domain. The perturbed quantity fsq(x,z,t) is then obtained by the inverse Fourier transform (78) of Fsq(x,z,ω) (cf. Eq. 88), and the result is

(100) f s q ( x , z , t ) = A f s q ( z ) e j ( ω 0 t - k x x ) ,

where

(101) f s q ( z ) = C q ( z ) F ^ q ( z , ω 0 ) .

Thus, the computed quantity is fsq(z), and the amplitude 𝒜 is determined from the normalization condition

(102) | Re { f s q 0 ( x = 0 , z 1 , t = 0 ) } | = f b q 0 ,

which yields

(103) A = f b q 0 | Re { f s q 0 ( z 1 ) } | .

4.3 Causality and imaginary frequency shifting

Causality means that the wave field in response to any source function cannot be nonzero prior to the earliest time at which the source function is nonzero. According to the classification rule (20), we have

(104) Re [ λ 1 l + ( ω ) ] Re [ λ 1 l - ( ω ) ] ,

for any layer l=1,,L and any real frequency ω. To preserve causality in solutions of two-point boundary value problems, a stronger condition is required, namely

(105) max l = 1 , , L Re [ λ 1 l + ( ω ) ] < min l = 1 , , L Re [ λ 1 l - ( ω ) ]

for all ω∈ℝ. Equivalently, this condition requires that there exists a single real constant σ, such that

(106) Re [ λ 1 l + ( ω ) ] < σ < Re [ λ 1 l - ( ω ) ] ,

for all l and all ω∈ℝ.

In some situations, condition (106) is not satisfied on the real frequency axis but can be enforced by introducing an imaginary frequency shift ωω-jδ. Following Knight et al. (2024), we adopt the Layerwise Causality (LC) condition. This condition requires that, at each layer l there is a σl such that

(107) Re [ λ 1 l + ( ω - j δ ) ] < σ l < Re [ λ 1 l - ( ω - j δ ) ] ,

for all ω∈ℝ. A less restrictive condition is obtained by requiring that, at each layer l,

(108) d l ( ω ) = Re [ λ 1 l - ( ω - j δ ) ] - Re [ λ 1 l + ( ω - j δ ) ] > 0 ,

for all ω∈ℝ, then the multilayer algorithm will still preserve causality. The LC condition requires a strict separation between the two eigenvalue families within each layer, but it does not require that the same separator works for all layers. Thus, each layer may have its own separating value σl. Equivalently, dl(ω)>0 means that, in layer l, the real parts of the eigenvalues associated with the ascending and descending gravity waves remain separated (and therefore do not cross) as functions of the real frequency ω after the shift.

To summarize the approach for computing fsq(x,z,t) in the case of imaginary frequency shifting, we introduce the shifted spectrum

(109) S δ ( ω ) = S ( ω - j δ ) = - s ( t ) e - j ( ω - j δ ) t d t = - [ s ( t ) e - δ t ] e - j ω t d t ,

which can be viewed as the analytic continuation of S(ω) to complex frequencies. Note that the shift ωω-jδ corresponds in the time domain to multiplication by exp (−δt).

Let

(110) F δ s q ( x , z , ω ) = A S ( ω - j δ ) C q ( z ) F ^ q ( z , ω - j δ ) e - j k x x

be the Fourier transform (in time) of the perturbed quantity with frequency shifting fδsq(x,z,t), where as usual, F^q(z,ω-jδ)=e(z,ω-jδ)q is solution of the differential equation (5) for a unit source factor in the frequency domain. Under the usual analyticity and decay assumptions (so that contour shifting is permitted), Cauchy's theorem yields the shift relation

fδsq(x,z,t)=12π-Fδsq(x,z,ω)ejωtdω(111)=e-δtfsq(x,z,t),

where fsq is the perturbed quantity without frequency shifting given by Eq. (89). Equivalently, this implies the shift-invariance property

(112) f s q ( x , z , t ) = e δ t f δ s q ( x , z , t ) .

Summarizing, the computational steps for the frequency-shifting approach are as follows:

  1. Compute e(z,ω-jδ) as the solution of the differential equation (5) for a unit source factor, and set F^q(z,ω-jδ)=e(z,ω-jδ)q.

  2. Compute fδsq by taking the inverse Fourier transform of Fδsq given by Eq. (110),

    fδsq(x,z,t)=Ae-jkxxCq(z)2π(113)×-S(ω-jδ)F^q(z,ω-jδ)ejωtdω.
  3. Recover fsq from the shift-invariance property (112).

For S(ω) as in Eq. (85), it is convenient to write the recovered solution in the form

(114) f s q ( x , z , t ) = A f δ q ( z , t ) e - j k x x ,

where (compare with Eq. 91)

(115) f δ q ( z , t ) = e δ ( t - t 0 ) C q ( z ) 2 π × - S ( ω - j δ ) F ^ q ( z , ω - j δ ) e j ω ( t - t 0 ) d ω ,

and 𝒮 is given by Eq. (92). The computed quantity is fδq(z,t). The amplitude 𝒜>0 is determined from the normalization condition (86) with fbq0 interpreted as a prescribed positive physical amplitude, according to

(116) A = f b q 0 | Re { f δ q 0 ( z 1 , t 0 ) } | .

Finally, the perturbed quantity fsq(x,z,t) is computed from Eq. (114). The Fourier integral in Eq. (115) is evaluated using a direct discrete Fourier transform (FT) rather than a fast Fourier transform (FFT). The frequency and time discretization used in the Fourier transform are discussed in Appendix D.

A potential numerical issue with this approach is that a large frequency shift δ, while ensuring the causality condition, may amplify rounding errors when recovering fsq from fδsq through the exponential term exp[δ(tt0)]. For large t, this may lead to an uncontrolled growth of the right-hand side of Eq. (115). Therefore, care is required in selecting δ: it must be large enough to ensure the layerwise causality condition, but not significantly larger than that. Rigorous methods for determining the minimum sufficient δ were described by Knight et al. (2019, 2021, 2022), while the numerical blow-up associated with the exponential growth term was discussed in Appendix B of Knight et al. (2021). In our implementation we employ a heuristic approach that combines (i) the Layerwise Causality (LC) condition applied at selected altitude levels, and (ii) a Source-Function Reconstruction (SFR) test.

First, an admissible interval [δmin,δmax] is constructed by enforcing the SFR criterion, and within this interval, the LC condition is applied at selected altitude levels to obtain a refined interval of admissible frequency shifts. In the final selection step, a discrete set of candidate shifts is evaluated, and for each candidate the LC condition is checked over the entire altitude range. Among all shifts that satisfy causality at all altitudes, the algorithm selects the one whose maximum-amplitude vector is closest to the center of mass of the admissible solutions. A detailed description of this approach is provided in Appendix D.

5 Numerical implementation

An implementation of the method is freely available as an open-source code at https://github.com/AlexandruDoicu/Gravity-Waves (last access: 1 June 2026) and https://doi.org/10.5281/zenodo.21410453 (Doicu and Efremenko2026). The code uses as input the data file produced by the International Reference Ionosphere (IRI) code available at https://ccmc.gsfc.nasa.gov/models/IRI~2016/ (last access: 1 June 2025) is used. From these data, we read

  1. the date (year, month, and day) and the time,

  2. the geographic latitude and longitude,

  3. the magnetic dip angle,

  4. the solar radio flux f10.7 and its 81 d averaged,

  5. the number density of O+ ions as a function of altitude.

The IRI data file does not provide the background ion velocity. In the present implementation, the background field-aligned ion diffusion velocity (uD0) is computed internally from the ambipolar-diffusion approximation derived in Appendix B and is used in the ion-continuity and ion-drag terms. In its present implementation, the IRI data files correspond to the locations summarized in Table 1. The altitude grid extends from zmin=80km to zmax=500km with a step size of dz=1.0 km. Users may generate custom data files by running the IRI code and specifying the corresponding file names in the input namelist.

Table 1Geographic locations and heights of the IRI data sets.

Download Print Version | Download XLSX

The IRI data are subsequently used in a manner analogous to that in the SAMI2 model of the Naval Research Laboratory (https://github.com/NRL-Plasma-Physics-Division/SAMI2, last access: 1 June 2025). In the present implementation, the ionospheric equations follow the SAMI2 framework originally developed by Huba et al. (2000) and described in detail by Huba (2023). In SAMI2, the neutral atmospheric parameters – namely the neutral number density, total mass density, and temperature – are specified using the MSIS family of models. In this study, these parameters are based on the MSIS formulation of Hedin (1987), while we note that more recent updates are provided by the NRLMSIS 2.0 model of Emmert et al. (2021). The meridional and zonal winds are specified using the Horizontal Wind Model. In the present implementation, we follow the formulation of Hedin et al. (1991), while more recent updates are described by Drob et al. (2015).

The derivatives of the background parameters are computed using central finite differences. Prior to the finite-difference calculations, the background parameters are smoothed using cubic smoothing splines with a regularization (roughness-penalty) term to suppress small-scale numerical fluctuations (Reinsch1967; Wahba1990).

Other features of the model are summarized as follows:

  1. Two linearization models are included in the code:

    • a.

      a general model that accounts for the altitude derivatives of the background velocity, temperature, density scale height, and dynamic viscosity; and

    • b.

      a simplified model for a windless atmosphere without ion drag, in which the gradients of the background temperature and kinematic viscosity are neglected.

  2. The methods for solving the linearized equations based on the matrix exponential formalism comprise:

    • a.

      the Global Matrix Method for the Amplitudes (GMMA) of the characteristic solutions, described in Sect. 3.1;

    • b.

      the Scattering Matrix Method for the Amplitudes (SMMA) of the characteristic solutions, described in Sect. 3.2; and

    • c.

      the Global Matrix Method for the Nodal (grid-point) values (GMMN) of the state vector, described in Appendix C.

  3. At the lower boundary, we impose that a selected component of the state vector is finite and that its first and second derivatives with respect to height vanish. At the upper boundary, we assume that there is no downward energy propagation, i.e., the amplitudes of all descending wave modes are set to zero.

  4. The code first computes the wave parameters for a single-frequency wave and then for a time-dependent wave packet.

  5. Typical values of the horizontal wavelength lie in the range 300–700 km.

  6. For a single-frequency wave, the output quantity of interest is Afsq(z), where fsq(z) and 𝒜 are given by Eqs. (101) and (103), respectively, whereas for a time-dependent wave packet the corresponding output quantity is Afδq(z,t), where fδq(z,t) and 𝒜 are given by Eqs. (115) and (116), respectively.

6 Numerical simulations

The simulations are performed using, as input, an IRI data file corresponding to the EISCAT Tromsø (auroral) location on 11 February 2012 at 10:00 UT. The solar zenith angle is 84.2°, the magnetic inclination angle is 78.28°, the daily solar radio flux F10.7 is 109.4 sfu, and the 81 d averaged solar radio flux is 116.9 sfu, where 1sfu=10-22 W m−2 Hz−1. The geomagnetic activity parameter Ap is set to 7.0, corresponding to slightly disturbed geomagnetic conditions. In the simulations, the Prandtl number is 0.66, and the horizontal wind model 14 implemented in SAMI2 is used. The altitude grid extends from 80 to 500 km and contains 801 grid points. The lower boundary can, in principle, be set to smaller altitudes (e.g., 50 km), but we choose 80 km because this level is typically adopted as the lower boundary for ionospheric equations. Unless stated otherwise, the horizontal wavelength is λx=400 km, the wave period is λt=40 min, and the imaginary frequency shift for a single-frequency wave is 10−6 s−1. The lower boundary conditions are imposed on the vertical velocity with fb2=5×10-2 ms−1 in Eqs. (86) and (102).

6.1 Accuracy and efficiency of the solution methods

Taking the global matrix method for amplitudes as a reference, we find that the relative root-mean-square errors in the perturbed temperature, vertical velocity, and horizontal velocity obtained with the other two solution methods are smaller than 10−6. Thus, all methods exhibit comparable accuracy. On the other hand, we find that the scattering matrix method is more time-consuming than the global matrix methods, particularly for time-dependent wave packets. This is because the scattering matrix approach requires numerous matrix operations in each layer, whereas solving a system of equations compressed into band storage is computationally less expensive.

6.2 Background atmospheric parameters

The numerical model uses altitude-dependent profiles of atmospheric and ionospheric parameters, including temperature, mass density, pressure, southward horizontal velocity, atmospheric scale height, density scale height, specific heat capacity, ratio of specific heats, sound speed, O+ ion number density, neutral–ion collision frequency, ion–neutral collision frequency, and the background field-aligned ambipolar diffusion velocity (see Appendix B). In addition, the altitude derivatives of temperature, horizontal velocity, mass density, pressure, density scale height, and ion number density are required. Figure 1 shows the background temperature T0, horizontal velocity u0 and the ion number density ni0, together with their corresponding altitude derivatives.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f01

Figure 1Background temperature T0, horizontal velocity u0 and ion number density ni0 (i=O+) (upper panels), and their height derivatives (lower panels).

Download

6.3 Pairwise classification of ascending and descending modes

Figure 2 compares the imaginary parts of the vertical wavenumbers associated with the ascending and descending gravity-wave modes. The upper panel shows the results obtained with the general model, including ion drag, while the second panel shows the corresponding results for the simplified model. In the general model, the imaginary parts of the ascending and descending vertical wavenumbers approach each other in the altitude range from approximately 80 to 170 km. To illustrate the degree of separation between these two modes, the third and fourth panels show the quantity Im(kz4)−Im(kz1) on a logarithmic scale for the general and simplified models, respectively. These plots demonstrate that the imaginary parts of the two gravity-wave modes remain separated at all altitudes, although the separation becomes very small in the transition region. A complete assessment of branch continuity, however, requires consideration of both the real and imaginary parts of the vertical wavenumbers. Additional numerical experiments indicate that the real parts of the ascending and descending gravity-wave modes cross near the altitudes (approximately 105 and 175 km) where sharp changes in the quantity Im(kz4)−Im(kz1) are observed. A detailed investigation of the root-tracking procedure and the influence of the imaginary frequency shift on branch continuity will be the subject of future research. Figure 3 shows the imaginary parts of the vertical wavenumbers for all wave modes (kzn,n=1,,6) computed using the general model. The plot illustrates the clear separation between the gravity-wave modes and the viscosity- and thermal-conduction modes. The latter two mode pairs approach each other most closely in the altitude range around 100 km.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f02

Figure 2Comparison of the imaginary parts of the vertical wavenumbers associated with the ascending (kz1) and descending (kz4) gravity-wave modes. Upper panel: Im(kz) computed using the general model, with and without ion drag. The oval indicates the altitude region where ion drag produces a small deviation in the vertical wavenumbers. Second panel: Im(kz) for the ascending and descending gravity-wave modes computed using the simplified model. Third panel: logarithmic plot of Im(kz4)−Im(kz1) for the general model. Fourth panel: logarithmic plot of Im(kz4)−Im(kz1) for the simplified model. The results correspond to λx=400 km and λt=40 min.

Download

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f03

Figure 3Imaginary parts of the vertical wavenumbers for all wave modes (kzn,n=1,,6) computed using the general model. The figure shows the gravity-wave modes together with the viscosity and thermal-conduction modes. The results correspond to λx=400 km and λt=40 min.

Download

6.4 General and simplified models

The altitude profiles of the perturbed temperature, vertical velocity, and horizontal velocity computed using the general and simplified models are shown in Fig. 4. The plots show that, in the altitude range 150–300 km, the amplitudes obtained with the general model are larger than those obtained with the simplified model. If the imaginary parts of the vertical wavenumber for ascending gravity waves computed with the general and simplified models were plotted on the same graph (i.e. by merging the lower and middle panels of Fig. 2), it would be seen that the imaginary part of the vertical wavenumber corresponding to the general model is negative but larger (i.e., less negative) than that obtained with the simplified model. As a consequence, the exponential attenuation with altitude is weaker in the general model, leading to systematically larger wave amplitudes in this region. This behavior reflects the modified balance between wave propagation and dissipation introduced by the inclusion of altitude-dependent background properties and by relaxing the assumption of constant kinematic viscosity, which reduces the effective vertical damping relative to the simplified model. In addition to the amplitude differences, Fig. 4 exhibits substantial phase shifts between the solutions of the general and simplified models. These phase shifts can be attributed to differences in the imaginary part of the eigenvalue, or equivalently, in the real part of the vertical wavenumber of the ascending gravity-wave mode. Since the wave phase accumulates with altitude in proportion to the real part of the vertical wavenumber, even moderate differences between the gravity-wave roots of the two models lead to noticeable displacements of the extrema of the temperature and velocity perturbations.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f04

Figure 4Altitude profiles of the perturbed temperature T, vertical velocity w, and horizontal velocity u for the general and simplified models. The results correspond to λx=400 km and λt=40 min.

Download

6.5 Ion Drag

The effect of ion drag on the perturbed temperature, vertical velocity, and horizontal velocity is illustrated in Fig. 5. A moderate attenuation is observed in the altitude range from 180 to 350 km, where the ion number density is relatively high. In the present model, E×B drift velocities are neglected, and the ion velocity is approximated by the field-aligned neutral velocity plus the field-aligned ambipolar diffusion velocity (see Appendix B). Consequently, the classical auroral-convection regime, in which E×B-driven ion motion transfers momentum and energy to the neutral atmosphere through ion drag, is not represented here (Richmond and Matsushita1975; Fuller-Rowell and Rees1984). Instead, ion drag arises primarily from field-aligned ambipolar diffusion and from relative ion–neutral motion induced by neutral winds. As a result, ion drag acts mainly as a secondary damping mechanism and does not constitute the dominant forcing of the neutral perturbations in the present simulations.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f05

Figure 5Altitude profiles of the perturbed temperature T, vertical velocity w, and horizontal velocity u for the general model, with and without ion drag. The results correspond to λx=400 km and λt=40 min.

Download

6.6 Horizontal wavelength and time period

The influence of the horizontal wavelength λx and the wave period λt on the perturbed quantities is shown in Fig. 6. The results indicate that, for the same lower-boundary amplitude, waves with larger horizontal wavelengths and longer periods generally attain smaller amplitudes at higher altitudes. In the inviscid region, the altitude variation of the wave amplitude is controlled primarily by the density stratification through the j/(2Ha) contribution to the vertical wavenumber (cf. Eq. 18) and is therefore largely independent of the horizontal wavelength and wave period. At higher altitudes, however, viscosity and thermal conduction become increasingly important, and the attenuation rate is determined by the imaginary part of the vertical wavenumber of the ascending gravity-wave mode. Since the horizontal wavelength and wave period modify the gravity-wave dispersion relation, they also modify the corresponding vertical wavenumber and its attenuation rate. Consequently, waves with different values of λx and λt experience different amounts of dissipation during upward propagation, leading to the amplitude differences observed in Fig. 6. The dependence on λx and λt can therefore be understood in terms of the corresponding gravity-wave roots computed by the model, whose imaginary parts determine the attenuation rates and whose real parts determine the phase propagation characteristics. Because the plotted quantities are signed perturbations, differences in the real part of the vertical wavenumber may also produce noticeable phase shifts between the profiles. Consequently, the 400 km profiles do not necessarily lie between the 300 and 500 km profiles, even though all solutions are normalized to the same prescribed lower-boundary amplitude fbq0 of the selected perturbation component.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f06

Figure 6Altitude profiles of the perturbed temperature T, vertical velocity w, and horizontal velocity u for (i) λx=300, 400, and 500 km with λt=40 min (upper panels), and (ii) λx=400 km with λt=40, 60, and 80 min (lower panels). The results correspond to the general model with ion drag.

Download

6.7 Computing ascending and descending wave solutions

The ascending and descending wave contributions in layer l, denoted by el+ and el-, respectively, can be computed using the GMMA through Eq. (62) or using the GMMN via the recurrence relations (C11) and (C12). The total solution el, obtained from Eq. (60) in the GMMA formulation and by solving Eq. (C8) in the GMMN formulation, should satisfy the relation el=el++el-. This identity was verified in all computations and was used as an internal consistency check of the code. Furthermore, the results shown in Fig. 7 indicate that the ascending-wave contribution is dominant, except in the altitude range between 120 km and 180 km in the case of the general model. This finding, which is consistent with the results presented by Knight et al. (2019) (see their Fig. 6), suggests that in a simplified model one may assume the ascending-wave contribution to be dominant at altitudes above 200 km, that is, elel+ for l=1,,L. Under this assumption, the state vector can be computed using the upward recurrence relation (C11). In Knight et al. (2019), this approach was referred to as the transmission-only approximation, whereas in Knight et al. (2021) a related single-mode approximation was introduced.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f07

Figure 7Altitude profiles of the perturbed temperature T, vertical velocity w, and horizontal velocity u for the total solution (el=el++el- in layer l), the ascending-wave solution (el+), and the descending-wave solution (el-). The upper panels correspond to the general model, and the lower panels to the simplified model. The horizontal wavelength is λx=400 km and the wave period is λt=40 min.

Download

6.8 Time-dependent wave packet

For the source function (83)–(84), Fig. 8 shows the perturbed temperature and vertical velocity as functions of time and altitude. Note the different time intervals used for each horizontal wavelength λx in these plots. The maximum values of the perturbed temperature are 32.21, 31.15, and 32.73 K for the horizontal wavelengths 300, 500, and 700 km, respectively, whereas the corresponding maximum values of the vertical velocity are 21.40, 16.21, and 12.08 m s−1. The practical implementation of the wave-packet calculations, including the choice of the frequency and time discretizations used for the Fourier-transform evaluation, is described in Appendix D.

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f08

Figure 8Perturbed temperature (left panels) and vertical velocity (right panels) as functions of time and altitude. The upper panels correspond to λx=300 km and λt=30 min, the middle panels to λx=500 km and λt=40 min, and the lower panels to λx=700 km and λt=60 min.

Download

6.9 Imaginary frequency shift

The determination of the admissible interval of imaginary frequency shifts follows the procedure described in Appendix D. For the present case λx=500 km and λt=40 min, this procedure yields the interval [δmin=10-6 s-1,δmax=32.24×10-6 s−1], within which the search for admissible solutions is performed. Specifically, candidate solutions corresponding to values of δ in this interval are examined, and only those satisfying the layerwise causality condition throughout the entire altitude range are retained. Five equidistant values of the imaginary frequency shift δ within this interval were considered. For each value, the wave parameters were computed and the layerwise causality condition was verified throughout the entire altitude range. All five solutions satisfied this condition and produced nearly identical maximum values of the perturbed horizontal velocity, vertical velocity, and temperature (Table 2). This behavior is expected because, once the layerwise causality condition is satisfied, the physical solution is not expected to depend on the particular value of the imaginary frequency shift δ, provided that δ remains within the admissible interval (see Knight et al.2022, following Eq. 2.58). To select a representative solution, we considered the three-dimensional space formed by the maximum amplitudes (umax,wmax,Tmax). The final solution was chosen as the one whose amplitude vector is closest to the center of mass of the five candidate solutions. This criterion yields the third solution, corresponding to δ=16.62×10-6 s−1. For this solution, the maxima occur at 11.06 h and 248.00 km for the horizontal velocity, 10.98 h and 303.64 km for the vertical velocity, and 10.90 h and 257.45 km for the temperature. To assess the sensitivity of the solution to the choice of δ, Fig. 9 shows the relative Root-Mean-Square (RMS) differences in the perturbed horizontal velocity, vertical velocity, and temperature between the selected solution and the remaining solutions. For each altitude, the relative RMS difference is computed over the entire time interval by dividing the RMS difference by the RMS value of the corresponding field of the selected solution over the same time interval.

Table 2Maximum values of the perturbed horizontal velocity (umax), vertical velocity (wmax), and temperature (Tmax) for different values of the imaginary frequency shift δ. The selected solution is the third solution corresponding to δ=16.62×10-6 s−1.

Download Print Version | Download XLSX

https://angeo.copernicus.org/articles/44/655/2026/angeo-44-655-2026-f09

Figure 9Relative Root-Mean-Square (RMS) differences in the perturbed horizontal velocity u, vertical velocity w, and temperature perturbation T between the selected solution (δ=16.62×10-6 s−1) and the remaining solutions corresponding to different values of the imaginary frequency shift δ. For each altitude, the relative RMS difference is computed over the entire simulation time interval by dividing the RMS difference by the RMS value of the corresponding field of the selected solution over the same time interval.

Download

7 Conclusions

We designed a numerical model for solving the linearized gravity-wave equations using a multilayer method, which is freely available as open-source code at https://github.com/AlexandruDoicu/Gravity-Waves (last access: 1 June 2026) . To decouple the hydrodynamic equations for the neutral atmosphere from the ionospheric equations, which are coupled through ion drag, we adopt a fast field-aligned diffusion approximation. This approximation may be viewed as a generalization of an approach originally proposed by Klostermeyer (1972).

To solve the linearized equations, we employ (i) global matrix methods based on matrix exponentials and (ii) scattering matrix methods to determine either (a) the amplitudes of the characteristic solutions or (b) the grid-point values of the state vector. Ascending and descending wave modes are identified according to the criterion that the real parts of the eigenvalues of the characteristic equation for ascending modes are smaller than those for descending modes (or, equivalently, that the imaginary parts of the vertical wavenumbers are smaller). Global matrix methods using the scaling matrices (36) and (37) require the classification of ascending and descending modes only at the lower and upper boundaries, whereas scattering matrix methods require an explicit determination of the mode type at every altitude. The model is devoted to solving the linearized equations including viscosity, thermal conduction, and ion drag. A simplified model for a windless atmosphere without ion drag is also considered, in which the altitude derivatives of the background temperature and kinematic viscosity are neglected.

Depending on the form of the source function, either single-frequency waves or time-dependent wave packets can be analyzed. A heuristic approach for determining the imaginary frequency shift introduced by Knight et al. (2019) is also considered. This approach is based on (i) a layerwise causality condition applied at selected altitude levels, and (ii) a source-function reconstruction test.

Numerical simulations demonstrate that both global matrix and scattering matrix methods achieve comparable accuracy. However, the former are significantly more efficient than the latter, particularly in simulations involving time-dependent wave packets. Among the global matrix methods, the approach based on solving for the amplitudes of the characteristic solutions appears to provide the highest efficiency and accuracy.

The linearized equations on which the solution methods were tested correspond to ionospheric conditions. The ultimate goal of our research is to develop a comprehensive model for analyzing ionospheric gravity waves using satellite measurements. The approach presented in this paper represents only the first component of such a model. Two options are envisaged for extending it to a more complete formulation.

  1. Fully coupled neutral–ion model. The linearized hydrodynamic equations would be solved together with the ion equations. In this case, the ion continuity equation would include perturbed production and loss terms, whereas ion inertia and ion–ion collisions would continue to be neglected in the ion momentum equation, and only transport parallel to the magnetic field lines would be retained. The state vector would then be augmented by two additional components, namely the perturbed ion number density and the ion diffusion velocity.

  2. Two-step coupling strategy. In the first step, the neutral-atmosphere equations are solved using the fast field-aligned diffusion approximation. In the second step, the wave-induced perturbations obtained from the neutral solution are used as input to solve the ionospheric equations for the perturbed O+ ion density. The ionospheric equations may be solved using the SAMI2 model (Huba et al.2000) for low latitudes, where the E×B drift is neglected, or the SAMI3 model (Huba et al.2008) at higher altitudes, where the E×B drift is included and the electric field is determined from the solution of a two-dimensional potential equation. In this strategy, priority is given to the ionospheric equations of the SAMI framework, while wave-induced perturbations are handled using the approximate approach developed in the present study. Along similar lines, Knight et al. (2025) solved the neutral-atmosphere equations without ion drag in a first step, and subsequently addressed the ionospheric response using the Field-Line Interhemispheric Plasma (FLIP) model (Richards and Peterson2008).

The development and application of these complete models will be addressed in future papers.

Appendix A: Derivation of the linear system of ordinary differential equations

In this appendix, we derive the explicit representation of the linear system of ordinary differential equations (5).

A1 Hydrodynamic equations

The hydrodynamic equations for the neutral atmosphere consist in the continuity, momentum, heat, and ideal gas equations (e.g., Midgley and Liemohn1966; Volland1969b)

(A1)DρDt=-ρu,(A2)ρDuDt=-p+ρg+σ-fID,(A3)ρcvDTDt=-pu+σ:u+(ΛT)-qID,(A4)p=ρRMT,

where ρ is the density, p the pressure, T the temperature, u the velocity, g the gravitational acceleration vector, D/Dt=/t+u the material (substantial) derivative, cv the specific heat at constant volume, Λ the coefficient of thermal conductivity, RM the specific gas constant, and σ the viscous stress tensor. The quantities fID and qID denote the ion-drag force exerted by neutrals on ions per unit volume, and the frictional heating rate per unit volume arising from ion–neutral collisions, respectively. In a Cartesian coordinate system (x1,x2,x3), the components of the viscous stress tensor are given by

(A5) σ i j = μ u i x j + u j x i - 2 3 δ i j u ,

where μ is the dynamic viscosity and δij the Kroneker delta. Accordingly, the double dot product of σ=ijσijx^ix^j with u=ijui/xjx^ix^j is

(A6) σ : u = i j σ i j u i x j .

Using the ideal-gas law p=ρRMT so that p=ρRMT+RMTρ, the momentum equation can be written as

(A7) u t = - R M T ρ ρ - R M T - ( u ) u + g + 1 ρ σ - 1 ρ f ID .

Moreover, using

(A8) c p = c v + R M , γ = c p c v , Λ = c p μ P r ,

where cp is the specific heat at constant pressure, γ the ratio of specific heats, and Pr the Prandtl number, and assuming that cp and Pr are constant, the heat equation becomes

(A9) T t = - γ - 1 T u - u T + 1 ρ c v σ : u + γ ρ P r μ T - 1 ρ c v q ID .

In the momentum and heat equations, the ion-drag force and the corresponding heating per unit mass are given by

(A10)1ρfID=νni(u-ui),(A11)1ρqID=1ρfID(u-ui)=νni|u-ui|2,

where νni is the neutral-ion collision frequency (the collision frequency between a neutral particle and all kind of ions).

We choose a rectangular coordinate system such that the x-axis is directed to the geographic south, the y-axis to the east and the z-axis upward. The wave propagates in the meridional plane, i.e., in the (x,z) plane. The viscous terms per unit mass in the momentum equation are then given by

1ρ(σ)x=μk2ux2+2uz2+132ux2+2wxz(A12)+1ρμzuz+wx,1ρ(σ)z=μk2wx2+2wz2+132uxz+2wz2(A13)+1ρμz43wz-23ux,

while the viscous dissipation term per unit mass appearing in the heat equation is

1ρσ:u=43μkux2-43μkuxwz+43μkwz2(A14)+μkuz2+2μkuzwx+μkwx2.

Here, μk=μ/ρ is the kinematic viscosity, and we have assumed that the viscosity depends only on altitude, so that

(A15) μ x = 0 .

Using Eqs. (A12)–(A14) together with assumption (A15), we express the momentum and heat equations as

ut=-RMTρρx-RMTx-uux+wuz+μk2ux2+2uz2+132ux2+2wxz(A16)+1ρμzuz+wx-1ρfIDx,

wt=-RMTρρz-RMTz-uwx+wwz-g+μk2wx2+2wz2+132uxz+2wz2(A17)+1ρμz43wz-23ux-1ρfIDz,

Tt=-γ-1Tux+wz-uTx+wTz+1cv43μkux2-43μkuxwz+43μkwz2+μkuz2+2μkuzwx+μkwx2(A18)+μkγPr2Tx2+2Tz2+γρPrμzTz-1cvρqID,

where g=-gz^, and fIDx and fIDz are the components of the ion drag force fID on the x- and z-axis, respectively.

In the above hydrodynamic equations, the Coriolis force has been neglected. For a two-dimensional wave geometry in which both the background flow and the perturbation velocities are confined to the vertical (x,z) plane and all variables are independent of the transverse horizontal coordinate y, the Coriolis acceleration associated with the Earth's rotation is directed entirely along the transverse direction and therefore does not enter the momentum equations considered here. More precisely, for u=(u,0,w) and Ω=(-Ωcosϕ,0,Ωsinϕ), where ϕ is the geographic latitude and Ω=7.29×10-5 s−1 the Earth's angular velocity, the Coriolis force per unit mass is fC=-2Ω×u=(0,2Ω(cosϕw+sinϕu),0). Thus, the Coriolis acceleration is directed entirely along the transverse horizontal direction y and does not affect the two-dimensional (x,z) momentum equations.

A2 Linearized equations

To linearize the hydrodynamic equations, we assume that all background (unperturbed) quantities vary only in the z-direction and write

f(x,z,t)=f0(z)+f(x,z,t),

where f denotes any state variable. In particular, we assume

(A19) u 0 ( z ) = ( u 0 ( z ) , 0 , w 0 ( z ) = 0 ) , ρ 0 = ρ 0 ( z ) , T 0 = T 0 ( z ) .

Furthermore, we neglect the second derivative of the background horizontal wind and background temperature,

(A20) d 2 u 0 d z 2 = 0 , d 2 T 0 d z 2 = 0 ,
  1. The linearized continuity equation is

    (A21) ρ t = - u 0 ρ x + ρ 0 H ρ w - ρ 0 u x + w z ,

    where Hρ is the density scale height defined by

    (A22) 1 H ρ = - 1 ρ 0 d ρ 0 d z .
  2. The linearized momentum equations are

    ut=-du0dzw-u0ux-cs2γρ0ρx-cs2γT0Tx+μk02ux2+2uz2+132ux2+2wxz+1ρ0dμ0dzuz+wxX(A23)+1ρ0du0dzμz-1ρ0dμ0dzdu0dzρρ0P-1ρfIDx

    and

    wt=-cs2γρ0ρz+cs2γHρTT0-ρρ0-cs2γT0Tz-u0wx+μk02wx2+2wz2+132uxz+2wz2(A24)+1ρ0dμ0dz43wz-23uxX-1ρfIDz,

    where

    (A25) c s = γ R M T 0

    is the speed of sound, and (fIDx/ρ) and (fIDz/ρ) denote the perturbations of the x- and z-components, respectively, of the ion-drag force per unit mass fIDx/ρ and fIDz/ρ.

  3. The linearized heat equation is

    Tt=-γ-1T0ux+wz-u0Tx+dT0dzw+2μk0cvdu0dzuz+wx+μ0cvρ0du0dz2μμ0-ρρ0P+μk0γPr2Tx2+2Tz2+γρ0Prdμ0dzTzX+dT0dzμzP(A26)-1cv1ρqID,

    where (qID/ρ) denotes the perturbation of the ion-drag heating per unit mass.

The linearized equations (A21), (A23), (A24), and (A26) are structurally consistent with Eqs. (7), (4), (5), and (6) in Vadas and Nicolls (2012), respectively, when the unlabelled terms and the terms labelled 𝒳 are considered (the terms labelled 𝒫 are not included). They are likewise related to Eqs. (3.5), (3.1), (3.3), and (3.4) in Knight et al. (2024), when only the unlabelled terms are considered (the additional contributions labelled 𝒳 and 𝒫 are not included).

Using the following representation for the dynamic viscosity μ (Dalgarno and Smith1962)

(A27) μ = 3.34 × 10 - 7 T 0.71 ,

we obtain

(A28) μ = 0.71 μ 0 T T 0 , μ z = 0.71 d μ 0 d z T T 0 + 0.71 μ 0 z T T 0 .

With these relations, the linearized x-momentum and heat equations can be written as follows:

  1. x-momentum equation

    ut=-du0dzw-u0ux-cs2γρ0ρx-cs2γT0Tx+μk02ux2+2uz2+132ux2+2wxz+1ρ0dμ0dzuz+wx+1ρ0du0dz0.71dμ0dzTT0+0.71μ0zTT0(A29)-1ρ0dμ0dzdu0dzρρ0-1ρfIDx,
  2. z-momentum equation

    wt=-cs2γρ0ρz+cs2γHρTT0-ρρ0-cs2γT0Tz-u0wx+μk02wx2+2wz2+132uxz+2wz2(A30)+1ρ0dμ0dz43wz-23ux-1ρfIDz,
  3. heat equation

    Tt=-γ-1T0ux+wz-u0Tx+dT0dzw+2μk0cvdu0dzuz+wx+μ0cvρ0du0dz20.71TT0-ρρ0+μk0γPr2Tx2+2Tz2+γρ0Prdμ0dzTz+γρ0PrdT0dz0.71dμ0dzTT0+0.71μ0zTT0(A31)-1cv1ρqID.

A3 Plane wave solution

We assume that all perturbations vary harmonically in time and in the x-direction, that is,

(A32) f ( x , z , t ) = f ( z ) e j ( ω t - k x x ) ,

where ω is the angular frequency and kx the horizontal wavenumber. It then follows that

(A33) f t = j ω f , f x = - j k x f , 2 f x 2 = - k x 2 f .

The linearized continuity equation becomes

(A34) ρ ρ 0 = k x Ω u - j Ω H ρ w + j Ω d w d z ,

where

(A35) Ω = ω - k x u 0

is the intrinsic frequency. Further, using

(A36) d d z ρ ρ 0 = 1 ρ 0 d ρ d z + 1 H ρ ρ ρ 0

together with

(A37) d Ω d z = - k x d u 0 d z , d ρ 0 d z = - ρ 0 H ρ ,

we obtain

1ρ0dρdz+1Hρρρ0=kx2Ω2du0dzu-jΩHρ×kxΩdu0dz-1HρdHρdzw+kxΩdudz+jΩkxΩdu0dz-1Hρ(A38)×dwdz+jΩd2wdz2.

In a first step, we use Eqs. (A34) and (A38), together with the linearized forms of the momentum and the heat equation given in Eqs. (A29), (A24), and (A31), to express the governing equations in terms of u, w, T/T0, and their vertical derivatives.

In a second step, we introduce the dimensionless state variables u^, w^, and T^, defined by

(A39) u ( z ) = ω 0 k x u ^ ( z ) , w ( z ) = ω 0 k x w ^ ( z ) , T ( z ) = T 0 ( z ) T ^ ( z ) ,

where ω0 is a reference frequency, together with their vertical derivatives

(A40) U ^ = d u ^ d z , W ^ = d w ^ d z , T ^ = d T ^ d z .

The state vector is organized as

e=[u^,w^,T^,U^,W^,T^]T

and the corresponding system of ordinary differential equations is given by

(A41)1kxdu^dz=1kxU^,(A42)1kxdw^dz=1kxW^,(A43)1kxdT^dz=1kxT^,
kxμk01kxdU^dz=jΩ+43kx2μk0+kxΩ1ρ0dμ0dzdu0dzP-jkxcs2γu^+du0dz+jkx1ρ0dμ0dzX-jΩHρ1ρ0dμ0dzdu0dzP-jkxcs2γw^-kxω0jkxcs2γ+0.711ρ0dμ0dzdu0dzPT^-1ρ0dμ0dzXU^+13jkxμk0+jΩ1ρ0dμ0dzdu0dzP-jkxcs2γW^(A44)-0.71μ0ρ0du0dzkxω0T^P+kxω01ρfIDx,
kx43μk0-jcs2γΩ1kxdW^dz=-23jkx1ρ0dμ0dzX+cs2kx2γΩ2du0dzu^+jΩ+kx2μk0-jcs2γΩHρkxΩdu0dz-1HρdHρdzw^-cs2γkxω01Hρ-1T0dT0dzT^+13jkxμk0+kxcs2γΩU^+jcs2γΩkxΩdu0dz-1Hρ-431ρ0dμ0dzXW^(A45)+cs2γkxω0T^+kxω01ρfIDz,

kxμk0γPr1kxdT^dz=ω0-jγ-1+1Ωμ0cvT0ρ0du0dz2Pu^+ω0kx1T0dT0dz+j2μk0kxcvT0du0dz-jΩHρμ0cvT0ρ0du0dz2Pw^+jΩ+μk0γPrkx2-C1γρ0Prdμ0dz1T0dT0dz-0.71μ0cvT0ρ0du0dz2PT^-2μk0cvT0ω0kxdu0dzPU^+ω0kxγ-1+jΩμ0cvT0ρ0du0dz2PW^-γPr1ρ0dμ0dzX+C2μk01T0dT0dzT^(A46)+1cvT01ρqID.

Equations (A44), (A45), and (A46) with the constants C1=1.71 and C2=2.71 correspond to the general model, in which all altitude derivatives of the background parameters u0, T0, Hρ, and μ0 are retained. The unlabelled terms and the terms labelled 𝒳, in these equations, with the constants C1=1.0 and C2=2.0, correspond to the model of Vadas and Nicolls (2012). Moreover, Eqs. (A44), (A45), and (A46), when only the unlabelled terms are retained and the constants are set to C1=C2=0, are consistent in form with Eqs. (3.32), (3.31), and (3.33) in Knight et al. (2024), respectively. Note that in Knight et al. (2024), the wave propagates in three-dimensional space, the harmonic dependence of the perturbed quantities is taken as exp[-j(ωt-kxx-kyy)], rather than exp [j(ωtkxx)], the characteristic solutions have an exp (jmz) dependence, rather than exp (kxλz), and the state vector is defined as [u,w,T^,U,W,T^]T instead of [u^,w^,T^,U^,W^,T^]T, where U=du/dz and W=dw/dz. Essentially, the difference between the model of Vadas and Nicolls (2012) and that of Knight et al. (2024) is that, in the latter, the derivative of the dynamic viscosity dμ0/dz is omitted. In the code, for testing purposes, we included a hard-coded logical flag that selects the linearized model to be used. Our numerical simulations show that there are no significant differences between the general model and that of Vadas and Nicolls (2012), and that the effect of the assumption dμ0/dz=0 is relatively small. This latter assumption was discussed in detail in Knight et al. (2024). In the general model, the derivative dμ0/dz is computed as

dμ0dz=0.71μ01T0dT0dz,

whereas the derivatives of u0, T0, and Hρ are computed using central finite differences.

The model can be particularized as follows:

  1. For a windless atmosphere (u0=0), in which the altitude derivatives of the background temperature and kinematic viscosity are neglected, we set

    (A47) d u 0 d z = 0 , d T 0 d z = 0 , Ω = ω 0 , d H ρ d z = 0 ,  and  1 ρ 0 d μ 0 d z = - μ k 0 H ρ .

    In this case, the density scale height Hρ coincides with the atmospheric scale height Ha, which satisfies

    (A48) 1 ρ 0 d ρ 0 d z = 1 p 0 d p 0 d z = - 1 H a

    and is given by

    (A49) H a = p 0 ρ 0 g = R M T 0 g = constant .
  2. For an atmosphere without ion drag, we set

    (A50) f ID x = 0 , f ID z = 0 ,  and  q ID = 0 .

A4 Dispersion equation

For f^(z)exp(kxλz), we obtain

(A51) F ^ = d f ^ d z = k x λ f ^ , d F ^ d z = k x 2 λ 2 f ^ ,

where f denotes u, w, and T, and denotes 𝒰, 𝒲, and 𝒯. Inserting Eq. (A51) into Eqs. (A44)–(A46) yields a homogeneous system of equations. In Knight et al. (2024), the dispersion relation reported in their Eq. (3.35) was derived by setting the determinant of the corresponding coefficient matrix equal to zero and applying the variable transformation described in their Sect. 2.2. Using the equivalences discussed above, namely the different harmonic convention, the relation m=-jkxλ, and the different definitions of the state vector, their Eq. (3.35) can be written in the form

-Ωcs2Ω-jγμk0Prkx21-λ2×Ω-jμk0kx21-λ2Ω-j4μk03kx21-λ2+Ω-jμk0kx21-λ2Ω-jμk0Prkx21-λ2(A52)×kx21-λ2+kxλHρ-kx2cs2γ2Hρ2γ-1=0.

For a windless atmosphere without ion drag, in which the gradients of the background temperature and kinematic viscosity are neglected, the dispersion equation reduces to the cubic equation (Midgley and Liemohn1966)

(A53) C 3 R 3 + C 2 R 2 + C 1 R + C 0 = 0 ,

for R=-λ2+αλ+1, where α=1/kxHa, or equivalently, R=κ2-jακ+1, where

(A54) κ = j λ = 1 k x k z + j 1 2 H a .

The coefficients of the cubic equations are given by

(A55)C3=-3ην(1+4η),(A56)C2=3η(1+4η)γ-1+νβ(1+7η)+3η,(A57)C1=-[β2-2ηα2(1+3η)]ν-β(1+7η)γ-1-β,(A58)C0=β2-2ηα2(1+3η)γ-1+α2(1+3η),

where

η=jω0μ03p0,ν=jkx2Λ0T0ω0p0,Λ0=γcvμ0Pr,(A59)β=ω02kx2gHa.

If Rm, m=1,,3 are the solutions of the dispersion equation, the corresponding vertical wavenumbers kzm± are given by

(A60) k z m ± = k x R m - 1 - α 2 4 .

The wavenumbers kzm+ with Im(kzm+)<0 are associated with ascending modes, whereas the wavenumbers kzm- with Im(kzm-)>0 correspond to descending modes. Ordering the ascending wavenumbers as

Im(kz3+)<Im(kz2+)<Im(kz1+)<0,

we identify (i) kz1+ and kz1- as ascending and descending gravity-wave modes, respectively, (ii) kz2+ and kz2- as ascending and descending viscosity-wave modes, respectively, and (iii) kz3+ and kz3- as ascending and descending thermal-conduction wave modes, respectively. A similar cubic equation was derived by Francis (1973) under the assumption that the geomagnetic field is either in the horizontal or the vertical direction.

Appendix B: Derivation of the ion-drag terms

In this appendix we derive the expressions for the ion-drag terms that enter the hydrodynamic equations (A44)–(A46).

B1 Ion equations

For each ion species i, the ion continuity equation is

(B1) n i t + ( n i u i ) = P i - n i L i ,

and the corresponding ion momentum equation, including pressure gradient, electric field, magnetic field, gravity, and collisions, is

uit+(ui)ui=-1minipi+qimiE+qimiui×B+g(B2)-νin(ui-u)-jνij(ui-uj),

where ni, ui, Ti, mi, and pi=nikBTi are the number density, velocity, temperature, mass, and pressure of ion species i; E is the electric field, B the magnetic field, qi the ion charge, and kB the Boltzmann constant (Huba et al.2000). The quantities Pi and i denote the ionization production rate and the loss rate due to chemical processes of ion i, respectively. The neutral wind velocity is u, and the collision frequencies νin and νij describe ion–neutral and ion–ion collisions.

In addition to ion equations, we consider the electron momentum equation (Huba et al.2000)

(B3) 0 = - 1 m e n e p e - e m e E - e m e u e × B ,

where ne, ue, Te, me, and pe=nekBTe are the number density, velocity, temperature, mass, and pressure of electrons. In Eq. (B3), electron inertia is neglected because of the small electron mass, while electron collisional terms are neglected because νe≪Ωe, where νe denotes the electron collision frequencies and Ωe is the electron cyclotron frequency.

In the ion momentum equation we neglect the ion inertia and the ion–ion collisions, and introduce the drift velocity uD by writing ui=u+uD. This yields

(B4) m i ν i n u D = q i E + ( u + u D ) × B - 1 n i p i + m i g .

The momentum equation is projected along the direction of the magnetic field b^ and perpendicular to it. The parallel and perpendicular force-balance equations are

(B5) m i ν i n u D = q i E - 1 n i p i + m i g ,

and

(B6) m i ν i n u D = q i E + ( u + u D ) × B - 1 n i p i + m i g ,

respectively, where in general a=(ab^)b^=ab^ and a=a-a. The parallel transport equation for electrons reduces to

(B7) E = - 1 e n e p e b ,

where pe/b=peb^. The parallel and perpendicular force-balance equations are solved as follows. We first consider the ambipolar diffusion velocity, and then the electromagnetic drift velocity.

  1. Ambipolar diffusion velocity. For a single dominant ion species of charge qi=+e, the parallel force balance equation for ions becomes

    (B8) m i ν i n u D = e E - 1 n i p i b + m i g ,

    where g=gb^. Inserting Eq. (B7) into Eq. (B8), gives

    (B9) m i ν i n u D = - 1 n e p e b + 1 n i p i b + m i g ,

    where g=gb^. Using the ideal-gas relations pi=nikBTi and pe=nekBTe, assuming quasi-neutrality ne=ni, and thermal equilibrium Ti=Te=T, we obtain

    (B10) u D = - D A 1 n i n i b + 1 T T b + g ν i n ,

    where

    (B11) D A = 2 k B T m i ν i n

    is the ambipolar diffusion coefficient (Schunk and Nagy2009).

  2. Electromagnetic drift velocity. Neglecting perpendicular pressure-gradient and gravity terms, which are often small compared to the electromagnetic drift terms, and assuming a collisionless or weakly collisional limit in which the ion–neutral drag term is negligible, the perpendicular momentum balance reduces to

    (B12) E + ( u + u D ) × B = 0 .

    With ui=u+uD, this gives ui×B=-E, whose solution is the electromagnetic drift velocity

    (B13) u E = E × B B 2 = E × B B 2 .

    Consequently,

    (B14) u D = u E - u .

Collecting all contributions, the ion velocity can be written as

(B15) u i = u + u D + u E ,

where u=(ub^)b^ is the field-aligned neutral velocity, uD=uDb^ is the ambipolar diffusion velocity given by Eq. (B10), and uE is the electromagnetic drift velocity given by Eq. (B13). This expression follows from the decomposition ui=u+uD, together with uD=uE-u, so that the perpendicular neutral velocity cancels.

In our model, the ion velocity is assumed to be aligned with the magnetic field lines. This assumption is introduced to decouple the hydrodynamic and ion equation systems. Accordingly, the ion velocity is approximated by

(B16) u i ( u b ^ ) b ^ + u D b ^ .

This approximation is justified when perpendicular ion transport is small compared to the dominant field-aligned diffusion. The resulting formulation captures the leading-order effects of ambipolar diffusion along the magnetic field lines, while deliberately neglecting perpendicular electrodynamic coupling, such as cross-field advection and E×B drifts. Consequently, the model is applicable to regimes in which field-aligned transport dominates and perpendicular electrodynamic effects play a secondary role. We note, however, that the neglect of the electromagnetic drift velocity is not appropriate for all geophysical regimes. At high latitudes, ion convection is largely controlled by magnetospheric forcing (Dungey1961), and realistic modeling generally requires externally imposed convection electric fields, for example from empirical models such as Weimer (2005). At mid-latitudes, perpendicular ion motion may be influenced by inter-hemispheric coupling and neutral-wind differences between conjugate hemispheres (Laundal et al.2025; Buchert2020). A fully self-consistent electrodynamic formulation, in which the electric field is obtained from an electrostatic potential Φ via E=-Φ, with Φ determined from quasi-neutral current continuity and the conductivity-tensor relation (Weimer2005), is therefore beyond the scope of the present study but constitutes an important extension for future work.

In the following, for simplicity, the subscript is omitted, and we write uD and uD instead of uD∥ and uD∥, respectively. Let

g=(0,0,-g),b^=(-cosI,0,-sinI),(B17)u=(u,0,w),

where I is the geomagnetic inclination. The field-aligned derivative is

b=b^=-cosIx+sinIz,

and the scalar field-aligned diffusion velocity becomes (cf. Eq. B10)

(B18) u D = D A cos I 1 n i n i x + sin I 1 n i n i z + cos I 1 T T x + sin I 1 T T z + g ν i n sin I .

B2 Linearized equations

The linearized continuity equation, together with the linearized expressions for the diffusion velocity, ion-drag force, and ion-drag heating, are as follows.

  1. Ion continuity equation. Neglecting the perturbed production and loss terms, the perturbed ion continuity equation is

    (B19) n i t + n i u i 0 + u i 0 n i + n i 0 u i + u i n i 0 = 0 .

    Using Eq. (B17) and the standard assumptions ni0=ni0(z), u0(z)=(u0(z),0,0), and uD0=uD0(z), we obtain

    tnini0=-uD0bnini0-1ni0dni0dzsinInini0+duD0dzsinInini0+ub-1ni0dni0dzsinIucosI+wb-1ni0dni0dzsinIwsinI-uDb-1ni0dni0dzsinIuD+u0cosIbnini0-cosIsinIdu0dz+u01ni0dni0dz(B20)×nini0.
  2. Diffusion velocity. For the perturbed diffusion velocity uD , we have the representation

    uD=-DA0bTT0-DA0bnini0+1ni0dni0dz+1T0dT0dzsinIDA(B21)-gsinIνin0νinνin0.
  3. Ion-drag force and ion-drag heating. For the ion-drag force per unit mass (cf. Eq. A10 of Appendix A),

    1ρfID=νni(u-ui),

    we obtain

    1ρfIDx=νni0[sin2Iu-sinIcosIw+cosIuD(B22)+uD0cosI+u0sin2Iνniνni0],1ρfIDz=νni0[-sinIcosIu+cos2Iw+sinIuD(B23)+uD0sinI-u0cosIsinIνniνni0].

    For the ion-drag heating per unit mass (cf. Eq. A11 of Appendix A)

    1ρqID=νni|u-ui|2,

    we find

    1ρqID=νni0×[2sin2Iu0u-cosIsinIu0w+uD0uD(B24)+u02sin2I+uD02νniνni0].

Under the assumption that, in the ionosphere, the atomic oxygen O and O+-ions are the main neutral and ionic constituents, we compute the background neutral-ion and ion-neutral collision frequencies as (Shibata1983; Stubbe1968)

νni0=7.22×10-17T00.37ni0,νin0=νni0ni0nn,n=O,i=O+

and their perturbed values as

(B25)DA=DA0TT0-νinνin0,(B26)νinνin0=0.37TT0+ρρ0,(B27)νniνni0=0.37TT0+nini0.

B3 Decoupled system of equations

From Eqs. (B20)–(B24) we deduce that the hydrodynamic equations should be solved together with the ion continuity and momentum equations by introducing two additional state variables, namely ni/ni0 and uD. The resulting system then consists of eight equations, obtained by augmenting the hydrodynamic system with the ion continuity and momentum equations. This fully coupled approach was used by Shibata (1983).

In our analysis we instead employ a simplified, approximate model that decouples the hydrodynamic and ion equations. We have two options.

  1. Klostermeyer Approximation. Klostermeyer (1972) solved the ion-continuity equation by neglecting the ambipolar diffusion velocity and neutral winds, i.e.,

    tnini0=-cosIux+sinIuz+1ni0dni0dzsinIucosI-cosIwx+sinIwz(B28)+1ni0dni0dzsinIwsinI,

    and then computed the ion-drag force and ion-drag heating by including the background neutral wind, i.e.,

    1ρfIDx=νni0sin2Iu-sinIcosIw(B29)+u0sin2Iνniνni0,1ρfIDz=νni0-sinIcosIu+cos2Iw(B30)-u0cosIsinIνniνni0,

    and

    1ρqID=νni02sin2Iu0u-cosIsinIu0w(B31)+u02sin2Iνniνni0.

    Klostermeyer's method is best viewed as a semi–diagnostic approximation: one solves a simplified ion continuity equation driven only by the wave-induced divergence, and then evaluates ion-drag force and heating, including u0 and νni, but assuming no diffusion velocity. In other words, field-aligned diffusion and background neutral wind are neglected in the ion continuity equation when computing ni, and the ion drag is treated as a diagnostic based on the neutral wave field and background wind.

  2. Fast Field-Aligned Diffusion. In the second method, we assume that field-aligned diffusion is sufficiently strong that the relative ion perturbation and the perturbed diffusion velocity are nearly constant along the magnetic field line (but can vary across it):

    (B32) b n i n i 0 = - cos I x + sin I z × n i n i 0 0

    and

    (B33) u D b = cos I u D x + sin I u D z 0 .

    We then obtain

    tnini0=(uD01ni0dni0dz-cosIdu0dz-cosIu01ni0dni0dz+duD0dz)sinInini0+1ni0dni0dzsinIuD-cosIux+sinIuz+1ni0dni0dzsinIucosI-cosIwx+sinIwz(B34)+1ni0dni0dzsinIwsinI

    and

    uD=DA0cosIxTT0+sinIzTT0+1ni0dni0dz+1T0dT0dzsinIDA(B35)-gsinIνin0νinνin0.

    The ion-drag force and ion-drag heating are still computed from Eqs. (B22)–(B24).

B4 Plane wave solutions

Let

(B36) n i ( x , z , t ) = n i ( z ) e j ( ω t - k x x ) , n i ( z ) = n i 0 ( z ) n ^ i ( z ) ,

and (cf. Eq. A32 of Appendix A)

f(x,z,t)=f(z)ej(ωt-kxx).

As in Appendix A, we introduce the dimensionless state variables u^, w^, and T^, defined by

u=ω0kxu^,w=ω0kxw^,TT0=T^,

together with their derivatives

dudz=ω0kxU^,dwdz=ω0kxW^,ddzTT0=dT^dz=T^
  1. Representation of  uD. From Eq. (B35) we obtain

    uD=-jkxDA0cosIT^+DA0sinIT^+1ni0dni0dz+1T0dT0dzsinIDA(B37)-gsinIνin0νinνin0.

    Using

    (B38)DADA0=TT0-νinνin0,(B39)νinνin0=0.37TT0+ρρ0,

    together with (cf. Eq. A34 of Appendix A)

    ρρ0=kxΩu-jΩHρw+jΩdwdz

    we express uD as

    (B40) u D = U u u ^ + U w w ^ + U T T ^ + U W W ^ + U T T ^ ,

    where the U coefficients are given by

    (B41)Uu=-ω0Ω(DA0E+G),(B42)Uw=jω0Ω1kxHρ(DA0E+G),(B43)UT=-jkxDA0cosI+0.63DA0E-0.37G,(B44)UW=-jω0Ω1kx(DA0E+G),(B45)UT=DA0sinI,

    with

    (B46) E = sin I 1 n i 0 d n i 0 d z + 1 T 0 d T 0 d z , G = g sin I ν i n 0 .
  2. Representation of n^i. From Eq. (B34) we obtain

    (jω-uD01ni0dni0dzsinI+du0dzcosIsinI+u01ni0dni0dzcosIsinI-duD0dzsinI)n^i=1ni0dni0dzsinIuD+jkxcosI-1ni0dni0dzsinIcosIω0kxu^+jkxcosI-1ni0dni0dzsinIsinIω0kxw^(B47)-cosIsinIω0kxU^-sin2Iω0kxW^.

    After some manipulations, the expression for n^i reads

    (B48) n ^ i = N u u ^ + N w w ^ + N T T ^ + N U U ^ + N W W ^ + N T T ^ ,

    where the N coefficients are given by

    Nu=1N0jkxcosI-1ni0dni0dzsinIcosIω0kx(B49)+1ni0dni0dzsinIUu,Nw=1N0jkxcosI-1ni0dni0dzsinIsinIω0kx(B50)+1ni0dni0dzsinIUw,(B51)NT=1N01ni0dni0dzsinIUT,(B52)NU=-1N0cosIsinIω0kx,(B53)NW=-1N0sin2Iω0kx-1ni0dni0dzsinIUW,(B54)NT=1N01ni0dni0dzsinIUT,

    and

    N0=jω-uD01ni0dni0dzsinI+du0dzcosIsinI(B55)+u01ni0dni0dzcosIsinI-duD0dzsinI.
  3. Ion-drag force and ion-drag heating. Using Eqs. (B40) and (B48), together with

    (B56) ν n i ν n i 0 = 0.37 T T 0 + n i n i 0 = 0.37 T ^ + n ^ i ,

    we obtain

    1νni01ρfIDx=Fxuu^+Fxww^+FxTT^(B57)+FxUU^+FxWW^+FxTT^,1νni01ρfIDz=Fzuu^+Fzww^+FzTT^+FzUU^(B58)+FzWW^+FzTT^,1νni01ρqID=Puu^+Pww^+PTT^+PUU^(B59)+PWW^+PTT^.

    With

    (B60) A x = u D 0 cos I + u 0 sin 2 I , A z = u D 0 sin I - u 0 cos I sin I , B = u D 0 2 + u 0 2 sin 2 I ,

    the coefficients corresponding to fIDx are

    (B61)Fxu=sin2Iω0kx+AxNu+cosIUu,(B62)Fxw=-sinIcosIω0kx+AxNw+cosIUw,(B63)FxT=0.37Ax+AxNT+cosIUT,(B64)FxU=AxNU,(B65)FxW=AxNW+cosIUW,(B66)FxT=AxNT+cosIUT,

    the coefficients corresponding to fIDz are

    (B67)Fzu=-sinIcosIω0kx+AzNu+sinIUu,(B68)Fzw=cos2Iω0kx+AzNw+sinIUw,(B69)FzT=0.37Az+AzNT+sinIUT,(B70)FzU=AzNU,(B71)FzW=AzNW+sinIUW,(B72)FzT=AzNT+sinIUT,

    and the coefficients corresponding to qID are

    (B73)Pu=2sin2Iω0kxu0+BNu+2uD0Uu,(B74)Pw=-2cosIsinIω0kxu0+BNw+2uD0Uw,(B75)PT=0.37B+BNT+2uD0UT,(B76)PU=BNU,(B77)PW=BNW+2uD0UW,(B78)PT=BNT+2uD0UT.

Note that, in the algorithm implementation, the derivatives dni0/dz and duD0/dz are computed using central finite differences.

Appendix C: Global matrix method with matrix exponential for the grid-point values of the state vector

In this appendix, the global matrix method with matrix exponential will be formulated for the grid-point values of the state vector.

In the layer l, with boundaries zl and zl+1, the discrete values el+1=e(zl+1) and el=e(zl) are related through the relation (cf. Eq. 14)

(C1) e l + 1 = V l diag [ e k x λ n l Δ l ] V l - 1 e l ,

or equivalently,

(C2) V l - 1 e l + 1 = diag [ e k x λ n l Δ l ] V l - 1 e l .

Taking into account that by Eqs. (13) and (14), we have el=Vlal and el+1=Vl+1al+1,we see that Eqs. (35) and (C2) are completely equivalent. Multiplying Eq. (C2) with the scaling matrix Kl,1, we obtain the layer equation

(C3) A l 1 e l + 1 - A l 0 e l = 0 2 M , l = 1 , , L - 1 ,

where

(C4)Al1=Kl,1Vl-1,(C5)Al0=Kl,0Vl-1,

and Kl1 and Kl0, are given by Eqs. (36) and (37), respectively. Essentially, we have L−1 equations imposed on layers 1,,L-1 for the L unknowns e1,,eL. On the layer l=1, the boundary condition (cf. Eq. 42) a1+=i1, translates into (cf. Eq. 24)

(C6) [ I M , 0 M ] V 1 - 1 e 1 = i 1 ,

while on the layer l=L, the boundary condition (cf. Eq. 45) aL-=0M translates into (cf. Eq. 25)

(C7) [ 0 M , I M ] V L - 1 e L = 0 M .

As in Sect. 3, the layer equations (C3) together with the boundary conditions (C6) and (C7) for a unit scale factor, are assembled into a system of equations for the stratified atmosphere, i.e.,

(C8) A e = b ,

where

A=(C9)[0M,IM]VL-1000AL-11-AL-100000A11-A10000[IM,0M]V1-1,(C10)e=eLeL-1e2e1 and b=0M02M02Mi1.

When applying the lower boundary condition (55), i1 in Eq. (C10) should be replaced by B−1b1, where, for a unit scale factor, b1=[1,0,0]T. After solving Eq. (C8), we compute the wave amplitudes by using Eq. (61).

Comments.

  1. The ascending and descending wave solutions can be derived by using the upward and downward recurrence relations (cf. Eqs. 2831, 41 and 44)

    el+1+=Tl+el, for l=1,,L-1,(C11) with e1+=v1+, andel-=Tl-el+1, for l=L-1,,1,(C12) with eL-=02M,

    respectively, where

    (C13)Tl+=Vldiag[ekxλml+Δl]0M0M0MVl-1,(C14)Tl-=Vl0M0M0Mdiag[e-kxλml-Δl]Vl-1.

    Obviously, the relation el=el++el- , l=1,,L, can be used to verify the numerical algorithm.

  2. If we assume that the ascending-wave contributions are dominant, i.e., elel+ for l=1,,L, we may compute the state vector by means of the upward recurrence relation (cf. Eq. C11)

    (C15) e l + 1 = T l + e l , for l=1,,L-1, with  e 1 = v 1 + .
Appendix D: Implementation issues

In this appendix, we discuss several implementation issues related to the choice of frequency and time discretization for the Fourier transform and the determination of the imaginary frequency shift.

D1 Frequency and time discretization for the Fourier transform

The Fourier transform is evaluated by direct numerical discretization of the Fourier integral rather than by a Fast Fourier Transform (FFT). The frequency interval is centered on the reference frequency ω0, while the time interval is chosen sufficiently large to contain the temporal support of the source function.

The Fourier integral is discretized over a frequency band centered on the reference frequency ω0. The frequency standard deviation is defined as σω=ω0/κω, where κω≥6 is an input parameter. The frequency band is chosen to cover approximately ±3σω, i.e., ωmin=ω0-3σω and ωmax=ω0+3σω, and is discretized using NFT points. The corresponding time standard deviation is σt=1/σω. The time interval is chosen to contain Np periods of the reference wave, and is discretized using the same number NFT of points. The time grid is defined on the interval [tmin,tmin+Lt], where Lt=Npλt and λt=2π/ω0. In the simulations we use NFT=256, κω=20, Np=30, and tmin=0. These discretization parameters were used in all simulations presented in this paper and were verified to provide accurate Fourier-transform reconstructions of the source function while avoiding significant aliasing and truncation errors.

D2 Imaginary frequency shift

The imaginary frequency shift is determined using a heuristic approach that combines two criteria: application of the Layerwise Causality (LC) condition at selected altitude levels, and a Source-Function Reconstruction (SFR) test.

  1. LC condition at selected altitude levels. Choose a subset L0{1,2,,L} of altitude indices, and let NL0 be the number of elements of the set L0, i.e., NL0=|L0|. Choose lower and upper bounds, δstart and δstop, respectively, for the imaginary frequency shift δ. At each altitude level l0L0, start with δl0=δstart and increases δl0 in steps of Δδ, i.e., δl0min(δl0+Δδ,δstop), until the LC condition (cf. Eq. 108)

    (D1) d l 0 ( ω k ) = Re [ λ 1 l 0 - ( ω k - j δ l 0 ) ] - Re [ λ 1 l 0 + ( ω k - j δ l 0 ) ] > ϵ LC

    is satisfied for all ωk=ωmin+(k-1)Δω, k=1,2,,NFT, and some prescribed tolerance ϵLC. If there exists an altitude level for which it is not possible to satisfy the LC condition for all frequencies ωk by increasing the imaginary frequency shift within the interval from the start value δstart to the stop value δstop, then the subset-based LC criterion is said to fail. Otherwise, the LC frequency shift is computed as

    (D2) δ LC = max l 0 L 0 δ l 0 .
  2. SFR. A frequency shift δ is considered valid if the relative RMS error between the source function s(t) and the inverse Fourier transform applied to S(ω−jδ) is below a prescribed tolerance ϵSFR=5×10-3. In practice, we compare the normalized functions

    s^(t)=s(t)maxtRe{s(t)},s^δ(t)=sδ(t)maxtRe{sδ(t)},

    where (compare with Eq. 115)

    (D3) s δ ( t ) = A e δ ( t - t 0 ) 1 2 π - S ( ω - j δ ) e j ω ( t - t 0 ) d ω ,

    and s(t) and 𝒮(ω) are given by Eqs. (84) and (92), respectively. The relative RMS error is computed as

    (D4) ε s δ = k = 1 N FT [ s ^ ( t k ) - s ^ δ ( t k ) ] 2 k = 1 N FT s ^ ( t k ) 2

    with tk=tmin+(k-1)Δt, k=1,2,,NFT. In the algorithm,

    • a.

      if εsδ>ϵSFR, the frequency shift is relaxed according to δmax(δ-Δδ,δstop), and

    • b.

      if εsδ>ϵSFR also holds for δ=δstop, the SFR test fails.

Starting from prescribed bounds δmin and δmax, the SFR check is first used to identify a numerically reliable interval of frequency shifts. The LC condition at selected altitude levels is then applied within this interval, yielding a refined interval of admissible frequency shifts. To select a representative value, Nδ equidistant frequency shifts are sampled from the admissible interval. For each value, the LC condition is verified over the full altitude range. Whenever this condition is satisfied, the corresponding wave parameters and maximum perturbation amplitudes are computed. The final frequency shift is chosen as the one whose maximum-amplitude vector is closest to the center of mass in the space spanned by the maximum horizontal velocity, maximum vertical velocity, and maximum temperature perturbation.

Code and data availability

The designed model is freely available as open-source code at https://github.com/AlexandruDoicu/Gravity-Waves (last access: 1 June 2026) and https://doi.org/10.5281/zenodo.21410453 (Doicu and Efremenko2026). The International Reference Ionosphere (IRI) code data files are available at https://ccmc.gsfc.nasa.gov/models/IRI~2016/ (last access: 1 June 2026). The SAMI2 model of the Naval Research Laboratory is avaliable at https://github.com/NRL-Plasma-Physics-Division/SAMI2 (last access: 1 June 2025).

Author contributions

AlD: writing (original draft preparation), and conceptualization. DSE: writing (original draft preparation), and validation. TT: writing (original draft preparation), and formal analysis.

Competing interests

The contact author has declared that none of the authors has any competing interests.

Disclaimer

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. The authors bear the ultimate responsibility for providing appropriate place names. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.

Acknowledgements

We are grateful to Harold Knight for his helpful and insightful comments and for his detailed explanations of the theoretical results of his work. We also thank Stephan Buchert for his pertinent comments, especially those concerning ion drag.

Financial support

The article processing charges for this open-access publication were covered by the German Aerospace Center (DLR).

Review statement

This paper was edited by Gunter Stober and reviewed by Harold Knight and Stephan C. Buchert.

References

Anderson, E., Bai, Z., Bischof, C., Blackford, L. S., Demmel, J., Dongarra, J., Du Croz, J., Greenbaum, A., Hammarling, S., McKenney, A., and Sorensen, D.: LAPACK Users’ Guide, Society for Industrial and Applied Mathematics, https://doi.org/10.1137/1.9780898719604, 1999. a, b

Buchert, S. C.: Entangled dynamos and Joule heating in the Earth's ionosphere, Ann. Geophys., 38, 1019–1030, https://doi.org/10.5194/angeo-38-1019-2020, 2020. a

Budak, V. P., Klyuykov, D. A., and Korkin, S. V.: Complete matrix solution of radiative transfer equation for PILE of horizontally homogeneous slabs, J. Quant. Spectrosc. Ra., 112, 1141–1148, https://doi.org/10.1016/j.jqsrt.2010.08.028, 2011. a, b

Budak, V. P., Efremenko, D. S., and Shagalov, O. V.: Efficiency of algorithm for solution of vector radiative transfer equation in turbid medium slab, J. Phys. Conf. Ser., 369, 012021, https://doi.org/10.1088/1742-6596/369/1/012021, 2012. a, b

Chandrasekhar, S.: Radiative Transfer, Dover Publications, Inc., New York, ISBN 9780486605906, 1960. a

Dalgarno, A. and Smith, F.: The thermal conductivity and viscosity of atomic oxygen, Planet. Space Sci., 9, 1–2, https://doi.org/10.1016/0032-0633(62)90064-8, 1962. a

Doicu, A. and Efremenko, D.: AlexandruDoicu/Gravity-Waves: Gravity Waves Code (Version v1.0.0), Zenodo [code], https://doi.org/10.5281/zenodo.21410453, 2026. a, b, c

Doicu, A. and Trautmann, T.: Discrete-ordinate method with matrix exponential for a pseudo-spherical atmosphere: Scalar case, J. Quant. Spectrosc. Ra., 110, 146–158, https://doi.org/10.1016/j.jqsrt.2008.09.014, 2009a. a, b

Doicu, A. and Trautmann, T.: Discrete-ordinate method with matrix exponential for a pseudo-spherical atmosphere: Vector case, J. Quant. Spectrosc. Ra., 110, 159–172, https://doi.org/10.1016/j.jqsrt.2008.09.013, 2009b. a, b

Drob, D. P., Emmert, J. T., Meriwether, J. W., Makela, J. J., Doornbos, E., Conde, M., Hernandez, G., Noto, J., Zawdie, K. A., McDonald, S. E., Huba, J. D., and Klenzing, J. H.: An update to the Horizontal Wind Model (HWM): The quiet time thermosphere, Earth Space Sci., 2, 301–319, https://doi.org/10.1002/2014ea000089, 2015. a

Dungey, J. W.: Interplanetary Magnetic Field and the Auroral Zones, Phys. Rev. Lett., 6, 47–48, https://doi.org/10.1103/physrevlett.6.47, 1961. a

Efremenko, D. S., Molina García, V., Gimeno García, S., and Doicu, A.: A review of the matrix-exponential formalism in radiative transfer, J. Quant. Spectrosc. Ra., 196, 17–45, https://doi.org/10.1016/j.jqsrt.2017.02.015, 2017. a

Emmert, J. T., Drob, D. P., Picone, J. M., Siskind, D. E., Jones, M., Mlynczak, M. G., Bernath, P. F., Chu, X., Doornbos, E., Funke, B., Goncharenko, L. P., Hervig, M. E., Schwartz, M. J., Sheese, P. E., Vargas, F., Williams, B. P., and Yuan, T.: NRLMSIS 2.0: A Whole‐Atmosphere Empirical Model of Temperature and Neutral Species Densities, Earth Space Sci., 8, https://doi.org/10.1029/2020ea001321, 2021. a

Francis, S. H.: Acoustic-gravity modes and large-scale traveling ionospheric disturbances of a realistic, dissipative atmosphere, J. Geophys. Res., 78, 2278–2301, https://doi.org/10.1029/ja078i013p02278, 1973. a, b, c, d, e

Fritts, D. C., Laughman, B., Lund, T. S., and Snively, J. B.: Self‐acceleration and instability of gravity wave packets: 1. Effects of temporal localization, J. Geophys. Res.-Atmos., 120, 8783–8803, https://doi.org/10.1002/2015jd023363, 2015. a

Fuller-Rowell, T. and Rees, D.: Interpretation of an anticipated long-lived vortex in the lower thermosphere following simulation of an isolated substorm, Planet. Space Sci., 32, 69–85, https://doi.org/10.1016/0032-0633(84)90043-6, 1984. a

Heale, C. J., Snively, J. B., Hickey, M. P., and Ali, C. J.: Thermospheric dissipation of upward propagating gravity wave packets, J. Geophys. Res.-Space, 119, 3857–3872, https://doi.org/10.1002/2013ja019387, 2014. a

Hedin, A. E.: MSIS‐86 Thermospheric Model, J. Geophys. Res.-Space, 92, 4649–4662, https://doi.org/10.1029/ja092ia05p04649, 1987. a

Hedin, A. E., Biondi, M. A., Burnside, R. G., Hernandez, G., Johnson, R. M., Killeen, T. L., Mazaudier, C., Meriwether, J. W., Salah, J. E., Sica, R. J., Smith, R. W., Spencer, N. W., Wickwar, V. B., and Virdi, T. S.: Revised global model of thermosphere winds using satellite and ground‐based observations, J. Geophys. Res.-Space, 96, 7657–7688, https://doi.org/10.1029/91ja00251, 1991. a

Hickey, M. P., Taylor, M. J., Gardner, C. S., and Gibbons, C. R.: Full‐wave modeling of small‐scale gravity waves using Airborne Lidar and Observations of the Hawaiian Airglow (ALOHA‐93) O(1S) images and coincident Na wind/temperature lidar measurements, J. Geophys. Res.-Atmos., 103, 6439–6453, https://doi.org/10.1029/97jd03373, 1998. a

Hickey, M. P., Schubert, G., and Walterscheid, R. L.: Propagation of tsunami‐driven gravity waves into the thermosphere and ionosphere, J. Geophys. Res.-Space, 114, https://doi.org/10.1029/2009ja014105, 2009. a

Hines, C. O.: Internal atmospheric gravity waves at ionosphric heights, Can. J. Phys., 38, 1441–1481, https://doi.org/10.1139/p60-150, 1960. a

Hines, C. O.: A critique of multilayer analyses in application to the propagation of acoustic-gravity waves, J. Geophys. Res., 78, 265–273, https://doi.org/10.1029/ja078i001p00265, 1973. a, b

Huba, J. D.: On the Development of the SAMI2 Ionosphere Model, Perspect. Earth Space Sci., 4, https://doi.org/10.1029/2022cn000195, 2023. a

Huba, J. D., Joyce, G., and Fedder, J. A.: Sami2 is Another Model of the Ionosphere (SAMI2): A new low‐latitude ionosphere model, J. Geophys. Res.-Space, 105, 23035–23053, https://doi.org/10.1029/2000ja000035, 2000. a, b, c, d

Huba, J. D., Joyce, G., and Krall, J.: Three‐dimensional equatorial spread F modeling, Geophys. Res. Lett., 35, https://doi.org/10.1029/2008gl033509, 2008. a

Inoue, Y. and Horowitz, S.: Numerical Solution of Full‐Wave Equation With Mode Coupling, Radio Sci., 1, 957–970, https://doi.org/10.1002/rds196618957, 1966. a

Kattawar, G. W., Plass, G. N., and Catchings, F. E.: Matrix Operator Theory of Radiative Transfer 2: Scattering from Maritime Haze, Appl. Optics, 12, 1071, https://doi.org/10.1364/ao.12.001071, 1973. a

Klostermeyer, J.: Numerical calculation of gravity wave propagation in a realistic thermosphere, J. Atmos. Sol.-Terr. Phys., 34, 765–774, https://doi.org/10.1016/0021-9169(72)90109-2, 1972. a, b, c, d, e, f, g, h

Klostermeyer, J.: Computation of acoustic‐gravity waves, Kelvin‐Helmholtz instabilities,and wave‐induced eddy transport in realistic atmospheric models, J. Geophys. Res.-Oceans, 85, 2829–2839, https://doi.org/10.1029/jc085ic05p02829, 1980. a, b, c

Knight, H., Broutman, D., Eckermann, S., and Doyle, J.: A single-mode approximation for gravity waves in the thermosphere, J. Atmos. Sol.-Terr. Phys., 224, 105749, https://doi.org/10.1016/j.jastp.2021.105749, 2021. a, b, c, d, e, f, g, h, i

Knight, H., Broutman, D., and Eckermann, S.: Full-wave anelastic and compressible Fourier methods for gravity waves in the thermosphere, Wave Mot., 110, 102894, https://doi.org/10.1016/j.wavemoti.2022.102894, 2022. a, b, c, d, e, f, g, h, i, j, k, l, m

Knight, H., Broutman, D., and Eckermann, S.: Compressible and anelastic governing-equation solution methods for thermospheric gravity waves with realistic background parameters, Theor. Comput. Fluid Dyn., 38, 479–509, https://doi.org/10.1007/s00162-024-00709-x, 2024. a, b, c, d, e, f, g, h, i, j, k

Knight, H. K., Broutman, D., and Eckermann, S. D.: A causality-preserving Fourier method for gravity waves in a viscous, thermally diffusive, and vertically varying atmosphere, Wave Mot., 88, 226–256, https://doi.org/10.1016/j.wavemoti.2019.06.001, 2019. a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p

Knight, H. K., Richards, P. G., Martinis, C. R., and Goncharenko, L. P.: Modeling MSTIDs Produced by Gravity Waves With Parameters Obtained From All‐Sky Imager Observations and Comparisons to Incoherent Scatter Radar Observations, J. Geophys. Res.-Space., 130, https://doi.org/10.1029/2025ja033906, 2025. a, b, c

Laundal, K. M., Skeidsvoll, A. S., Popescu Braileanu, B., Hatch, S. M., Olsen, N., and Vanhamäki, H.: Global inductive magnetosphere-ionosphere- thermosphere coupling, Ann. Geophys., 43, 803–833, https://doi.org/10.5194/angeo-43-803-2025, 2025. a

Lindzen, R. S. and Kuo, H.-L.: A Reliable Method for the Numerical Integration of a Large Class of Ordinary and Partial Differential Equations, Month. Weather Rev., 97, 732–734, https://doi.org/10.1175/1520-0493(1969)097<0732:armftn>2.3.co;2, 1969. a

Liu, X., Xu, J., Yue, J., and Vadas, S. L.: Numerical modeling study of the momentum deposition of small amplitude gravity waves in the thermosphere, Ann. Geophys., 31, 1–14, https://doi.org/10.5194/angeo-31-1-2013, 2013. a

Maeda, S.: Numerical solutions of the coupled equations for acoustic-gravity waves in the upper thermosphere, J. Atmos. Sol.-Terr. Phys., 47, 965–972, https://doi.org/10.1016/0021-9169(85)90074-1, 1985. a, b

Midgley, J. E. and Liemohn, H. B.: Gravity waves in a realistic atmosphere, J. Geophys. Res., 71, 3729–3748, https://doi.org/10.1029/jz071i015p03729, 1966. a, b, c, d, e, f

Nakajima, T. and Tanaka, M.: Matrix formulations for the transfer of solar radiation in a plane-parallel scattering atmosphere, J. Quant. Spectrosc. Ra., 35, 13–21, https://doi.org/10.1016/0022-4073(86)90088-9, 1986. a

Pérez-Álvarez, R. and García-Moliner, F.: Transfer Matrix, Green Function, And Related Techniques: Tools For The Study Of Multilayer Heterostructures, Universitat Jaume I, Castelló de la Plana, Spain, ISBN 978-84-8021-472-8, 2004. a

Pfeffer, R. L. and Zarichny, J.: Acoustic-Gravity Wave Propagation from Nuclear Explosions in the Earth’s Atmosphere, J. Atmos. Sci., 19, 256–263, https://doi.org/10.1175/1520-0469(1962)019<0256:agwpfn>2.0.co;2, 1962. a

Plass, G. N., Kattawar, G. W., and Catchings, F. E.: Matrix Operator Theory of Radiative Transfer 1: Rayleigh Scattering, Appl. Optics, 12, 314, https://doi.org/10.1364/ao.12.000314, 1973.  a

Pütz, C., Schlutow, M., and Klein, R.: Initiation of ray tracing models: evolution of small-amplitude gravity wave packets in non-uniform background, Theor. Comput. Fluid Dyn., 33, 509–535, https://doi.org/10.1007/s00162-019-00504-z, 2019. a

N Reinsch, C. H.: Smoothing by spline functions, Numer. Math., 10, 177–183, https://doi.org/10.1007/bf02162161, 1967. a

Richards, P. G. and Peterson, W. K.: Measured and modeled backscatter of ionospheric photoelectron fluxes, J. Geophys. Res.-Space, 113, https://doi.org/10.1029/2008ja013092, 2008. a

Richmond, A. D. and Matsushita, S.: Thermospheric response to a magnetic substorm, J. Geophys. Res., 80, 2839–2850, https://doi.org/10.1029/ja080i019p02839, 1975. a

Schunk, R. and Nagy, A.: Ionospheres: Physics, Plasma Physics, and Chemistry, Cambridge University Press, https://doi.org/10.1017/cbo9780511635342, 2009. a

Shibata, T.: A numerical calculation of the ionospheric response to atmospheric gravity waves in the F-region, J. Atmos. Sol.-Terr. Phys., 45, 797–809, https://doi.org/10.1016/s0021-9169(22)00009-5, 1983. a, b

Stamnes, K.: The theory of multiple scattering of radiation in plane parallel atmospheres, Rev. Geophys., 24, 299–310, https://doi.org/10.1029/rg024i002p00299, 1986. a

Stamnes, K. and Swanson, R.: A New Look at the Discrete Ordinate Method for Radiative Transfer Calculations in Anisotropically Scattering Atmospheres, J. Atmos. Sci., 38, 387–389, https://doi.org/10.1175/1520-0469(1981)038<0387:ANLATD>2.0.CO, 1981. a

Stubbe, P.: Frictional forces and collision frequencies between moving ion and neutral gases, J. Atmos. Sol.-Terr. Phys., 30, 1965–1985, https://doi.org/10.1016/0021-9169(68)90004-4, 1968. a

Vadas, S. L. and Nicolls, M. J.: The phases and amplitudes of gravity waves propagating and dissipating in the thermosphere: Theory, J. Geophys. Res.-Space, 117, https://doi.org/10.1029/2011ja017426, 2012. a, b, c, d, e

van de Hulst, H.: A new look at multiple scattering. Tech. Rep., Goddard Institute for Space Studies, NASA TM-I03044, 81 pp., 1963. a

Volland, H.: Full wave calculations of gravity wave propagation through the thermosphere, J. Geophys. Res., 74, 1786–1795, https://doi.org/10.1029/ja074i007p01786, 1969a. a, b, c, d, e

Volland, H.: The upper atmosphere as a multiply refractive medium for neutral air motions, J. Atmos. Sol.-Terr. Phys., 31, 491–514, https://doi.org/10.1016/0021-9169(69)90002-6, 1969b. a, b, c, d, e, f, g, h

Wahba, G.: Spline Models for Observational Data, Society for Industrial and Applied Mathematics, https://doi.org/10.1137/1.9781611970128, 1990. a

Weimer, D. R.: Improved ionospheric electrodynamic models and application to calculating Joule heating rates, J. Geophys. Res.-Space, 110, https://doi.org/10.1029/2004ja010884, 2005. a, b

Wick, G. C.: Über ebene Diffusionsprobleme, Z. Phys., 121, 702–718, https://doi.org/10.1007/bf01339167, 1943. a

Yeh, K. C. and Liu, C. H.: Acoustic‐gravity waves in the upper atmosphere, Rev. Geophys., 12, 193–216, https://doi.org/10.1029/rg012i002p00193, 1974. a, b, c

Download
Short summary
We created a new computer model to study gravity waves, which are ripples in the atmosphere that affect weather and climate. Our research aimed to improve how these waves are simulated, as they play a key role in understanding atmospheric behavior. We developed a stable and efficient model that can model gravity waves in the atmosphere. Our method is fast and accurate, offering better tools for scientists to predict atmospheric changes.
Share