Upstream solar wind speed at comet 67P-Reconstruction method, model comparison, and results

Context. Rosetta followed comet 67P at heliocentric distances from 1.25 to 3.6 au. The solar wind was observed for much of this time, but was significantly deflected and to some extent slowed down by the interaction with the coma. Aims. We use the different changes in the speed of H and He2+ when they interact with the coma to estimate the upstream speed of the solar wind. The different changes in the speed are due to the different mass per charge of the particles, while the electric force per charge due to the interaction is the same. A major assumption is that the speeds of H and He2+ were the same in the upstream region. This is investigated. Methods. We derived a method for reconstructing the upstream solar wind from H and He2+ observations. The method is based on the assumption that the interaction of the comet with the solar wind can be described by an electric potential that is the same for both H and He2+. This is compared to estimates from the Tao model and to OMNI and Mars Express data that we propagated to the observation point. Results. The reconstruction agrees well with the Tao model for most of the observations, in particular for the statistical distribution of the solar wind speed. The electrostatic potential relative to the upstream solar wind is derived and shows values from a few dozen volts at large heliocentric distances to about 1 kV during solar events and close to perihelion. The reconstructed values of the solar wind for periods of high electrostatic potential also agree well with propagated observations and model results. Conclusions. The reconstructed upstream solar wind speed during the Rosetta mission agrees well with the Tao model. The Tao model captures some slowing down of high-speed streams as compared to observations at Earth or Mars. At low solar wind speeds, below 400 km s−1, the agreement is better between our reconstruction and Mars observations than with the Tao model. The magnitude of the reconstructed electrostatic potential is a good measure of the slowing-down of the solar wind at the observation point.


Introduction
The Rosetta mission opened up the possibility of studying solar wind interaction with a comet environment over a wide range of heliocentric distances and associated changing comet activity, solar wind density, and insolation (Glassmeier et al. 2007;Taylor et al. 2017). Throughout much of the mission, the solar wind permeated the coma of the comet and could thus be measured locally. The solar wind at the measurement location was affected by the interaction with the coma, seen primarily as a deflection of the flow direction (Behar et al. 2016a(Behar et al. , 2017, with some slowing-down (Nilsson et al. 2017a) that was further accented in sporadically occurring shock-like structures, so-called infant shocks Goetz et al. 2021). A better knowledge of the upstream speed of the solar wind would improve our understanding of the response of the comet environment to the solar wind and would also provide an observation of the solar wind speed in a wide range of heliocentric distances. We investigate a method for retrieving the upstream solar wind speed by comparing the speed of H + and He 2+ when they are affected by interaction with the coma.
The solar wind is gradually slowed down as energy and momentum is passed from the solar wind to the newly born ions picked up by the solar wind. This process of adding mass to a plasma flow by ionisation of a background neutral source is called mass-loading (Szegö et al. 2000). The mass-loading process is strongly affected by the size and density of the ionised part of the cometary gas. At Halley during the Giotto encounter, the cometary bow shock was located about one million kilometers from the nucleus (Reinhard 1986;Neugebauer 1990;Damas et al. 1994). This is large compared to an ion gyroradius in this environment, which is about 10 4 km, and thus a fluid description is valid for the large-scale mass-loading.
For a low-to medium-activity comet such as 67P Churyumov-Gerasimenko as observed during the Rosetta mission, the solar wind behaviour was most of the time simpler in terms of mass-loading. Solar wind ions were seen to be deflected against the direction of the solar wind electric field in the opposite direction to the acceleration of cometary ions along the solar wind electric field (Broiles et al. 2015;Behar et al. 2016bBehar et al. , 2017. This can be regarded as due to a conservation of momentum, or as a gyration of the solar wind around the common centre of mass of the solar wind and cometary ions (Behar et al. 2018). The solar wind was shown to be more strongly deflected for higher comet activity (Behar et al. 2017;Nilsson et al. 2017aNilsson et al. , 2020. The He 2+ ions were most of the time seen to be deflected by about half the angle seen for H + , in line with twice the mass per charge for He 2+ . Where significant deflection was observed, the speed of the solar wind ions was mostly similar to the expected upstream value (Behar et al. 2017;Nilsson et al. 2017a), although significant slowing-down was seen closer to perihelion (Nilsson et al. 2015a;Gunell et al. 2018;Goetz et al. 2021). Any electrostatic force slowing down the solar wind would slow down the H + more than the He 2+ due to the higher mass per charge of He 2+ . A comparison of the speed of H + and He 2+ could therefore shed light on such an electrostatic force, and might allow us to reconstruct the upstream solar wind speed.
At active comets such as Halley, a bow shock forms (Biermann et al. 1967;Coates et al. 1997;Galeev et al. 1986). At a bow shock, a cross-shock electrostatic potential is expected. At Halley, the cross-shock potential was estimated to be only 40 V (Neugebauer et al. 1987). For well-studied bow shocks such as at Earth, the cross-shock potential can be obtained by integrating the observed electric field (see Dimmock et al. 2012, and references therein). The observed cross-shock potential typically corresponded to an energy change of a few dozen percent of the incident solar wind kinetic energy. Xu et al. (2021) estimated the cross-shock potential at Mars by comparing electron energy spectra observed up-and downstream of the shock. The cross-shock potential was found to be about 100 V.
The situation at a low-activity comet is less well studied. A model of the electrostatic field forming around a plasma cloud smaller than a cometary ion gyroradius was presented by Nilsson et al. (2018). The model was based on a previous model by Brenning et al. (1991) for barium release clouds, but was adapted to the situation at a low-activity comet. The model describes that a polarisation electric field arises when the ions are moving at high speed across the magnetic field, essentially unmagnetised due to their large gyroradius, while the electrons are still magnetised. The electrostatic field at the observed comet need not follow this particular model, but it shows that the obstacle will cause an electrostatic field in the solar wind reference frame. All solar wind ions observed at a specific location inside the sphere of influence of the comet environment should then have experienced the same potential difference relative to the upstream solar wind. If we can assume that H + and He 2+ have the same speed upstream of the coma, we can then compare the speed at the measurement point, and thus estimate both the potential difference and the upstream speed; see Sect. 3 for more details.
The question is then whether it is a reasonable assumption that H + and He 2+ have the same speed in the upstream solar wind. A significant difference is possible in the magnetic fieldaligned direction. Studies made of the solar wind at 0.3-1 au with the Helios spacecraft showed that He 2+ are faster than H + near the Sun (Marsch et al. 1982), with the speed difference decreasing with distance. The differential speed between the species increases with the H + speed (Ďurovcová et al. 2017). In particular, the speed difference is low for slow solar wind with speeds lower than 400 km s −1 (Steinberg et al. 1996). Cases with H + faster than He 2+ increased with distance from the Sun, indicating that the speed difference was not just diminished through Coulomb collisions; rather, some wave-particle interaction due to the speed difference accelerated the protons to be faster than the He 2+ particles (Ďurovcová et al. 2017). It is therefore worthwhile to particularly look for cases of H + faster than He 2+ in our data, as this could be an indication that the same-speed approximation does not hold. The aim of this paper is to study the speed difference between H + and He 2+ and use it to derive the electrostatic potential of the observation point relative to the upstream solar wind and use this to derive the upstream solar wind speed. The upstream solar wind speed estimate will be compared to other solar wind observations propagated to the location of Rosetta.

Instrument description
We used data from the Ion Composition Analyzer (ICA) (Nilsson et al. 2007), part of the Rosetta Plasma Consortium (RPC) (Carr et al. 2007). ICA is a mass-resolving ion spectrometer with an energy range of a few eV to 40 keV (see Nilsson et al. 2015bNilsson et al. , 2017aStenberg Wieser et al. 2017;Bergman et al. 2020) for an updated description on the lower limit of the energy range) and a near 2π sr field of view achieved through electrostatic entrance deflection out of a 360 • basic field of view. ICA has a mass resolution of M/∆M ∼ 2, allowing for resolution of ion masses of 1,2 4, 8, 16, and 32 amu per elementary charge (amu/e). Ion masses above 16 amu/e are usually treated as belonging to the water group.

Method
The method is based on comparing the speed of H + and He 2+ at the observation point. More precisely, we compare the average kinetic energy of the H + and He 2+ . The average energy is calculated by adding the energy spectra for all directions and then calculating the mean particle energy of this one-dimensional distribution. This is used as we are not interested in the direction of the particles, only the change in energy.
The first assumption of the method is that the speeds of H + and He 2+ are the same upstream of the coma. We let E p sw denote the kinetic energy of the solar wind protons. Their energy per charge is then where m amu is one atomic mass unit, which to the accuracy needed here can be assumed to be the mass of both protons and neutrons. The kinetic energy per charge of the He 2+ (i.e. alpha particles) is then where the mass per charge of He 2+ is twice that of H + . If there is an electric potential difference between the upstream solar wind and the observation point, then the energy of both particle species will change per charge by the same amount ∆E/e, and we thus will observe energies per charge inside the coma E p obs /e and E α obs /(2e) of from which we can calculate the upstream solar wind kinetic energy per charge, and the potential difference so that we obtain both the kinetic energy and the electrostatic potential difference. From the upstream mean kinetic energy, we obtain an estimate of the upstream solar wind speed corresponding to the mean energy as where v α obs and v H + obs are the observed He 2+ and H + speeds, respectively. The equations above are derived for mono-energetic ion populations. For non-zero temperatures, an error is introduced if a significant part of the population is slow enough that it cannot pass the potential drop to the downstream side. Thus, the error will be greater for higher temperatures, higher potential differences, and lower solar wind speeds. The errors to the solar wind speed and potential difference estimates are detailed in Appendix A. For typical solar wind conditions, these errors are small. For example, for v sw = 380 km s −1 , k B T p = 10 eV, k B T α = 40 eV, and ∆U = 500 V the error in the solar wind speed estimate is smaller than 1% and the potential drop estimate error is approximately 6%.
In addition to having a non-zero temperature in the solar wind, the ion populations may undergo wave-induced heating as they pass through a bow shock. This error is estimated in Appendix A. The error increases with heating. For a 380 km s −1 solar wind, a 500 V potential drop, and a heating of 100 eV for the H + , the error of the solar wind estimate is below 5% and the error to the estimate of the potential drop below 20%.
The method is valid if the assumption holds that the upstream speeds are the same, as we discuss in Sect. 4.1. Furthermore, the collisionless interaction affecting the energy of the particles in the solar wind reference frame is assumed to be mediated by an electrostatic field. During times when the magnetic field is changing, there could also be a rotational electric field. This would occur when the magnetic field at the comet has a time derivative, that is, when it is changing shape. We did not consider this possibility, but rather assumed that the effect is zero on average as it can both add and subtract from the electrostatic field.

Validation of the same-speed assumption
To determine how valid the same-speed assumption is, we show in Fig. 1 RPC-ICA observations of the speed difference between H + and He 2+ on the y -axis as a function of the speed of H + on the x -axis from August 2014 to September 2016. The plot shows the occurrence as a colour scale. Occurrence here is defined as the fraction of all data points that falls in a particular bin. The sum of all shown bins is 1.
From previous studies we have that the He 2+ is typically faster than H + for a fast solar wind, so we would expect a more negative difference in Fig. 1 for a high H + speed (Ďurovcová et al. 2017). The opposite is observed; we see a rather constant small difference for high speeds, and a significant and increasing difference with decreasing H + speed. If the effect is due to the coma, we would expect a larger difference for low-speed protons, which have been more decelerated by the interaction with the coma. We would also expect a small and rather constant difference for speeds of 400 km s −1 and above, as these are typical undisturbed solar wind values, indicating very little interaction with the coma. This is exactly what Fig. 1 shows. We see very few cases of H + faster than He 2+ , which could occur in the pristine solar wind at large heliocentric distances (Ďurovcová et al. 2017;Steinberg et al. 1996). Figure 1 strongly supports the samespeed assumption and that at least the majority of the observed speed difference is due to the solar wind interaction with the coma.

Time series of the reconstructed solar wind speed
In Fig. 2 the observed H + speed is shown in green, and the reconstructed upstream solar wind speed is shown in orange. For comparison, we show the Tao model (Tao et al. 2005) prediction for the location of comet 67P with a blue line (all left y-axis). The Tao model is a one-dimensional magnetohydrodynamic model used to propagate the solar wind to any location in the Solar System. Observations at Earth were used as input. Tao et al. (2005) found good agreement for Earth -Sun -target angles smaller than 50 • , with prediction errors of time shifts less than 2 days at Jupiter orbit. The Earth -Sun -comet 67P angle is shown with a grey line (right y-axis). We also compare with data obtained near Mars below, therefore the Mars -Sun -comet 67P angle is shown with a dashed grey line.
The agreement between the reconstructed speed and the Tao model is fairly good in the general features, but there is much more variability in the observations than in the Tao model. This is mainly due to the lower resolution of the Tao model data (1 h), but the variability in the ICA data is larger than in typical solar wind observations such as in OMNI data (King & Papitashvili 2005). The large variability is typical for the ICA data, as also discussed in Nilsson et al. (2020). To facilitate comparison, we show in Fig. 3 the reconstructed data filtered using a running median filter of 50 data points (2.7 h) together with the Tao  model results. The Tao model and reconstructed speed do not agree for all features, but agreement is still quite good, and the speed peaks at similar levels. From June 2016 onward, five clear speed peaks are seen in both data sets. The main mismatch is that the Tao model predicts periods with very low speeds that are not seen in the Rosetta observations.

Reconstructed speed compared with other predictions
In order to quantify the difference between our reconstructed data set and other solar wind predictions, we used a dynamic time warping (DTW) algorithm (Giorgino 2009). The basic idea of DTW is to compare two time series by stretching and compressing them locally to make them resemble each other as much as possible. Different constraints are applied to restrict how the points in the two time series can be matched. The time ordering of both time series is kept, and each point in one time series must be matched to one or more points in the other. For the DTW application in this paper, we allowed a maximum time difference of ±5 days between any matched pair of points.
We compared our reconstructed solar wind speed with the speed from the Tao model, the speed from the OMNI data  base (obtained close to Earth orbit and propagated to 67P), and with data from the Mars Express spacecraft (measured in orbit around Mars and propagated to the comet). To enable comparison between the reconstructed solar wind speed and the three other data sets, we restricted ourselves to two time periods during 2016. Period 1 covers 14 January to 24 May, and period 2 covers 7 July to 29 September. We wished to avoid effects of the precise start and end times on the result, therefore we chose periods during which the first and last points of the different sequences agreed reasonably well. The reason for the division into two time periods is the lack of Mars Express observations in the middle of 2016. Figure 4 (top panel) shows our reconstructed solar wind speed (orange line) together with the speed predicted by the Tao model (blue line) for the two time periods we considered. In the bottom panel the DTW algorithm is applied. The reconstructed data set was filtered using a running median over 75 points. The reconstructed speed time series (the reference) is exactly the same as in the top panel, but the Tao model time series was stretched and compressed to achieve an optimal agreement to the reconstructed speed. The algorithm compresses the Tao model when its amplitude is larger than the reference time series to minimise the distance between them. Stretching occurs when instead the amplitude of the reference time series is larger.
The similarity between the reconstructed speed and the three other predictions is measured using the DTW distance per step, which is the accumulated Euclidean distance between the matched points normalised by the number of points. For this comparison, we interpolated all time series to the original times of the Tao model. Hence, all times series in the comparison have equally many data points.
The results are presented in Table 1. For the first time period, all three data sets are about equally similar to the reconstructed solar wind speed. For the second time period, we note that the agreement with the reconstructed speed is significantly worse for all the Tao and OMNI data sets. The poor agreement between the Tao model and the reconstructed speed is obvious also from  Fig. 4, where despite the large amount of stretching and compressing, the remaining differences are quite large. At three large peaks, however, the match is almost perfect. The poor agreement comes from several peaks in the reconstructed data that are not present in the Tao model data. The data from Mars Express matches the reconstructed solar wind speed best during the second time period we considered. The agreement between the reconstructed speed and the propagated Mars Express data is equally good during both periods.

Statistics of the reconstructed solar wind speed
The comparison with the Tao model in a time series is limited in that even if the speed reconstruction of our method is good, the solar wind features of the Tao model may be arriving at the wrong time or may have emerged from another part of the Sun than the solar wind that arrived at the comet. Thus we might obtain poor agreement in time between the models, but the speed reconstruction may still be good. An additional test is to study the statistical distribution of speeds predicted by the Tao model and reconstructed from observations at the location of comet 67P throughout the Rosetta mission. This is shown in Fig. 5 also show speed data from OMNI at Earth orbit (dashed blue line) and from Mars Express in orbit around Mars (yellow line). The dotted orange line shows the reconstructed speed using only observations with a negative difference between the speeds of H + and He 2+ . A positive speed difference could be real, indicating an increase in the energy of the solar wind ions, but this seems unlikely for very low H + speeds. It thus seems more likely that the relation on which we base the reconstruction has broken down. The occurrence is shown with a logarithmic scale to clearly show the high-speed tail, where we expect the greatest difference between the observed and reconstructed data.

Electric potential of the observation point relative to the solar wind
A particular feature of the reconstruction model is that it also gives an estimate of the electric potential difference between the measurement point and the undisturbed solar wind in the solar wind reference frame. In Fig. 6 we show the electric potential of the observation point relative to the undisturbed solar wind as a time series. The upper panel shows data from before the solar wind ion cavity, and the lower panel shows data from after the solar wind ion cavity. Data from the solar wind ion cavity around perihelion are not shown. Green dots show individual data points, and the orange line represents the 400-point running median filtered data. The potential is several dozen volts for low activity and a few hundred volts for medium activity, and it reaches around 1 keV during certain events and closer to perihelion. The higher values close to the typical energy of the solar wind are noteworthy and deserve a more careful investigation. We leave most of this for a future study, but discuss some particular features with a high potential and thus high reconstructed speed in the next section.

Cases with high electric potential
The first peak to clearly stand out in the median-filtered electric potential shown in Fig. 6 is seen around 1 February 2015 and is marked with an arrow and the letter A. The reconstructed speed reaches about 700 km s −1 while the locally observed speed was around 400 km s −1 , as was the prediction of the Tao model (Fig. 2). Comparison with Mars Express data shows very good agreement with the reconstructed speed, as shown in Fig. 7. The orange line (median-filtered reconstructed data) and the green line (Mars Express IMA data) show similar features with a clear maximum around 1 February. The next region with a potential of nearly 1 keV is around the beginning of March 2015, marked with an arrow and the letter B in Fig. 6. This is the time period of the first reported infant bow shock , for which the reconstructed speed was nearly 700 km s −1 , consistent with the interpretation that the shock was pushed closer to the nucleus due to high solar wind pressure. This high-speed period was not reproduced by the Tao model, but generally, high velocities in the time period were observed in Mars Express data. The second infant bow shock (reported in Gunell et al. 2018) on 24 March 2016, marked with an arrow and the letter C in Fig. 6, occurred during a period of a more modestly enhanced electrostatic potential of 400 V and a reconstructed solar wind speed of 500-600 km s −1 , in good agreement with the Tao model. This is consistent with an enhanced solar wind speed and a significant slow-down of the solar wind in this period where an infant shock was observed, but it is less pronounced than in the first case.
Electrons at up to 1 keV energy were observed by the RPC-IES instrument on Rosetta intermittently from December 2015 through January 2016 (Goldstein et al. 2019). This is in a general period when the electrostatic potential of the observation point had a median value of about 600 eV, and peak values reached 1.4 keV. This is consistent with the electrostatic potential playing some role in accelerating solar wind electrons during this period.

Discussion
The reconstructed solar wind speed agrees very well with the Tao model in a statistical sense for speeds above 400 km s −1 , as shown by the red and blue lines in Fig. 5. For speeds below 400 km s −1 , the agreement is best with Mars data (orange line). Mars is closer to comet 67P in terms of heliocentric distance than Earth, but not by much compared to the range of heliocentric distances covered by the Rosetta data. Below 400 km s −1 , the Tao model and the OMNI data from Earth orbit agree very well. This is expected because the OMNI data were used as input to the Tao model. The locally observed H + data show significantly lower speeds, even though the peak of the distribution is in the vicinity of 400 km s −1 , just as for the other data sets. For speeds above 400 km s −1 , both OMNI and Mars data show higher speeds than the Tao model and the reconstructed speed at 67P. This reflects the slowing-down of a fast solar wind stream as it propagates through the Solar System; this appears to be well captured by the Tao model if we assume our reconstructed data are correct. Mars is somewhat farther from the Sun than Earth, but the difference in the high-speed tail between Earth and Mars observations is very small. Comet 67P had its perihelion between the Earth and Mars orbits. Close to perihelion, Rosetta was inside the solar wind ion cavity (Behar et al. 2017;Nilsson et al. 2017a) so that the Rosetta solar wind reconstructed data set was obtained for heliocentric distances of more than 1.5 au, that is, from just outside Mars orbit to well beyond at 3.6 au. Rosetta solar wind observations have already been used for one of the most complete solar wind propagation studies published, which followed an ICME in October 2014 from the Sun all the way to the vicinity of Pluto (Witasse et al. 2017). We note here that the solar wind  reconstruction we have made here makes no difference to that result, but would allow for even more detailed comparisons of model and observation between 1.5 and 3.5 au.
Using the dynamic time-warping (DTW) method, it is possible to obtain a very good agreement for most major features in the solar wind. The DTW method provides a measure of how well it is possible to make the two time series match, the DTW distance. The larger distance between our reconstruction and the Tao model for the second of our investigated time periods mainly arose because several features in the reconstructed data were absent in the Tao model. Three prominent peaks in the velocity time series matched very well for the same period. By aligning the reconstructed speed with either model results or Mars-based observations, we could extrapolate the magnetic field and solar wind density from the model or remote observations with more accuracy. The DTW results indicate that this is feasible at and around many prominent peaks in the solar wind speed, but not for all time periods. This use of models to obtain more complete upstream conditions thus seems mainly feasible for case studies.
The reconstruction of the upstream solar wind speed is based on a theory for mono-energetic beams. This also works well for data with a finite temperature as long as all particles reach the observation point. We estimated the error of the speed reconstruction for a typical solar wind speed to be smaller than 1% and the error of the potential estimate to be smaller than 6%. Both errors are negligible in most contexts; the variability of the data is larger. If there is significant heating, we estimate that the error can rise to typically about 5% for the speed and 20% for the potential. This still does not affect most uses of the reconstruction model. Cases with large errors should be possible to identify in the data, as they occur when part of the ion population does not reach the observation point. For these cases, ions should be present down to the lowest observable energies. There is no evidence for this, but the ICA response for H + at energies below about 100 eV is not well known. The detector has several dead mass channels just around the H + channels (Nilsson et al. 2015b,a). If H + behaves in the same way as heavier ions as a function of energy, the lowest energy H + should be observed by ICA despite these dead mass channels, but this is not certain enough to rule out the possibility of low-energy H + that were present but not detected.
The electrostatic potential difference we observe is predicted, for example, by a simple plasma cloud model (Brenning et al. 1991;Nilsson et al. 2018). In this model, the plasma cloud of the comet is moving sunward in the solar wind reference frame, A&A 659, A18 (2022) and a charge separation is built up due to the different response of ions and electrons to the cloud motion across magnetic field lines. Ions move across magnetic field lines, while electrons E × B drift. This leads to a potential difference between the solar wind and the inner part of the plasma cloud. The outer part of this field will decelerate the solar wind. Inside the dense coma, the electric field will accelerate ions anti-sunward. The appearance of the potential in a more realistic scenario needs to be studied in more detail. In particular, the simple cloud model only takes the surrounding solar wind into account as a current carrier, leaking accumulated charge through field aligned currents. Not fully taking the solar wind into account may be an oversimplification that needs to be remedied before we can fully exploit this new estimate of the electric potential. Finally, we note that the type of electric potential structures we discuss here is also seen at well-developed bow shocks (Dimmock et al. 2012).
The high electrostatic potentials seen in some events and closer to perihelion appear to be real. The reconstructed speeds are realistic and similar to the Tao model in some events and Mars Express observations in other events. High potential means a significant slowing-down of the solar wind, and a relation to the reported infant bow shocks might be expected. This is the case for the shocks reported in Gunell et al. (2018). We leave a closer investigation of the shocks and warm proton events reported in Goetz et al. (2021) for a future study. Such a follow-up study will also examine the temperature of the observed distributions to further assess any possible impact of the finite temperatures of the distributions on our reconstructed solar wind speed estimates.
A significant positive electrostatic potential of the observation point as compared to the upstream solar wind would also mean that any solar wind electrons making it to that point will be accelerated. The shape of the observed electron energy spectra provides evidence for significant acceleration of solar wind electrons into the coma of comet 67P (Myllys et al. 2019;Madanian et al. 2016;Galand et al. 2020). The current interpretation is that the observed electron acceleration is due to an ambipolar electric field formed by the presence of energetic photoelectrons in the expanding plasma of the coma. Simulations show that at least for low activity, the solar wind electrons and ions can split paths, as do the cometary ions and electrons (Deca et al. 2017). Solar wind electrons end up neutralising cometary ions and cometary electrons neutralise solar wind ions, maintaining quasi-neutrality. Thus solar wind electrons will not necessarily enter the inner coma. The energetic electrons of up to about 1 keV reported in Goldstein et al. (2019) did not show a well-defined peak at about the electrostatic potential we observe. The energy spectra rather showed a broad plateau of constant differential flux from a few 100 eV up to 1 keV. The suggested explanation was that the electrons were heated by lower hybrid waves, as also suggested in other studies for lower-energy electrons (Broiles et al. 2016). Lower hybrid waves have indeed been observed at comet 67P (Karlsson et al. 2017;André et al. 2017). However, the results shown here suggest the possibility that a net potential difference between the observation point and the upstream solar wind can also play a role. A presence or absence of solar wind electrons accelerated by the observed potential difference would shed further light on the dynamics of the electrons in the comet -solar wind interaction. This will be the subject of a follow-up study.
The median-filtered electrostatic potential and reconstructed solar wind speed show a consistent behaviour over the mission, being similar in shape and temporal evolution to other observations related to mass loading, that is, pick-up ion acceleration and density (Nilsson et al. 2017a,b) as well as features in the Tao model (e.g. the cases a, b, and c discussed previously and indicated in Figs. 2, 3, and 6). There is also considerable variation on shorter timescales. The reconstructed speed shows a variability that is not present in solar wind observations at other locations. As the energy of the particles is well constrained from observations and count statistics is usually good, the variability in the speed is not measurement noise. The variability must therefore reflect an additional spatial and/or temporal variability in the solar wind -coma interaction that is not captured by our electrostatic potential estimate.
This strong variability on shorter timescales was also reported for the Rosetta ICA observations of bulk velocity ) and ion momentum flux . For these data sets, the median-filtered data behaved in a manner that might be explained by the changing activity of the comet over the mission. The shorter time variations remain to be explained.

Conclusions
By comparing the speed of H + and He 2+ particles, we can reconstruct the upstream solar wind speed at comet 67P. This works for cases in which the solar wind has been significantly slowed down by the interaction with the coma, H + more so than He 2+ due to its lower mass per charge.
The statistical distribution of the reconstructed speed agrees very well with Tao model predictions for speeds above 400 km s −1 . At lower speeds, the agreement is better for data obtained at Mars. Mars is located at a heliocentric distance somewhat closer to the comet than the Earth-based observations that were used as input to the Tao model. The reconstructed data set constitutes an estimate of the solar wind speed during a period of more than two years for heliocentric distances of 1.5-3.6 au.
The reconstruction method also provides an electrostatic potential of the observation point relative to the undisturbed solar wind. The electric potential can reach above 1 keV during events (e.g. events a, b, and c discussed previously) and just around the solar wind ion cavity, the closest solar wind observations made around perihelion. This opens up new possibilities to study ion and electron dynamics at a more global scale around the comet. For example, a large electric potential should correspond to significant slowing-down of the solar wind and thus more likely indicates the presence of an upstream shock and formation of a local magnetosheath. Reported infant bow shocks ) did take place during periods of significant electrostatic potential difference between the solar wind and the observation point, as did observations of a developing cometosheath (Williamson et al. 2022).
The electrostatic potential would likely also affect electrons seen at the observation point. Solar wind origin electrons reaching the observation point should also have been accelerated by the potential difference between the observation point and the upstream solar wind. Thus a comparison between the electric potential of the observation point and electron energy spectra would shed light on electron dynamics in the solar wind -coma interaction.
The reconstructed time series at times agree quite well with the Tao model, mostly after perihelion, but for more detailed case study comparisons, a further refinement of the timing of individual features should be made. The DTW method was demonstrated as a possible tool for identifying suitable time periods and providing a more precise timing between local observations and model results or propagated upstream observations. There remains a variability at short timescales in the reconstructed data that is not present in the model prediction (but it has a fairly low resolution), nor in other solar wind observations. A&A 659, A18 (2022)

Appendix A: Error estimates
This appendix details the systematic errors that are introduced to the method described in the main text if the upstream ion distributions have non-zero temperatures. We assume that the only force acting on the ions is the electric force resulting from a potential drop between the upstream and downstream regions. The electrostatic potential U is defined so that U = 0 in the upstream solar wind and U < 0 downstream. The upstream distribution functions are assumed to be drifting Maxwellians f (v), and, since ions moving upstream in the solar wind cannot reach the downstream region, we have set f to zero for v < 0, Eq. (A.1) applies to both protons and alpha particles if m, q, and T are replaced by the mass, charge, and temperature, respectively, of these particle populations. As f is a function of the constants of motion (see e.g. Krall & Trivelpiece 1973) and the total energy, mv 2 /2 + qU, is a constant of motion, the distribution that can be observed downstream is obtained by substituting The integration is performed numerically, using the distribution functions shown by the dashed curves in Fig. A.1a. With the energies computed according to Eq. (A.2) for protons and alpha particles used in Eqs. (5) and (6), we can find the estimates of the solar wind speed and potential drop our method would produce for these distributions. The original values of v sw and U are then subtracted to produce the error. Figures A.1b and A.1c show the errors of the solar wind speed and potential difference estimates, respectively. The absolute error is colour-coded, and the relative error, expressed as a percentage, is shown by overlaid contours. The temperatures were k B T p = 10 eV and k B T α = 40 eV for protons and alpha particles, respectively, and the errors are shown as functions of solar wind speed and potential drop. The errors are worse for large |U| and slow solar winds.
To estimate the error caused by heating, we start with low temperatures, add a contribution ∆T p to the proton temperature, adjust v sw so that the mean kinetic energy of the distribution remains unchanged, and then we compute the error according to the procedure described above. The solid red line in Fig. A.1a shows an upstream distribution resulting from adding k B ∆T p = 100 eV to a k B T p = 10 eV distribution and adjusting v sw from 380 km s −1 to 367 km s −1 . The dashed red line shows (b) solar wind speed error due to non-zero upstream temperatures. (c) potential difference error due to non-zero upstream temperatures. (d) solar wind speed error due to heating. (e) potential difference error due to heating. In panels b-d, the absolute error is colour-coded, and the relative error, expressed as a percentage, is shown by overlaid contours. the distribution function of that proton population on the downstream side of the potential drop. Figures A.1d and A.1e show the errors of the solar wind speed and potential difference estimates, respectively. The errors are shown as functions of the temperature increase caused by heating and the potential drop. The original temperatures were set low (k B T p = 0.001 eV and k B T α = 0.004 eV) in order to isolate the error caused by heating. The absolute error is colour-coded, and the relative error, expressed as a percentage, is shown by overlaid contours. As expected, more intense heating and larger potential drops yield larger errors. We assume that the protons are heated first and are then subjected to a slow-down by the electrostatic field. This is not a model of what occurs at a bow shock, but only an estimate of how much heating we can accept before our estimates become fraught with significant errors. Moreover, we have assumed that only the protons are heated, not the alpha particles. As the scale lengths are different for these two species, this assumption should hold in a region near the a bow shock.