The Scalable Plasma Ion Composition and Electron Density (SPICED) Model for Earth's Inner Magnetosphere

The plasma mass loading of the terrestrial equatorial inner magnetosphere is a key determinant of the characteristics and propagation of ultra low frequency waves. Electron number density is also an important factor for other types of waves such as chorus, hiss and EMIC waves. In this paper, we use Van Allen Probe data from September 2012 to February 2019 to create average models of electron densities and average ion mass in the plasmasphere and plasmatrough, near the Earth's magnetic equator. These models are combined to provide an estimate of the most probable plasma mass density in the equatorial region. We then use machine learning to form a set of models which are parameterized by the SuperMAG ring current index based on the design of the average models. The resulting set of models are capable of predicting the average ion mass, electron density and plasma mass density in the range 2≤L≤5.9 and over all magnetic local time sectors during a range of conditions where −75≤SMR≤+27 nT.

cm E  ) plasmatrough population Abstract The plasma mass loading of the terrestrial equatorial inner magnetosphere is a key determinant of the characteristics and propagation of ultra low frequency waves. Electron number density is also an important factor for other types of waves such as chorus, hiss and EMIC waves. In this paper, we use Van Allen Probe data from September 2012 to February 2019 to create average models of electron densities and average ion mass in the plasmasphere and plasmatrough, near the Earth's magnetic equator. These models are combined to provide an estimate of the most probable plasma mass density in the equatorial region. We then use machine learning to form a set of models which are parameterized by the SuperMAG ring current index based on the design of the average models. The resulting set of models are capable of predicting the average ion mass, electron density and plasma mass density in the range 2 5.9 E L   and over all magnetic local time sectors during a range of conditions where 75 27 E SMR     nT.
JAMES ET AL. ©2021. The Authors. This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.
2 of 32 existing at higher E L values, and the plasmapause boundary separating the two. Whereas the plasmapause originates predominantly from the interplay of ionospheric refilling and erosion, the plasmatrough contains plasma from both direct ionospheric outflows as well as convected plasma from the plasma sheet. In terms of loss processes, the dominant contributor is convective erosion. Flux tubes undergoing convective flows experience dramatic plasma loss following reconnection at the dayside magnetopause, where this process is attributed to the sharp drop in density outside the plasmapause (Chappell, 1972). During periods of enhanced magnetospheric convection (e.g., geomagnetic storms), convection erosion is increased and can significantly erode the plasmapause to low E L values (Darrouzet et al., 2009). Furthermore, enhanced heavy ion outflows during active periods can radically alter the mass density of inner magnetospheric plasma (Kronberg et al., 2014;Sandhu et al., 2017).
A number of models of electron and ion densities have been produced using in-situ data (e.g., Carpenter & Anderson, 1992;Gallagher et al., 1988Gallagher et al., , 2000. Carpenter and Anderson (1992) used ISEE (International Sun-Earth Explorer) 1 data to produce a model of electron density in the region 2.25 8 E L   , although the coverage in magnetic local time (MLT) was limited to the range 0-15 h due to the variable plasma structure in the evening sector. Another model of electron densities by Sheeley et al. (2001) used CRRES measurements to model both the plasmasphere and plasmatrough for all local times and E L-shells in the range 3 7 E L   -this model did not include any dependence on magnetic activity. A model of proton densities was also produced using data from the Dynamics Explorer 1 satellite (Gallagher et al., 1988) which used an analytical expression to describe plasmaspheric and plasmapause proton densities during moderate geomagnetic activity. The Global Core Plasma Model (GCPM) (Gallagher et al., 2000), is notable in that it provided both electron density and ion composition information parameterized by solar and geomagnetic activity, and was a combination of separate models for the ionosphere, plasmasphere, plasma trough, plasmapause and the polar cap.
More recently, machine learning has been utilized to form electron density models; Zhelavskaya et al. (2017) created the PINE (Plasma density in the Inner magnetosphere Neural networks-based Empirical)-an artificial neural network-based model using Van Allen Probe measurements of electron density. This model is capable of reproducing the cold electron dynamics of the equatorial inner magnetosphere and compares well with IMAGE extreme ultraviolet (EUV) images of helium ion column density. Unfortunately, the design of the PINE model is such that there is a discontinuity in the electron densities around midnight and the model itself is not publicly available. Another model of electron density was created by Chu et al. (2017), called the DEN3D (three-dimensional dynamic electron density) model using electron densities measured by a number of different spacecraft. This model used an artificial neural network to predict electron densities in the region 2 7 E L   and is capable of reproducing 91% of measurements. Both PINE and DEN3D models attempt to describe the plasmaspheric and plasmatrough electron densities together, but neither is quite able to accurately depict the relatively sudden transitions between each population across the plasmapause; instead the transition is gradual-effectively smoothing the densities of the two populations together. In this paper, the plasmasphere and plasmatrough populations are considered separately, where a probability model suggests which population is most likely to exist at a given position near the equatorial plane. This configuration allows the predictions of both populations' densities to be predicted independently and, either using the probability model or in-situ observations, the user can decide which is most likely.
In the Earth's magnetosphere, a function based on the position along a field line is sometimes used to describe the distribution of plasma mass density, one example is the power law used by Cummings et al. (1969), where different power law indices were shown to result in changes to both the field line eigenfrequencies and the the ratios of harmonic frequencies. Later work by Denton et al. (2001); Denton et al. (2004) using ULF waves to probe field line mass loading suggested that on more distant field lines, the power law was not completely appropriate to describe observed ULF waves, and that there was an equatorial enhancement in E .
Work by Sandhu et al. (2016a), (2016b) used data from the Cluster mission from the outer magnetosphere to construct models of average ion mass and electron density, respectively. The average ion mass, av E m , model of Sandhu et al. (2016b) was constructed using CODIF (ion Composition and Distribution Function analyzer, Rème et al., 1997) where 0 ( ) E F L is a function which describes the variations in the axisymmetric component (i.e., are functions which provide the amplitude and phase, respectively, for each azimuthal wavenumber.
Equivalently, Equation 7 can be expressed in its sine-cosine form, means that no phases need to be unwrapped. This is particularly useful in the case of the models presented later in Section 4.3, where we can avoid the complexity and unreliability of 2D phase-unwrapping algorithms.

Probability (P) Model
The first step in creating the probability model was to separate electron density measurements by the plasma population from which they originated. Measurements were separated using (Sheeley et al., 2001), where E L is the E L-shell of the spacecraft at the time of the observation. Measurements where e b E n n  were considered to originate from the plasmaspheric population, otherwise they are considered to be from the plasmatrough. The reliability of using this equation for the classification of electron density measurements is discussed in Section 3.2.
The axisymmetric component of the probability model, 0 E P, was found by placing data from all local times into thin E L bins and calculating the probability using, where PS E N is the number of plasmaspheric measurements and PT E N is the number of plasmatrough measurements. Figure 1 shows 0 E P as a function of E L in black, with a fitted variant of the logistic function similar to the sigmoid function, is shown as a red dashed line, where E a and E b are free parameters. This form of the logistic function was used because it is constrained such that it could only take values in the range Figure 3 shows the probability model in the equatorial plane, where (a) is the axisymmetric portion of the model, (b) is the spatial variation due to the periodic components of the model and (c) is the combined model. The color scale used in panels (a) and (c) is such that red corresponds to positions which are more likely to be within the plasmasphere ( 0.5 E P  ); blue would suggest that the plasmatrough is more likely; and white regions suggest that the probability of encountering either plasma population is close to being equal ( 0.5 E P  ). Panel (b) shows the spatial variations due to the periodic components of the model, where red implies a local increase in E P (with solid contour lines) and blue means a reduction in E P (dashed contour lines).   3 show that overall the plasmasphere is considerably more likely to be encountered within the region 2 5.9 Figure 3c is mostly white, E P is close to 0.5 so either population could be present. The spatial variations presented in Figure 3b suggest that there is an asymmetry, with an increased probability (up to E 10%) of being in the plasmasphere around dusk at 5 E L  . Figure 3c also suggests that the plasmatrough is more commonly observed at larger E L in the noon sector. The probability model presented here is created using all data, and is therefore considered to be an average picture of the probability of any position within this region being within the plasmasphere. The plasmasphere undergoes significant changes in shape and size depending upon the global magnetospheric state (e.g., Moldwin et al., 2002;Spasojević et al., 2003), so a parameterized version of this model which can exhibit much of this variation is presented later, in Section 4.3.

Plasmatrough (n e PT) and Plasmasphere (n e PS) Electron Density Models
The e E nPT and e E nPS models are both created in a similar way to the probability model, by subtracting some axisymmetric component which does not vary with azimuth, and then using L-S to determine the amplitudes and phases of variations which occur with integer values of E m. Figure 4a shows a histogram of the e E n measurements used to create these models; e E n is not distributed normally (as a Gaussian) and can take

of 32
values over a range of different orders of magnitude. The result of this highly non-Gaussian distribution is that the mean of e E n in a E L bin will not accurately represent the expected value of e E n. Figure 4b shows that 10 log e E n is much closer to being normally distributed, but a better (more Gaussian) solution to this problem is the use the Box-Cox transformation (Box & Cox, 1964): where E  is the power parameter, e E n must be greater than zero, and t e E n is the transformed electron density. The value of E  was obtained by maximizing the log-likelihood function (e.g., Box & Cox, 1964),  Figure 4c, which is closer to a normal distribution.  The b E n line in Figure 5 (in pink) was used by Sheeley et al. (2001) to separate the the mean electron density distributions of the plasmasphere and plasmatrough. It was acknowledged by Sheeley et al. (2001) that using Equation 11 to classify the two populations could be a possible source of error due to the potential overlap in the electron density distributions of the two populations. It is also evident from Figure 5 that for low E L ( 2), b E n would be greater than the electron densities predicted by extrapolating the PS model, which would lead to relatively high plasmaspheric electron densities ( 5000 E  3 cm E  or more) being mislabeled as 9 of 32 plasmatrough densities. Fortunately, in the region of the inner magnetosphere considered here (2 5.9 E L   ), Figure 5 shows that Equation 11 appears to separate the two populations reliably overall.
As in the probability model, the axisymmetric component of the density was subtracted from the data in each of the E L bins for both models so that L-S analysis could be performed. The Real, ( )    n models, respectively, where contour lines show the effect which the spatial variations have upon the model. All panels are oriented such that noon is at the top and dawn is to the right. 11 of 32 component of the model. While there appear to be substantial changes in the density with local time at low E L, the same is true about the spatial variations depicted by the PT model, with most being less than 25% of the magnitude of the axisymmetric component.

Plasmatrough (m av PT) and Plasmasphere (m av PT) Average Ion Mass Models
The average ion mass models are constructed in a very similar way to the electron density models in Section 3.2, where the main difference lies in the transform used on the data. The distribution of av E m is highly skewed towards 1 av E m  , but the shape of this distribution varies significantly with E L. Instead of using a single value of

of 32
Unlike in Figure 5a, where there are two distinct populations of electrons, Figure 8 shows that both populations have similar, albeit not quite identical, compositions. The difference between the two is most notable at higher E L, where there is a larger enhancement in the PT population av E m than that of the PS.
As with the aforementioned models, the axisymmetric components of av E m PS and av E m PS were subtracted prior to L-S analysis. Figure 9 shows the real (a and c) and imaginary (b and d) components of the av E m models, in the same format as   Models of total electron density can inform our understanding of key wave processes within the inner magnetosphere. Regions of high density plasma correlate with plasmaspheric hiss (Russell et al., 1969), sharp density gradients are implicated in the chorus to hiss mechanism (Delport et al., 2012), and high density regions on the duskside are important for EMIC wave generation (Usanova et al., 2008). Due to their role in a range of processes, electron density models are also a key input to magnetospheric simulations (e.g., Glauert & Horne, 2005).
The output of these combined models could also act as a useful constraint when using the harmonics of ULF waves observed on the ground (e.g., Wharton et al., 2018) or in space (e.g., Takahashi et al., 2004) to characterize the field-aligned plasma density profile. Depending upon the assumed profile of the plasma (e.g., power law or power law + equatorial enhancement), this model could be used to reduce the number of free parameters to be fitted by providing an estimate of the equatorial density. However, caution should 15 of 32 be exercised when using these average densities-especially at larger E L, where the probability model becomes close to 0.5. The inner magnetosphere is a very dynamic region of space and sometimes the average model may assume that a position is occupied by the plasmasphere when, given the current magnetospheric conditions, that position is actually within the plasmatrough (or vice versa), for example, when spatially localized plumes form-these would not be well represented by this model. The models above can therefore be considered to provide two values for E : one from the plasmasphere and one from the plasmatrough, where the probability model would provide an idea about which population is more likely to be present.

Comparison to Other Models
In this section the SPICED model is compared to other models of electron density and composition.   (Carpenter, 1966). The difference between the model presented here and that of Sandhu et al. (2016a) also appears to increase with E L, which may be attributed to the fact that the equatorial electron density in the Sandhu et al. (2016a) model is effectively a linear function of E L, where other models use non-linear functions to describe this relationship. The GCPM estimates of electron density at 5 E L  or 6 are similar in magnitude to the PT model in all local times, but the plasmaspheric portion of the GCPM shows a different trend to the densities output by the PS model presented here. The PS and PT models presented here show that there is typically a difference of around an order of magnitude between the plasmaspheric and plasmatrough densities for 2 5.9 E L   ; the GCPM used a smooth transition between the plasmasphere and plasmatrough, which only exhibits a noticeable step-like change near dawn -otherwise the difference between the two populations appears to only be a change in the gradient with E L. This smooth transition between the two populations used by the GCPM model effectively smooths the densities of the two populations together. The advantage of having two separate PS and PT models is that this smoothing across the plasmapause does not happen, allowing for more reliable estimates of e E n in both the plasmatrough and in particular the plasmasphere. Carpenter and Anderson (1992) and Sheeley et al. (2001) both provide separate models of the plasmasphere and plasmatrough, where each population is described by some non-linear function of E L. The Sheeley et al. (2001) models are in very good agreement with the PS and PT models presented in this paper at all MLTs and overlapping E L-shells. The Carpenter and Anderson (1992) models exhibit similar plasmasphere and plasmatrough densities, but are only valid for a limited range in local time (0 E  MLT 15 E  ), unlike our models. The plasmaspheric densities provided by Carpenter and Anderson (1992) are generally higher than those predicted here, and the plasmatrough densities are usually lower, where both differences may be explained by the difference in data selection criteria used before creating the models. Carpenter and Anderson (1992) specifically selected plasmaspheric electron density measurements from density profiles along E L which were characteristic of a "quiet" plasmasphere, and discarded data along the profile where it either became irregular or exhibited a steeper negative slope with E L. The criteria used by Carpenter and Anderson (1992) intentionally excludes lower electron densities which could potentially originate from JAMES ET AL.

10.1029/2021JA029565
16 of 32 flux tubes which were still refilling (leaving measurements of the "saturated" plasmasphere), whereas both our model and the Sheeley et al. (2001) model were constructed using all plasmaspheric electron density measurements ( e b E n n  , Equation 11). The Carpenter and Anderson (1992) plasmatrough model differs from both the Sheeley et al. (2001) and our plamastrough models for a similar reason-Carpenter and Anderson (1992) selected electron density profiles which were at least a factor of 5 smaller than the "saturated" plasmasphere model in the dayside magnetosphere, and a factor of 10 on the nightside, whereas our model and the Sheeley et al. (2001) model both include electron densities which would have been rejected by Carpenter and Anderson (1992). With the inclusion of our E P model, our set of models has an advantage over those of Carpenter and Anderson (1992) and Sheeley et al. (2001) in that it provides an estimate of which populations are most likely at different E L-shells and MLTs. Our average models are also improved upon in Section 4.3, where they are all parameterized based on geomagnetic conditions. The right hand panels of Figure 12 show that, at the interface where the av E m models presented in Section 3.3 and the Sandhu et al. (2016a) model meet ( 5.9 E L  ), there can be substantial differences in the predicted average ion mass. A possible explanation for the difference is that the HOPE instrument is capable of detecting particles with lower energies than that of CODIF and may therefore provide different relative concentrations of the ions. Another possible reason for the different ion concentrations is that the datasets used to create each model originate from times associated with different levels of solar activity; the data set used by Sandhu et al. (2016a)  The average ion mass models created here can also be compared with magnetoseismological studies which have use ULF waves to determine av E m . One such example is provided by Takahashi et al. (2006), where av E m is predicted to be typically from E 2-4 amu in the region    4 8 L (see Figure 7b of Takahashi et al. (2006)). Another study by Takahashi et al. (2008) also used ULF wave activity to determine average ion mass for a pass through the plasmatrough and plume and found that m calculated by the model solely due to changes in the relative concentration of helium ions to protons. The data presented in Figure 8 suggest that oxygen makes a significant contribution to the plasma mass loading of field lines at low E L-shells, which GCPM does not predict.

Model Parameterization Using Artificial Neural Networks
The aforementioned models show an average picture of the density and composition of the Earth's near-equatorial inner magnetosphere; this set of models can be used to provide an example of the most probable characteristics of the PS and PT plasma populations, but there is no information on how these plasmas may vary. The Earth's magnetosphere is by no means a steady system, variations in Solar and geomagnetic activity drive large changes in the morphology and composition of both the plasmasphere and plasmatrough, therefore it is prudent to attempt to determine how this model may vary under different levels of activity. In this section, we briefly describe the implementation of e E nPS, e E nPT, E P, av E m PS and av E m PT models which can be scaled based on changes in geomagnetic activity.
The first step in scaling these models was to determine what parameter(s) would be most suited to each one. For simplicity, a single extra parameter, E z, was chosen for each of the five models. Appendix B describes in detail the process by which the parameters were selected. Conveniently, the best parameter for scaling all 5 models is the SMR index (Newell & Gjerloev, 2012), which is a measure of the horizontal deviation in the Earth's surface magnetic field due to variations in the ring current; this index is similar to the E Dst and SYM-H indices. The magnitudes of number density and heavy ion concentrations, as well as the size and shape of the plasmasphere, is known to respond strongly to ring current indices (Goldstein et al., 2019;Kronberg et al., 2014;Sandhu et al., 2017;Wharton et al., 2020). During storm times, heightened convection and field-aligned currents result in strong convective erosion and enhanced heavy ion outflows.
With the additional parameter, m E I L z , each of which is a non-linear 2D function. Artificial neural networks (ANNs) were trained to act as these functions because they are particularly well suited to solving highly non-linear problems and have been proven to be capable of creating similar models (e.g., Chu et al., 2017;Zhelavskaya et al., 2017).

of 32
In order to create training data for each of the ANNs, the Lomb-Scargle analysis used to create the average models was performed on small subsets of the data. Each subset contains 5% of the total data, which covers a small range of SMR; a total of 951 subsets are used starting from the lowest 5% of SMR, to the highest 5% in steps of 0.1%. The SMR range covered by the median values of the parameters bins was −41 to +16 nT. These parameter ranges were extended by splitting the most extreme data bins into smaller bins, each containing 1% of the total data, resulting in a total of 991 subsets. This extended the SMR ranges to −75 to 27 nT and gives the model the ability to provide density and composition predictions for a wider range of magnetospheric activity levels. Every subset provides 0 E F, m E R and m E I for up to 381 values of E L, providing a total of up to E 377k samples.
The implementation of the ANNs used here is addressed specifically in Appendix C which describes how the network architectures were chosen and how they were trained. As with the average model, the parameters and the code for the scaled models are all available in the Supporting Information S1 and at https:// github.com/mattkjames7/spicedmodel.

Comparison to Real Data and Other Scalable Models
In this section the models are compared to real data, where the primary focus is upon the parameterized variant of the models using the trained ANNs described in the previous section. Figure 13 shows the comparison between electron density data (top panels a and b) with the combined output of the e E nPS, e E nPT and E P models (bottom panels c and d), using the same method as described for Figure 11a. Panel e shows the probability density function of the SMR index for the entire data set, where the lowest and highest 5% of SMR measurements have been highlighted in green. Panel a shows the electron densities measured near to the magnetic equatorial plane for the 5% of data collected during times with the lowest SMR, in the range −249 to −30 nT with a median of −41 nT. Panel c shows the corresponding combined electron density model output using the median value of SMR from panel a. Both the data and the model show that during low values of SMR, the plasmapause moves significantly planetward in all local times except near to dusk where a plume forms. The right panels (b and d) of Figure 13 show the equivalent to the left panels using the 5% of data associated with the highest SMR. Both panels b and d show that the region from 2 5.9 E L   is predominantly occupied by a large plasmasphere during periods of high SMR, with the plasmapause location beyond the scope of the model in all local times. Any mismatch of shape of the plasmapause in panel c with that of panel a could be attributed to there being relatively little data to train the model near the more extreme values of SMR; as panel e shows, 90% of the data (949 out of 991 SMR bins from section Appendix B) originate from times when 30 13 E SMR    nT, a range which is only E 20% of the size of the range in panels a and c, so the model is likely to be somewhat biased towards times with more commonly observed values of SMR. Figure 14 shows a comparison of the measured and modeled av E m in the same format as that of Figure 13 with the same SMR bins. In the low SMR case (panels a and c), both plasmatrough and plasmasphere exhibit generally higher av E m values than those predicted by the average models implying more O E  ions populating the inner magnetosphere during disturbed times, with the plasmatrough also displaying more significant local time variations. Panels b and d show the high SMR case, where the plasmasphere occupies the entire model E L range, as in Figure 13d. During high SMR, the av E m PS model predicts overall that the average ion mass is less than both the low SMR example and the average model-particularly at larger E L. Unlike the electron density model, where there is approximately an order of magnitude step between the two plasma populations, the change in average ion mass over the predicted plasmapause is much less severe (typically 1 E  amu or less), which suggests that any change in the local Alfvén speed across the plasmapause boundary will mostly be attributed to changes in the overall plasma density, rather than the composition. The increase in av E m at high E L in the low SMR case is consistent with the recent observations of the oxygen torus made by Nosé et al. (2018) using Arase (Miyoshi et al., 2017) and Van Allen Probe data. The observations of Nosé et al. (2018) suggested that the oxygen torus was localized in MLT, with an enhancement observed near dawn ( 3.5 av E m  near 5 E L  -similar to that predicted here), but no notable enhancement at dusk. While the true azimuthal extent of the oxygen torus observed by Nosé et al. (2018) is unclear, it did suggest that the generation mechanism proposed by Roberts et al. (1987) may be in play.

of 32
The comparisons made between the model output and the data in Figures 13 and 14 show that the parameterized models provide a reasonable representation of the data in the specific cases where the SMR index has deviated significantly away from normal values, whereas Figure 15 shows a more general comparison. In Figure 15 both the average and the parameterized versions of the models are compared directly to the data. Each panel shows a 2D histogram of the original data on the x-axis and the model output on the y-axis, where a green dashed line represents the identity line where data and model output would be equal. The root mean square (RMS) differences and mean absolute errors (MAE) for each parameter are shown in the bottom right of each panel, where the MAE and RMS values for the density plots are calculated using the Box-Cox transformed densities. The top panels (a, b, c and d) compare the data with the predictions made using the average models constructed in Section 3, while the bottom panels (e, f, g and h) show the equivalent comparisons made using the parameterized models constructed in Section 4.3. . , where both predict densities characteristic of the plasmasphere. At larger E L-shells, particularly at noon and dawn, the PINE model starts to gradually deviate away from plasmaspheric densities, towards those which resemble the plasmatrough. This is in contrast to the SPICED model which predicts that the plasmasphere is the most likely population to exist for the entire range of E L at SMR = 0 nT. The PINE model images compared in the right panels of Figure 16 both originate from times when SMR was close to −75 nT (dashed and dotted black lines). The dashed line represents the PINE model output shortly after the onset a geomagnetic storm, during the main phase (at 03:30 UT on June 6, 2013) and the dotted line represents the output during the start of the recovery phase of the storm (at 14:00 UT on June 6, 2013). In both storm-time cases, the PINE model is mostly in agreement with the models presented here, where the plasmasphere was eroded significantly-particularly from midnight through to noon. The largest difference is near noon,

of 32
where the plasmasphere is predicted to extend to much larger E L-shells early during the main phase of the storm; later in the storm, during the recovery phase, the plasmapause is at a much lower E L-shell, and both models are in closer agreement. The PINE model has the advantage over the model presented here that it is capable of taking into account the time history of geomagnetic parameters; the downside of the PINE model is that there is always a very smooth change in the electron densities across the plasmapause because both plasmasphere and plasmatrough populations are modeled together. Modeling the PS and PT separately, and combining these models with the E P model, allows for better predictions of e E n closer to the plasmapause, rather than effectively smoothing the densities of the two populations together like the PINE model. Gradients in density around the plasmapause can vary from being very gradual and not very well defined during times when the plasmasphere is refilling; it can also be very sharp during periods of erosion (Chappell, 1972). approximately match SMR (Bergin et al., 2020), so for the purpose of the comparison made here-SMR is used in place of E Dst. Both models suggest that the plasmatrough electron densities drop during low SMR compared to higher SMR, albeit by different amounts. As with the average models presented in Figure 12, the difference between the two models increases with

10.1029/2021JA029565
24 of 32 Figure 17 shows an example of the model being used to describe the state of the equatorial inner magnetosphere during the main phase of a geomagnetic storm by driving the model using time-series SMR indices, while showing direct comparisons to Van Allen Probe data. The top three panels a, b and c, each show the plasma mass density in the equatorial plane as predicted by the combined models at three different times during the main phase of the storm. In each panel a-c, the positions of probes A and B are represented by red and orange circles, respectively; in each case, the orbits were oriented such that apogee was around 23 MLT. Panel d shows the SMR indices from 20:00 on April 29 th E to 14:00 on May 1 st E 2013. The red, purple and blue vertical dashed lines in panel d and all subsequent panels, represent the times which correspond to the model plots in panels a, b and c, respectively. Below panel d, data from each spacecraft are shown, where probe A data are on the left and probe B data on the right. In panels e to j data from the spacecraft are in gray, while the model outputs are in color; both model outputs (from PS and PT) are presented in each panel as dotted lines, which become solid depending on which population the E P model predicts the spacecraft to be within. Panels e and f show av E m measured by the Van Allen Probes in gray and modeled in blue (PT) and purple (PS). Panels g and h show the electron densities, where the PS and PT models are both presented in yellow and red, respectively. Panels i and j show the plasma mass density for the PS (green) and PT (cyan), calculated using the av E m and e E n data and models from the panels directly above. The E P model output for each probe is presented in panels k and l as a purple line, where 0.5 E P  represents times when the probes are likely to be within the plasmasphere. The shaded areas represent the PS (orange) and PT (purple) classifications based on the measured electron densities. Finally, panels m and n show the value of norm E R for each spacecraft, where the green shaded area represents the valid range of 0.95 norm E R  -the times when this condition is met are shown in panels e-j by a green shaded background. An animated version of this plot is included in the Movie S1 for this paper.
During the time shown in Figure 17d, the SMR index drops from just above 0 to around −75 nT, reaching the lower SMR limit of the models, beyond which the model is not likely to be capable of providing reliable predictions. At the start of the event, the plasmasphere extends to beyond the outer boundary of the model. As time progresses and SMR drops, panels b and c show that the plasmasphere is predicted to shrink and form a plume near dusk. The majority of the changes to the modeled plasma mass density observed in Figures 17a-17c are driven by the variation in SMR shrinking the plasmasphere compared to the changes in composition.
The data shown in panels e and f of Figure 17 show that the av E m measurements can be fairly noisy (particularly in the plasmatrough), but are mostly in some agreement with the model when within the valid norm E R range. Both e E nPS (upper yellow line) and e E nPT (lower red line) models provide reasonable estimates of the plasmaspheric and plasmatrough densities when compared to the data. The PS model appears to perform somewhat better than the PT model, this is likely to be because 75% of the collected electron densities originated from the plasmasphere, whereas the plasmatrough does not usually extend to lower E L-shells. This resulted in less plasmatrough data to train with in this region of space. A similar story is true for the E  model comparison presented in panels i and j, where plasmaspheric mass densities are generally predicted better than plasmatrough ones. Panels k and l show that the model provides reasonable estimates of when the probes cross the plasmapause from one population to the other even when outside of the valid norm E R range. The E P model is not perfect though, as panel l shows that probe B traversed the plasmatrough in the hours surrounding midnight, but the model still predicted E P slightly higher than the threshold required to switch from PS to PT densities. The scalable models presented in this paper are all parameterized using a single instantaneous value of SMR. This simple parameterization means that times corresponding to identical SMR values during different phases of a storm, such as that presented in Figure 17, would incorrectly generate the same model. The models could be improved by using a weighted history of SMR, similar to the weighted p E K used by Gallagher et al. (1988), or by creating models for specific phases of a storm. A potentially better way of improving the SPICED model would be to include a history of multiple driving parameters as inputs, similar to the method used by (Zhelavskaya et al., 2017), where a 96 h history of multiple parameters is used to drive the model. Such developments will be included in future iterations of SPICED.

Conclusion
In this paper, measurements of electron density and ion composition made by the Van Allen Probes are used to create models of the equatorial inner magnetosphere. The first set of models are created in Section 3 are used to describe the average state of this region. Two models of average ion mass are created using the relative concentrations of hydrogen, helium and oxygen ions-one for the plasmasphere and one for the plasmatrough. Two models of electron densities are created, one describing plasmaspheric electron densities, the other describing the plasmatrough population. A fifth model is created to describe the probability of a position on the magnetic equatorial plane being within the plasmasphere or not and is used in conjunction with the average ion mass and two electron density models to provide an estimate of the average plasma mass density near the equatorial plane.
The average models described above are then parameterized such that they can be used to describe the ion composition, electron density and probable plasmasphere shape during varying geomagnetic conditions by utilizing artificial neural networks. The models are shown to provide a good representation of the data overall, especially at times when the SMR index remains within a normal range. Both sets of average and scalable models compare well with previously published models, also providing improvements in e E n predictions where other models may be mixing the plasmasphere and plasmatrough densities. These models are also the only set of models which are capable of providing both electron density and average ion mass predictions within the region 2 5.9 E L   -similar to the way that the Sandhu et al. (2016b); Sandhu et al. (2016aSandhu et al. ( , 2017 models do for the region 5.9 9.5 E L   .
The predictions made by these models can be used to aid the study of ULF wave propagation within the vicinity of the Van Allen Probes. By providing the electron density and average ion mass, the models can be used to provide estimates of the equatorial plasma mass density and, with additional magnetic field data, determine an approximate prediction of the Alfvén speed in the region for a range of geomagnetic conditions.
Future work in this area could include extending this set of equatorial plasma models using data from other spacecraft at higher E L-shells. The models could also be extended using data from spacecraft with higher orbital inclinations (e.g., Arase) to be able to determine the field-aligned profile of av E m and e E n as done in Sandhu et al. (2016b) and Sandhu et al. (2016a). Ground-based and in-situ ULF wave observations would also have the potential to extend the model further along the field lines by using the harmonics of the waves to determine the field-aligned structure of the plasma.

Appendix A: HOPE Moments
This section describes the derivation of cold ion densities from HOPE level 3 omni-directional spectra by integrating the differential energy flux and correcting the oxygen ion densities.
Following the work of Genestreti et al. (2017)  is the spacecraft potential as measured by the Electric Field and Waves instrument (EFW), (Wygant et al., 2013). The spectra are then integrated from E min  (the minimum energy limit of the HOPE instrument) to 20 eV using a Reimannian discrete sum (e.g., Genestreti et al., 2017;Goldstein et al., 2014) in order to obtain an initial partial energy number density (PEND), L, because all three model parameters are functions of the E L-shell (see Equation 8). This section determines which feature would be best to use alongside E L as a second feature, which would correlate the most with the largest variations in the model parameters.
The potential features tested here include the F10.7 index, Kp-index (Bartels et al., 1939), OMNI parameters (King & Papitashvili, 2005) (including magnetic field orientation, solar wind velocity, Mach numbers etc.) and SuperMAG geomagnetic indices (Newell & Gjerloev, 2011, 2012)-see Table B1. Prior to feature analysis, all parameters were scaled such that they vary over similar scales, either such that their ranges were limited to the range −1 to +1, or such that their means were equal to 0 and standard deviations equal to 1. In some cases, where parameters varied over a large range and exhibited a non-Gaussian distribution, the Box-Cox transformation (see Equation 14) was used and then data were normalized to have a mean of 0 and a standard deviation of 1.
To compare the different features, the sklearn.feature_selection. SelectKBes function from scikit-learn (Pedregosa et al., 2011) was used to compare each parameter to the density, average ion mass and whether a measurement originated from within the PS or PT. This object uses a scoring function which determines how well changes in each feature correlate with changes in a given output parameter. Determining whether a point originates from the PS or PT populations is a classification problem, so the scoring function used for this was f_classif; but e E n and av E m are continuous variables, so the f_regression function was used in these cases. Both functions provide an "F-value," where a parameter with a larger F-value has more of an effect on the output parameter.  magnetic field deviation on the ground due to the variations in the Earth's ring current. The SMR index, like the st E D and SymH indices, are a useful indicator for the presence of geomagnetic storms which cause large enhancements in the Earth's ring current, resulting in negative deviations in SMR. It is therefore understandable that there is some correlation of SMR with electron densities and in particular with PS/PT classification because geomagnetic storms cause large changes in the structure of the plasmasphere though enhanced global convection, which results in an eroded plasmasphere (Moldwin et al., 2002) and the formation of a plume (e.g., Spasojević et al., 2003).
As a result of this feature analysis, the model parameters for all models will be parameterized by both E L and SMR.

Appendix C: Network Architecture Selection and Training
In this section feed forward ANNs are used to predict the model parameters based on solar/geomagnetic activity. A feed forward ANN consists of nodes, analogous to neurons, which are arranged in layers; the first layer is the input layer, the final layer is the output layer, and the layers between are hidden layers. Each node has an activation function, which adds non-linearity to the ANN, the output of which is mapped to every node in the following layer. The ANN works by propagating input features through the ANN one layer at a time, until an output is produced.
For each of the four models presented in Sections 3, a single ANN is used to predict the axisymmetric, real and imaginary components of Equation 8. The input layers for every ANN used here contains just two nodes, one for E L and one for SMR ( E P, PT and PS models). The output layer for every model contains 7 nodes: one for 0 E F, three for m E R and three for m E I (where E m is 1, 2 or 3). With the exception of the output nodes, all nodes use the softplus function: ( ) log (1  ), which is a smooth approximation of the rectified linear unit (ReLU) (Glorot et al., 2011). The combination of ReLU units in the hidden layers adds the ability of the networks to form a highly non-linear model. The output nodes for the ANNs are linear, which means that they can output any real, finite value.
The specific configuration of a neural network (i.e., the number of layers, and number of nodes in each layer) is called the network "architecture." The exact numbers of hidden layers and nodes for each model Figure B1. F-values for each potential feature parameter for (a) PS/PT classification, (b) electron density and (c) average ion mass. In each panel, parameters are sorted left to right from highest to lowest F-value, where the mean F-value is represented by a horizontal dashed line. Potential feature parameters include: SuperMAG ring current and electrojet indices; OMNI parameters such as solar wind velocity, dynamic pressure and IMF vectors; clock and cone angles derived from OMNI IMF vectors.