In this paper, we develop an inversion procedure by replacing the polynomials (Taylor or shifted Chebyshev polynomials) with EOFs which are calculated from the archived electron density profiles measured by Mars Global Surveyor (MGS) radio occultation. These archived electron density profiles are available on the website http://nova.stanford.edu/projects/mgs/eds-public.html.

### 3.1 The archived data and the EOF analysis

About 5600 MGS electron density profiles covering high SZAs (70 to 90°), high latitudes (60.5 to 85.7°N and 61.5 to 69.4°S) and LST (2.76 to 14.74 h) are used in the EOF analysis. We first transform these electron density profiles into profiles, , of the normalized plasma frequency,

where *f*_{p}(max) and *N*_{e}(max) are the peak values of the plasma frequency, *f*_{p}, and the corresponding electron density, *N*_{e}, respectively, and the superscript asterisk denotes the normalized value.

Assuming that the electron density profile in the Martian topside ionosphere is a monotonically decreasing function, we can obtain a true height function by inverting the normalized profile . Thus, a sampled dataset of is obtained for the EOF analysis (Wilks, 1995),

where is the stepped normalized frequency, is the *j*th true height function, is the mean height function averaged for all, is the *k*th EOF (a base function) and *A*_{
jk
} is the corresponding coefficient for the *j*th true height function. The total number of EOFs, *K*, is determined by the number of . ’s are empirically determined by diagonalizing the covariance matrix between ; i.e. is the *k*th orthonormalized eigenvector of the covariance matrix. As shown by standard mathematical analysis (see, e.g., Jolliffe, 2002), if we project the data), if we project the data onto the ’s, then the projection , (*k* = 1, 2, …, *K*; *M* ≥ *K*) represents the maximum possible fraction of the variability contained in . Therefore, the EOF series in Eq. (2) converges most quickly in representing the true height dataset . For instance, four leading terms , (*k* = 1, 2, 3, 4) may represent 94% of the total variance of our true height dataset. Hence, in our ionogram inversion we truncated the EOF series at *K* = 4. The mean height and the four leading EOFs vs. the normalized plasma frequency are illustrated in Fig. 2. The beginning of is chosen as 0.2 to make sure that all values of the true height are sampled adequately to give a statistically valid result, though the information of the true height at though the information of the true height at smaller than 0.2 will be lost. It is clearly seen that, in general, the mean height function represents the typical variation of the 5600 MGS electron density profiles. The larger rank EOF refers to the smaller scale variation. The different scales of the true height variations can be represented by different ranks of the EOF.

### 3.2 Ionogram inversion

It is assumed that the Martian ionosphere is horizontally stratified. For a vertical incidence radio wave with frequency *f*, the echo is reflected from the range *z*_{
r
} where the plasma frequency *f*_{p} equals *f.* In this case, the apparent range from the spacecraft to *z*_{
r
} is given by

where is the group refractive index; *f*_{S} is the local plasma frequency at the spacecraft; *z*(*f*_{p}) is the true range, and can be computed from the true height,

where *h*_{S} is the true height of the spacecraft. The integral function (Eq. (3)) has a unique solution under the assumption, as was made above, that the electron density distribution in the topside ionosphere of Mars has a monotonic profile.

In the integration of Eq. (3), we adopt the variable transformation, *f*_{p} = *f* sin *φ*, to avoid the infinite *n′* at the reflection point. Then Eq. (3) becomes

or equivalently,

where . In Eq. (5b), is the normalized plasma frequency defined in Eq. (1). A similar definition is made for the normalized radio frequency that *f** = *f/f*_{p}(max).

Noticing the relationship between the true range and the true height in Eq. (4), the following results may be obtained by substituting Eq. (2) into (5b)

or, in discrete form,

where

can be calculated in advance; is measured from the ionogram with the scaling process in Section 2. Thus, the coefficients *A*_{
k
} are estimated by solving the matrix equation (Eq. (7)), and the final electron density profile is then obtained by Eq. (2). However, in most cases, the densities between the spacecraft and the first reflection point are not known. In order to carry out the inversion, we assume that the electron density varies exponentially with height in the gap. The assumption used here, similar to that of Nielsen *et al.* (2006), Gurnett *et al.* (2008) and Morgan *et al.* (2008), is also a good approximation but not a complete description.

In theory, the EOF series, the same as the polynomials used previously (such as the Taylor or shifted Chebyshev polynomials), can be used to expand any electron density profile in the Martian topside ionosphere. Moreover, the EOF series converges more quickly, especially when it is used to represent the electron density profile in the range of the MGS radio occultation data, because the EOF series is derived from the measured MGS radio occultation data.