2.1 Introduction

At high magnetic latitudes, the ionospheric current system basically consist of horizontal currents flowing around 100–150 km altitude, and almost vertical field-aligned currents (FAC) flowing along the geomagnetic field, thus connecting the ionospheric currents to the magnetosphere. The magnitude, spatial distribution, and temporal variations of the horizontal currents and FAC can be estimated from the magnetic field they produce. Over the years, several techniques have been developed for this task, as discussed in various Chapters of this book (see also Vanhamäki and Juusola 2018, and reference therein). The present chapter gives an overall introduction to the Spherical Elementary Current System (SECS) method, while Chap. 3 deals with the specific application of the SECS method to magnetic data provided by the Swarm satellite mission.

Mathematically speaking, the elementary systems form a set of basis functions for representing two-dimensional vector fields on a spherical surface. This can, of course, be done in other ways too, e.g., by using spherical harmonic or spherical cap harmonic functions. The main difference is that the elementary systems represent the vector field in term of its divergence and curl, whereas harmonic functions are used to represent the scalar potential and stream function of the vector field. In principle, these methods should be equivalent, but in practice, each has its strengths and weaknesses. As will be seen, advantages of the SECS method include adjustable grid resolution, variable shape of the analysis region and no requirement for explicit boundary conditions.

The chapter begins with a summary of some basic electrodynamic properties of ionospheric current systems and the most commonly used approximations in Sect. 2.2. The 2D SECSs are introduced in Sect. 2.3. Their applications to analysis of two-dimensional vector fields and magnetic fields are discussed in Sects. 2.42.7. A one-dimensional variant of the SECS method, applicable to studies of single-satellite magnetic measurements, is discussed in Sect. 2.9. Some practical issues when applying the SECS method are discussed in Sect. 2.10. Finally, a short overview of some of the studies where the SECS method has been used is given in Sect. 2.11.

An example MATLAB code demonstrating the use of SECS in the specific task of estimating ionospheric equivalent current from ground magnetic measurements is included as supplementary material in the electronic version of the book, including data from the IMAGE (International Monitor for Auroral Geomagnetic EffectsFootnote 1) magnetometer network.

2.2 Short Review of Ionospheric Electrodynamics

A short summary of the relevant properties of ionospheric electrodynamics, especially at high magnetic latitudes (i.e., the auroral oval), is given in this section. For a more comprehensive introduction see, for example, Richmond and Thayer (2000). In the context of this chapter, ionospheric electrodynamics is described by the electric field, and the Hall and Pedersen conductivities and currents. Additionally, the magnetic perturbation created by the ionospheric currents is an important quantity in many studies. Thus, the focus is on macroscopic electric parameters, while many interesting phenomena, such as various chemical processes and particle dynamics, are ignored.

In the commonly used thin-sheet approximation (see e.g., Untiedt and Baumjohann (1993)) the ionosphere is assumed to be a thin, two-dimensional spherical shell of radius R at a constant distance from the Earth’s center. The thin-sheet approximation is justified by the fact that the horizontal currents flowing in the ionosphere are concentrated to a rather thin layer around 100–150 km altitude, where the Pedersen and Hall conductivities have their maxima. Thus the thickness of this layer is small compared to the horizontal length scale of typical ionospheric current systems. However, in some cases, three-dimensional modeling is required (Amm et al. 2008).

Above the ionospheric current sheet there is perfectly conducting plasma, where magnetic field lines are equipotentials, and below is the nonconductive neutral atmosphere. The electric field is assumed to be roughly constant in altitude through the thin current layer. Thus the Pedersen and Hall conductivities can be height integrated into Pedersen and Hall conductances, while the sheet current density \(\mathbf {J}\) is obtained by similarly height integrating the horizontal part \(\mathbf {j}_h\) of the 3D current \(\mathbf {j}\).

In summary, the main electrodynamic variables are: horizontal sheet current density \(\mathbf {J}\), field-aligned current density \(j_\parallel \), horizontal electric field \(\mathbf {E}\), magnetic field \(\mathbf {B}\) and height-integrated Hall and Pedersen conductances \(\varSigma _H\) and \(\varSigma _P\). These variables are related through Maxwell’s equations, Ohm’s law, and current continuity:

$$\begin{aligned} (\nabla \times \mathbf {E})_r = - \frac{\partial B_r}{\partial t} \end{aligned}$$
(2.1)
$$\begin{aligned} \nabla \times \mathbf {B} = \mu _0 \mathbf {j} = \mu _0 \, \mathbf {J} \delta (r-R) - \mu _0 \, j_\parallel \, \hat{\mathbf {e}}_r \end{aligned}$$
(2.2)
$$\begin{aligned} \mathbf {J} = \varSigma _P \mathbf {E} - \varSigma _H \hat{\mathbf {e}}_r \times \mathbf {E} \end{aligned}$$
(2.3)
$$\begin{aligned} j_\parallel = \nabla \cdot \mathbf {J}. \end{aligned}$$
(2.4)

In the last equation, the FAC density \(j_\parallel \) just above the ionospheric current sheet is obtained by integrating the continuity equation \(\nabla \cdot \mathbf {j} = 0 \Leftrightarrow \partial _z j_z = - \nabla _h \cdot \mathbf {j}_h\) through the current sheet.

Equations (2.1)–(2.4) employ the frequently used assumption of a radial magnetic field, so that \(\hat{\mathbf {e}}_\parallel = \mathbf {B}/|\mathbf {B}| = -\hat{\mathbf {e}}_r\) at the northern hemisphere. Due to the thin-sheet approximation, only the radial component is needed in Eq. (2.1). According to Untiedt and Baumjohann (1993) and Amm (1998), the effect of the tilted field lines is negligible for inclination angles \(\chi > 75^\circ \), which covers the auroral zone. At lower latitudes the inclination of the magnetic field could be taken into account by modifying the Hall and Pedersen conductances in Eq. (2.3) (see e.g., Brekke 1997, Chap. 7.12) and by calculating the FAC as \(j_\parallel = \nabla \cdot \mathbf {J} / \sin \chi \).

In a thin-sheet ionosphere the electric field \(\mathbf {E}\) and horizontal current \(\mathbf {J}\) are two-dimensional vector fields, each of which can be represented by two potentials

$$\begin{aligned} \mathbf {E} = -\nabla \phi _E - \hat{\mathbf {e}}_r \times \nabla \psi _E \end{aligned}$$
(2.5)
$$\begin{aligned} \mathbf {J} = -\nabla \phi _J - \hat{\mathbf {e}}_r \times \nabla \psi _J. \end{aligned}$$
(2.6)

The function \(\phi _E\) is the usual electrostatic potential and \(\psi _E\) is related to the rotational inductive part of the electric field (see e.g., Yoshikawa and Itonaga 1996; Sciffer et al. 2004). It is usually assumed that \(\nabla \psi _E=0\), but this does not hold in some situations (e.g., Vanhamäki and Amm 2011, and references therein). The current potential \(\phi _J\) is connected to FAC through Eq. (2.4), while \(\psi _J\) represents a rotational current that is closed within the ionospheric current sheet. The latter part is also related to so called ionospheric equivalent current and ground magnetic disturbance, as discussed in Sect. 2.7.

2.3 Elementary Current Systems

In Sect. 2.2, the electric field and current were described in terms of potentials. This kind of representation is very common in many fields of physics, and can be applied by expanding the potential in terms of some basis functions, such as Fourier series, spherical harmonics or spherical cap harmonics (see, for example, Backus 1986, and Chap. 9 in this Book).

However, the fields can equally well be represented in terms of their sources and rotations, that is by their divergence and curl. This approach is used in the elementary system method. It is based on Helmholtz’s theorem, which states that any well-behaved (e.g., continuously differentiable) vector field is uniquely composed of a sum of curl-free (CF) and divergence-free (DF) parts.

Elementary current systems, as applied to ionospheric current systems, were introduced by Amm (1997). Although for historical reasons the name refers to currents, they can be used to represent any two-dimensional vector field. Basically, they represent a localized curl or divergence of the vector field. Such elementary systems can be defined either in spherical or Cartesian geometry, and they are called SECS and CECS, respectively. In this chapter, the spherical variant is used.

In accordance with Helmholtz’s theorem, there are two different types of elementary systems: one is DF and the other CF. The spherical elementary systems, shown in Fig. 2.1, are defined in such a way that the CF system has a Dirac \(\delta \)-function divergence and the DF system a \(\delta \)-function curl at its pole, with uniform and oppositely directed sources elsewhere. It is easy to show (Amm 1997) that the vector fields

$$\begin{aligned} \mathbf {V}^{CF}(\mathbf {r}')=\frac{S^{CF}}{4\pi R} \cot \left( \frac{\theta '}{2} \right) \hat{\mathbf {e}}_{\theta '} \end{aligned}$$
(2.7)
$$\begin{aligned} \mathbf {V}^{DF}(\mathbf {r}')=\frac{S^{DF}}{4\pi R} \cot \left( \frac{\theta '}{2} \right) \hat{\mathbf {e}}_{\phi '}. \end{aligned}$$
(2.8)

have the desired properties of

$$\begin{aligned} \nabla \cdot \mathbf {V}^{CF} = S^{CF} \left( \delta (\theta ',\phi ') - \frac{1}{4\pi R^2} \right) \end{aligned}$$
(2.9)
$$\begin{aligned} \left( \nabla \times \mathbf {V}^{CF} \right) _r = 0 \end{aligned}$$
(2.10)
$$\begin{aligned} \nabla \cdot \mathbf {V}^{DF} = 0, \end{aligned}$$
(2.11)
$$\begin{aligned} \left( \nabla \times \mathbf {V}^{DF} \right) _r = S^{DF} \left( \delta (\theta ',\phi ') - \frac{1}{4\pi R^2} \right) . \end{aligned}$$
(2.12)

Here, \(S^{CF}\) and \(S^{DF}\) are the scaling factors of the elementary systems, while R is the radius of the sphere (e.g., ionosphere) where elementary systems are placed. The above formulas are given in a spherical coordinate system \((r,\theta ',\phi ')\), with unit vectors \((\hat{\mathbf {e}}_{r},\hat{\mathbf {e}}_{\theta '},\hat{\mathbf {e}}_{\phi '})\), oriented so that center of the elementary systems is at \(\theta '=0\). This coordinate system is used in the definition of the elementary system, as the expressions take the most simple form there. In the actual analysis, the elementary systems are rotated to a more suitable coordinate system, such as the geographical or geomagnetic system, as discussed in Sect. 2.5.

Fig. 2.1
figure 1

Adapted from Amm and Viljanen (1999)

Two-dimensional curl-free (CF) and divergence-free (DF) Spherical Elementary Current Systems (SECS). The CF SECS is shown with associated radial FAC.

Using the theory of Green’s functions it can be shown (e.g., Vanhamäki and Amm 2011) that the CF and DF SECS form a complete set of basis functions for representing two-dimensional vector fields on a sphere. An individual CF SECS with its pole located at \((R,\theta ^{el}, \phi ^{el})\) represents a source or sink of a vector field at that point, while a DF SECS represents rotational vector field around that point. Thus, by placing a sufficient number of CF and DF SECS at different locations at the ionosphere, one can construct any two-dimensional vector field from its sources and curls, in accordance with Helmholtz’s theorem. In principle, the spatial resolution of the representation depends on the number and distribution of the elementary systems. However, in practical applications the amount of available data is a limiting factor.

2.4 Current and Magnetic Field

When using the SECS to represent currents, the DF systems form a rotational current that is closed within the ionospheric current sheet. This part of the current is described by \(\psi _J\) in Eq. (2.6). The CF systems represent the same part of the current as \(\phi _J\) in Eq. (2.6), and are connected to the FAC via Eq. (2.4). The FACs are assumed to flow radially toward or away from the ionosphere, as illustrated in Fig. 2.1. As mentioned before, this is a reasonable assumption only at high magnetic latitudes. In addition to the \(\delta \)-function at its pole, each CF SECS is also associated with a uniform FAC distributed all around the globe. However, in practice, the actual FACs are described by the \(\delta \)-functions. The reasons is that if the analysis area is large enough, the sum of the SECS’s scaling factors (i.e., sum or integral of the upward and downward FACs) is expected to be close to zero, so that the uniform FACs of the CF SECS will almost cancel each other.

When observing ionospheric current systems, the measured quantity is almost always the magnetic field produced by the currents. In order to use the SECS in these studies, the magnetic fields produced by the currents in individual CF and DF SECS need to be calculated, including the FAC in the case of CF SECS.

Amm and Viljanen (1999) did this calculation for the DF systems, by straightforward (although somewhat tedious) evaluation of the vector potential from the Biot–Savart law. The result is that the magnetic field has only r- and \(\theta '\)-components, given by

$$\begin{aligned} B_{r}^{DF}(r,\theta ',\phi ') = \frac{\mu _0 S^{DF}}{4\pi r} \, \left\{ \begin{array}{ll} \frac{1}{\sqrt{1+s^2-2s\cos \theta '}} - 1, r<R, \\ \frac{s}{\sqrt{1+s^2-2s\cos \theta '}} - s, r>R. \end{array} \right. \end{aligned}$$
(2.13)
$$\begin{aligned} B_{\theta '}^{DF}(r,\theta ',\phi ') = \frac{-\mu _0 S^{DF}}{4\pi r\sin \theta '} \, \left\{ \begin{array}{ll} \frac{s-\cos \theta '}{\sqrt{1+s^2-2s\cos \theta '}} + \cos \theta ', r<R, \\ \frac{1-s\cos \theta '}{\sqrt{1+s^2-2s\cos \theta '}} - 1, \quad \,\, r>R \end{array} \right. \end{aligned}$$
(2.14)

where \(s=min(r,R)/max(r,R)\).

The magnetic field of the CF system, with associated FAC, is most easily calculated using Ampere’s circuit law, following the same reasoning as in Appendix A of Juusola et al. (2006). The important thing is to first convince oneself that, due to symmetries, the magnetic field must have the form \(\mathbf {B}^{CF} = B_{\phi '}(r,\theta ') \, \hat{\mathbf {e}}_{\phi '}\). After that it is easy to evaluate the circuit law and obtain the field as

$$\begin{aligned} \mathbf {B}^{CF}(r,\theta ',\phi ') = \frac{-\mu _0 S^{CF}}{4\pi r} \, \left\{ \begin{array}{ll} 0, \qquad \qquad \, r<R, \\ \cot \left( \frac{\theta '}{2}\right) \, \hat{\mathbf {e}}_{\phi '}, r>R. \end{array} \right. \end{aligned}$$
(2.15)

It is left as an exercise to the reader to check that Eqs. (2.13)–(2.15) give the correct magnetic field. This is most easily done by verifying that (1) divergence of \(\mathbf {B}^{CF}\) and \(\mathbf {B}^{DF}\) is zero, (2) the discontinuity at the ionospheric current sheet (\(r=R\)) gives the horizontal current in Eqs. (2.7) and (2.8), (3) elsewhere the curl of \(\mathbf {B}^{DF}\) is zero and (4) the curl of \(\mathbf {B}^{CF}\) gives the correct FAC above the ionosphere.

2.5 Coordinate Transformations

The fields of individual CF and DF SECS in Eqs. (2.7) and (2.8) and (2.13)–(2.15) are given in a coordinate system that is centered at the SECS pole. Typically, the analysis is done in the geographical or geomagnetic coordinate system, which is now the unprimed system. Assume that measurements at locations \((r_k,\theta _k,\phi _k)\), \(k=1\ldots K\), are available, and place the SECS at various locations \((R,\theta ^n,\phi ^n)\), \(n=1\ldots N\), in the ionosphere. In order to use the SECS, the colatitude \(\theta '\) and unit vectors \((\hat{\mathbf {e}}_{\theta '},\hat{\mathbf {e}}_{\phi '})\) need to be transformed from the SECS-centered coordinate system to the geographical or geomagnetic system. The radial coordinate and unit vector require no transformation, as they are the same in both systems.

Fig. 2.2
figure 2

Adapted from Vanhamäki et al. (2003)

Geometry of the coordinate transformation. Elementary system is located at \((\theta ^{el},\phi ^{el}\) and the result is evaluated at \((\theta _k,\phi _k)\). \(\theta '\) is the colatitude of the point \((\theta _k,\phi _k)\) in the coordinate system centered at the elementary system.

This is a straightforward rotation of the coordinate system, but for completeness sake one possible method is presented here. The geometry of the situation is illustrated in Fig. 2.2. According to spherical trigonometry the colatitude \(\theta '\) is given by

$$\begin{aligned} \cos \theta ' = \cos \theta _k \, \cos \theta ^{el} + \sin \theta _k \, \sin \theta ^{el} \, \cos (\phi ^{el} - \phi _k). \end{aligned}$$
(2.16)

From Fig. 2.2 the unit vectors can be expressed as

$$\begin{aligned} \hat{\mathbf {e}}_{\theta '} = \hat{\mathbf {e}}_\theta \cos C - \hat{\mathbf {e}}_\phi \sin C, \end{aligned}$$
(2.17)
$$\begin{aligned} \hat{\mathbf {e}}_{\phi '} = \hat{\mathbf {e}}_\theta \sin C + \hat{\mathbf {e}}_\phi \cos C. \end{aligned}$$
(2.18)

It is a straightforward exercise in spherical trigonometry to show that

$$\begin{aligned} \cos C = \frac{\cos \theta ^{el} - \cos \theta \cos \theta '}{\sin \theta \sin \theta '}, \end{aligned}$$
(2.19)
$$\begin{aligned} \sin C = \frac{\sin \theta ^{el} \sin (\phi ^{el}-\phi )}{\sin \theta '}. \end{aligned}$$
(2.20)

With these expressions, it is easy to calculate the current or magnetic field at geographical location \((r_k,\theta _k,\phi _k)\) that is produced by a SECS located at geographical point \((R,\theta ^{el},\phi ^{el})\).

2.6 Vector Field Analysis with SECS

In practical calculations, the elementary systems are placed at some discrete grid, and the scaling factors give the divergence and curl of the vector field in the grid cell. In some arbitrary grid cell n, the scaling factors are

$$\begin{aligned} S_{n}^{CF} = \int _{cell \, n} \nabla \cdot \mathbf {V} \, \text {da}, \end{aligned}$$
(2.21)
$$\begin{aligned} S_{n}^{DF} = \int _{cell \, n} (\nabla \times \mathbf {V})_r \, \text {da}, \end{aligned}$$
(2.22)

where \(\text {da}\) is the area element. This means that the curl and divergence distributed over the grid cell are represented by point sources at the center of the cell.

With SECS a vector field (e.g., the ionospheric horizontal current or electric field) is composed of rotational and divergent parts as

$$\begin{aligned} \mathbf {\mathscr {V}} = \overline{\mathrm M}_1 \cdot \mathbf {\mathscr {S}}^{CF} + \overline{\mathrm M}_2 \cdot \mathbf {\mathscr {S}}^{DF} \end{aligned}$$
(2.23)

The composite vector \(\mathbf {\mathscr {V}}\) contains the \(\theta \)- and \(\phi \)-components of the vector field \(\mathbf {V}\) at the grid points \(\mathbf {r}_k=(R,\theta _k,\phi _k)\),

$$\begin{aligned} \mathbf {\mathscr {V}} = \left[ V_\theta (\mathbf {r}_1) ,\,\,\,\,V_\phi (\mathbf {r}_1) ,\,\,\,\,V_\theta (\mathbf {r}_2) ,\,\,\,\,\ldots \right] ^T. \end{aligned}$$
(2.24)

The vectors \(\mathbf {\mathscr {S}}^{CF}\) and \(\mathbf {\mathscr {S}}^{DF}\) contain the scaling factors of the CF and DF SECS, respectively, at grid points \(\mathbf {r}^{el}_n\)

$$\begin{aligned} \mathbf {\mathscr {S}}^{CF} = \left[ S^{CF}(\mathbf {r}^{el}_1) ,\,\,\,\,S^{CF}(\mathbf {r}^{el}_2) ,\,\,\,\,S^{CF}(\mathbf {r}^{el}_3) ,\,\,\,\,\ldots \right] ^T, \end{aligned}$$
(2.25)
$$\begin{aligned} \mathbf {\mathscr {S}}^{DF} = \left[ S^{DF}(\mathbf {r}^{el}_1) ,\,\,\,\,S^{DF}(\mathbf {r}^{el}_2) ,\,\,\,\,S^{DF}(\mathbf {r}^{el}_3) ,\,\,\,\,\ldots \right] ^T, \end{aligned}$$
(2.26)

Here \(S^{DF}(\mathbf {r}^{el})\) and \(S^{CF}(\mathbf {r}^{el})\) should be interpreted as the average divergence and curl of \(\mathbf {V}\) over the grid cells, as in Eqs. (2.21) and (2.22). The components of the transfer matrices \(\overline{\mathrm M}_{1,2}\) can be calculated using Eqs. (2.7) and (2.8), as explained in detail by Vanhamäki (2011).

Fig. 2.3
figure 3

From Vanhamäki (2007)

On the left scaling factors of CF elementary systems, and on the right the corresponding vector field. Scaling factors, vector values, and lengths are in arbitrary units.

Figure 2.3 illustrates how an irrotational potential field can be modeled with just CF elementary systems. In this case the vector \(\mathbf {\mathscr {S}}^{DF}\) in Eq. (2.23) is zero.

A given vector field \(\mathbf {V}\) could be represented with elementary systems by evaluating the integrals in Eqs. (2.21) and (2.22) over a suitable grid. However, it is often more practical to rewrite Eq. (2.23) as

$$\begin{aligned} \mathbf {\mathscr {V}} = \overline{\mathrm M}_{12} \cdot \mathbf {\mathscr {S}}^{CD}, \end{aligned}$$
(2.27)

where the CF and DF parts have been combined,

$$\begin{aligned} \overline{\mathrm M}_{12} = \left[ \overline{\mathrm M}_{1} \, \overline{\mathrm M}_{2} \right] , \qquad \mathbf {\mathscr {S}}^{CD} = \left[ \begin{array}{c} \mathbf {\mathscr {S}}^{CF} \\ \mathbf {\mathscr {S}}^{DF} \end{array} \right] . \end{aligned}$$
(2.28)

Now, the equation can be inverted for the unknown scaling factors contained in the vector \(\mathbf {\mathscr {S}}^{CD}\). This inverse problem can be solved in various ways, for example, employing singular value decomposition (SVD) of the matrix \(\overline{\mathrm M}_{12}\). The solution method and possible regularization of the inverse problem (see Sect. 2.10.3) may have some effect on the solution, especially when the matrix is under-determined (more unknowns than measurements). If it is known a priori that the vector field \(\mathbf {V}\) is either curl- or divergence-free (e.g., the ionospheric electric field is often assumed curl-free), it is only necessary to use one type of the elementary systems, thus reducing the size of the inverse problem by a factor of two.

If the vector field \(\mathbf {V}\) is known globally (e.g., everywhere in the ionosphere), it is completely determined by its curl and divergence. However, if the vector field is specified in only some limited region, it may contain a Laplacian part that has zero curl and divergence inside this region. In a potential representation, such as in Eqs. (2.5) and (2.6), this Laplacian part would be determined by the boundary conditions at the edge of the area where \(\mathbf {V}\) is known. In the SECS representation, the Laplacian part can be included by placing some elementary systems outside the region of interest. These “external” SECS represent the effect that distant sources (i.e., divergences or curls) have inside the analysis area. Therefore, in regional studies, it is important to make the SECS grid somewhat larger than the area of interest (see Sect. 2.10.1), but it should be remembered that in the outlying areas the SECS representation is no longer unique.

This kind of vector field representation was one of the original uses of the elementary current systems. When Amm (1997) introduced the CECS and SECS ionospheric studies, he was searching for a practical way to decompose vector fields into curl-free and divergence-free parts and also to interpolate the fields in a way that would conserve their curl-free and/or divergence-free character.

2.7 Analysis of Ground Magnetic Measurements

An important application of the SECS method has been the estimation of the ionospheric current system based on the magnetic disturbance field it creates at the ground. This is a classical problem in geosciences, and many methods have been developed to tackle it, see e.g., Chapman and Bartels (1940), or Untiedt and Baumjohann (1993), Amm and Viljanen (1999) and references therein. Most of the previously used methods were based on harmonic analysis, where the magnetic field is expanded as a sum of suitable basis functions, for example, spherical harmonics. In the SECS analysis, it is the current system that is expanded in terms of elementary systems, whose amplitude is then fitted to match the measured magnetic disturbance field.

An important practical question is how to separate the disturbance field from the total magnetic field that is measured by magnetometers. Detailed discussion is beyond this review, but we mention that with ground magnetometer data this is usually done by determining some quiet-time reference level and removing it from the data. van de Kamp (2013) present one realization of this method.

The seminal work in ionospheric current studies using SECS analysis was by Amm and Viljanen (1999), who first derived analytical formulas for the magnetic field of the DF SECS and showed how the DF SECS could be used to estimate the ionospheric equivalent current from ground magnetic measurements. They also compared the SECS analysis with more traditional spherical cap harmonic analysis of the magnetic field, and demonstrated the practical advantages of the SECS method.

An important question is the relationship between the ionospheric equivalent current and the real ionospheric current. At high magnetic latitudes the curl-free part of the ionospheric horizontal current, together with associated FAC, does not produce any magnetic field below the ionosphere. Fukushima (1976) showed this by assuming uniform ionospheric conductances, but the result is valid independent of the conductance distribution (Amm 1997). The crucial assumption needed in deriving this result is that the FAC should flow radially. For strictly radial FAC, the ground magnetic disturbance from ionospheric current is produced solely by the divergence-free part, as is evident also in Eqs. (2.13)–(2.15). This is only approximately true even at the auroral zone, and breaks down completely at lower latitudes, where the magnetic field has larger inclination.

When the magnetic field lines are tilted, the FACs and associated horizontal curl-free currents make some contribution to the ground magnetic disturbance. As for example Tamao (1986) showed, this contribution can be reasonably large even at \(\sim \)60\(^\circ \) magnetic latitude. Luckily, the ground magnetic field due to tilted FACs is typically spatially smoother than that due to divergence-free currents, as is evident in Fig. 6 by Tamao (1986). Therefore contributions from opposite FACs should readily almost cancel each other, with the remaining magnetic effect being rather small and spatially smooth. For FACs tilted in the north/south direction the ground magnetic field is mostly in the east/west direction, which should show up as north/south equivalent current (see, e.g., Fig. 12 in Untiedt and Baumjohann 1993). Taking all this into account, it should be safe to assume that at high magnetic latitudes the ionospheric equivalent current is approximately equal to the divergence-free part of the actual ionospheric current, possibly apart from a relatively small and smooth north/south directed background current. For a more thorough discussion about the concept of equivalent current see, for example, Sect. 3 in Vanhamäki and Amm (2011) and references therein.

When calculating the ionospheric equivalent current with the SECS method, the horizontal components of the ground magnetic disturbance \(\mathbf {B}_G\) measured by magnetometers at locations \(\mathbf {r}_n=(R_E,\theta _n,\phi _n)\) during some time instant are collected into a composite vector

$$\begin{aligned} \mathbf {\mathscr {B}}_{G,\perp } = [B_x(\mathbf {r}_1) ,\,\,\,\,B_y(\mathbf {r}_1) ,\,\,\,\,B_x(\mathbf {r}_2) ,\,\,\,\,\ldots ]^T. \end{aligned}$$
(2.29)

The unknown scaling factors of the DF SECS located at \(\mathbf {r}^{el}_n=(R,\theta ^{el}_n,\phi ^{el}_n)\) are collected into another vector as in Eq. (2.26). These vectors are connected by a transfer matrix \(\overline{\mathrm T}\), so that

$$\begin{aligned} \mathbf {\mathscr {B}}_{G,\perp } = \overline{\mathrm T} \cdot \mathbf {\mathscr {S}}^{DF}. \end{aligned}$$
(2.30)

The components of the transfer matrix \(\overline{\mathrm T}\) give the magnetic field caused by each individual unit SECS at the magnetometer sites, and is therefore known and depends only on geometry. For example, \(T_{2,4}\) gives the y-component (East) of \(\mathbf {B}_G\) at \(\mathbf {r}_1\) caused by the SECS centered at \(\mathbf {r}^{el}_4\). Details of calculating the matrix \(\overline{\mathrm T}\) and inverting Eq. (2.30) for the unknown scaling factors \(\mathbf {\mathscr {S}}^{DF}\) using truncated singular value decomposition are given by Amm and Viljanen (1999) and Pulkkinen et al. (2003b). Once the scaling factors are known, the actual ionospheric equivalent current \(\mathbf {J}_{eq,ion}\) can be calculated using Eq. (2.8) for each individual DF SECS.

A matlab code included as supplementary material demonstrates the process of calculating the ionospheric equivalent current with the SECS method. Readers are encouraged to study the code and experiment with it. However, the code should not be directly applied to other magnetometer networks, as some parameters may have to be adjusted with changing geometry of the network. This is further discussed in Sect. 2.10. Quick-look plots of the equivalent currents calculated with the SECS method are provided by the Finnish Meteorological Institute.Footnote 2

2.7.1 Separation into Internal and External Parts

In the above discussion, only the horizontal part of the ground magnetic disturbance was used, and all the elementary systems were placed at the ionosphere (radius R), thus determining the ionospheric equivalent current. However, due to geomagnetic induction, the observed ground magnetic perturbation also has internal telluric sources, especially during disturbed geomagnetic conditions (Tanskanen et al. 2001). Using all three components of the observed ground magnetic disturbance, it is possible to separate the measured field into internal and external parts, which can be represented by two layers of equivalent currents (e.g., Haines and Torta 1994).

As far as the SECS method is concerned, this kind of separation was first applied by Pulkkinen et al. (2003b). The method is very similar to the above discussion of ionospheric equivalent currents, but in this case all three magnetic field components are used and there are two layers of elementary systems, one in the ionosphere and the other inside the ground.

The measured ground magnetic disturbance \(\mathbf {B}_G\) at magnetometer locations \(\mathbf {r}_n=(R_E,\theta _n,\phi _n)\) are collected into a composite vector,

$$\begin{aligned} \mathbf {\mathscr {B}}_{G} = [B_x(\mathbf {r}_1) ,\,\,\,\,B_y(\mathbf {r}_1) ,\,\,\,\,B_z(\mathbf {r}_1) ,\,\,\,\,B_x(\mathbf {r}_2) ,\,\,\,\,\ldots ]^T. \end{aligned}$$
(2.31)

The external (\(=\)ionospheric) DF SECS are located at \(\mathbf {r}^{el,e}_n=(R,\theta ^{el,e}_n,\phi ^{el,e}_n)\), while the internal DF SECS are placed at \(\mathbf {r}^{el,i}_n=(R_i,\theta ^{el,i}_n,\phi ^{el,i}_n)\). Note that in general there can be a different number of internal and external elementary systems, and they can be located at different latitudes and longitudes. The scaling factors are collected into vectors

$$\begin{aligned} \mathbf {\mathscr {S}}^{i} = [S^{i}(\mathbf {r}^{el,i}_1) ,\,\,\,\,S^{i}(\mathbf {r}^{el,i}_2) ,\,\,\,\,S^{i}(\mathbf {r}^{el,i}_3) ,\,\,\,\,\ldots ]^T. \end{aligned}$$
(2.32)
$$\begin{aligned} \mathbf {\mathscr {S}}^{e} = [S^{e}(\mathbf {r}^{el,e}_1) ,\,\,\,\,S^{e}(\mathbf {r}^{el,e}_2) ,\,\,\,\,S^{e}(\mathbf {r}^{el,e}_3) ,\,\,\,\,\ldots ]^T. \end{aligned}$$
(2.33)

These vectors are connected by transfer matrices \(\overline{\mathrm T}_i\) and \(\overline{\mathrm T}_e\), so that

$$\begin{aligned} \mathbf {\mathscr {B}}_{G} = \overline{\mathrm T}_i \cdot \mathbf {\mathscr {S}}^{i} + \overline{\mathrm T}_e \cdot \mathbf {\mathscr {S}}^{e}. \end{aligned}$$
(2.34)

These matrices can be calculated in a completely similar manner as discussed in the previous section, except that in this case, the matrices also include the vertical component of the magnetic field. For solving the unknown scaling factors, Eq. (2.34) is again written as a single matrix equation

$$\begin{aligned} \mathbf {\mathscr {B}}_{G} = \overline{\mathrm T}_{ie} \cdot \mathbf {\mathscr {S}}^{ie}, \end{aligned}$$
(2.35)

similar to Eq. (2.27). Note that the ordering of the magnetic measurements and scaling factors in Eqs. (2.31)–(2.33) is not important, as long as the matrix \(\overline{\mathrm T}_{ie}\) connects the elementary systems and measurements in the same order as used in the vectors.

The equivalent currents can mimic the magnetic field produced by all the currents that are located behind them, as seen from the ground surface. That is, external and internal equivalent currents represent currents that are located either above the ionospheric layer or below the internal layer, respectively. As the induced telluric currents can flow at any depth, and also very close to the surface especially in the highly conductive oceans, in principle it would be best to place the internal equivalent current just below the ground surface. However, that may lead to numerical problems, as the finite grid spacing and the singular nature of the SECS mean that one SECS pole placed close to a magnetometer station would make an unrealistically large contribution to the measurement. As a reasonable compromise between numerical stability and inclusion of near-surface currents, Pulkkinen et al. (2003b) placed the internal current layer at 30 km depth.

Making the separation into internal and external equivalent currents is in principle more accurate than calculating only the external current from Eq. (2.30). However, the separation has also some drawbacks in practice. First of all, the inverse problem becomes less stable compared to the external-only calculation, as the number of observations increase from two to three components per station, but typically the number of SECS is doubled. Furthermore, even though the separation is in principle unique when done globally (and with perfect data coverage), Thébault et al. (2006) demonstrated that in local studies, the internal and external sources mix to some degree. In practical applications, the limited amount of input data lead to further ambiguities in the solution. Thébault et al. (2006) considered spherical cap harmonic analysis of the ground magnetic field, but similar problems are expected also in SECS analysis, although this has not been studied in detail. For these reasons, the telluric contributions have been neglected in many SECS studies, which can be expected to lead to some overestimation of the ionospheric equivalent currents, especially during disturbed conditions when time variations are rapid.

2.8 Analysis of Satellite Magnetic Measurements

In the above discussion, the focus was on calculating the ionospheric equivalent current from ground magnetic measurements, which has arguably been the most successful and widely used application of the SECS method. The main limitation is that only the equivalent current, not the whole ionospheric current containing the CF, DF, and FAC parts, can be calculated from ground magnetic data alone. Getting the full current would require some further assumptions about the ionospheric electric field or electric conductivity, as discussed, e.g., by Untiedt and Baumjohann (1993) or Vanhamäki and Amm (2011). This is not a shortcoming of the SECS method, but a general limitation inherent to magnetic fields and currents.

The situation is quite different when there are magnetic measurements from low-orbiting satellites, such as CHAMP (CHAllenging Minisatellite Payload, https://www.gfz-potsdam.de/champ/) or Swarm (Olsen et al. 2013). The satellites pass through the FACs, so their effect dominates the observed magnetic disturbance. The ionospheric horizontal currents, assumed to flow in a thin sheet at E-region altitude, are usually several hundred kilometers below the satellite, and therefore make a smaller contribution to the measured field. As the satellite magnetic data contains information on the FAC, and associated CF current via Eq. (2.4), as well as the DF ionospheric current, the whole current system may be estimated by fitting both CF and DF SECS to the measurements. Therefore satellite data can in principle provide the “real” current distribution.

Often data from only one satellite at any specific region or instant of time are available. Therefore assumptions about gradients perpendicular to the satellite track have to be made, or combined data from several orbits (typically several months or years) are used. Exception to this are the Swarm mission and the AMPERE (Active Magnetosphere and Planetary Electrodynamics Response Experiment Anderson et al. 2014) project. For further discussion of AMPERE, see Chap. 8. The SECS method tailored for Swarm data analysis is discussed in detail in Chap. 3, while analysis of single-satellite passes with assumption of vanishing gradients is discussed in the next section.

Juusola et al. (2014) presented a statistical analysis of CHAMP satellite’s magnetic data using the SECS method. They first projected all the magnetic measurements into a regular grid in the geomagnetic coordinate system, and then averaged and binned the data with respect to solar wind conditions. The ionospheric current system, including the FAC and both CF and DF parts of the horizontal current, was determined by fitting CF and DF SECS to the gridded magnetic data. Apart from including the CF systems, the approach is very similar to the analysis of ground magnetic data.

The gridded magnetic disturbances measured by CHAMP are collected into a composite vector similar to Eq. (2.31). The CF and DF SECS are placed at selected positions in the ionosphere, and their scaling factors are collected into vectors as in Eqs. (2.21) and (2.22). In general, there can be a different number of CF and DF elementary systems, and they can be located at different latitudes and longitudes. The vectors are connected by transfer matrices \(\overline{\mathrm T}_{cf}\) and \(\overline{\mathrm T}_{df}\), so that

$$\begin{aligned} \mathbf {\mathscr {B}}_{C} = \overline{\mathrm T}_{cf} \cdot \mathbf {\mathscr {S}}^{CF} + \overline{\mathrm T}_{df} \cdot \mathbf {\mathscr {S}}^{DF}. \end{aligned}$$
(2.36)

These matrices can be calculated in a completely similar manner as discussed in the previous section, using Eq. (2.15) for the CF SECSs and Eqs. (2.13) and (2.14) for the DF SECSs. The fitting problem is again combined into a single matrix equation and solved for the unknown scaling factors.

It should be noted that the assumption of perfectly radial FAC used in the CF SECS will lead to some errors when analyzing satellite data. This is most clearly manifested as a slight southward shift in the ionospheric location of the FAC, which is caused by using radial instead of field-aligned mapping from the satellite altitude (typically \(\sim \)400 km) to the ionospheric E-region. However, Juusola et al. (2014) estimated that at high latitudes the error was at most 0.9\(^\circ \), and thus smaller than the latitude resolution of their statistical grid.

When using only satellite data, the ionospheric currents and induced telluric currents can not be separated. The reason is that both current systems are below the satellite, so they produce qualitatively similar magnetic effects. Despite the large distance between the satellite and induced telluric current, in some cases, they may have a large effect on the measured magnetic disturbance, as shown by Vanhamäki et al. (2005). The telluric currents may be approximated by placing a perfect conductor inside the Earth at a certain depth (depending on the ground conductivity), in which case the internal currents would be mirror images of the ionospheric currents. This approach was used by Olsen (1996), but in a statistical comparison of satellite- and ground-based currents Juusola et al. (2016) found it inadequate.

2.9 1D SECS

In many situations, data are only available along a single line, and not on a two-dimensional area. Typical cases are passes of a single satellite, or a (North–South) chain of magnetometers. In these cases, for single events, some additional assumptions are necessary. For example, the SECS method discussed in Sect. 2.7 is not directly applicable, as it produces reliable results only if measurements are available in a suitably large two-dimensional area.

One approach is to use a “1D assumption”, where gradients of the studied parameter (current, electric field, conductances, ...) are assumed to vanish in one specific direction. This is identified as the “zero-gradient direction”, while the perpendicular direction is the “1D direction” (e.g., along a magnetic meridian). For example, assume that ionospheric current depends only on latitude so that gradients in the longitudinal direction vanish. It should be noted that this zero-gradient direction need not be exactly perpendicular to the satellite path or magnetometer chain, but the angle should still be large enough so that good coverage is achieved in the 1D direction. Also, even though the analysis maybe simplified by assuming some a priori fixed 1D direction (e.g., geomagnetic meridian), there exist methods (e.g., minimum variance analysis, Sonnerup and Scheible 1998) that can be used to determine the optimum direction from the data. Some method should also be used to check how good the 1D assumption is in each specific case, e.g., by estimating how small the gradients in the “zero-gradient direction” actually are, because in reality, the situation is never perfectly one-dimensional.

One-dimensional variants of the CF and DF SECS were defined by Vanhamäki et al. (2003) and Juusola et al. (2006), respectively. In order to distinguish them from the elementary systems discussed thus far, the terms 1D and 2D SECS are used here. The 1D variants can be obtained by placing the poles of the respective two-dimensional SECS around a circle at a constant latitude \(\theta _0\), essentially integrating over the position of the 2D SECS’s poles (Vanhamäki et al. 2003). The resulting current systems are

$$\begin{aligned} \mathbf {J}_{1D}^{CF}(\theta ,\theta _0) = \frac{S_{1D}^{CF}}{2 R} \hat{\mathbf {e}}_{\theta } \left\{ \begin{array}{ll} -\tan \left( \theta /2 \right) ,\theta <\theta _0 \\ \cot \left( \theta /2 \right) \,\,\,\,,\theta >\theta _0 \end{array} \right. , \end{aligned}$$
(2.37)
$$\begin{aligned} \mathbf {J}_{1D}^{DF}(\theta ,\theta _0) = \frac{S_{1D}^{DF}}{2 R} \hat{\mathbf {e}}_{\phi } \left\{ \begin{array}{ll} -\tan \left( \theta /2 \right) ,\theta <\theta _0 \\ \cot \left( \theta /2 \right) \,\,\,\, ,\theta >\theta _0 \end{array} \right. \end{aligned}$$
(2.38)
Fig. 2.4
figure 4

The left panel shows a 1D CF SECS, with associated FACs. A \(\delta \)-function FAC enters at colatitude \(\theta _0\), where it is connected to meridionally flowing horizontal currents. A uniform outward FAC ensures current continuity. The right panel shows a 1D DF SECS. The azimuthal horizontal current, shows a sharp shear at colatitude \(\theta _0\)

The 1D SECS are illustrated in Fig. 2.4 and may look deceptively similar to the 2D SECS introduced in Sect. 2.3. However, the crucial difference is that the 1D SECS are defined in the global coordinate system (often geographical or geomagnetic), where the 1D direction is in the meridional plane (all azimuthal gradients vanish). Therefore Eqs. (2.37) and (2.38) have no prime in \(\theta \) or \(\phi \).

The 1D CF SECS has a ring of \(\delta \)-function divergence at colatitude \(\theta _0\), with uniform and opposite divergence elsewhere. Similarly, the 1D DF SECS has a band of \(\delta \)-function curl, compensated by uniform curl elsewhere. This is actually an alternative way to define the 1D SECS and to derive Eqs. (2.37) and (2.38). Similar to the general 2D SECS, the CF and DF 1D SECS are basis functions for any continuously differentiable vector field on a sphere, with vanishing gradients in the azimuthal direction. By using several 1D SECS with different amplitudes and different “critical co-latitudes” \(\theta _0\), any such vector field can be constructed.

The magnetic field of the 1D DF systems (when used to represent currents) was calculated by Vanhamäki et al. (2003). With \(s=min(r,R)/max(r,R)\) and defining two auxiliary functions

$$\begin{aligned} f(s) = \left\{ \begin{array}{ll} 1 ,r<R \\ s ,r>R \end{array} \right. , \qquad g_l(s) = \left\{ \begin{array}{ll} 1/l \qquad \quad \,,r<R \\ -1/(l+1)\, ,r>R \end{array} \right. \end{aligned}$$
(2.39)

the components can be written more compactly as

$$\begin{aligned} B_{r,1D}^{DF}(r,\theta ,\theta _0) = \frac{\mu _0 S_{1D}^{DF}}{2 r} f(s) \sum _{l=1}^\infty s^l P_l(\cos \theta _0) \, P_l(\cos \theta ) \end{aligned}$$
(2.40)
$$\begin{aligned} B_{\theta ,1D}^{DF}(r,\theta ,\theta _0) = \frac{\mu _0 S_{1D}^{DF}}{2 r} f(s) \sum _{l=1}^\infty s^l g_l(s) \, P_l(\cos \theta _0) \, P_l^1(\cos \theta ). \end{aligned}$$
(2.41)

Here, \(P_l\) and \(P_l^1\) are the unnormalized 0th- and first-order- associated Legendre polynomials. The magnetic field of the 1D CF SECS (with associated radial FAC) was calculated by Juusola et al. (2006) using Ampere’s law:

$$\begin{aligned} \mathbf {B}_{1D}^{CF}(r,\theta ,\theta _0) = \frac{\mu _0 S_{1D}^{CF}}{2 r} \hat{\mathbf {e}}_{\phi } \left\{ \begin{array}{ll} \tan \left( \theta /2 \right) &{} ,r>R \wedge \theta<\theta _0 \\ -\cot \left( \theta /2 \right) &{} ,r>R \wedge \theta >\theta _0 \\ 0 &{} ,r<R \end{array} \right. , \end{aligned}$$
(2.42)

The 1D SECS are used in a completely analogous way to the 2D systems discussed in Sect. 2.7. For ground magnetic analysis, the \(B_\theta \)-component (southward in the chosen coordinate system) can be used to calculate the ionospheric equivalent current, which in a 1D situation has only \(\phi \)-component (as 1D current in \(\theta \)-direction can not be completely divergence-free). Alternatively, both the \(B_r\)- and \(B_\theta \)-components can be used for the internal/external separation. The \(B_\phi \)-component should be much smaller than the other two, which can be used as one check of the quality of the 1D assumption.

In satellite applications, the southward current \(J_{\theta }\) is computed from the eastward magnetic disturbance by fitting 1D CF SECS to the data. The eastward divergence-free current is associated with magnetic disturbances in the radial- and \(\theta \)-directions. If only \(B_r\) is used in fitting the 1D DF SECS, the measured \(B_\theta \) may be compared to the magnetic disturbance calculated from the fitted DF SECS in order to estimate how good the 1D assumption is. This line of reasoning was applied by Juusola et al. (2007), who used it to search for the best 1D direction by allowing the North Pole of the coordinate system to move. In case they did not find good enough agreement in \(B_\theta \) for any North Pole location, the event was considered 2D and removed from analysis. It is better to use \(B_r\) in the fitting and \(B_\theta \) in the checking rather than the other way round, as the horizontal component is more easily affected by 2D structures in the FAC. However, due to non-radial FAC, it would be even better to use field-aligned magnetic disturbance in fitting the 1D DF SECS. That can be done by taking the appropriate linear combination of the r- and \(\theta \)-components.

2.10 Some Practical Considerations

In this section, several practical issues related to the application of the SECS methods are considered. Some of them are also discussed and solved in the example code that is included as supplementary material in the book. However, issues such as grid selection and regularization of the matrix inversion depend on the geometry of each situation, and must be adjusted for each magnetometer network.

2.10.1 Grid and Boundary Effects

The SECS method does not require any explicit boundary conditions, even when applied to regional studies. This is different from potential representations of the electric field or current, like Eqs. (2.5) and (2.6), which require explicit boundary information. In contrast, in the SECS analysis, there is an implicit condition that the vector fields are smooth and source-free outside the analysis area. The CF and DF SECS represent all sources of the vector field, so in regions where there are no SECSs both the curl and divergence must vanish. Of course, explicit boundary conditions may be added using virtual data points at the edges of the analysis area, requiring that the vector field has a certain value at these points.

Fig. 2.5
figure 5

Adapted from Vanhamäki (2007)

An example of representing a given vector field (in this case current) with Cartesian Elementary Current Systems (CECS). The model current system is shown in panels (a, d). The estimated CF and DF scaling factors shown in panels (e) and (f), respectively, are obtained from fit to the current shown in panel (a). The black rectangle in the right side plots denoted the area shown in the vector plots. In panel d all the nonzero CF CECS are inside the black rectangle, while all the nonzero DF CECS are outside. The local field in panel b correspond to the model CF CECS in panel (d), while the remote field in panel c is given by the model DF CECS.

As mentioned in Sect. 2.6, in order to minimize boundary effects caused by the implicit boundary conditions and the possible presence of a Laplacian field, the SECS grid should be somewhat larger than the area of interest. This is illustrated in Fig. 2.5, where a given vector field shown in panel (a) is divided into CF and DF parts using Eq. (2.27). The original vector field was constructed from a curl-free part with sources inside the shown area and a divergence-free part with sources outside, see panels (b–d). In this case, the data region is the area where the vector field shown in panel (a) is given. The SECS grid used in the analysis is the colored area in panels (e–d), where also the data region is shown as a black rectangle. Note that although this example was done with Cartesian Elementary Current Systems (CECS), the same principle holds for SECS.

When the given vector field in panel (a) is decomposed into DF and CF parts using elementary systems, the local curl-free part is correctly represented in terms of CF systems inside the area where the vector field was originally specified. This is seen by comparing the estimated scaling factors shown in panels (e–f) with the model CF scaling factors that are inside the black rectangle in panel (d). The estimated CF scaling factors inside the data region agree very well with the model, while the estimated DF scaling factors are nearly zero. However, the remote divergence-free part gets represented in terms of both CF and DF systems located just outside the data region. This is seen by comparing the areas outside the black rectangle in panels (d–f): In the model there are only DF CECS outside the black rectangle, but in the fit results both CF and DF CECS have nonzero amplitudes there.

This demonstrates that in general, outside the data region, the decomposition is no longer unique, and a (locally) Laplacian field may equally well be caused by either remote curls or divergences, or some combination of them. In global studies, there is no such fundamental ambiguity, because the Laplacian field must vanish or be physically unreasonable. In the case of Fig. 2.5, the Laplacian field corresponds to the remote currents shown in panel (c), caused by the DF CECS located outside the data region in panel (b).

In summary, the division of local field into CF and DF parts is in principle unique, but remote fields, whose sources are outside the data region, can not be decomposed in a unique way. This is not a limitation of the elementary system method, but similar ambiguities (related to boundary conditions) would appear also in potential representations like Eq. (2.6). Finally, it should be kept in mind that in practical applications data availability and quality are often serious limiting factors. Measurements are rarely as extensive, detailed and noise-free as the model field shown in panel (a) of Fig. 2.5.

Fig. 2.6
figure 6

An example of analysis grid used when calculating ionospheric equivalent currents from IMAGE magnetometer data in the example program accompanying this chapter. Black dots show the DF SECS’s positions, red dots the points where the equivalent current vectors are calculated and blue stars show the magnetometer locations

The recommendation is to make the SECS grid somewhat larger than area of interest. Figure 2.6 illustrates typical SECS and output grids used in the calculation of equivalent currents with data from the IMAGE magnetometer network. Role of the outlying SECS is to provide an equivalent representation of distant current systems, that do not have sources (in this case curls) directly above the magnetometer network.

2.10.2 Singularities

The elementary systems defined in Eqs. (2.7) and (2.8) are unfortunately singular, as there is divergence at the SECS pole where \(\theta '=0\). Consequently, the magnetic field of a DF SECS given in Eqs. (2.13) and (2.14) has a singular point at \((r=R, \theta '=0)\), while the CF SECS’s field in Eq. (2.15) is singular along the line \((r\ge R,\theta '=0)\). These singularities should be kept in mind, as they may cause numerical problems.

In many applications, it is sufficient to select the SECS grid carefully, so that there is no need to evaluate the fields (either the SECS’s vector field or magnetic field) too close to singular points. This is usually the case, e.g., in the calculation of equivalent currents from ground magnetic data, discussed in Sect. 2.7 and demonstrated in the example code. If the vertical separation between the SECS layers and the magnetometers is large enough, the singularities in the magnetic field do not matter. Similarly, the resulting equivalent current vectors can be calculated at the midpoints between the SECS locations, as illustrated in Fig. 2.6.

However, in some applications it is necessary to calculate the fields near the singularities. In this case, the elementary systems in Eqs. (2.7) and (2.8) may be modified to

$$\begin{aligned} \mathbf {V}^{CF}(\mathbf {r}')=\frac{S^{CF}}{4\pi R} \hat{\mathbf {e}}_{\theta '} \left\{ \begin{array}{ll} \alpha \tan \left( \frac{\theta '}{2} \right) &{} \theta ' < \theta _0 \\[8pt] \cot \left( \frac{\theta '}{2} \right) &{} \theta ' \ge \theta _0 \end{array} \right. \end{aligned}$$
(2.43)
$$\begin{aligned} \mathbf {V}^{DF}(\mathbf {r}')=\frac{S^{DF}}{4\pi R} \hat{\mathbf {e}}_{\phi '} \left\{ \begin{array}{ll} \alpha \tan \left( \frac{\theta '}{2} \right) &{} \theta ' < \theta _0 \\[7pt] \cot \left( \frac{\theta '}{2} \right) &{} \theta ' \ge \theta _0 \end{array} \right. \end{aligned}$$
(2.44)

When \(\alpha = \cot ^2 ( \theta _0/2 )\), the vector fields are continuous at \(\theta '=\theta _0\). Moreover, the \(\delta \)-function source at the elementary system’s pole is now spread uniformly inside a spherical cap of width \(\theta _0\).

In a similar way the 1D SECS can be redefined so that the divergence or curl that in Eqs. (2.37) and (2.38) is a \(\delta \)-function at colatitude \(\theta _0\) is uniformly spread to a spherical zone \(\theta _0-\varDelta \le \theta \le \theta _0+\varDelta \). Inside this zone the 1D DF SECS has current density

$$\begin{aligned} \mathbf {J}_{1D}^{DF}(\theta ,\theta _0,\varDelta ) = \frac{S_{1D}^{CF}}{2 R} \frac{\cos \theta _0 \, \cos \varDelta -(1-\sin \theta _0 \, \sin \varDelta ) \cos \theta }{\sin \theta _0 \, \sin \varDelta \, \sin \theta } \hat{\mathbf {e}}_\phi , \end{aligned}$$
(2.45)

while outside it is the same as in Eq. (2.38). The current density of a 1D CF SECS has the same expression, but in the \(\hat{\mathbf {e}}_\theta \) direction.

Assuming radial FAC, the magnetic field of the modified CF SECS can be calculated using Ampere’s law, as before. In fact, for a general ionospheric curl-free current \(\mathbf {J}^{cf}(\theta ,\phi )\), with \((\nabla \times \mathbf {J}^{cf})_r=0\), and radial FAC, the magnetic field is

$$\begin{aligned} \mathbf {B}(r,\theta ,\phi ) = \left\{ \begin{array}{ll} \frac{\mu _0 R}{r} \hat{\mathbf {e}}_r \times \mathbf {J}^{cf}(\theta ,\phi ), &{}r>R \\ 0, &{} r<R \end{array} \right. \end{aligned}$$
(2.46)

This general result is evident from the magnetic field and current of CF SECS, given in Eqs. (2.15) and (2.7), respectively. Remember that the CF SECS form a complete set of basis functions for curl-free vector fields. However, the result can also be verified by checking that the magnetic field is divergence-free and gives the correct current distribution via Ampere’s law. Equation (2.46) forms the basis for many analysis techniques for satellite magnetic data, including the analysis of AMPERE data, discussed further in Chap. 8.

In contrast, it is quite unlikely that the magnetic field of the modified nonsingular DF SECS could be calculated in a closed form. Possibly a series expansion could be derived using the same methods as in Vanhamäki et al. (2003). However, in the attached example code this problem is simply ignored: Equation (2.44) is used for the vector field, while the magnetic field is calculated using Eqs. (2.13) and (2.14). This is slightly inconsistent, but does not appear to affect practical applications.

The effects of the singularities can be further reduced in a rather straightforward manner by subdividing the SECS into smaller units. This is not the same as making the original SECS grid finer, as that would increase the number of scaling factors. Rather, if one SECS with scaling factor \(S_n\) is normally placed into a grid cell n, then the cell is divided into N equal parts and SECSs with amplitudes \(S_n/N\) are located into each one. This way the size of the system matrix in Eq. (2.27) or (2.30) stays the same, but the matrix elements are calculated as sums of sub-elementary systems placed at different corners of the original grid cells. This does not completely remove the singularity, but reduces it into a smaller area, which can be either handled by using the redefined nonsingular SECS in Eqs. (2.43) and (2.44), or ignored completely. For example, if the original grid cell is divided into 100 sub-cells, then removing the one sub-cell where the calculation point is located should amount to roughly 1% error.

2.10.3 Inversion Regularization

When applying the SECS method, matrix equations such as Eq. (2.27) or (2.30) need to be inverted. Often these are either under-determined (more unknown scaling factors than measurements), or otherwise ill-conditioned. In either case, direct attempt to invert the equation will lead to nonsensical results. In this kind of situation, the problem requires regularization, either by adding some constraints or assumptions about the solution.

There are several possible methods to deal with these situations, but the traditional method of choice in SECS analysis has been the Singular Value Decomposition (SVD, see, e.g., Press et al. 1992, Sect. 2.6). In SVD the system matrix, e.g., \(\overline{\mathrm T}\) in Eq. (2.30), is decomposed into a product of three matrices

$$\begin{aligned} \overline{\mathrm T} = \overline{\mathrm U} \cdot \overline{\mathrm S} \cdot \overline{\mathrm V}^*, \end{aligned}$$
(2.47)

where \(\overline{\mathrm U}\) and \(\overline{\mathrm V}\) are unitary matrices, \(\overline{\mathrm S}\) is a diagonal matrix containing the singular values (nonnegative, arranged from largest to smallest) and \(^*\) denotes conjugate transpose. In the case of Eq. (2.30), the rows of \(\overline{\mathrm V}^*\) represent different, mutually orthogonal configurations of the SECS scaling factors, while the columns of \(\overline{\mathrm U}\) give the corresponding (also mutually orthogonal) magnetic field configurations at the magnetometer stations. In some sense the corresponding singular values in \(\overline{\mathrm S}\) indicate how distinguishable these modes are in the magnetic field. A large value \(S_{n,n}\) means that the corresponding magnetic field configuration is easy to find in the data, while those with small values can be lost in the noise.

Thus SVD may be used to locate and remove the ill-conditioned parts of the system matrix, making the inversion numerically stable. In practice Eq. (2.30) is inverted as

$$\begin{aligned} \mathbf {\mathscr {S}}^{DF} = \overline{\mathrm V} \cdot \overline{\mathrm \sigma } \cdot \overline{\mathrm U}^* \cdot \mathbf {\mathscr {B}}_{G,\perp }, \end{aligned}$$
(2.48)

where \(\overline{\mathrm \sigma }\) is a diagonal matrix with elements

$$\begin{aligned} \sigma _{n,n} = \left\{ \begin{array}{ll} 1/S_{n,n} \,\, &{} \text {if} \,\, S_{n,n} > \varepsilon S_{1,1} \\ 0 &{}\text {otherwise} \end{array} \right. \end{aligned}$$
(2.49)

Here, \(\varepsilon \) is a parameter that determines the cut-off point for small singular values, with respect to the largest value \(S_{1,1}\).

The important question is how to choose \(\varepsilon \). Too small a value will lead to problems with noisy data (e.g., spurious structures appearing in the solution), while too large value means that good data are rejected. Perhaps the only sure way is to test the analysis with simulated data, where the correct answer is known, and try different \(\varepsilon \)-values. In these tests, it is important to use realistic models and to add a realistic amount of noise to the simulated data. This kind of \(\varepsilon \)-optimization has been done, e.g., by Weygand et al. (2011) and Vujic and Brkic (2016).

The SVD approach seems to work well in practice, but there are also other possible ways to regularize the inversion problem. One could add extra constraints to the system matrix by demanding that the spatial gradient of the SECS scaling factors must be as small as possible. Readers are encouraged to consider and test alternatives to the SVD.

2.10.4 Tilted Field Lines

When representing ionospheric currents with SECS, the FAC is connected to the CF systems. In the present formulation, the FAC are assumed to flow radially, as shown in Fig. 2.1 and assumed in deriving Eq. (2.15). As noted in Sect. 2.4, this assumption is a reasonable approximation only at high magnetic latitudes, where inclination of the magnetic field is large. At lower latitudes, the field lines are noticeably tilted, and Eq. (2.15) becomes an increasingly worse approximation.

However, in principle, this is a problem only when analyzing satellite magnetic measurements. The CF and DF systems still form a basis for representing horizontal vector fields (including the horizontal current) at middle and low latitudes, and the ground magnetic field can still be represented in terms of equivalent currents. Unfortunately, interpretation of the ionospheric equivalent current at lower latitudes is more problematic, as it equals the divergence-free part of the real current only at high magnetic latitudes.

In satellite analysis, one can try to correct small errors caused by the radial/tilted discrepancy, e.g., by introducing a “forbidden zone” between the assumed and actual locations of the FAC at satellite altitude (see Fig. 3 in Juusola et al. 2006), and by shifting the resulting FAC and curl-free current slightly poleward by the amount the field line moves between the satellite altitude and ionospheric E-layer (e.g., Juusola et al. 2016). However, these approximate corrections are reasonably accurate only at high magnetic latitudes, where the field lines are almost vertical.

The CF systems could be improved by assuming a more realistic geometry for the FAC. At high and middle latitudes it might be sufficient to model the FAC as semi-infinite line currents that are oriented along the magnetic field. There is a closed-form analytical expression for the magnetic field of such a line current, so the 2D CF SECS could be redefined by replacing the semi-infinite radial line current at the pole (the \(\delta \)-function current) with a tilted one. There is no pressing need to redefine the uniform radial FAC, as those should mostly cancel when summing several different 2D CF SECS with different amplitudes. For even lower latitudes the semi-infinite line currents should probably be replaced with FAC flowing along the actual magnetic field lines, or at least along a dipole field. For the 1D CF SECS the horizontal current may be redefined so that it is antisymmetric between the (geomagnetic) hemispheres,

$$\begin{aligned} \mathbf {V}_A(\theta ,\theta _0) = \mathbf {V}_{1D}^{CF}(\theta ,\theta _0) - \mathbf {V}_{1D}^{CF}(\theta ,\pi -\theta _0) = \frac{V^{CF}}{R} \, \hat{\mathbf {e}}_\theta \, \left\{ \begin{array}{rl} -1 / \sin \theta , &{} \theta _0< \theta < \pi -\theta _0 \\ 0, &{} otherwise \end{array} \right. \end{aligned}$$
(2.50)

Assuming that the FAC flows along dipole field lines between conjugate points, the magnetic field can be calculated using Ampere’s law (Juusola et al. 2006; Deguchi 2014),

$$\begin{aligned} \mathbf {B}_A(r,\theta ) = \mu _0 \left( \frac{R}{r} \right) ^{3/2} \, \mathbf {V}(\theta _I,\theta _0) \times \hat{\mathbf {e}}_r = \frac{V^{CF} \mu _0}{R} \left( \frac{R}{r} \right) ^{3/2} \, \hat{\mathbf {e}}_\phi \, \left\{ \begin{array}{rl} 1 / \sin \theta _I, &{} \theta _0< \theta _I < \pi -\theta _0 \\ 0, &{} otherwise \end{array} \right. \end{aligned}$$
(2.51)

Here, \(\theta _I = \arcsin \left( \sqrt{\frac{R}{r}} \sin \theta \right) \) is the colatitude mapped along a dipole field to the ionosphere. One could also consider other modifications, where the FAC would be terminated at the equatorial plane (Deguchi 2014). They would have the advantage that the current system is not forced to be anti-symmetrical between the hemispheres. For the 2D CF SECS, these non-radial modifications have not been investigated.

2.10.5 Equivalent Current as a Proxy for FAC

As mentioned in Sect. 2.7, the divergence-free equivalent current may be calculated using only ground magnetic data. Thus, strictly speaking, no information is available about FAC. However, it is well known that certain patterns in the equivalent current are good indicators of FAC (e.g., Untiedt and Baumjohann 1993). These estimates can be made more formal by noting that under certain conditions the curl of the equivalent current is directly proportional to the FAC (see, e.g., Amm et al. 2002).

First of all, assume that the equivalent current is equal to the divergence-free part of the actual ionospheric current. This should be valid at high magnetic latitudes, as discussed in Sect. 2.7, although distortions created by internal induced currents and magnetospheric current systems may cause small deviations. More crucially, further assume that the Hall to Pedersen conductance ratio \(\alpha = \varSigma _H / \varSigma _P\) is spatially constant and that conductance gradients are perpendicular to the electric field. Under these assumptions \(j_\parallel = -(\nabla \times \mathbf {J}_{eq})_r / \alpha \), which is easy to verify by comparing the curl and divergence of ionospheric Ohm’s law in Eq. (2.3).

This kind of reasoning has been used from time to time (e.g., Amm et al. 2002; Juusola et al. 2009; Weygand and Wing 2016), but it should be kept in mind that this relation is only approximate and relies on assumptions that are not generally valid. Therefore \((\nabla \times \mathbf {J}_{eq})_r\) should be only considered as a proxy for FAC.

2.11 How SECS Have Been Used

As mentioned in Sect. 2.6, the elementary systems, as used in ionospheric studies, were originally introduced by Amm (1997) in order to optimally interpolate vector fields and to divide them into CF and DF parts. Since then the SECS method has found many other applications, most prominently in the analysis of satellite or ground-based magnetic measurements. The method to calculate ionospheric equivalent currents from ground-based data was developed by Amm and Viljanen (1999), as discussed in Sect. 2.7. It was extensively tested and expanded to include the internal/external separation by Pulkkinen et al. (2003a) and Pulkkinen et al. (2003b), while Vanhamäki et al. (2003) introduced the 1D variant for ground-based analysis. Since then the method has been used in numerous studies, especially with the IMAGE magnetometer network.

Other research groups have adapted the SECS method. For example McLay and Beggan (2010) applied the method to very sparse magnetometer arrays in order to interpolate the external magnetic disturbance field over large distances. Weygand et al. (2011) used the ground-based SECS method to calculate equivalent currents over North America and Greenland, by constructing an irregularly shaped grid for the elementary systems. They also carefully validated and optimized the inversion method by using simulated measurements based on a known ionospheric current model. Instead of calculating equivalent currents, Vujic and Brkic (2016) used the SECS method to construct a regional model of the crustal magnetic field using data from repeat stations and ground survey sites around the Adriatic Sea.

Satellite applications of the SECS method were developed by Juusola et al. (2006) and Juusola et al. (2014) for the 1D and 2D cases respectively, as described in Sects. 2.8 and 2.9. Juusola et al. (2007) carried out a large statistical study of the ionospheric current system by analyzing 6112 individual CHAMP passes with the 1D SECS method. To our knowledge the 2D SECS analysis of gridded and averaged CHAMP measurements by Juusola et al. (2014) was the first study where the 2D ionospheric current system, both CF and DF horizontal currents as well as FAC, was directly estimated from satellite magnetic data. Amm et al. (2015) developed a tailored SECS-based method for analyzing electric and magnetic data from the Swarm multi-satellite mission. This application is discussed in detail in Chap. 3.

Apart from magnetic data analysis, the SECSs can be used as basis functions for representing general vector fields and potentially transforming differential and integral equations into algebraic ones. This is very similar to using spherical harmonic functions in solving differential equations. For example, Vanhamäki et al. (2006) and Vanhamäki (2011) have used the elementary systems for solving ionospheric induction problems starting from Ohm’s law and Maxwell’s equations. Meanwhile, Vanhamäki and Amm (2007) introduced a new, local variant of the KRM (Kamide–Richmond–Matsushita) method (Kamide et al. 1981) for calculating the ionospheric electric field from ground magnetic data and estimated ionospheric conductances. In these applications, the elementary systems are used to transform the partial differential equations into matrix equations, which can be solved much more easily.

Finally, Amm et al. (2010) used the SECS method for local analysis of the ionospheric plasma convection (or electric field) measured by the SuperDARN radars. This application is very close to the original purpose of Amm (1997), as here the SECS method was used to combine and interpolate/extrapolate the radar line-of-sight velocity measurements into a divergence-free map of the plasma convection. The main advantages over the standard SuperDARN analysis (Ruohoniemi and Baker 1998) is that the SECS method can be used locally, relies only on measured data without any underlying statistical model, and does not require any explicit boundary conditions.