Reliable real-time Polar Cap (PC) indices for space weather monitoring and forecasts

The Polar Cap (PC) indices were approved by the International Association for Geomagnetism and Aeromony (IAGA) by Resolution No. 3 (2013) noting that ‘‘IAGA . . . recommends use of the PC index by the international scientific community in its near-real time and definitive forms’’. PC indices were made available in 2014 at the web portal http://pcindex.org holding near-real time as well as final index values. The near-real time PC index values are not permanently available. However, analyses of indices on basis of occasional downloads have detected differences between near-real time and final PC indices of up to 3.65 mV/m (Stauning, 2018b, Ann Geophys, 36, 621–631). At such differences, one or the other index may indicate (or hide) strong geomagnetic activity without justification in the actual conditions. The present work has disclosed the cause of observed large differences between real-time and final PC index values in the IAGA-endorsed versions. In addition, anticipated differences are derived on a general basis from the available basic magnetic data by using the index calculation procedures and calibration constants provided by the PC index suppliers. It is shown that corresponding or even larger anomalies are expected to be common during moderate to strong magnetic activity where the near-real time PC indices might otherwise prove very useful for space weather monitoring, e.g., for power grid protection. An alternative real-time PC index derivation scheme described here reduces the excessive differences between real-time and final PC index values by an order of magnitude.


Introduction
The Polar Cap (PC) indices, PCN (North) based on magnetic data from Qaanaaq (Thule) and PCS (South) based on Vostok data, reflect the transpolar convection of plasma and magnetic fields driven by the interaction of the solar wind with the magnetosphere. PC index values are calculated from the basic formula (e.g. Troshichev et al., 2006;Menvielle et al., 2011) by: where DF PROJ is the horizontal polar magnetic variation vector (DF = F À F QL ) measured from a reference quiet level (F QL ) and projected to a specific optimum direction in space considered to be perpendicular to the transpolar forward (noon to midnight) plasma convection direction. The optimum direction is defined through its angle, u, with the E-W meridian, while the slope, a, and the intercept, b, are used to calibrate the PC index values against the solar wind merging electric field, E M . The parameters (u, a, and b), are tabulated for each minute through the year (e.g. http:// pcindex.org/supported-material). They are kept invariant over years. The merging electric field is estimated by using the expression from Kan and Lee (1979): where V SW is the solar wind velocity, B T the transverse component (B T = p (B Y 2 + B Z 2 ) of the Interplanetary Magnetic Field (IMF), while h is the polar angle between the Z-axis of the Geocentric Solar-Magnetospheric (GSM) coordinate system and the transverse IMF component. Here, the OMNIweb service (http://omniweb.gsfc.nasa.gov) is used to provide solar wind data based on contributions from IMP8, ACE, WIND, and GeoTail satellite measurements.
A large number of publications have demonstrated the close correlation between (final) PC indices and further indications of geomagnetic activity such as provided, for instance, by the auroral AE, mid-latitude Kp, and ring current Dst geomagnetic indices (e.g. Menvielle et al., 2011, and references therein). In its real-time version, the PC indices could be used to monitor the transfer of energy from the solar wind to the magnetosphere (e.g. Troshichev et al., 2014) and the related intensities of transpolar convection and cross polar cap potentials (e.g. Troshichev et al., 2000). The PC index development could be used to monitor auroral activity and to forecast substorms (e.g. Janzhura et al., 2007;Troshichev et al., 2014). With adequate integration, the PC indices could be used to predict Kp levels, and they could be used in source functions to predict the development in the Dst ring current index (Stauning et al., 2008;Stauning, 2012;Troshichev et al., 2012).
The PC indices are particularly useful to forecast occurrences of the very intense substorms that may threaten power grid systems. In a study of substorm-associated high-voltage power line disruptions in Sweden, it was shown that such events were almost always preceded by ''alert'' conditions (PCN > 10 mV/m) through an hour or more (Stauning, 2013c). It has also been demonstrated (Stauning, 2018a) that monitoring PC indices could have given 6 h of early warning (''alert''), of which the last two hours were ''red alert'' (PCN > 15 mV/m), up to the onset of the strong substorm event on 13 March 1989 that caused the major power outage in Quebec.
It is imperative for using the real-time PC indices in space weather monitoring or forecast services that they are reliable and also robust to possible irregularities like temporary disruptions of the supply of polar geomagnetic data. The reliability could be improved by using multiple data sources (Stauning, 2018a). However, the index derivation procedure must also be reliable and robust. The IAGA-endorsed version of near-real time PC index calculations, as will be shown, are extremely vulnerable to various types of magnetic activity and also to even minor irregularities in the data supply which could result in extended intervals of unavailable or, still worse, misleading index values. Thus, an improved scheme for calculation of real-time PC indices is needed.
The IAGA-endorsed near-real time indices are displayed in a screen image at the web portal http://pcindex.org for a continuously updating 24-h window but not stored permanently. A snapshot of these values can be obtained by downloading the most recent index values up to actual time.
The first reported assessment (Stauning, 2018b) of near-real time PC indices in the IAGA-endorsed version was based on comparing PCS values from downloads on 11 Nov 2014 (with real-time indices) and 25 Oct 2017 (with final indices). The analysis disclosed differences of up to 3.65 mV/m between the PCS indices calculated at around download time and the same series of indices calculated 3 years later from the same basic magnetic data. It should be noted that PC index values above a level of 1.5 ± 0.5 mV/m indicate magnetic storm or substorm conditions according to Troshichev et al. (2014). The present work extends the former analysis (Stauning, 2018b) to further examples but provides also analyses of the IAGA-endorsed methods used to derive PC indices in near-real time. The dominant cause of the large differences between reported real-time and final index values has been disclosed. By calculating anticipated differences, it has been found that the method can be expected to generate unjustified excursions of several mV/m in the near-real time PC index values compared to their final values during many cases of moderate to strong magnetic activity.
Section 2 presents a brief summary of the PC index processing as defined by the software built by the index providers. Section 3 provides an illustrative example based on the download on 30 June 2015 to define near-real time PCN index values and the subsequent download of the same series of index values on 25 October 2017 to define the final index values. In Section 4 the methods are analysed in order to detect the specific cause of differences resulting from the different methods used for calculations of real-time and final PC index values. The results are generalised by calculations throughout 2015 to illustrate the relative frequency and magnitude of anomalies in the real-time PC index values compared to their final values. Section 5 discusses the findings, while Section 6 presents alternative methods to generate real-time index values. Section 7 discusses differences between the IAGA and the DMI versions and is followed by the conclusions. A step-by-step procedure for continuous (e.g. online) generation of real-time PC index values is presented in the appendix.
In this work the term ''real-time'' value is used for index values calculated at the time of download. The ''near-real time'' values are those calculated within 2 days preceding download time. The term ''prompt'' is used for index values (including the ''real-time'' values) calculated within a couple of months before the download. ''Final'' or ''archival'' index values are those downloaded at least 2 years later than their time stamps. Controlled and verified index values are usually termed ''definitive'' by the data centres. However, the PCN values available since 1975 and the PCS index values available since 1994 are presently termed ''provisional'' by the International Service of Geomagnetic Indices (ISGI) as reported at their web site, http://isgi.unistra.fr.

Processing of magnetic data in the IAGA version
The International Association for Geomagnetism and Aeronomy (IAGA) endorsed by Resolution No. 3 (2013) the PC indices in the formulation suggested by the suppliers, Arctic and Antarctic Research Institute (AARI) in St. Petersburg, Russia, and DTU Space in Lyngby, Denmark. The endorsement was given on basis, among others, of documentation summarized in Appendix A (2014) available at the ftp server at DTU Space. In the documentation, reference is made to the index descriptions in Troshichev et al. (2006) andTroshichev (2011). The derivation of the reference quiet level (QL) used for the endorsed index version refers to .
Calculations of PC index values according to Equation (1) from the observed horizontal magnetic vector data, F, and using the tabulated parameters (u, a, b) are performed in the following steps: (i) Derivation of the horizontal QL reference level, F QL . (ii) Calculation of the disturbance vector, DF = F À F QL . P. Stauning: J. Space Weather Space Clim. 2018, 8, A49 (iii) Projection of the disturbance vector to the optimum direction (u), DF PROJ = (DF) PROJ . (iv) Scaling of the projected disturbance vector using (a, b), PC = (DF PROJ À b)/a.
In the former PC index version, the basic principle for the reference quiet level is formulated in Troshichev et al. (2006) where (in Sect. 2.1) it is stated that: Magnetic deviations dD and dH are calculated from a certain level, ''curve of quiet day'', which presents the daily variation, observed at the particular station during extremely quiescent days. Thus, according to this definition, the reference level would be F QL = F QDC .
For the derivation of the QDC, F QDC = (X QDC , Y QDC ) or (H QDC , D QDC ), reference is made to the methods described in J&T2008. With unlimited data series available before and after the day in question, an interval of 30 days is considered at a time. For each component, an initial 30-days QDC is now formed by superposition and averaging of quiet 20-min samples from within the 30-days interval. The reference day for this QDC is determined by the relative distribution of quiet samples and is usually located close to the middle of the interval.
Next, the 30-days interval is shifted forward by one day at a time and the calculations repeated. The new QDC may refer to the same or to a different day. With continued forward stepping, a sequence of QDCs is generated. Each initial QDC refers to a specific date. For deriving the final 30-days QDCs for each day of the interval, according to J&T2008, ''we use two-dimensional bicubic interpolation with subsequent Savitzky-Golay smoothing [Ramsay, 2005]''.
The new feature in the IAGA-endorsed procedure compared to the preceding PC index version defined in Troshichev et al. (2006) is the introduction of a solar wind sector (SWS) vector term, F SWS = (X SWS , Y SWS ) or (H SWS , D SWS ), defined in J&T2011 (see also Menvielle et al., 2011). The solar sector terms are meant to compensate for the effects on the transpolar plasma convection patterns from the Y-component, IMF B Y , of the interplanetary magnetic field coupled to the solar wind sector structure. The changing convection patterns generate systematic variations in the polar magnetic fields particularly at daytime (e.g. Stauning, 2015). The steady SWS-related variations could be considered part of the quiet level rather than part of disturbances in PC index calculations.
According to J&T2011, and also specifically mentioned in the documentation in Appendix A (2014) submitted to IAGA for the endorsement process, and stated in messages from the index providers, the SWS terms are only used for correcting the measured magnetic data from which the QDCs are calculated. The index reference level would then be F QL , SWS = F QDC , SWS .
However, Appendix A (2014) also holds transcripts of essential computer programs used for calculation of PC index values. They enable tracking of the general data processing scheme, while the more subtle details are hidden in machine coded subroutines. In this software, the solar sector terms appear in the derivation of the QDC from data corrected for the SWS values as well as directly in the definition of the reference level, that is, F QL , SWS = F SWS + F QDC , SWS , from which the disturbance components are measured. The expression in Equation (1) for the PC index could be written: The direct inclusion of the median-based solar wind sector term, F SWS , into the reference level from which the disturbances involved in the calculation of PC index values are measured, generates an effective QL level that may not (most likely does not) represent the quiet level found at corresponding local time, seasonal, and IMF B Y conditions (Stauning, 2013a(Stauning, , 2015. This is a violation of the basic principle for the reference quiet level formulated in Troshichev et al. (2006).
The QL problems related to the SWS-terms in posterior data processing are aggravated in near-real time processing. The solar wind sector terms are derived from forward extrapolation of the cubic spline functions fitted to the four 3-day median values derived for every other of the preceding 9 days. The precise definition is provided in J&T2011 and quoted in Section 4 here.
For the extension of the QDC procedure to real-time applications, where only past data are available, the most recently completed 30-days QDC, according to J&T2008, is projected forward in time to the actual day by using the seasonal trend derived from last year's QDCs. However, there is now a potential problem since, contrary to the cases dealt with in J&T2008, where no SWS effects are involved, previous QDCs are now derived from SWS-corrected values and not straight from the raw data. The SWS-related effects on previous QDCs, whether for the same or from the preceding year, may not repeat at the actual interval in question. Hence, the SWS effects on the realtime QDCs could differ substantially from the SWS effects acting on the final QDCs for the same dates. The problem is not dealt with in the available documentation.
The real-time cubic spline construction of the SWS-terms is prone to generate more variable QL reference levels which, particularly at night time conditions, may deviate substantially from the quiet levels found during corresponding local time, seasonal and IMF B Y conditions. The different methods used to derive the SWS terms and also the general differences in the methods and the data bases used for the involved 30-days QDCs generate differences between values of PC index series calculated in near-real time and values of the same index series calculated posterior from the same basic magnetic data (see Stauning, 2018b). The present work analyses and discusses such differences more closely.

Example case
The near-real time PC index values are not permanently available. However, comparisons of PC index values downloaded from the (otherwise excellent) web server http:// pcindex.org at different times may disclose features of the derivation procedures that are not illustrated in the available reference publications or in other documentation provided for the IAGA endorsement. Such downloads (unfortunately) have been made just occasionally. However, the comparisons between the available cases of near-real time PC index values calculated at around the time of download and the final values made available several years later might provide useful indications of essential problems in the index calculation methods. An example is presented in Figure 1. . These values were derived from OMNI solar wind bow shock nose (BSN) data comprising contributions from IMP8, ACE, WIND and Geotail measurements made available from the OMNIweb service at http:// omniweb.gsfc.nasa.gov. Throughout the exposed interval from 1 to 30 June 2015 the magnetic data are the same for the two downloads and the calibration parameters (u, a, b) are also identical. Consequently, as seen from the expression in Equation (3), the only cause of possible differences between the PCN values from the two downloads resides in the different QL reference levels, F QL . This is also evident from the smoothness of the differences which is in strong contrast to the variability seen in the values of the individual index series. The sinusoidal-like variations seen in the differences are mainly the results of the projection to the optimum direction fixed with respect to the solar wind-magnetosphere system of the difference vector DF SWS = F SWS (near-real time) -F SWS (final) since both SWS vectors are derived on a daily basis in coordinates fixed at the rotating Earth.
A prominent feature seen in Figure 1 is the large differences between the near-real time (prompt) and the final PCN values during the days close to the date of downloading (30 June) of the former series. A further feature to note is the continued irregular differences between prompt and final PCN values throughout the month proceding the download time. Note also in Figure 1 the discontinuities seen at day shifts (at 00:00 UT) in the patterns of the PCN differences. From corresponding displays (not shown) for April and May of prompt data from the download on 30 June 2015, and final data from the download on 25 October 2017, the irregular differences as well as the discontinuities are seen to continue back to 2 April 2015.
On the download day (30 June 2015) the differences range between À1.4 and +1.6 mV/m, while on 23 June the differences peak at +3.09 mV/m. Thus, the present case adds another example of excessive deviations between near-real time and final PC index values to the case reported in Stauning (2018b

Analyses of differences between real-time and final PC index values
It seems that the near-real time PC index values provided at http://pcindex.org are not kept for further assessments of their validity. Thus, representative values are available from occasional downloads only (e.g. Table 1). The present work, therefore, tries to resolve the cause of these differences attempting to derive more general indications of their possible frequencies and magnitudes and their relations to other conditions. Unfortunately, many details of the derivation of the SWS terms and the QDCs are not available in the reference publications (J&T2008 and J&T2011) or in the documentation in Appendix A (2014). Direct communications with the index and software providers have also been fruitless so far. Thus, such details must be inferred from examination of the available index values, e.g., in displays like Figure 1.
As mentioned above, the differences between near-real time and final index values must be related to differences in QL values since the magnetic data and the calibration constants are the same. The irregular patterns of the differences during the 3 months from 2 April up to the date of the download of the prompt PCN values indicate that the differences should be found mainly in the SWS terms since the 30-days QDC would hardly change that much over a few days (cf. examples of smooth QDC variations in J&T2008). The discontinuities at transitions between days indicate that the SWS-terms are shifted each day.
In summary, it is inferred that the main part of the differences between real-time and final index values on the download day arise from shifts between using forward extrapolation of the cubic spline constructions based on four 3-day medians derived every other of the foregoing 9 days like detailed in J&T2011 and the subsequent smoothing of medians at the processing much later. For the differences between prompt and final values observed on other than the download day, no explanation of the applied calculation method is provided in the available documentation.
Assuming that the 30-days QDCs are about the same in the near-real time and final versions, the differences between PC indices in the two versions could be calculated from the differences between the SWS-vectors using appropriate projection and calibration parameters. The derivation of the real-time solar sector terms is detailed in J&T2011 pp. 1496-1497 by the following procedure: 1. median values for magnetic components H and D are derived for four intervals of days preceding with the exception of the current day (n = 0): -r1 = F[for interval from n-3 day to n-1 day] -r2 = F[for interval from n-5 day to n-3 day] -r3 = F[for interval from n-7 day to n-5 day] -r4 = F[for interval from n-9 day to n-7 day] 2. piecewise polynomial form of the cubic spline interpolant for r1, r2, r3, and r4 segments is determined; 3. termination of this form related to day n = 0 is examined as representative of the SWS effect for the current day, even if this day is disturbed.
It might be noted that the illustration in Figure 7 of J&T2011 of the results from using the above procedure is seriously misleading. In contrast to the description in the text, the displayed H SWS values are the post-event smoothed median values for the final version and not the real-time cubic spline extrapolated H SWS values, which are much more variable (see Stauning 2018b).  In Figure 2, an illustrative example shows the X-component cubic spline construction (in black line) based on 3-day medians from 17, 19, 21 and 23 June (marked by black dots) extrapolated to provide the real-time X SWS value for 25 June (marked by a large black dot). A corresponding example for the Y-component shows the construction (in black line) of the real-time Y SWS value for 25 June (large black dot). The example case for X SWS on 25 June is shown in greater detail in Figure 3.
In Figure 3, the green lines connect 3-day median values. The four 3-day median values named r1-r4 (cf. J&T2011) used for the cubic spline construction have been marked by black dots superimposed on the green ones. The cubic spline function is displayed in black line including the tangential extension up to the X SWS value on 25 June marked by a large black dot. The 3-day median values on 24 and 25 June connected by a green dashed line were not available on the date, 25 June, for the cubic spline construction shown here. Note the ''take-off'' of the cubic spline tangential extension beyond the 3-day median value (green) on 23 June (the r1 point) to define an excessively high value for X SWS on 25 June compared to the 3-day median value (green) for the day or the smoothed median value (magenta) that defines the final X SWS value on that day.
The red lines connect previously determined real-time X SWS values, while the curve in magenta line displays the smoothed solar wind sector X-component terms derived in the post-event processing. The difference (here 100 nT) between the real-time and the post-event X SWS values in combination with the corresponding difference between the realtime and the post-event Y SWS values and with projection and calibration processing by Equations (4)-(6) form the large differences ranging from À2.0 to +4.4 mV/m between anticipated near-real time and final PC index values on this day, 25 June 2015.
The solar wind sector components, X SWS and Y SWS , from Figure 2 provide the solar wind sector term F SWS in the realtime as well as in the final versions for each day of June. To derive index differences, these vectors (in their rotating coordinate system) are projected to the optimum direction using the optimum angle values (u) provided at http://pcindex.org for each minute of the involved days. The projection angle is: where k is the longitude of the observatory (THL), while hrs is UT time in decimal hours of the day. The projection is accomplished through Equation (5): The SWS-related differences between the real-time and final PCN values can now be calculated according to Equation (3) by the differences between the projected SWS vectors divided by the slope coefficients (a) provided at http:// pcindex.org: The varying values of DPCN are displayed in the bottom field of Figure 2 for each day of June 2015 separately. Note, that these values represent the anticipated differences between near-real time and final values to be found on the day by watching the display or downloading near-real time PCN index values (e.g. for space weather monitoring) from http://pcindex.org. On 30 June 2015 the calculated differences reach values between À1.8 and +2.8 mV/m which should be compared to the differences between the downloaded near-real time and final values presented in Figure 1 that range between À1.4 and +1.6 mV/m. Complete agreement could not be expected since the 30-days QDCs may differ between the real-time and the final versions, but the order of magnitude agrees.
Depending on the day in June 2015 of simulated download of real-time PCN index values, the differences between realtime and final values may range between À4.07 (28 June) and +4.43 mV/m (25 June). Results from corresponding calculations for further months of 2015 gave the representative anticipated monthly peak differences listed in Table 2. The numbers of days where the anticipated numerical values of either DPCN or DPCS exceeded 1 resp. 2 mV/m are also listed for each month. The extreme values in each column are emphasized.

Discussions
The most prominent features of Table 1 are the large differences between real-time and final PCN indices ranging from À1.79 to +3.09 mV/m and the still larger differences between real-time and final PCS indices ranging from À2.21 to +3.65 mV/m. The quoted differences can easily be verified from the PC index files downloaded from http://pcindex.org at different times and made available in the Supplement. It should be noted that the differences are not resulting from poor data quality. They are, predominantly, the adverse results from the method used to derive the solar wind sector terms in real time through the applied cubic spline construction. For judging these values, PC index values above 1.5 ± 0.5 mV/m are considered by Troshichev et al. (2014) to indicate magnetic storm or substorm conditions. Figure 4 provides a more detailed view of the differences than available from displays like  For an examination of the cause of the large differences, an inspection of Figure 2 discloses that the large differences between the forward projected and the smoothed SWS terms, and thus the excessive differences between prompt and final PC index values, occur at or just after intervals where the IMF B Y components display considerable variability. The variations in the IMF B Y values generate corresponding variations in the median values of the magnetic components. In the cubic spline construction, the forward projection extending 2 days ahead of the latest 3-day median value amplifies such variations (described in a non-professional term as the ''roller-coaster take-off'' effect) and could even give changes to a different polarity of the real-time SWS terms compared to the final median values.
In the X SWS example for 25 June 2015, shown in Figures 2  and 3, the forward projection extending from the 3-day median on 23 June shows strongly increasing values while the actual 3-day medians as well as the final (smoothed) X SWS values on 24 and 25 June show decreasing values. The corresponding feature is seen in the Y SWS example from 25 June and in many further cases. This mechanism is considered the main cause of the excessive differences between near-real time and final PC index values in the IAGA-endorsed versions.
Thus, the cubic spline-based method to determine the SWS terms in real time aggravates the QL problem residing in the posterior version (cf. Stauning, 2015) since the SWS terms may now fluctuate strongly from one day to the next (cf. Fig. 2) instead of the more damped variations in the smoothed solar wind sector terms. It should be noted that the calculations of the solar wind sector terms from the recorded magnetic data using the prescribed methods (J&T2011) are accurate and ''final''. The differences between the forward projected real-time and the final settled 30-days QDCs appear unpredictable; at best they are fairly small. The differences between the real-time and the final index values resulting from differences in the QDCs could either mitigate or come on top of the differences resulting from the different derivation of the contributions from the solar wind sector terms. It is seen from Table 2 that the anticipated difference throughout 2015 between real-time and final PCN index values range between À4.07 and +4.43 mV/m. Comparing these values with the corresponding differences ranging from À2.21 to +3.65 mV/m shown in Table 1 derived from the few available downloads of near-real time indices indicates agreement in order of magnitude. The agreement substantiates the relevance of the calculations of anticipated differences. Thus, Table 2 could also be considered to indicate the general frequency and order of magnitude of expected differences between real-time and final PCN (or PCS) index values. Table 2 shows that the differences between real-time and final indices are generally strongest and most frequent in the PCN index values compared to PCS indices. Furthermore, in both PCN and PCS index versions, the differences are strongest and most frequent during the local summer season. In May or June, 2015, the anticipated PCN differences exceeded 1 mV/m every other day and ranged above 2 mV/m during every fourth day on the average. Values from July 2015 are not included in the series of summer months presented in Table 2. In the otherwise very regular supply of magnetic data from Qaanaaq (THL), the recordings from 13-17 and 19-24 July are missing or incomplete. Reliable real-time PCN indices in the IAGA-endorsed version could not be derived in an extended interval between 14 July and 2 August due to the complicated construction of the cubic spline interpolation polynomials for the real-time SWS values.
Thus, the method used to generate real-time solar sector terms makes the derived PC index values highly vulnerable to temporary disruptions of the data supply.
Even worse, incomplete data, e.g. missing data through some hours of a day, may change the daily median values by considerable amounts. Such anomalies are amplified by the cubic spline construction and may migrate to generate incorrect near-real time PC index values throughout the 9 days where the damaged median value is involved among the four 3-day medians.
In order to judge the effects of incomplete magnetic data, the calculations leading to estimates of the differences between near-real time and final PCN index values were repeated in a special version. The magnetic data from the first half of 23 June, 2015, were made unavailable. Thus, the medians for this day had to be calculated from the remaining data from 12:00 to 24:00 UT only. The results are displayed in Figure 6b. The initial results (also presented in Fig. 2) are displayed in Figure 6a for comparison.
It is clear from the differences between Figures 6a and b that the absence of magnetic data from the first 12 h of 23 June generates substantial changes. The 3-day median values (green) are changed throughout 21-25 June where they include the median value for 23 June. The SWS cubic spline extrapolated values (red line) and thus the near-real time PCN values are changed throughout 22 June to 3 July, while the 7-day smoothed medians (magenta) and thus the final PCN values are changed throughout 20-26 June.
PCN values, of course, are missing throughout the interval of missing data, i.e., from 00:00 to 12:00 UT on 23 June. The maximum changes in the final PCN values are around 1 mV/m on 23-24 June. The largest changes in the near-real time PCN index values are around 4 mV/m and occur on 25 June, that is, 2 days after the 12 h interval of missing data imposed on 23 June. The differences between the final and the near-real time PCN index values range up to 3 mV/m on 25 June as seen in the difference between the negative peak values of À2.9 in Figure 6a and À5.9 mV/m in Figure 6b. 6 Alternative real-time PC index derivation methods In order to provide constructive suggestions for improvements of the derivation procedure, alternative methods for calculations of the reference quiet level (QL) are outlined. Basis for the suggested alternative real-time QL derivation scheme is the ''solar rotation weighted'' (SRW) QDC method developed at the Danish Meteorological Institute (DMI) and presented in .
The SRW method is part of the ''DMI'' PC index derivation procedure which has been used to calculate indices presented in publications since 2007 (see references in Stauning, 2016). The scaling parameters, (u, a, b), in the DMI version are almost the same as those of the IAGA-endorsed version during winter days and summer night times but differ markedly during summer daytime conditions. The solar wind and geomagnetic data bases (1997)(1998)(1999)(2000)(2001)(2002)(2003)(2004)(2005)(2006)(2007)(2008)(2009) as well as the correlation and regression methods used for calculations of index parameters are the same for the two versions, but the DMI procedure omits strong reverse convection samples. Illustrations of the associated effects on index quality are provided, e.g., in Stauning (2013bStauning ( , 2015Stauning ( , 2018a. With the SRW method, the final QL is the QDC constructed by weighted averaging of quiet samples for corresponding times of the day from an interval of ±40 days from the day in question. In addition to giving weights according to the ''quietness'' of the recorded values, the samples are weighted to give preference to dates closest to (and including) the day in question and to dates with nearly the same view of the Sun in its 27 days rotation. In real-time calculations of PC indices, the QL estimates use only past data recorded 40 days prior to the date and time in question. The use of pre-event data only generates differences between the real-time and the final QDCs. These differences are largest at equinoxes where the seasonal variations in the QDCs are largest and the post-event data, therefore, are most needed to balance the anticipated seasonal QDC changes. In post-event calculations the QL estimates are gradually improved as samples from up to 40 days following the day in question become available.
The robustness of the QL methods in the DMI real-time and final versions to irregularities in the basic supply of magnetic data was tested the same way as the corresponding test of the IAGA-endorsed versions by making data from 00:00 to 12:00 UT on 23 June unavailable for the QL calculations. The reference QLs for the real-time as well as the final versions were changed by insignificant amounts, less than 1 nT, corresponding to changes in the PC indices of less than 0.03 mV/ m. The reason for the small changes in the DMI versions of the QLs and the large changes in the IAGA QLs is the same. The high disturbance level on 23 June 2015 generates minimal values to the quietness weights for the samples used for the SRW method, while the SWS term in the IAGA QL depends strongly on the interval of data used for deriving the daily median value.
The appendix holds an outline of a step by step procedure for deriving real-time, prompt, and final QL and PC index values in the DMI versions from observed magnetic data assumed to be currently available. A programmer, most likely, could easily convert the procedure into an operational program in his programming language. If the magnetic data are not changed later on then the derived PC indices are turned into final values after 40 days. During intervals of missing data, the PC indices, of course, could not be derived. However, if the interruption lasts less than a few days, then reliable PC index calculations could be resumed at once data become available.
It might be noted that magnetic data from observatories within the central northern polar cap like Qaanaaq in Greenland, Alert, and Resolute Bay in Canada would give about the same positive PCN index values in the DMI version using coefficients derived without including reverse convection samples. Negative index values that would indicate reverse convection could be quite different. Usually, however, reverse convection conditions relate to weak global magnetic activity. Correspondingly, magnetic data from observatories in the central southern polar cap like Vostok and Dome-C, would give about the same positive PCS index values (Stauning, 2018a).

Comparison between IAGA-endorsed and DMI versions
Differences between near-real time and final PC index values have been calculated separately for the IAGA-endorsed versions and the versions developed at DMI (Stauning, 2016). The results for the summer months, May to July, 2015, are shown in Figure 7.
The most important factor for the different relations between the near-real time and the final PC index values in DMI versions vs. the IAGA-endorsed versions is the different In contrast, the IAGA-endorsed methods to derive the reference QL include solar wind sector terms derived from median values that could show large variations in periods with magnetic disturbances. Such variations are reduced by smoothing the SWS terms in the final version but amplified (at times strongly enhanced) by the cubic spline extrapolation process thus creating large variations in the derived near-real time PC indices and large differences with respect to the final index values. Differences between 30-days real-time and final QDCs may add further fluctuations to the displayed difference values for the IAGA versions.
The peak differences between real-time and final indices based on hourly values are noted in the respective fields of Figure 7. For the DMI version, the maximum deviations range between À0.11 and 0.41 mV/m throughout the summer season.
Throughout the year (2015) the maximum differences (not shown) range between À0.74 and +0.45 mV/m, which could be considered ''tolerable'' in view of the uncertainty range of ±0.5 mV/m associated with the 1.5 mV/m onset level for magnetic storm activity found by Troshichev et al. (2014). The ranges for the DMI versions should be contrasted with differences between the near-real time and final indices ranging from À1.79 to +3.09 mV/m observed at occasional downloads (Table 1) of PCN data in the IAGA versions or with the anticipated range from À4.07 to +4.43 mV/m (Fig. 2 or Table 2) derived throughout 2015 by using the prescribed IAGA-endorsed calculation methods for the solar wind sector terms included in the QLs.
In addition to reducing the differences between real-time and final PC index values by almost an order of magnitude compared to the IAGA-endorsed methods, the SRW method developed at DMI to derive the QL levels is far more robust to data irregularities. Like shown by the robustness test (DPC < 0.03 mV/m) and also demonstrated in Figure 7, intervals of some hours or a few days void of data would only have minor effects on the resulting QDCs. PC index values from such intervals, of course, could not be restored, but reliable index values could be obtained throughout all neighbouring intervals.
For the IAGA-endorsed versions, the complicated construction of the SWS terms implies that the real-time as well as the final SWS terms could not be derived for lengthy intervals extending beyond temporary disruptions in the supply of data. Such intervals are marked in the middle field of Figure 7. Still worse, the derived PC indices are possibly given incorrect values at irregularities in the supply of magnetic data. The test example displayed in Figures 6a and b showed that missing data in 12 h of a day could change the difference between near-real time and final PC index values throughout 14 days by up to 3 mV/m. On top, the near-real time index would change by up to 4 mV/m on 25 June at 2 days after the 12 h of unavailable data on 23 June.  (Troshichev et al., 2014), the large observed or anticipated differences between real-time and final PC index values imply that real-time indices may report magnetically quiet conditions while the same indices in their final version would report strong magnetic storm (or vice versa). -The cubic spline extrapolation method involved in the near-real time IAGA-endorsed index version uses four 3day median values of the magnetic data to derive the solar wind sector terms used for the QL reference level from which disturbances are measured. This construction makes the derivation of PC index values highly vulnerable to conditions with varying IMF B Y levels. At such conditions the daily median values of the recorded magnetic data may fluctuate strongly. Such fluctuations are further amplified by the cubic spline extrapolation process to create excessively high (or low) reference levels. -In addition, the method needs 9 days in succession with good data for each cubic spline construction and, therefore, is strongly vulnerable to irregularities in the supply of magnetic data. In a test example where data were made unavailable for 12 h, the PC index values were changed throughout 14 days. The near-real time indices were changed by up to 4 mV/m at 2 days after the interval of unavailable data. Thus, a 12 h disruption of the flow of magnetic data could make PC indices indicate (or hide) strong magnetic storm activity 2 days later regardless of actual conditions. -Alternative methods to provide more reliable real-time QL levels and PC index values are outlined in the article. A calculation scheme which could be used, for instance, for space weather monitoring by users with access to polar magnetic data either from the standard observatories (Qaanaaq and Vostok) or alternative polar cap stations, is specified in the appendix.

Conclusions
-IAGA and the index providers have been notified of the frequent occurrence of large differences between near-real time PC indices obtained from http://pcindex.org and the same index series in the final version. The alternative methods described here might be considered an option for possible modifications of the present IAGA-endorsed PC index derivation methodology.

Data availability
Near-real time PC index values and archival PCN and PCS index series derived by the IAGA-endorsed procedure are available through the web site: http://pcindex.org. The (otherwise excellent) web site holds a display of current 24 h near-real time PCN and PCS values and provides also a download option for the index values. The near-real time PC index values are not stored and, therefore, not permanently available. The web site, furthermore, holds PCN and PCS index calibration coefficients. Solar wind sector terms and QDC values are not included. The web site includes the document ''Polar Cap (PC) Index'' (Troshichev, 2011). Files of near-real time and final PCN and PCS data used in the present paper are provided in the Supplementary Material and available at https://www.swscjournal.org/10.1051/swsc/ 2018031/olm. Geomagnetic data from Qaanaaq and Vostok supplied from the INTERMAGNET data service center were downloaded from http://intermagnet.org. Solar wind OMNI BSN data from combined ACE, WIND, IMP8, and Geotail interplanetary satellite measurements were provided from the OMNIweb data service at Goddard Space Flight Center, NASA, at http://omniweb.gsfc.nasa.gov The ''DMI'' PC index versions including the real time and final QDC calculation methods are documented in the report SR-16-22 (Stauning, 2016) available at the DMI web site: http://www.dmi.dk/fileadmin/user_upload/Rapporter/TR/2016/ SR-16-22-PCindex.pdf.
provides an indication of the slope of the values recorded through the hour.
For the sample interval (1 h) with the calculated variances a weight function related to the ''normalized'' variances is defined as shown below: WF VV H0 À 1; D0 ð Þ¼exp Àf dFt=RTL ð Þ 2 þ dFv=RVL ð Þ 2 g À Á ; RTL ¼ 6 nT; RVL ¼ 12 nT The X and Y component average values (X M , Y M ) and their assigned variability weight function value, WF VV (same for both components) are stored. Note that the hourly average component values and their variability weight function values are not changed later on, while the date difference and solar rotation weight function values are recalculated at each new calculation of QLs.