Prediction and warning system of SEP events and solar flares for risk estimation in space launch operations

A web-based prototype system for predicting solar energetic particle (SEP) events and solar flares for use by space launch operators is presented. The system has been developed as a result of the European Space Agency (ESA) project SEPsFLAREs (Solar Events Prediction system For space LAunch Risk Estimation). The system consists of several modules covering the prediction of solar flares and early SEP Warnings (labeled Warning tool), the prediction of SEP event occurrence and onset, and the prediction of SEP event peak and duration. In addition, the system acquires data for solar flare nowcasting from Global Navigation Satellite Systems (GNSS)-based techniques (GNSS Solar Flare Detector, GSFLAD and the Sunlit Ionosphere Sudden Total Electron Content Enhancement Detector, SISTED) as additional independent products that may also prove useful for space launch operators.


Introduction
The occurrence of solar energetic particle (SEP) events poses a serious health risk to humans in space and can result in increased radiation doses for high-latitude aircraft flights.In addition, they can constitute a serious hazard for microelectronics and other hardware elements of satellites, aircraft, and launchers (see, for example, ESA SSA Team 2011).An SEP prediction made as early as possible can reduce the risk of radiation damage and impact on operations.In the case of human space flight, an SEP prediction can be interpreted as a notification to take immediate action (e.g., taking shelter inside spacecraft or even in specific high-shielding areas until the radiation storm has ceased).An SEP predictor needs to provide an early and reliable indication about when the energetic particle flux might reach a hazardous level.A prediction system should neither miss relevant events that exceed the hazard level nor issue false warnings at an unacceptably high rate, which might be disruptive for space activities.Moreover, it should continuously warn of radiation danger until the particle environment allows the continuation of routine or launch operations.
At least two major physical processes have been recognized that accelerate charged particles at or near the Sun: shock waves and solar flares.Coronal mass ejection (CME)-driven shocks are believed to be the primary drivers of large, gradual SEP events (Reames 2004;Tylka et al. 2005); however, SEP-occurrence forecasts from these shocks are currently unreliable for real-time purposes and, consequently, cannot be used in operations mode until a solar proxy that generates the shock is found for the initial conditions, and until a statistical validation to estimate the errors in the prediction of the timing and size of the events is performed (Pomoell et al. 2015).A lot of effort is currently being put into achieving a proper determination of the strength of the CME-driven shock from observational data to derive predictions (e.g.Lario et al. 1998;Manchester et al. 2005;Luhmann et al. 2010;Rodríguez-Gasén et al. 2011;Rouillard et al. 2011).In the meantime, SEP-occurrence forecasts are mainly derived from flare data, taking into account that large SEP events almost always have a related flare (Cliver et al. 2012).For this reason, knowledge of the probability of flaring is a central component of SEP forecasts (for predictions more than a few hours in advance).For the prediction of the peak and duration of SEP events, CME-driven shock propagation simulation also appears to be a fundamental component (Aran et al. 2006;Crosby et al. 2015).
One of the earliest flare forecasting systems was THEO1 (McIntosh 1990), which was based on subjective judgments and statistical correlations between sunspot characteristics with magnitudes potentially relevant.Active Region Monitor (ARM) is another solar flare forecasting system that was developed to estimate the flaring probability for active regions from statistical information related to the number of flares produced by McIntosh classified sunspots (Gallagher et al. 2002).Nuñez et al. (2005) used active region information and flare history to build an empirical model for predicting solar flares, and Wheatland (2005) developed a Bayesian approach to solar flare prediction based solely on local flaring rates.Leka & Barnes (2007) used discriminant analysis to investigate the flaring and non-flaring active regions based on their photospheric properties.The Automated Solar Activity Prediction (ASAP) is a machine-learning based system that was developed to be fully automated to extract sunspot data from solar images directly and provide flare forecasts in near real-time (Colak & Qahwaji 2009).ASAP was initially developed to operate on intensitygram and magnetogram images from the SOHO/MDI (Solar and Heliospheric Observatory/Michelson Doppler Imager) images and currently operates on SDO/HMI (Solar Dynamics Observatory/Helioseismic and Magnetic Imager).It is worth noting that there are other studies that investigated the solar flare forecasting domain, most of them were focused on adopting different photospheric magnetic field parameters as inputs to statistical or machinelearning based models, e.g.Cui et al. (2006), Jing et al. (2006), Song et al. (2008), Mason & Hoeksema (2010), Uritsky et al. (2013), Yu et al. (2010), Ahmed et al. (2013), andMonte-Moreno &Hernández-Pajares (2014).
The state of the art of SEP prediction can be divided into physics-based and empirical forecasting models.Physics-based models rely on the proper integration of several models: the background solar wind evolution, CME and shock propagation, and particle injection and transport.The integration of these models is complex, and so it is currently done on a scientific basis as opposed to an operational one (Tsagouri et al. 2013).At the moment, the best known solar wind model is the global 3D MHD WSA-ENLIL model (Odstrcil et al. 2004;Pizzo et al. 2011), which provides a time-dependent background heliospheric description, into which a cone-shaped CME can be inserted (Xie et al. 2004).Other physics-based particle models, like SOLPENCO (Aran et al. 2006) and SOLPENCO2 (Aran et al. 2011;Crosby et al. 2015) and Solar Energetic Particle MODel (SEPMOD; see Luhmann et al. 2010), can provide predictions of the proton intensity profiles.In SOLPENCO, the SEP intensity profiles are computed from the onset of the event up to the arrival of the associated interplanetary shock based on a subset of pre-calculated synthetic flux profiles.SEPMOD calculates the time series of ~10-100 MeV protons at a specific observer location using a passive test particle population.
At present, empirical SEP forecasting methods are primarily used to predict the event occurrence and not to predict the SEP peak or the duration of the event.These empirical SEP-occurrence prediction models (Kahler et al. 2007;Posner 2007;Balch 2008;Laurenza et al. 2009;Núñez 2011;Núñez et al. 2016;Dierckxsens et al. 2015) rely on observations of associated solar phenomena, including electromagnetic signatures of SEP acceleration/escape near the Sun, and observations at the near-Earth environment of energetic particles (relativistic electrons or protons).Balch's approach (Balch 1999), called PROTONS,2 is based on the soft X-ray peak flux and time-integrated flux, the occurrence or non-occurrence of type II (associated with CME-driven shocks) and/or type IV radio bursts, and the Ha flare location.Kahler et al. (2007) developed a method, called the Proton Prediction System (PPS), for predicting SEP events by analyzing the solar flare peak, time-integrated X-ray fluxes, radio fluxes and times of onsets and maxima, and solar flare locations.Laurenza's approach (Laurenza et al. 2009) is based on flare location, flare size, and evidence of a particle acceleration/escape as parameterized by flare longitude, time-integrated soft X-ray intensity, and time-integrated intensity of type III radio emissions at 1 MHz, respectively.In this technique, warnings are issued 10 min after the maximum of soft X-ray flares of class greater than M2.Posner (2007) developed an electron-based SEP prediction technique that exploits the shorter transit time of electrons relative to ions.This approach is based on the instrument COSTEP on board SOHO, which provides data on relativistic electrons and <50 MeV protons.This approach is specialized in forecasting SEPs in the range 30-50 MeV.Núñez (2011) developed a method called UMASEP that predicts wellconnected events by identifying an empirically-estimated magnetic connectivity using X-ray/proton flux correlations, and poorly-connected events by using an ensemble of regression models.Finally, Dierckxsens et al. (2015) presented a statistical analysis, useful for predicting SEP events, about the relationship between SEP events and the properties of solar flares and CMEs during solar cycle 23.
Most of the research on SEP event characteristics has been carried out on the first phases of SEP events (onset, occurrence, and peak).Regarding SEP duration prediction, few studies (e.g.Kahler 2005;Kecskemety et al. 2009) have been carried out on the downstream (post-shock) region, mostly discussing the dependences between the characteristic decay time and several solar and interplanetary factors (e.g.heliolongitude of the solar parent event, CME properties, particle energy of accelerated particles, solar wind conditions).These studies have concluded that there is no satisfactory theoretical model to predict the decaying phase of SEP events.The SEP end time involves huge uncertainties, mostly associated to the particle acceleration modeling and the evolution of the affected interplanetary magnetic field (IMF) structure.Another key issue is the proper temporal simulation of the shock propagation at distances greater than 1 AU.
The SEPsFLAREs system aims at going a step further by providing valuable information for launch operators, among other interested users.This includes alerts on potential unsafe conditions in terms of forecasts of solar flares and SEP events.In this way, effects resulting from enhancements of solar highenergy particles, which impact spacecraft, could be anticipated and/or prevented.The SEPsFLAREs system provides SEP event predictions and warnings with forecast windows (also referred to as prediction horizons) up to 48 h, being a T-hour forecast window a prediction of an event that might occur in the time window [0, T] hours.The system also provides predictions of SEP event peak fluxes and durations.
The following section provides a summary of the SEPsFLAREs system and its operation for the pre-flare, post-flare/pre-SEP, and intra-SEP scenarios.Then, Sections 3-6 present the SEPsFLAREs results on each of these scenarios and the conclusions of this work are discussed in Section 7.

System overview
The SEPsFLAREs prototype system is based on the fact that an SEP event almost always has a precursor associated flare.In order to properly support launch operators, three scenarios are analyzed, and an explanation is given on how the SEPs-FLAREs system covers them.These scenarios are: the pre-flare scenario, meaning there is evidence from solar activity that a large flare could take place (see Sect. 2.1); the post-flare/ pre-SEP scenario, in which a large flare has already taken place and there is evidence that an SEP onset could take place (see Sect. 2.2); and, the intra-SEP scenario, in which the SEP is occurring and there is evidence for predicting the SEP peak and duration (see Sect. 2.3).
The system also includes two real-time products relying on solar flare nowcasting, which are based on Global Navigation Satellite Systems (GNSS) for monitoring the daylight ionospheric overionization caused by an increase of electromagnetic radiation associated with solar flares: the so-called GNSS Solar Flare Detector (GSFLAD; Hernández-Pajares et al. 2012) and the Sunlit Ionosphere Sudden Total Electron Content Enhancement Detector (SISTED; García-Rigo 2012).These products are not used for solar flare or SEP predictions within SEPsFLAREs but can themselves be useful for real-time monitoring of space launch activities, complementing other flare detection products (e.g. based on other wavelengths) as well as the required information on EUV/ X-ray flux, solar indices (e.g.F10.7, sunspot number), and geomagnetic indices.

Pre-flare scenario
As part of the pre-flare scenario, the forecast of solar flares as well as the possibility of triggering SEP warnings depending on the solar flare predictions is considered.In the SEPs-FLAREs system, the pre-flare scenario is handled by a module comprised of an updated version of ASAP (labeled SEPs-FLAREs ASAP; see Sect.2.1.1)and the SEP warning tool (see Sect. 2.1.2).
A number of updates to the classical ASAP (Colak & Qahwaji 2009) have been incorporated into SEPsFLAREs ASAP, including: updating the imaging modules to process SDO/HMI intensitygram and magnetogram images; updating the learning rules modules based on sunspot-flare association cases from 1st January 1982 to 31st December 2013; in addition to the original 24 h, it provides 6, 12, and 48-hour prediction horizons; and finally, provides all-clear forecasts for M and X-class flares.

SEP warnings
Prior to the occurrence of a solar event (e.g.solar flare), which might indicate the onset of an SEP event, the warning tool is used to provide SEP warnings with prediction horizons from 48 down to 6 h.The warning tool processes flare predictions from SEPsFLAREs ASAP, applying minimum probability thresholds (for every predicted flare's class) shown in Table 1A.This filtering process is needed to prevent an SEP warning being issued for every low-probability flare forecast, which would increment the False Alarm Ratio (FAR).It minimizes the FAR while maximizing the successful SEP predictions (Probability of Detection, POD).Based on a statistical study of historical NOAA-defined SEP events3 and their associated flares from 1997 to 2014, Table 1B was constructed, providing probabilities of SEP events based on X-ray flare magnitude and heliolongitude. 4he probability outputs of Table 1B were converted into SEP warning confidence categories as shown in Table 1C.Table 1D presents the resulting table of categorical values for flare location and magnitude to provide warnings once the ASAP flare probability exceeds the thresholds of Table 1A.If SEPsFLAREs ASAP predicts a flare with a probability lower than the one shown in Table 1A, the corresponding warning confidence in Table 1D is reduced one level (e.g. from ''HIGH'' to ''MEDIUM''); however if the SEPsFLAREs ASAP probability is lower than 20% (for all flare classes), no warning is issued in order to reduce the number of false alarms.Probability boundaries could be adapted depending on the specific needs of users.
As an example, if SEPsFLAREs ASAP makes a 24-hour forecast that there is a 90% probability that an X-class flare will take place at heliolongitude West 60 (W60), then the warning tool predicts an SEP warning with ''HIGH'' confidence for the next 24 h.This is because historically there is a probability of 35.22% that an SEP event will take place given the occurrence of such a flare class (see Table 1B).A real example of a warning message, applied to the case of 11th April 2013 and considering SEPsFLAREs ASAP predictions with a prediction horizon of 24 h, is depicted in Figure 1.In the post-flare/pre-SEP scenario, evidences of poor-and wellconnected events are analyzed for the prediction of SEP occurrence and onset.In the SEPsFLAREs system, the post-flare/ pre-SEP scenario is handled by UMASEP (see Sect. 2.2.1), which performs X-ray and proton flux correlations to find the first signatures of future well-and poorly-connected SEP events.

Prediction of SEP occurrence and onset
The UMASEP component, described by Núñez (2011), is responsible for a short-term, accurate prediction of the SEP onset time.It is based on a dual-model approach for predicting the time interval within which the integral proton flux is expected to meet or surpass the NOAA/SWPC threshold of J (E > 10 MeV) = 10 proton flux units (pfu5 ) and J (E > 100 MeV) = 1 pfu.The first model, applied in the case of well-connected (western) events, identifies precursors of an SEP event by empirically estimating the magnetic connectivity from the associated flaring active region to the near-Earth environment and identifies the flare temporally associated with the phenomenon.This model also tries to identify the heliolongitude of the parent solar event (if available), by consulting the NOAA/SWPC edited event list. 6The second model, applied in the case of poorly-connected (central and eastern) events, identifies precursors of an SEP event by using a regression model that checks whether the differential proton flux behavior is similar to that in the beginning phases of previous historically poorly-connected SEP events in order to deduce whether fluxes are likely to exceed the NOAA/SWPC threshold or not.

Intra-SEP scenario
In the intra-SEP scenario, the SEP main characteristics, including the peak (intensity and timing) and duration of SEP events for proton energies > 10 MeV, which may affect launch operations, can be forecast.In the SEPsFLAREs system, this is handled by the SEP peak and duration model (SEPPD; see Sect.2.3.1) and the Shock ARrival Model (SARM; see Sect.2.3.2).In summary, the parent solar flare associated to an observed predicted SEP is identified, the radial propagation of the predicted shock on a representative interplanetary magnetic field (IMF) structure (in this work, a static Parker Spiral) is simulated, and this information is used to predict the particle peak arrival time and intensity, as well as the expected SEP end time.

SEP peak and duration
The observed proton flux profile depends on the location of the corresponding solar event.For this reason, the SEP Peak and Duration model is designed based on the preliminary identification of the heliolongitude of the associated flare, when available.
The SEP peak and duration model is intended to run based on real-time data.For this purpose, several assumptions have been taken, including approximations.Note that we need to issue a hypothesis about the location, intensity, and duration of the associated flare to make its predictions.If the parent solar event could not be identified by UMASEP, the model makes an analysis of the previous flare events in the NOAA/SWPC edited event list, according to the following ordered procedure steps:

Estimation of proton enhancement occurrence times
In order to issue the hypothesis about the associated flare, a proton enhancement in at least one Geostationary Operational Environmental Satellites (GOES) differential proton channel has to be in progress taking into account the minimum proton flux thresholds identified in Núñez (2011) for each differential proton channel.Associated to each differential proton channel, a minimum proton flux threshold was empirically found to recognize that an enhancement in its flux is in progress (e.g. for channel GOES/P3 (i.e. 9 < E < 15 MeV), the threshold was 0.05 pfu; for the GOES/P4 channel (i.e. 15 < E < 40 MeV), the threshold was 0.008 pfu).These thresholds were empirically found in order to maximize the number of successful parent solar event identifications.Given an observed gradual proton enhancement (i.e.probably associated to a poorly-connected event), a failed identification of the parent solar event results in a wrong SEP peak and duration forecast; and a successful identification of the parent solar event facilitates the prediction of SEP peak and duration forecast; therefore, the process of identification of solar parent event was calibrated by minimizing the errors in the identification of solar parent event, SEP peak and SEP end predictions (see Sect. 6 for the corresponding obtained results).The time of a differential proton enhancement occurrence is defined as the time when its flux surpasses its corresponding proton enhancement threshold.These proton enhancement times are important in order to determine the flare association.In fact, the SEP peak and duration model seeks the flare (from the NOAA/SWPC event list) that is most likely to be associated to the enhancement given the particle propagation times found.

Obtain the list of previous solar events
By analyzing the NOAA/SWPC SEP event list, it was found that flares of magnitude smaller than C4 class are not associated with SEP events in 96% of cases.Therefore, for each SEP event, only flares of magnitude greater than C4 class that took place during the previous 66 h are considered.

Calculate the association confidence for every flare and the slope
The flare with the highest association confidence is qualified as the ''associated flare''.The flare's association confidence is estimated by using a formula that numerically benefits some flare characteristics observationally associated to poorly-connected SEP events.Whenever a very gradual >10 MeV proton enhancement is observed, the SEP peak and duration model calculates the association confidence of every past flare of magnitude greater than C4 class in the NOAA/SWPC edited event list that occurred in the previous 66 h. 7Another key issue to estimate the association confidence is the recent slope, measured as the log-linear increase of >10 MeV integral proton flux in the last 3 h.We empirically found that the lower the recent slope of the particle flux is, the earlier the start time of the associated flare should be from the current time.
The flare with the highest association confidence is used as input to the model developed to simulate shock propagation (i.e.SARM; Núñez et al. 2016).

Shock propagation
Assuming that the corresponding shock has a radial direction from the solar location of the solar parent event (identified by the SEP peak and duration model component), a shock arrival (or propagation) model and a particle transport model are needed.In this context, it has been decided to use the SARM, which has been designed and calibrated with flare data.Although both flare and CME data may be provided as SARM's inputs, the loss of accuracy is low if only flare data are used (only according to the validation tests carried out).Considering that information on the true radial CME speeds is difficult to obtain in real-time due to line-of-sight issues (unless they are limb CMEs) -a difficulty now greater due to the unavailability of Stereo B since October, 2014 -it is deemed sufficient to run the model using only flare data in order to simulate the propagation speed in the direction associated to the corresponding flare location.
The purpose of SARM is to predict the arrival time of shocks to distances up to 9 AU, motivated by its potential use in future planetary missions; however, the best performance was obtained for distances from 0.72 to 6 AU.SARM is used in the SEPsFLAREs system to predict shock arrival times for distances up to 3 AU because it is the maximum distance of the considered static Parker Spiral.
The SARM uses a single 1D differential equation that was calibrated from a dataset of 98 shocks.The corresponding study in Núñez et al. (2016) assumes that shocks are driven by the observed CME, with contributions from the associated flare.8However, that study found that the best prediction results were obtained when SARM also used flare data, in terms of flare duration and peak intensity.It was also shown that predicting shock arrival times using only flare data yielded similar results as using only plane of the sky CME speeds.

SEP peak prediction
Regarding the SEP peak prediction, the SEP intensity-time profile depends on the location of the parent solar event with respect to the observer.Figure 2 shows the intensity-time profile of an eastern event and an illustration of the corresponding shock interaction with the interplanetary magnetic field.
For the case of eastern SEP events (i.e. between East 90°a nd East 30°, E90-E30), it is assumed that the front of the shock encounters an interplanetary magnetic field line connected with the Earth, and that particles accelerated at the shock travel along it, reaching the near-Earth environment at the time of the observed peak intensity.The formula to calculate the SEP peak time is shown in Eq. ( 1).
where Total Time To SEP peak is the time of occurrence of the associated flare to the SEP peak; ShockFront travel time is calculated by simulating the shock propagation in the direction of the parent solar event location by using the SARM(i.e. from the Sun to the intersection point P, the intersection of the front shock with the interplanetary magnetic field line connected to the Earth); and Particle travel time is the travel time of particles through the interplanetary magnetic field segment connected to the Earth from the intersection point, P.
To accurately determine the location of the intersection point P, we would need the dynamically-simulated solar wind conditions at the time of the prediction, taking into account coronal holes and solar regions, among others.Instead of that, we assume that the interplanetary magnetic field lines follow some average configuration, which can be a representative configuration that we call static Parker Spiral.In order to select a representative configuration (see Fig. 3, top), a day within solar maximum but with very low solar activity, so that no magnetic field irregularities are present, was selected (1st January 2013).This interplanetary magnetic field configuration, which may be consulted through NASA's Integrated Space Weather Analysis (ISWA) system, has been calculated by using the WSA-ENLIL + Cone Model (see Odstrcil et al. 2004) with real-time data.
At the bottom of Figure 3, the table with the distances to be traveled by particles for the case of the Earth is presented.The first column corresponds to the heliolongitude of the parent solar event, the second column shows the distance (in AU) to be traveled by the corresponding shock, and the third column shows the expected length (in AU) of the interplanetary magnetic field segment to be traveled by particles accelerated by the shock front.
CME shock speeds range from 400 km/s to 3,000 km/s, while particles, significant in contribution to the >10 MeV integral energy channel for SEP events, range from 10 MeV to a few hundreds of MeV.This means that at shocks the speeds of considered particles range from less than 50,000 km/s to ~150,000 km/s, several orders of magnitude higher than the shock speed.Therefore, even with the most accurate particle travel times, what really governs the SEP peak time for eastern events is the shock travel time.Therefore, variations in Particle travel time , which may be calculated using transport codes (Lario et al. 1998;Aran et al. 2006), are neglected in the frame of this study.It has been empirically found that a proton energy of 70 MeV, although it seems higher than expected, yields the best results as the average energy for calculating the travel time of particles at the shock peak.
For the case of central-meridian SEP events (i.e.associated with parent solar events occurring at heliolongitudes between East 30°and West 30°, E30-W30), the shock front will be connected to Earth as the shock approaches the Earth; therefore, the SEP peak time will approximately depend on the shock arrival time to 1 AU, which is of the order of tens of hours.In the context of calculating the SEP time using the presented approach, central-meridian SEP events may be considered as particular cases of eastern events (summarized in Fig. 2).The same formula is used with a negligible Particle travel time .
In order to predict the SEP peak intensity for those SEP events associated with parent solar events that occurred in the W30-W90 range of heliolongitudes, the UMASEP intensity prediction is reused.Since the peak of these events takes place very early (several hours after the flare/CME occurrence), the prediction of UMASEP on the intensity at 7 h after the onset (see Núñez 2011) is also considered valid for predicting the SEP peak intensity.
Several prediction items (e.g.SEP peak intensity) cannot be inferred from the shock propagation model SARM.Therefore, in order to predict those non-SARM prediction items, full data-driven models are required.In order to predict the SEP peak intensity in the case of >10 MeV proton enhancements with times greater than 7 h, a regression formula has been found that correlates the X-ray peak flux and the predicted or observed intensity at 7 h, as variable predictors.Another example is the prediction of the SEP peak time for very western events, for which the average of the SEP peak times of all SEP events associated to flares that took place in the range W30-W90 from years 1994 to 2014 was 4.2 h; therefore, we have used this average as a prediction for very western events, and the corresponding prediction error yielded a satisfactory average absolute error (see Sect. 6).In other words, we have empirically found that a satisfactory flux profile forecast for very western events is that with a prompt component whose >10 MeV SEP peak takes place at 4.2 h after the onset, and whose intensity is very similar up to 7 h after the onset.Finally, a fully data-driven regression model has been used for predicting time and peak for those SEP events for which no solar parent event is found.

SEP duration prediction
In this work, an SEP duration prediction based on SARM is applied.SARM is not able to simulate the evolution of the magnetic field line configuration as the CME propagates.Therefore, the considered empirical estimations are based in this work on the incremented distances on the static Parker Spiral.It is assumed that the propagation of the CME diverges from the shock-Earth interplanetary magnetic field interconnection point, and therefore, it increments the length of the segment from the interconnection point P to the Earth (see Fig. 4).It is assumed that the interplanetary magnetic field interconnection point is displaced d1 and d2, where d1 is the increment in the traveled distance of the shock's right flank and d2 is the increment in the distance of the deformed interplanetary magnetic field line connected to the Earth (see Fig. 4).Beyond d1, the >10 MeV proton flux is reduced to a level close to the background, and thus the SEP event is considered to be at an end.Obtaining d1 and d2 from a simulation, or calculating them by regression methods, is beyond the reach of current models.
For that purpose, 130 shock cases were used to find an average of the incremented distances d1 and d2, with the goal of reducing the absolute error of the SEP duration prediction method by using Eq. ( 2 The table with a subset of heliolongitudes for the parent solar event and the corresponding distances from the Sun to the interplanetary magnetic field connected to the Earth, and the distance to be traveled by particles (in AU).
empirical approaches are presented in terms of mean absolute errors of SEP end predictions in Section 6.
It is also assumed that the farther away the parent solar event is, the longer the deformation d will be given.That is, let us say that D1 is the distance from the Sun to the point P, using the static Parker Spiral shown in Figure 3, and D2 is the distance from P to the Earth using the same configuration; then, the SEP end time will be the sum of two times: the travel time of the shock propagation through D1 + d1; and the travel time of protons at 10 MeV (which are the less energetic protons that could characterize an SEP end time) through the distance D2 + d2.Therefore, it is necessary to calibrate a formula that predicts d1 and d2 from the heliolongitude a of the identified flare.We assume a linear dependence: d = aa + b, where a is the absolute value of the heliolongitude of the associated flare in degrees.The coefficients of this linear formula (i.e. a and b) have been manually calibrated by using trial and error executions with the purpose of minimizing the absolute error of the SEP end time predictions regarding the observed SEP end times.By using these tests, we empirically found that d1 was similar to d2, therefore we assumed that d1 = d2 = d.Finally, we obtained the following formula for estimating d = (|a| + 30) • 0.013 AU.
For instance, if the associated flare took place at E45 (i.e., |a| = 45°), then the deformation distance d = (45 + 30) • 0.013 = 0.975 AU.Since the distance D1 obtained in the direction E45 (see Fig. 3) is 1.771 AU, the shock travel time to calculate the end time will then be based on the distance 1.771 AU + 0.975 AU (i.e.2.746 AU).By using the same approach, the proton travel time should be 2.280 AU.Therefore, the shock is expected to traverse 1.771 + 0.975 (i.e.2.746 AU) until it reaches the point P connected to the Earth; and protons are expected to traverse 1.305 + 0.975 (i.e.2.280 AU) from P to the Earth.In other words, the end time is the sum of the shock traveling up to 2.746 AU (by using SARM as the shock propagation simulator) and the 10 MeV particles traveling 2.280 AU.The performance results of this empirical approach in terms of absolute errors with data from years 1994 to 2014 are presented in Section 6.
For those cases where the associated heliolongitude is in the range W30-W90 or the associated heliolongitude cannot be identified, the deformation presented in Figure 4 is not applicable.Since the final decreasing phase of the >10 MeV integral proton flux is always gradual, it is then logical to infer that the larger the SEP peak intensity is, the more delayed the end will be.Therefore, we used the SEP peak intensity in terms of log10 units (i.e.log10(pfmax)) to make SEP end predictions, by using a linear regression formula, as follows: SEP duration = 26 • log10(pfmax) -12 h.For those cases for which the associated heliolongitude cannot be obtained, none of the approaches mentioned above can be applied; however, we have found that we may still derive end time predictions if we use the observed SEP peak intensity with the following linear regression formula: SEP duration = 31 • log10(pfmax) -11 h, where pfmax is the SEP peak intensity.

Results on solar flare forecasts
The learning rules behind SEPsFLAREs ASAP have been updated using sunspot-flare association cases from 1st December 1981 to 31st December 2013.To evaluate the prediction performance for the SEPsFLAREs ASAP, the system has been tested on a dataset from 1st January 2014 to 31st December, 2015.A number of performance measures, including POD, FAR, Quadratic Score (QS) or mean square error, Heidke Skill Score (HSS), and True Skill Score (TSS), were calculated.These measures are commonly adopted to evaluate flare prediction methods (i.e.Barnes & Leka 2008;Colak & Qahwaji 2009;Bloomfield et al. 2012) and the reader can refer to these papers for more information.Unlike HSS, TSS is unbiased for unbalanced datasets.Thus, TSS is recommended to be adopted as a standard for forecast comparison (Bloomfield et al. 2012).Therefore, in this work we have focused on the QS and the TSS in particular.The obtained evaluation performance measures for the classical ASAP with 24-hour prediction horizon and SEPsFLAREs ASAP predictions with 6, 12, 24, and 48-hour prediction horizons are given in Table 2. Comparing the performances of the SEPsFLAREs ASAP and the classical ASAP for 24-hour prediction horizon, it is shown that the two systems have a similar prediction performance in general, with a slight improvement for the M-class flare predictions.In general, the prediction performance measures of the SEPsFLAREs ASAP are quite promising.
Another evaluation of SEPsFLAREs ASAP's performance has been carried out by producing reliability plots.A reliability plot reflects the frequency of flare occurrence against the forecast probability generated by the forecast system (e.g.Wheatland 2005).To construct a reliability plot, the forecast probabilities are grouped into bins with 5% (0.05) width: 0-5% (0-0.05),5-10% (0.05-0.1), 10-15% (0.1-0.15), etc., and the flare observations within each bin were determined.The observed flare frequency was plotted against the given probability, with error bars estimated based on the number of predictions that fall in each bin.Predictions with perfect reliability lie on the diagonal line, (x = y).SEPsFLAREs ASAP's predictions between January 2014 and December 2015 were investigated and compared with flare observations as reported in the NGDC flares catalog.The investigated period consists of   which are equal to: 0.85, 0.91, 0.90, and 0.74, for the 6, 12, 24, and 48-hour horizon, respectively.However, the reliability plots also show a tendency for slight overprediction, which could be caused by scenarios where a high probability of flare occurrence was given for a particular prediction horizon, and the flare occurred just after the prediction time window.In any case, this needs further investigation in the future.Further analysis has been carried out to count the predictions associated with the occurrences and non-occurrences of significant flares (M and X-class) and their associated probabilities that were given by SEPsFLAREs ASAP.Histograms on the forecast probabilities associated with flare occurrences and non-occurrences have been constructed considering bins of 5% (0.05) width.The histogram for the 24-hour prediction horizon is shown in Figure 6.These histograms have been adopted to derive an estimate of ''all quiet'' forecasts (i.e.nonoccurrence of M or X-class flares), which we set to be issued when the prediction probabilities are below 0.05, 0.1, 0.15, and 0.25, for the 6, 12, 24, and 48-hour horizon, respectively.

Results on SEP warning tool
Regarding the evaluation of the warning tool, there is no possibility of obtaining a single overall performance, as it can be done with the event-oriented (yes/no) SEP forecasting functionality, because its performance depends on some userdefined variables (i.e. the definition of the minimum probabilities of flare occurrence, the values of the confidence table, and the value of the threshold to identify a proton enhancement; see Table 1).However, since it is important to assess the warning tool approach, several user-defined values have been considered.The configuration tables presented in Table 1 allow the calculation of the performance metrics POD, FAR, and AWT (i.e.average of warning times).By using SEPsFLAREs ASAP predictions for the period from January to July 2012 we obtained a POD of 58.3%, a FAR of 90.1%, and an AWT of 23.1 h.The most notable result of SEPsFLAREs ASAP's contribution to the SEP-occurrence forecast is the high AWT (i.e.23.1 h), which is important, particularly because space launch operators need to be warned well in advance of any dangerous situation; however, the very high FAR of the warning tool makes its outputs unsuitable for providing concrete predictions of SEP events.

Results on SEP occurrence and onset prediction
Taking into account data from January 1994 to June 2014, UMASEP obtains a POD of 86.82%, a FAR of 25.83%, and an AWT of 3.93 h (2.47 h for well-connected events and 6.36 h for poorly-connected events, with a maximum of 24 h for the case of very gradual SEP events).According to the study by Núñez (2011), comparing UMASEP with the most well-known >10 MeV SEP-occurrence predictors (Kahler et al. 2007;Posner 2007;Balch 2008;Laurenza et al. 2009), it was concluded that UMASEP outperforms them in terms of POD and FAR.The prediction of UMASEP for the event on 18th April 2014 is presented in Figure 7.

Results on SEP peak and duration prediction
The model for peak and duration prediction has also been evaluated for a period of 20 years: from January 1994 to June 2014.The overall results for a total of 129 SEP events are shown in Table 3, including details of the results on peak and end predictions.In order to identify the associated solar parent events, the NOAA/SWPC SEP list was taken as the only reference.
Table 3 shows that all SEP events within the analyzed period have been included in the evaluation.For 83.7% of all SEP events, the model has been able to derive the SEP peak predictions (i.e.peak times and peak intensities).For 86.8% of all SEP events, the model has been able to provide the SEP end time predictions.Parent solar events have been issued in 66.7% with a success percentage of 81.4% in their identification.The average absolute error of SEP peak time predictions of the SEPsFLAREs approach is 11.3 h, and the average absolute error of SEP end time predictions is 28.8 h.
In order to fairly compare errors of predictions applied to very different conditions we may use percentages.Figure 8 shows the average of individual percentage errors by using Mean Absolute Percentage Errors (MAPE9 ).
For the case of SEP peak and end predictions of eastern events, the mean percentage errors shown in Figure 8 are in the range of 32%-33%.The SEP peak prediction of eastern events mainly depends on the shock propagation simulation (in this work by means of SARM) and the interplanetary magnetic field configuration (i.e. the considered static Parker Spiral; see Section 2.3.2.Regarding the end time prediction for eastern events, we have not identified similar real-time systems for comparison purposes. For the case of SEP peak and end predictions of centralmeridian events, the mean percentage errors shown in Figure 8 have been in the range of 41%-45%.The SEP peak prediction of central-meridian events mainly depends on the shock propagation simulation, which is done by SARM.This problem may be compared with the prediction of a shock at Earth.As an example in this regard, the mean absolute error was quantified near 12 h by Gopalswamy et al. 2005; however, in recent years, lower error estimates may be obtained by shock arrival time predictors (e.g.Gopalswamy et al. 2013;Vrsnak et al. 2014).For this reason, a mean average error of 11.4 h for SEP peak time predictions in the case of central-meridian events is considered acceptable.Regarding the end time prediction for central-meridian events, we have not identified similar real-time systems for comparison purposes.
For the case of SEP predictions of western events, although the absolute error is low (7-8 h); the percentage errors are in the range of 50%-59%.These percentages suggest that the prediction of peak and end times for western events needs a future improvement.However, it is important to mention that for the prediction of these SEP enhancements SARM was not used as their prediction depends on accurate simulations of the interaction between the shock front (e.g. its location) and the interplanetary magnetic field connected with the Earth (while SARM uses a static Parker Spiral); given the limitations of current measurements and modeling there is a lot of uncertainty about the location of the shock front and the interplanetary magnetic field structure, among other uncertainties (such as the evolution of particle injection rate).This problem can be considered as unsolved for real-time physics-based approaches.Consequently, the use of data-driven/regression methods is required, even though the shock propagation prediction nor the geometry of the interplanetary magnetic field structure is not taken into account.For this reason, western events' percentage errors are higher than the percentage errors of eastern and central-meridian events.Regarding the end time prediction for western events, high percentage errors are likely due, in part, to the shorter absolute SEP duration.
The graphical output of the SEP peak and duration model consists of a chart, whose X-axis is the time and Y-axis is the level in terms of the NOAA/SWPC-radiation storm type (i.e. from S1 to S5). Figure 9 shows the prediction of the intensity of the first hours of an SEP event that has already started.
It is worth mentioning that each prediction is composed of micropredictions and each of them has an associated confidence.The confidence levels of the micropredictions are indicated by the level of transparency of the associated icon.The more transparency, the more uncertainty is associated with the microprediction.The further away the microprediction is from the mean of the micropredictions, the lower is its  lower errors.Based on a validation of this prediction module on 129 events occurring from January 1994 to June 2014, the obtained average absolute error of SEP peak time predictions has been 11.3 h, and the average absolute error of SEP end time predictions has been 28.8 h (see Table 3).It is likely that end time predictions for SEP events will continue to return high errors in the near future due in part to limitations in data/modeling but also to the gradual decrease to background levels, making actual end times uncertain and open to interpretation.
In conclusion, the SEPsFLAREs system consists of several modules that will provide space launch operators with the following services: -Real-time solar flare forecast with 6, 12, 24, and 48-hour horizons, based on SDO/HMI intensitygram and magnetogram images.-SEP occurrence and onset prediction, based on X-ray and proton flux correlations performed with the purpose of finding the first signatures of future well-and poorlyconnected SEP events.A warning tool is also provided that is able to warn about SEP events from flare predictions.-SEP flux and duration prediction, based on the identification of the parent solar flare associated to the observed/ predicted SEP, and the application of a specific prediction model depending on the identified parent event heliolongitude.-Nowcasting of solar flares facing the Earth from GNSSbased GSFLAD and SISTED.
Last but not least, the SEPsFLAREs web-based prototype system is available to interested space weather users at http:// sepsflares.estec.esa.int.

Fig. 1 .
Fig. 1.Screenshot illustrating a warning message triggered for a real situation, which occurred on 11th April 2013.The output of the warning tool is shown together with the corresponding SEPsFLAREs ASAP's flare predictions for the prediction horizon 24 h (and its zoom).

Fig. 2 .
Fig. 2. Intensity-time profile and shock interaction with the interplanetary magnetic field of SEP events associated to eastern events.(a) The intensity-time profile of the SEP event that occurred on 6th December 2006 (from NOAA/SWPC).The solid red, blue, and green fluxes represent a typical evolution of the integral proton fluxes for eastern events with energies >10, >50, and >100 MeV, respectively.(b) The CME propagation direction and particle transport for the peak of the event as seen close to the Earth are shown.

Fig. 3 .
Fig.3.Interplanetary magnetic field configuration for a period of very low solar activity within a solar maximum.With these requirements, 1st January 2013 has been selected as a representative configuration.(a) The corresponding static Parker Spiral available through NASA's ISWA (see http://iswa.ccmc.gsfc.nasa.gov/IswaSystemWebApp).The concentric circles have radial distances in 0.5-AU steps.(b) The table with a subset of heliolongitudes for the parent solar event and the corresponding distances from the Sun to the interplanetary magnetic field connected to the Earth, and the distance to be traveled by particles (in AU).

Fig. 4 .
Fig. 4. SEP duration as a problem of sum of travel times, assuming the increment d1 in the traveled distance of the shock's right flank and the increment d2 in the distance of the deformed interplanetary magnetic field line connected to the Earth.IMF o corresponds to the original Earth-connected interplanetary magnetic field line in quiet conditions and IMF d to the displaced one.

Fig. 5 .
Fig. 5. Reliability plots for M and X-class flare predictions produced by SEPsFLAREs ASAP with the 24-hour prediction horizon, for the investigated period.The diagonal line (x = y) is a reference to represent perfect predictions.The correlation coefficient between the SEPsFLAREs ASAP's reliability and the ideal reliability is equal to 0.90 for the 24-hour prediction horizon (0.85 for 6-hour horizon, 0.91 for 12-hour horizon, and 0.74 for 48-hour horizon; not shown in the figure).

Fig. 6 .
Fig. 6.Histogram on the number of predictions associated with occurrence and non-occurrence of significant flares (M or X-class) and their solar flares probabilities (generated by SEPsFLAREs ASAP with 24-hour prediction horizon for the period of January 2014-December 2015).

Fig. 7 .
Fig. 7. Screenshot illustrating the occurrence and onset prediction by UMASEP of the SEP event on 18th April, 2014.

Fig. 8 .
Fig. 8. Mean of individual Absolute Percentage Errors (MAPE) of the predictions of peak and end times in function of the heliolongitude range for the period from January 1994 to June 2014.

Fig. 9 .
Fig. 9. Screenshot illustrating the SEP peak and duration predictions.Each SEP peak time and intensity microprediction is shown with a ''^'' character in the intensity-time profile.Each SEP end time microprediction is represented with a ''\'' character.The ''official'' prediction (also called updated prediction) is presented in the text at the bottom of the prediction image.This forecast image was generated by analyzing real data from 21st September 2001.

Table 1 .
(A)The default minimum SEPsFLAREs ASAP probabilities to issue a warning.The categorical confidence (D) is derived from the SEP/flare probabilities (B) by using the conversions criteria (C).The default categorical confidence values (D) used to issue warnings from SEPsFLAREs ASAP flare predictions for all the considered prediction horizons (i.e. 6, 12, 24, and 48 h).

Table 2 .
Evaluation of the performance of the classical ASAP with 24-hour prediction horizon and the SEPsFLAREs predictions for 6, 12, 24, and 48-hour prediction horizon, when tested on data from January 2014 to December 2015.The selected thresholds (labeled Thres) to obtain the reported performances, which were achieved by means of Receiver Operating Characteristic (ROC; Swets 1996), 1 are also included.