1 INTRODUCTION

The transition from the climate models to the models of the Earth system in the past decade in the world’s scientific community includes the new regions of the near-Earth space with the upper layers of the atmosphere (up to altitudes of approximately 500 km, where the hydrodynamic equations can still be considered valid) and the models of the ionosphere in the modern climate models and models of general atmospheric circulation. In this research area, development of such a model of the Earth system including the thermosphere and ionosphere is a complicated interdisciplinary problem. The appearance of such models is an important step not only for modeling the climate but also for several independent problems, because the problem of describing and predicting the ionosphere is of importance not only in terms of its interaction with the neutral atmosphere and possible effect on the climate characteristics of the atmosphere but also from the aspect of the significance of this medium for applications.

The exact information on the state of the thermosphere–ionosphere system is required for solving several problems of the space industry, intercontinental and satellite radio communication, as well as radiolocation, since it partially determines the characteristics of low-orbit satellite motion and the conditions of the propagation of the radio signals necessary for the systems of long-range radio communication and radiolocation, as well as for the navigation systems of the global satellite positioning (GPS and Russian GLONASS). Therefore, investigating and predicting the ionosphere is practically most important for developing precise navigation technologies, increasing the reliability and validity of the operation of communication systems, and other applications.

The problem of describing the Earth’s ionosphere and thermosphere is traditionally solved based on the processing of the available experimental aeronomic, dynamic, radiophysical, and other types of data with the construction of empirical models. The empirical models of the upper atmosphere are the climatology of the global state under certain conditions and do not take into account the variability of the medium caused both by external and internal factors (such as nonlinear wave processes in the thermosphere and ionosphere). At the same time, these models are frequently used to solve important applied problems. Models IRI, SIMP, etc., of the ionosphere [1, 2] are examples of such reference models. Nowadays, there are fewer state-of-the-art numerical models of the upper atmosphere than there are models for predicting the weather and climate for the lower layers of the atmosphere.

The most developed models of the ionosphere that are also applied for forecasting are developed mainly in the large centers and consortiums of various institutes. They include the following modern joint models of the thermosphere and ionosphere: the US NCAR TIEGCM and TIEM-GCM models [3], the English UCL and CTIP-CMAT models [4], and the Russian UAM [5] and GCM-TIP models [6]. The recently developed models of the entire atmosphere (for altitudes from 0 to 500 km and beyond), created to solve the problems of accounting for the interaction between the lower and upper layers, are the analogous more complex models: different versions of the WACCM [7] models (including TIEGCM [3]), IDEA, and WAM (including CTIP) [8]. The development of such complex models including different layers of the atmosphere even in the world’s leading research centers is at the initial stages.

It is well known that the problems of describing the formation processes of the lower ionosphere layers (layers D and E at altitudes from 60 to 130 km) and of the upper ionosphere layers (F layer at altitudes from 130 to 600 km) are significantly different: in the lower layers of the ionosphere, the ions’ inherent dynamics may be ignored at a low ion concentration (the ions are transferred by a neutral wind where the key processes are the ionization and chemical interactions); however, the processes associated with the ionization of a neutral atmosphere in these regions are complicated. In the upper layers of the ionosphere the situation is different: the ion concentration is relatively high; thus, the dynamic properties of plasma and its interaction with the magnetic and electric fields become crucial, and considering the processes of the dynamic interaction of ions with the neutral atmosphere is critical for the correct formulation of the problem. At the same time, the description of ionization processes of a neutral atmosphere is much easier than in the lower layers. Since the dynamic properties of plasma, the transfer of ions and electrons, and the role of electromagnetic forces in the upper layers of the ionosphere are important, the description of the Earth’s magnetic field is also important.

The current work is aimed at describing the dynamic model of the F layer of the ionosphere developed at the Marchuk Institute of Numerical Mathematics of the Russian Academy of Sciences (INM RAS). The main content of the work includes the formulation of the model’s full system of equations and a description of the solution method. This work is carried out as part of the solution of the general problem of creating the global dynamic coupled thermosphere–ionosphere INM RAS model (for altitudes ranging from 90 to 500 km) based on the presented model of the ionosphere included as a compatible computational unit in the model of the general circulation of the thermosphere developed earlier [9]. The goal of the research on the upper atmosphere at the INM RAS is to create a model of the Earth system with the consistent description of all key atmospheric layers (for the altitudes ranging from 0 to 500 km). We propose that this model is based on matching (i) the already developed joint models of the lower atmosphere and ionosphere (up to altitudes ranging from 90 to 130 km) [10] and (ii) the currently developed Earth’s thermosphere–ionosphere model (the altitude ranging from 100 to 500 km).

One of the key problems where this model is applied is the prediction of the global state of the Earth’s ionosphere. To solve this problem, we propose to create the digestion system for the observation data which is specialized for the Earth’s ionosphere and based on this model and the methodology developed at the INM RAS [11]. Since the proposed methodology is created after taking the splitting method into account, this method is taken as the main one in developing the ionosphere model presented in this work.

We briefly outline the content of this work. In the next section we present the problem setting of simulation the F layer of the ionosphere and formulate and derive the main equations of the model. In Section 3 we describe the method of solving the equations of ambipolar diffusion as the main part of the formulated equations. In Section 4 of the paper, we provide the results of validating the accuracy of the developed methods of model realization based on the modeling of the given test analytical solution. We separately consider the role of the boundary layer in the structure generation and of the key characteristics of the solution. In the conclusions we formulate and discuss the main results of the work.

2 MODEL OF THE IONOSPHERE’S F LAYER

2.1 Problem Formulation

The main equation of the model is the continuity equation for the concentration of free charges:

$$\frac{{\partial {{n}_{i}}}}{{\partial t}} + \nabla ({{n}_{i}}{{{\mathbf{u}}}_{i}}) = \frac{{\delta {{n}_{i}}}}{{\delta t}} = {{R}_{i}}.$$
(1)

In this equation, \({{n}_{i}}\) is the ion concentration equal to the concentration of electrons \({{n}_{e}}\) due to the quasi-neutral approximation of the ionospheric plasma, and \({{{\mathbf{u}}}_{i}}\) is the velocity vector of the ion transfer. In the right-hand side we take into account the incidental terms, the chemical sources (mainly, the ionization by the solar radiation), and the sinks.

The model of ionosphere presented in the work is based on the following assumptions:

(1) We consider just the F layer of the Earth’s ionosphere as the zone of the maximum electron and ion content in the atmosphere and as the key domain of practical interest (because it determines the maximum critical frequency of radio-signal reflection by the electron concentration at the pike of the F layer and because it has the most significant fraction of the total integrated electron content (TEC), an important characteristic for navigation systems).

(2) We use the single-ion formulation of the model because of the photochemical dominance of the ionization of atomic oxygen O and the recombination of its ion O+ with the main components of the thermosphere at these altitudes.

(3) We assume the local quasi-neutrality of the plasma (\({{n}_{i}} = {{n}_{e}}\)) and joint motion of electrons and ions.

(4) We assume the dominance of ambipolar diffusion along the lines of force of the Earth’s magnetic field in the dynamical processes of the ionospheric plasma.

(5) We assume the dominance of the electromagnetic transverse drift in the direction perpendicular to the force lines and approximate the Earth’s magnetic field by the dipole approximation described above.

Under these assumptions the total balance of forces acting upon the ionospheric plasma in a diffusion approximation may be represented by

$$\nabla ({{p}_{i}} + {{p}_{e}}) - e{{n}_{i}}\left( {{\mathbf{E}} + \left[ {{{{\mathbf{u}}}_{i}} \times {\mathbf{B}}} \right]} \right) - {{n}_{i}}{\mathbf{g}} = {{n}_{i}}{{m}_{i}}{{\nu }_{{in}}}({\mathbf{u}} - {{{\mathbf{u}}}_{i}}).$$
(2)

Here, \({{p}_{e}} = {{n}_{e}}k{{T}_{e}}\) and \({{p}_{i}} = {{n}_{i}}k{{T}_{i}}\) are the partial pressures of the electron and ion gases, respectively, obtained from the equation of state for the ideal gas approximations, \({{T}_{e}}\) and \({{T}_{i}}\) are the corresponding temperatures for each plasma component, \({{\nu }_{{in}}}\) is the frequency of ion-neutral coincidences, \({\mathbf{u}}\) is the velocity of motion of neutrals, \({\mathbf{E}}\) are the external electric fields, \({\mathbf{B}}\) is the Earth’s magnetic field, \(e\) is the electron charge, \({{m}_{i}}\) is the ion mass, and \({\mathbf{g}}\) is the acceleration of gravity.

We mark the direction coinciding with the Earth’s magnetic field and the plane perpendicular to this direction and then project the vector equation (2) onto these geometric directions, thus obtaining the expression for the parallel \({{u}_{i}}_{\parallel }\) and perpendicular \({{u}_{i}}_{ \bot }\) components of the velocity of the motion of ions.

In the direction parallel to the Earth’s magnetic field, using the balance given above (1), we obtain the classical equation of ambipolar diffusion along the magnetic lines

$$\begin{gathered} {{\nabla }_{\parallel }}({{p}_{i}} + {{p}_{e}}) - {{n}_{i}}{{m}_{i}}{{g}_{\parallel }} = {{n}_{i}}{{m}_{i}}{{\nu }_{{in}}}{{(u - {{u}_{i}})}_{\parallel }} \\ \Rightarrow {{u}_{i}}_{\parallel } = {{u}_{\parallel }} - \frac{1}{{{{m}_{i}}{{\nu }_{{in}}}}}\left( {\frac{1}{{{{n}_{i}}}}{{\nabla }_{\parallel }}({{p}_{i}} + {{p}_{e}}) - {{m}_{i}}{{g}_{\parallel }}} \right) \\ \Rightarrow {{u}_{i}}_{\parallel } = {{u}_{\parallel }} - \frac{{k({{T}_{i}} + {{T}_{e}})}}{{{{m}_{i}}{{\nu }_{{in}}}}}\left( {\frac{1}{{{{n}_{i}}}}{{\nabla }_{\parallel }}({{n}_{i}}) + \frac{1}{{({{T}_{i}} + {{T}_{e}})}}{{\nabla }_{\parallel }}({{T}_{i}} + {{T}_{e}}) - \frac{{{{m}_{i}}}}{{k({{T}_{i}} + {{T}_{e}})}}{{g}_{\parallel }}} \right), \\ D = \frac{{k({{T}_{i}} + {{T}_{e}})}}{{{{m}_{i}}{{\nu }_{{in}}}}},\,\,\,\,H = \frac{{k({{T}_{i}} + {{T}_{e}})}}{{{{m}_{i}}g}},\,\,\,\,{{T}_{p}} = \frac{1}{2}({{T}_{i}} + {{T}_{e}}). \\ \end{gathered} $$

Here \(D\) and \(H\) are the coefficient of ambipolar diffusion and the altitude scale for the ionospheric plasma, respectively.

In the transverse direction, we may use the balance of the Lorentz force and coincidence term (which is analogous to the balance used by us in the thermosphere model for describing the ion–neutral interaction); however, the empirical estimates for the altitudes of the ionosphere’s F layer shows that the electromagnetic drift is the dominant component in the transverse direction; therefore, it is not difficult to obtain \({{u}_{i}}_{ \bot } = {{B}^{{ - 2}}}\left[ {{\mathbf{E}} \times {\mathbf{B}}} \right]\).

The continuity equation for the electron concentration in the ionosphere’s F layer obtained taking all the approximations into account is given by

$$\frac{{\partial {{n}_{i}}}}{{\partial t}} = - \operatorname{div} ({{n}_{i}}\overrightarrow {{{u}_{\parallel }}} ) - \operatorname{div} \left( {{{n}_{i}}\frac{1}{{{{B}^{2}}}}{{{\left[ {\overrightarrow {E'} \times \overrightarrow B } \right]}}_{ \bot }}} \right) + \operatorname{div} \left( {D\left( {{{\nabla }_{\parallel }}({{n}_{i}}) + {{n}_{i}}\frac{1}{{{{T}_{p}}}}{{\nabla }_{\parallel }}{{T}_{p}} - \frac{{{{n}_{i}}{{m}_{i}}}}{{2k{{T}_{p}}}}\overrightarrow {{{g}_{\parallel }}} } \right)} \right) + \left[ {P - {{k}_{i}}{{n}_{i}}} \right].$$
(3)

In the right-hand side of this equation, the term \(P\) is the ionization rate of the neutral components of the thermosphere (of the atomic oxygen О to the ion О+ in this model) by the solar radiation, \({{k}_{i}}\) is the total rate of recombination at the coincidences with the neutrals (in this case we account for the coincidences only with the key components of the thermosphere, which are the molecular oxygen and nitrogen).

To solve this system it is reasonable to use the curvilinear coordinate system associated with the directions of the Earth’s magnetic field (the so-called magnetic tubes), which is done in several existing models [46]. This method allows solving the factually one-dimensional equations in the direction parallel to the tubes and separately calculating the transverse displacement of the tubes. However, in the implementation of this approach, there arise several difficulties related to the correct calculation of the Lame coefficients, with the calculation of the key parameters external to the ionosphere (in particular, the distribution of all characteristics of the neutral thermosphere), and with the calculation of the ion and electron temperatures, which are mainly connected with the vertical direction. These difficulties induce significant restrictions on the development of joint models for the thermosphere–ionosphere system, because the models of the thermosphere are traditionally developed in the geographic coordinate system with the vertical direction along the gravity field.

Hence, in the current work, as the base coordinate system, we take the spherical coordinate system in the approximation of a thin spherical layer consistent with the formulation of the INM RAS circulation model of the thermosphere. This choice of coordinate system is made due to the problem of the inclusion of the ionosphere model in the coupled thermosphere-ionosphere model and to the goal of creating a complete model of the neutral atmosphere and ionosphere (from 0 to 500 km).

Let us derive the full continuity equation after taking into account the three-dimensional plasma transfer under the above-mentioned approximations from the general equation (2) in this coordinate system; this equation will be used in the final version of the model. Using the expressions introduced above for the vector of the Earth’s magnetic field, we obtain the following three-dimensional continuity equation for the ions in the described approximations:

$$\frac{{\partial {{n}_{i}}}}{{\partial t}} = EYZ({{n}_{i}}) + DTr({{n}_{i}}) + Tr({{n}_{i}}) + \left[ {P - {{k}_{i}}{{n}_{i}}} \right],$$
(4)

where

$$\begin{gathered} EYZ({{n}_{i}}) = \frac{1}{{{{a}^{2}}\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {D{{{\cos }}^{2}}I\frac{{\partial {{n}_{i}}}}{{\partial \varphi }}\cos \varphi } \right] + \frac{\partial }{{\partial z}}\left[ {D{{{\sin }}^{2}}I\frac{{\partial {{n}_{i}}}}{{\partial z}}} \right] \\ - \,\,\frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {D\sin I\cos I\frac{{\partial {{n}_{i}}}}{{\partial z}}\cos \varphi } \right] - \frac{1}{a}\frac{\partial }{{\partial z}}\left[ {D\sin I\cos I\frac{{\partial {{n}_{i}}}}{{\partial \varphi }}} \right], \\ \end{gathered} $$
$$\begin{gathered} DTr({{n}_{i}}) = \frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {\left( {\frac{1}{a}D{{{\cos }}^{2}}I\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial \varphi }} - D\sin I\cos I\left( {\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial z}} + \frac{1}{H}} \right)} \right){{n}_{i}}\cos \varphi } \right] \\ + \,\,\frac{\partial }{{\partial z}}\left[ {\left( { - \frac{1}{a}D\sin I\cos I\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial \varphi }} + D{{{\sin }}^{2}}I\left( {\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial z}} + \frac{1}{H}} \right)} \right){{n}_{i}}} \right], \\ \end{gathered} $$
$$\begin{gathered} Tr({{n}_{i}}) = \frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \lambda }}\left[ {\frac{1}{B}({{E}_{y}}\sin I + {{E}_{z}}\cos I){{n}_{i}}} \right] \\ - \,\,\frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {\left( {\frac{1}{B}{{E}_{x}}\sin I + {{u}_{y}}{{{\cos }}^{2}}I - {{u}_{z}}\sin I\cos I} \right){{n}_{i}}\cos \varphi } \right] \\ - \,\,\frac{\partial }{{\partial z}}\left[ {\left( {\frac{1}{B}{{E}_{x}}\cos I - {{u}_{y}}\sin I\cos I + {{u}_{z}}{{{\sin }}^{2}}I} \right){{n}_{i}}} \right]. \\ \end{gathered} $$

2.2 Features of the System of Equations of the Ionosphere’s Model

Formulation (4) of the diffusion equations for the ionosphere F layer model contains several features which should be accounted for in the numerical implementation.

(1) Since the main equation of the model is in fact the representation of the mass balance for the charged particles, the corresponding integral balance relations must be satisfied for the sought distribution.

(2) From the physical point of view, these equations contain a description of the ambipolar diffusion along the lines of force of the Earth’s magnetic field projected onto the coordinate directions; therefore, the problem has geometric peculiarities associated with the distinguished direction of motion (along the line).

(3) For the considered altitude range, the characteristic values of the diffusion coefficient, as well as the ionization rate and some parameters related with the air density in the atmosphere, vary exponentially with the altitude by 6 orders of magnitude (it is easy to obtain using the empirical estimates of [2, 9]), which should be accounted for in the design of the solution methods in the region of interest.

(4) The characteristic times of plasma-chemical processes (the ionization and recombination rates in the right-hand side of Eq. (4)) are small (on the order of several seconds).

(5) The solution to the considered system of equations is non-negative due to the physical meaning of the gas component’s concentration.

Features 3 and 4 make the considered problem significantly stiff.

3 METHOD OF NUMERICAL IMPLEMENTATION OF MODEL

As mentioned above, solution of system (4) is based on the method of splitting by physical processes: the ambipolar diffusion and the advective transport. The advantage of this method lies not only in the possibility of constructing efficient algorithms but also in the opportunity of efficiently studying the contribution of each physical process to the generation of the ionosphere’s dynamic response against the external excitations.

In the algorithm proposed by us, at the first splitting step, we consider the ambipolar diffusion process with the plasma-chemical transformations. At the second stage we solve the problem describing the three-dimensional advective transport of ions caused by the electromagnetic drift and neutral wind. Such a splitting allows us to consider the first-step problem as an independent problem of the first approximation in the problem of describing the ionosphere’s dynamics.

The ambipolar diffusion equation with the plasma chemistry corresponding to system (4) is given by

$$\frac{{\partial {{n}_{i}}}}{{\partial t}} = EYZ({{n}_{i}}) + DTr({{n}_{i}}) + \left[ {P - {{k}_{i}}{{n}_{i}}} \right].$$
(5)

The considered range of altitudes from 100 to 500 km includes the altitudes of the generation of the E layer; however, these processes are considered in a separate model, whereas in the current work, the lower boundary is taken at a sufficient distance from the F layer maximum to avoid possible spurious effects. As the boundary conditions for system (5), we take the Dirichlet condition at the lower boundary, \({{n}_{i}} = {P \mathord{\left/ {\vphantom {P {{{k}_{i}}}}} \right. \kern-0em} {{{k}_{i}}}}\) at \(z = 100\) km, and at the upper boundary, we set the condition of the third kind

$$D\left( {\left( {\frac{{\partial {{n}_{i}}}}{{\partial z}} + \frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial z}}{{n}_{i}} + \frac{1}{H}{{n}_{i}}} \right){{{\sin }}^{2}}I - \left( {\frac{1}{a}\frac{{\partial {{n}_{i}}}}{{\partial \varphi }} + \frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial \varphi }}{{n}_{i}}} \right)\cos I\sin I} \right) = Fz(\varphi ).$$
(6)

At the poles we bound the derivatives with respect to the latitude: \(({{\partial {{n}_{i}}} \mathord{\left/ {\vphantom {{\partial {{n}_{i}}} {\partial \varphi }}} \right. \kern-0em} {\partial \varphi }})\cos \varphi \to 0\) with \(\varphi \to \pm {\pi \mathord{\left/ {\vphantom {\pi 2}} \right. \kern-0em} 2}\). This condition is not overloaded, because the effective diffusion coefficients also vanish with \(\varphi \to \pm {\pi \mathord{\left/ {\vphantom {\pi 2}} \right. \kern-0em} 2}\).

The detailed description of the numerical parameters of the model and the results of the first version in the quasi-one-dimensional formulation taking into account only the diffusion and transport in the vertical direction without accounting for the mixed derivative are given in [12].

3.1 Spatial Approximation

The finite difference approximation of system (5) is implemented on the nine-point pattern (Fig. 1, indices \(i\,\,{\text{and}}\,\,j\) correspond to the altitude and latitude). In the design of a finite difference approximation, we must bear in mind that in the two-dimensional problem (5) the diffusion occurs along the magnetic force lines, that is, the symmetric matrix of effective diffusion coefficients (which is easy to write considering the operator \(EYZ({{n}_{i}})\)) \(S = \left( {\begin{array}{*{20}{c}} {K_{1}^{2}}&{{{K}_{1}}{{K}_{2}}} \\ {{{K}_{1}}{{K}_{2}}}&{K_{2}^{2}} \end{array}} \right)\) is singular at each point \((z,\varphi )\), where \({{K}_{1}} = \sqrt D \cos I\) and \({{K}_{2}} = \sqrt D \sin I\). If we set the terms \(DTr({{n}_{i}})\), \(P\), and \({{k}_{i}}{{n}_{i}}\), as well as the boundary conditions, equal to zero in Eq. (5), then, after the scalar multiplication of Eq. (5) by \({{n}_{i}}\) and integration over the entire domain, the following relation is true:

$$\frac{1}{2}\frac{{\partial {{{\iint\limits_{\varphi ,z} {\left( {{{n}_{i}}} \right)}}}^{2}}\cos \varphi d\varphi dz}}{{\partial t}} = - \iint\limits_{\varphi ,z} {{{{\left( {{{K}_{1}}\frac{{\partial {{n}_{i}}}}{{\partial \varphi }} + {{K}_{2}}\frac{{\partial {{n}_{i}}}}{{\partial z}}} \right)}}^{2}}\cos \varphi d\varphi dz \leqslant 0}.$$
(7)

It is apparently impossible to construct the second-order finite difference scheme for the diffusion operators with mixed derivatives; this scheme is the finite-dimensional analog of relation (7). We construct the second-order approximation of those operators for which the finite-dimensional analog of relation (7) takes place if the effective diffusion coefficients are independent of the spatial variables.

Fig. 1.
figure 1

Schematic pattern of spatial finite difference approximation for terms of mixed derivative in considered model.

The sought approximation is constructed in the following manner: the two-dimensional Laplace operator is approximated by the integro-interpolation method with the second order of accuracy on a five-point pattern; the approximation of the mixed derivatives at the point \((i,j)\) is constructed as the half-sum of the second-order approximations of the mixed derivative at the points with fractional indices (as an example we take the mixed derivative \(\frac{\partial }{{\partial y}}\left( {a(y)\frac{{\partial n}}{{\partial z}}} \right)\) with the alternating function \(a(y)\), where \(y\) corresponds to the latitude). The approximations of the mixed derivative at the points with fractional indices with the degree of accuracy up to the multiplier of the mesh step have the following form:

$${\text{for}}\,\,{\text{point}}\,\,(i + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}){\text{:}}\,\,\,\,{{a}_{j}}{{n}_{{i + 1,j}}} - {{a}_{j}}{{n}_{{i,j}}} - {{a}_{{j - 1}}}{{n}_{{i + 1,j - 1}}} + {{a}_{{j - 1}}}{{n}_{{i,j - 1}}},$$
(8)
$${\text{for point}}\,\,(i + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}){\text{:}}\,\,\,\,{{a}_{{j + 1}}}{{n}_{{i + 1,j + 1}}} - {{a}_{{j + 1}}}{{n}_{{i,j + 1}}} - {{a}_{j}}{{n}_{{i + 1,j}}} + {{a}_{j}}{{n}_{{i,j}}},$$
(9)
$${\text{for point}}\,\,(i - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}){\text{:}}\,\,\,\,{{a}_{j}}{{n}_{{i,j}}} - {{a}_{j}}{{n}_{{i - 1,j}}} - {{a}_{{j - 1}}}{{n}_{{i,j - 1}}} + {{a}_{{j - 1}}}{{n}_{{i - 1,j - 1}}},$$
(10)
$${\text{for point}}\,\,(i - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}){\text{:}}\,\,\,\,{{a}_{{j + 1}}}{{n}_{{i,j + 1}}} - {{a}_{{j + 1}}}{{n}_{{i - 1,j + 1}}} - {{a}_{j}}{{n}_{{i,j}}} + {{a}_{j}}{{n}_{{i - 1,j}}}.$$
(11)

For positive \({{a}_{j}}\) we use the half-sum of approximations (8) and (11), and for the negative ones we use the half-sum of approximations (9) and (10) (to illustrate this, we marked the cells with the centers \((i - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2})\), \((i + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j - {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2})\) in the scheme).

It is easy to show that the following finite-dimensional analog of relation (7) is true for the constant effective diffusion coefficients and appropriate boundary conditions,

$$\frac{{\partial \sum\limits_{i,j} {{{{({{n}_{{i,j}}})}}^{2}}} }}{{\partial t}} = - {{\sum\limits_{i,j} {\left( {{{K}_{1}}\frac{{({{n}_{{i,j}}} - {{n}_{{i - 1,j}}})}}{{\Delta z}} + {{K}_{2}}\frac{{({{n}_{{i,j}}} - {{n}_{{i,j - 1}}})}}{{a\Delta \varphi }}} \right)} }^{2}} - {{\sum\limits_{i,j} {\left( {{{K}_{1}}\frac{{({{n}_{{i + 1,j}}} - {{n}_{{i,j}}})}}{{\Delta z}} + {{K}_{2}}\frac{{({{n}_{{i,j + 1}}} - {{n}_{{i,j}}})}}{{a\Delta \varphi }}} \right)} }^{2}}.$$

In the case of constant coefficients, we can demonstrate the absolute stability for such schemes when their matrix is positive definite [13]. This approximation also has the advantage of satisfying the necessary condition of the main theorem of the chemical kinetics [14].

The method discussed above is also applied for approximating the derivative \({{\partial n} \mathord{\left/ {\vphantom {{\partial n} {\partial \varphi }}} \right. \kern-0em} {\partial \varphi }}\) in the upper boundary condition at the point \(\left( {N + {1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2},j} \right)\) compatible with the approximation of Eq. (5) in the entire domain. Here, in the case of positive values of \(\sin I\), the approximation has the form

$$\frac{1}{2}\left( {\frac{{{{n}_{{N + 1,j + 1}}} - {{n}_{{N + 1,j}}}}}{{\Delta \varphi }} + \frac{{{{n}_{{N,j}}} - {{n}_{{N,j - 1}}}}}{{\Delta \varphi }}} \right),$$

and, in the case of negative values of \(\sin I\), we use the half-sum

$$\frac{1}{2}\left( {\frac{{{{n}_{{N + 1,j}}} - {{n}_{{N + 1,j - 1}}}}}{{\Delta \varphi }} + \frac{{{{n}_{{N,j + 1}}} - {{n}_{{N,j}}}}}{{\Delta \varphi }}} \right).$$

To approximate the operator \(DTr({{n}_{i}})\) describing the settling process we used the divergence schemes of both the first order of accuracy (forward or backward differences) and the second order of accuracy (central differences). We did not use the convolution algorithm suggested in [15], because the conditions of good approximation of the convolution method and of the forward (or backward) difference scheme coincide (\({{\widetilde uh} \mathord{\left/ {\vphantom {{\widetilde uh} {\left( {2D} \right)}}} \right. \kern-0em} {\left( {2D} \right)}} \ll 1\), where \(\widetilde u\) is the velocity scale of convective motion; i.e., the computational viscosity is much lower than the physical viscosity).

3.2 Temporal Approximation

In the current work we studied two methods of solving the derived evolutional differential-difference problem. Because of the formulated features of problem (5), in the first method, we used the first-order implicit scheme—the scheme of natural filtration, which allows choosing the time step compatible with the time steps in the problem of thermosphere simulation (2–4 min) [9]. To solve the system of algebraic equations, we used the stabilized method of biconjugated gradients [16] for the sake of accuracy with a reasonable number of iterations (see Sect. 4).

As the second method we studied the splitting method of the original system of equation into two subsystems. We investigated this method, because we bear in mind its application in the problem of four-dimensional digestion of data [11]. It is clear that with the mixed derivatives we cannot split the original differential operator by geometric variables—in this case it is more convenient to split the differential-difference problem applying the algorithm proposed and studied in [13] for the problems of the theory of elasticity which allows solving the problems at the fractional steps using one-dimensional sweeps.

In the language of the weak approximation method, the splitting algorithm used in the work had the following form. At the first stage we solved the diffusion problem projected onto the vertical axis z including the mixed derivatives and the terms describing the plasma-chemical transformations:

$$\begin{gathered} \frac{{\partial {{n}_{i}}}}{{\partial t}} = \frac{\partial }{{\partial z}}\left[ {D{{{\sin }}^{2}}I\left( {\frac{{\partial {{n}_{i}}}}{{\partial z}} + \left( {\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial z}} + \frac{1}{H}} \right){{n}_{i}}} \right) - \frac{1}{a}D\sin I\cos I\left( {\frac{{\partial {{n}_{i}}}}{{\partial \varphi }} + \frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial \varphi }}{{n}_{i}}} \right)} \right] \\ - \,\,\frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {D\sin I\cos I\frac{{\partial {{n}_{i}}}}{{\partial z}}\cos \varphi } \right] - \frac{1}{a}\frac{\partial }{{\partial z}}\left[ {D\sin I\cos I\frac{{\partial {{n}_{i}}}}{{\partial \varphi }}} \right] + \left[ {P - {{k}_{i}}{{n}_{i}}} \right]. \\ \end{gathered} $$

At the second stage we solved the diffusion problem along the coordinate of the magnetic latitude:

$$\begin{gathered} \frac{{\partial {{n}_{i}}}}{{\partial t}} = \frac{1}{{{{a}^{2}}\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {D{{{\cos }}^{2}}I\frac{{\partial {{n}_{i}}}}{{\partial \varphi }}\cos \varphi } \right] \\ + \,\,\frac{1}{{a\cos \varphi }}\frac{\partial }{{\partial \varphi }}\left[ {\left( {\frac{1}{a}D{{{\cos }}^{2}}I\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial \varphi }} - D\sin I\cos I\left( {\frac{1}{{{{T}_{p}}}}\frac{{\partial {{T}_{p}}}}{{\partial z}} + \frac{1}{H}} \right)} \right){{n}_{i}}\cos \varphi } \right]. \\ \end{gathered} $$

Such splitting enables us to naturally split the boundary conditions. Both problems are solved by the simultaneous sweeps along the corresponding directions. In the generation of sweeps at the first stage of splitting, we partially used the ideas proposed in [13] (the Seidel-type algorithm in the calculation of function values at the nodes not included in the sweep direction).

Let us briefly consider the problem of the solution’s non-negativity. In general, the matrices which have to be inversed at each time step do not satisfy the M-matrix definition: for the chosen spatial steps and parameter values of the problem, the definition is violated in a small neighborhood of the equator. For the case of the appearance of negative values of the solution’s components, we specify the application of a simple monotonizer.

4 RESULTS OF NUMERICAL EXPERIMENTS

4.1 Testing the Methods of Numerical Implementation of the Ionosphere Model Based on an Analytical Solution

To study the accuracy of the used finite difference schemes, we consider the model solution qualitatively reproducing the behavior of the real ionosphere in the solution of the original problem. We computed the forcing for the considered model to obtain this particular solution. Consider the case of the fixed daily distribution of the electron concentration in the F layer close to the observed one in the unperturbed ionosphere. Near the lower boundary, we have a sharp growth of the electron content with the altitude up to the maximum of the F layer; above it, we observe the exponential decay related with the dominance of diffusion. In addition, in the latitudinal direction, we see the apparent maximum of the distribution of the electron concentration in the equatorial region. Taking these features into account, we chose the model solution in the form:

$${{n}_{{\bmod }}}(z,\varphi ) = A\exp \left[ { - B(z - C)} \right](z - C){{\cos }^{2}}\left( {{\varphi \mathord{\left/ {\vphantom {\varphi 2}} \right. \kern-0em} 2}} \right),$$

where the positive constants \(A\), \(B\), and \(C\) were chosen equal to \(3 \times {{10}^{6}}\,\,{\text{c}}{{{\text{m}}}^{{ - 3}}}\,{\text{k}}{{{\text{m}}}^{{ - 1}}}\), \({1 \mathord{\left/ {\vphantom {1 {133}}} \right. \kern-0em} {133}}\) km–1, and \(100\) km in the test calculations. After choosing the model solution, we computed the corresponding function of photoionization \(P(z,\varphi )\) and the corresponding flux \(Fz(\varphi )\) in the upper boundary condition by direct substitution into the equation.

The numerical experiments on convergence to the stationary solution showed the high precision of the calculation results with both of the used methods. Figure 2 presents the shape of the spatial distribution of the prescribed analytical solution and the distribution of the errors from the results of the numerical experiments on a mesh with step \(h = 5\) km in altitude and with step Δφ = 1° in latitude. It is seen that the maximum numerical error in both methods is observed in the region of the near-equatorial latitudes in the upper layers of the ionosphere and also in the polar region; the structures of the error distribution are similar for both methods.

Fig. 2.
figure 2

(a) Latitudinal–altitudinal distributions of electron concentration values [cm−3] in prescribed test analytical solution and deviations from this solution in data of numerical implementation of ionosphere model (b) with iteration method and (c) with splitting method. The spatial resolution of the model in both cases was 5 km in altitude and 1° in latitude; the time step was 30 s.

In Table 1 we present some results of the comparative analysis of the accuracy of calculating the stationary solution for different problem parameters. In the implicit scheme, the accuracy was controlled by the choice of the residual order and number of iterations; the time step was taken equal to 100 s (the accuracy of the stationary solution is independent of the time step for this method). The accuracy of the solution with the splitting method was controlled by the choice of the time step. The computation was performed from the arbitrary initial conditions for 2 days.

Table 1.   Comparison of accuracy of iteration method and splitting method in implementation of ionosphere model with prescribed analytical solution

The iteration method showed a higher accuracy for the present problem setting, and the high accuracy is achieved by using several iterations. In the splitting method, the approximation error is larger for comparable time steps; to achieve the same accuracy as in the implicit scheme, we need to choose the time step on the order of 1 s. In addition, the 10% accuracy which is considered acceptable in the simulation of the F layer [1, 2] is achieved at the time steps on the order of 30 s.

4.2 Sensitivity of the Model Solution to the Flow at the Upper Boundary

In order to investigate the role of the upper boundary condition and obtain the quantitative estimates, we performed separate numerical experiments using the problem setting with a realistic right-hand side. Using the numerical estimates of the model parameters near the upper boundary [12], we can show that the effect of the flux at the upper boundary on the generation of the electron concentration profile is determined by the ratio of the terms \({{\partial {{n}_{i}}} \mathord{\left/ {\vphantom {{\partial {{n}_{i}}} {\partial z}}} \right. \kern-0em} {\partial z}}\), \({{{{n}_{i}}} \mathord{\left/ {\vphantom {{{{n}_{i}}} H}} \right. \kern-0em} H}\), and \({{Fz(\varphi )} \mathord{\left/ {\vphantom {{Fz(\varphi )} {(D{{{\sin }}^{2}}{\kern 1pt} I)}}} \right. \kern-0em} {(D{{{\sin }}^{2}}{\kern 1pt} I)}}\). Thus, the negative gradient of the vertical concentration profile is determined by the given characteristic scale of the diffusive settling, whereas the absolute value at the upper boundary is determined by the flux value.

In the current work, the sensitivity to the flux perturbations was considered with the base value of the flux used in the well-known ionosphere models \(Fz(\varphi ) = \pm {{10}^{9}}\,\,{\text{c}}{{{\text{m}}}^{{ - 2}}}\,{{{\text{s}}}^{{ - 1}}}\) [3]. The value of the flux varied in the range of these values, and we moved the characteristic values of the flow from this range by 10–20% to assess the relative sensitivity. We separately investigate the sensitivity of the value and position of the concentration maximum in the F layer, because these two parameters of the ionosphere are crucial for applied radiophysical problems. Figure 3 presents the altitude profiles of the electron concentration, as well as the values and the positions of the maximum, in different latitudes from the corresponding experimental data.

Fig. 3.
figure 3

Altitude distributions of electron concentration values [cm−3] for different values of flux at upper boundary (a) at equator and (b) at 60° of magnetic latitude, as well as latitudinal distributions (c) of maximum concentration in F layer and (d) of its altitude [km] using data of numerical implementation of ionosphere’s model with iteration method.

The model shows that the dependence of the solution’s behavior on the flux value at the boundary is significant in the prescribed range; however, the relative sensitivity can be ignored. The exponential character of the concentration decay with altitude and its value barely change; however, the value of the concentration varies up to the maximum. The relative sensitivity is maximal for the near-equatorial latitudes (the value of the maximum of the F layer at the latitudes of ~15° varies by ~6% as the flux is changed by 10%). The sensitivity of the maximum position is low for small perturbations in all regions, except for the near-equatorial latitudes; its altitude varies by approximately 10–30 km as the flux changes twice.

5 CONCLUSIONS

In this work we studied the methods of solving the system of equations describing the dynamics of the F layer of the Earth’s ionosphere in the approximation of the ambipolar diffusion. Let us briefly formulate the main results of the work.

At the INM RAS the first version of the two-dimensional dynamic model of the F layer of the ionosphere (100–500 km) is created based on the solution of the equations of the plasma dynamics in the approximation of ambipolar diffusion in the spherical geomagnetic coordinates, the main equations of the model are formulated, and the algorithm of its staged implementation based on the method of splitting by physical processes is proposed.

We developed and implemented the two methods of numerical integration of the model and compared the accuracy of the developed methods based on the analytical solution.

Using the numerical experiments with the created model, we quantitatively estimated the solution’s sensitivity to the perturbations of the flux through the boundary. The equations of the ionosphere’s dynamics in the spherical geomagnetic coordinate system have a complexity in the formulation of the quantitative parameters of the upper boundary condition. The results of the numerical experiments on studying the sensitivity of the solution of the formulated problem to the perturbations of the upper boundary condition give reason to hope that this issue can be resolved based on a system of four-dimensional assimilation of the data on the integrated electron concentration in the F layer.

Further, we plan to outline the method of solving the system of equations of ion transport by a neutral wind and the system of electromagnetic drift together with the results of the numerical experiments with the joint model of the ambipolar diffusion and ion transport in the Earth’s ionosphere. The next problem is the combination of the developed model of the ionosphere with the model of general circulation of the thermosphere in a joint combined model of the upper atmosphere (for altitudes ranging from 90 to 500 km).

In conclusion, we again note that the model of ion dynamics in the F layer and the thermosphere model are components of the model of the Earth’s system being developed at the INM RAS (the assumed altitudes range from 0 to 500 km), in which the algorithms of the calculation of the formation of the ionosphere in the D and E layers (at altitudes ranging from 60 to 120 km) have been already implemented.