Magnetic helicity and eruptivity in active region 12673

Context. In September 2017 the largest X-class flare of Solar Cycle 24 occurred from the most active region (AR) of this cycle, AR 12673. The AR attracted much interest because of its unique morphological and evolution characteristics. Among the parameters examined in the AR was magnetic helicity, but either only approximately, and/or intermittently. Aims. This work is interested in studying the evolution of the relative magnetic helicity and of the two components of its decomposition, the non-potential, and the volume-threading one, in the time interval around the highest activity of AR 12673. Special emphasis is given on the study of the ratio of the non-potential to total helicity, that was recently proposed as an indicator of ARs eruptivity. Methods. For these, we first approximate the coronal magnetic field of the AR with two different optimization-based extrapolation procedures, and choose the one that produces the most reliable helicity value at each instant. Moreover, in one of these methods, we weight the optimization by the uncertainty estimates derived from the Helioseismic and Magnetic Imager (HMI) instrument, for the first time. We then follow an accurate method to compute all quantities of interest. Results. The first observational determination of the evolution of the non-potential to total helicity ratio seems to confirm the quality it has in indicating eruptivity. This ratio increases before the major flares of AR 12673, and afterwards it relaxes to smaller values. Additionally, the evolution patterns of the various helicity, and energy budgets of AR 12673 are discussed and compared with other works.


Introduction
Magnetic helicity is a physical quantity that is used often in investigations of the eruptive behaviour of solar active regions (ARs, Rust 1994;Nindos & Andrews 2004;Green et al. 2018). This is because it is a conserved quantity of ideal magnetohydrodynamics (MHD), and thus it determines the dynamics of magnetized systems (Taylor 1974;Pariat et al. 2015;Linan et al. 2018). Magnetic helicity is a geometrical quantity that describes the level of complexity of a magnetic field, through the twist and writhe of its field lines, and their interlinking.
Magnetic helicity however is well defined only for systems that are magnetically closed, and thus is of limited use in the Sun and all other astrophysical conditions. The appropriate form of helicity in these situations is relative magnetic helicity (Berger & Field 1984;Finn & Antonsen 1985). It is defined through a volume integral as where B denotes the three-dimensional (3D) magnetic field in the volume of interest, V, while B p is a reference field that usually is taken to be potential. The two fields are generated from the vector potentials A and A p . The potential magnetic field is chosen to have the same normal components with B along the boundary of the volume, ∂V, namelŷ n · B| ∂V =n · B p | ∂V , withn denoting the unit vector that is normal to ∂V. This choice guaranties that the relative magnetic helicity given by Eq. 1 is independent from the gauges of the vector potentials, and thus physically meaningful.
Relative magnetic helicity can also be uniquely split into two gauge-independent components (Berger 1999), namely These are the non-potential component that depends only on the current-carrying part of the magnetic field, B j = B − B p , and the volume-threading component that depends additionally on the potential field. The detailed analysis of the behaviour of these components, and of their dynamics in Linan et al. (2018), showed that, unlike relative magnetic helicity, they are not conserved quantities of ideal MHD. The study of the different components of relative magnetic helicity is important however, as they provide additional information compared to H. Already from the first separate examination of these two components in eruptive ARs , it was observed that the non-potential component was fluctuating in accordance with the eruptions of the AR. This was noted in both observed, and synthetic, MHD-modelled eruptive ARs.
Moreover, using this decomposition of helicity in a set of eruptive, and non-eruptive MHD flux-emergence simulations,  Pariat et al. (2017) have determined that the ratio |H j |/|H| is an excellent indicator of the system's eruptivity. They noticed that the helicity ratio behaved differently in the eruptive than in the non-eruptive simulations, as well as between the pre-, and post-eruptive phases of the former. The helicity ratio obtained high values only in the eruptive cases, and only before the eruptions. The possible importance of |H j |/|H| was also highlighted in Linan et al. (2018) by using an MHD simulation of the formation of a coronal jet. Again, the helicity ratio attained very high values during the generation of the jet, and it droped significantly after that.
This result was further tested in Zuccarello et al. (2018) with a different set of line-tied, eruptive MHD simulations where the quality of the helicity ratio as an eruptivity indicator was reconfirmed. Additionally, by carefully identifying the onset of the eruption in these simulations, it was found that a threshold value of |H j |/|H| 0.3 was reached by all simulations when the eruptions occured.
These promising results on the ratio |H j |/|H| led to an interest in deriving it in observations. In a first observational determination of the helicity ratio, James et al. (2018) have found the value |H j |/|H| 0.17 for the flux rope of an AR, one hour before the occurence of an eruption. A reasonable next step is to study the evolution of the helicity ratio in an observed AR, which is the central task of this work.
A perfect target for this is the most active region of Solar Cycle 24, AR 12673 (Sun & Norton 2017). During its passage through the solar disk on the week of 4-10 September 2017 it produced four X-class flares, including the two strongest of the cycle, 27 M-class flares, and numerous more of smaller size, as the Geostationary Operational Environmental Satellite (GOES) soft X-ray (0.1 − 0.8 nm) light curve of Fig. 1 depicts. A few of these flares also produced coronal mass ejections (CMEs). Of the three halo CMEs, two were Earth-directed and geoeffective (Chertok et al. 2018), while one of them led to particle acceleration at the produced shock front (Morosan et al. 2019), and also to a ground-level enhancement of energetic particles (Augusto et al. 2019). This particle event originated from an X8.2 flare and its associated CME of 10 September 2017 , when AR 12673 was crossing the west solar limb.
Most of the interest in the activity of AR 12673 was focused however on the two X-class flares of 6 September 2017; the confined X2.2 flare that started at 08:57 UT (SOL2017-09-06T08:57), and the eruptive X9.3 flare, the largest since 2005, that followed three hours after the first, at 11:53 UT (SOL2017-09-06T11:53). In this work, we are interested in a 10-hours time interval centered around the X2.2 flare of 6 September that also includes the X9.3 flare.
The photospheric morphology of AR 12673 started as a single positive-polarity sunspot and quickly became quite complicated, displaying a complex network of δ-sunspots. It exhibited significant flux emergence and the highest instantaneous flux rate ever observed (Sun & Norton 2017), with values reaching up to 10 21 Mx hr −1 during the third of September, as Fig. 1 also shows. Many dipoles emerged close to the initial sunspot and the successive interactions between them resulted in the increased complexity of the system.
The magnetic field of the AR as measured by the Helioseismic and Magnetic Imager (HMI, Scherrer et al. 2012) instrument onboard the Solar Dynamics Observatory (Pesnell et al. 2012) was very strong, especially along the polarity inversion line . Photospheric shearing and twisting motions were also observed (Verma 2018), which helped in the cre- Fig. 1. GOES soft X-ray light curve, and evolution of HMI unsigned magnetic flux in AR 12673, for the first ten days of September 2017 (top). The brown vertical lines denote the interval of interest for this study, which is shown zoomed in at the bottom. The purple bands in that plot denote the time intervals of the X2.2 and the X9.3 flares, with onset times at 08:57 UT and 11:53 UT, respectively. The HMI magnetic flux on the bottom plot is of limited accuracy due to the emission of the flares, while between 06:00 UT and 08:36 UT there were no observations due to an eclipse of SDO. ation of the highly non-potential configuration that powered the two flares.
Many models were invoked in order to explain the evolution of AR 12673 towards the two X-class flares and the eruption of the second. Yang et al. (2017) associated the increased flareproductivity of the AR with the blocking of newly emerging flux by already existing flux, and the eruptive flare with a filament becoming kink unstable. The formation of a coronal sigmoid and the initiation of both X-class flares from the core of the sigmoid, led Mitra et al. (2018) to characterize the AR as a single "sigmoid-to-arcade" event. Hou et al. (2018) attributted the generation of the two flares to the formation of multiple flux ropes and twisted loop bundles that eventually erupted. The presence of a large, highly-twisted magnetic flux rope, and some smaller ones, was also confirmed by the MHD modelling of the X9.3 flare of AR 12673 made by Inoue et al. (2018).
The highly-twisted flux ropes that were found by many authors indicate that magnetic helicity should be an important factor in the eruptivity of AR 12673. Indeed, Liu et al. (2018) have found a significant enhancement, by almost a factor of three, of the magnetic helicity during the confined X2.2 flare, although they approximated helicity only with its twist. In another study, Yan et al. (2018) did not find a significant change of helicity during the first X-class flare, but only a small decrease during the second. They found however a negative helicity injection rate throughout the day of the two flares, consistent with the rotational motions of the sunspots in AR 12673.
The sign of magnetic helicity was actually negative for the whole week of the AR's activity, as was deduced by integrating the helicity injection rate (Vemareddy 2019). The same author found that AR 12673 exhibited very fast helicity injection, by a factor of three higher compared to other ARs when it was normalized to the square of magnetic flux.
All these support the choice of AR 12673 as an interesting case to study the evolution of the helicity ratio in an observed AR. The question we want to address is whether this evolution relates with the eruptivity of the AR, as proposed by Pariat et al. (2017). Apart from |H j |/|H|, we are also interested in examining the evolution of all helicity-, and energy-related budgets of the AR. For determining all quantites of interest, the coronal magnetic field must first be estimated. The method we followed for this is described in Section 2. The results that we obtained are presented in Section 3, and they are then discussed in Section 4.

Method
This section describes the method we followed to compute all magnetic helicities and energies in AR 12673. We first describe the non-linear force-free (NLFF) field extrapolation method that we used in order to approximate the coronal magnetic field of the AR. Then, we check that the produced coronal fields are suitable for use with the helicity computation method, which we briefly describe afterwards.

Coronal field modelling
The starting point of all computations performed in this work were magnetic field data from the HMI instrument of SDO. We used the vector magnetogram data with 12 minutes cadence (product hmi.sharp_720s). The actual cadence of the data varied during the interval of interest due to an eclipse of the observatory and a few low-quality data during the two flares. The morphology of the B z -distribution on the photosphere at the beginning and at the end of the 10-hours interval of study is shown in Fig. 2.
The next step was to model the 3D magnetic field of AR 12673 in a finite volume above the AR with a NLFF field extrapolation method. Such methods try to simultaneously satisfy the force-free, and the solenoidal conditions for the magnetic field, which read The unavoidable presence of numerical errors in the solution process hinders the exact fullfilment of these conditions. The solenoidal condition is thus never fully constrained in a NLFF extrapolated magnetic field. The level of non-solenoidality is however very important for the helicity computations. Valori et al. (2016) have showed that the values of helicity are unreliable when the non-solenoidality errors are above a certain level. It is therefore essential to estimate the level of solenoidality of the given magnetic field when computing relative magnetic helicity, which we do with two ways, as described in Sect. 2.2. A possible way to optimize the 3D magnetic field model with respect to its divergence-freeness is to perform different extrapolations and then to keep the best-performing one. In this work we estimated the magnetic field of AR 12673 using two different NLFF methods. The investigation of the various parameters in each method was not exhaustive since our goal was to have a reliable magnetic field for the helicity computations and not to determine it with the highest possible accuracy.
The first extrapolation method that we used was the optimization method of Wiegelmann (2004, hereafter W04). This tries to minimize a functional so that to fullfil the divergence-, and force-free conditions, given by Eqs. 6, 7. We note at this point that the assumption that the magnetic field is force-free is not always true, especially near the photosphere, and during solar flares. For this, the magnetograms were first preprocessed so that to become more compatible with the force-free assumption (Wiegelmann et al. 2006) with the standard set of preprocessing parameters [µ 1 , µ 2 , µ 3 , µ 4 ] = [1, 1, 10 −3 , 10 −2 ], in the authors' original notation.
The resolution used in the extrapolations was 1", or 720 km, while the grid size was 320×320×320 pixels. The computational volume consisted of the volume of interest surrounded by a boundary buffer layer in the lateral and top boundaries with 16 pixels on each side. In the helicity computations only the inner, physical part of the fields were kept, after further cutting in height, at roughly the 2/3 of the total height. The final datacubes thus consisted of 288×288×203 pixels. The total snapshots were 28, covering 10 hours starting from 6 September, 04:00 UT.
The second extrapolation method that we used was the newer version of the same optimization code (Wiegelmann et al. 2012, hereafter W12), which usually performs better. The idea of W12 is to add another term to the functional of W04 so that to take into account the uncertainties in the measurements of the photospheric magnetic field components. This is done by weighting each pixel separately according to its uncertainty. In this study we used the actual HMI measurement uncertainties for the first time. The empirical weighting function that we employed was: Here B denotes the magnetic field strength at a pixel on the photosphere, and σ B its uncertainty. We assumed a value of 200 G for the typical noise threshold, and 0.03 for the typical value of σ B /B. This choice sharply de-emphasizes the contribution of bad measurements in several strong field regions. All remaining parameters were the same as in the W04 case, except from the size of the buffer which was 32 pixels in this case. The final datacubes were thus 256×256×203 pixels. The number of snapshots were also smaller in this case, 18 instead of 28, but with the same coverage until the first flare. The morphology of the 3D magnetic field for the two cases and for the same snapshot is shown in Fig. 3. We note that the two cases exhibit many differences in morphology. The morphology of the magnetic field evolves during the flares, following the evolution of the photospheric magnetic field. We finally note that we checked other cases for the extrapolation parameters also, such as different µ 3 and/or µ 4 preprocessing parameters in W04, different binning in W04, and different weighting of the various terms in the functional of W12. None of these cases produced better results however, and so we presented here the two most accurate cases.

Solenoidality level estimation
The resulting magnetic fields were then tested for their quality with respect to how divergence-, and force-free they were. A traditional way to quantify the divergence-freeness of a magnetic field is through the average absolute fractional flux increase, | f i | , (Wheatland et al. 2000). This parameter expresses the average of the local non-solenoidalities in the volume of interest; the smaller it is the more solenoidal the field is. The level of divergence-freeness in the W04 case was quite high with a mean value over all the 28 snapshots of | f i | = (5.9 ± 0.5) × 10 −4 .
The respective values for the W12 set were slightly better, with a mean value over all 18 snapshots of | f i | = (5.3 ± 0.6) × 10 −4 . We also tested the level of force-freeness of the extrapolated fields with an angle, θ J , that expresses the average currentweighted angle between the current and the magnetic field (Wheatland et al. 2000). The mean value we found for the W04 magnetic fields was θ J = (16.8±2.6) o , typical for this method. In the W12 case, the force-freeness level was again slightly better, with an average angle θ J = (15.1 ± 1.5) o .
Another parameter that indicates the divergence-freeness of a magnetic field is the energy ratio E div /E, originally used by Valori et al. (2016). It expresses the fraction of the total energy that is related to all the (numerical) non-solenoidalities of the magnetic field. To derive the mathematical expresion for E div one needs to decompose the magnetic field into potential and currentcarrying components, B = B p + B j , and then split each component into solenoidal and non-solenoidal parts, B p = B p,s + B p,ns , and B j = B j,s + B j,ns , following Valori et al. (2013). By defining the energy budget of each component through the relation we end up with the following decomposition for the total energy of the given magnetic field with E mix the energy corresponding to all the cross terms. A nonnegative energy associated to all non-solenoidal components of the magnetic field can then be defined by the quantity It is an upper limit to the non-solenoidal energy since the absolute value of E mix , the only signed term in the decomposition of Eq. 10, is considered. A perfectly solenoidal magnetic field has E p,ns = E j,ns = E mix = 0, and thus also E div = 0; the larger the values of E div are, the more non-solenoidal it gets. Valori et al. (2016) have showed that when E div /E exceeds ∼ 8 − 9%, then the values of helicity become unreliable. Since the energy ratio E div /E is important for helicity computations we focused more on this quantity. We calculated all components in the energy decomposition following Valori et al. (2013), and we show in Fig. 4 the evolution of E div /E for the two sets of extrapolated magnetic fields that we used. Also shown is the condition E div /E = 0.08 which, according to Valori et al. Fig. 4. Evolution of the divergence-related energy normalized to the total field energy in AR 12673 for 10 hours around the two X-class flares of 6 September 2017, and for the two sets of extrapolated magnetic fields used. The purple bands denote the time intervals of the X2.2 and the X9.3 flares, with onset times at 08:57 UT and 11:53 UT, respectively.
(2016), discriminates between magnetic fields that lead to reliable values of helicity and those that do not.
We note that the energy ratio in the W04 case performs well until the first X-class flare with values around the limit E div /E = 0.08, but all snapshots after the first flare have much higher values. On the contrary, most of the snapshots in the W12 case are well below the limit, with the exception of three points; the two right before the first flare, and the one after the second flare. Additionally, the values of the energy ratio for the W12 fields are much lower than the W04 ones except from the two points before the first flare. Therefore, we kept in the following computations the best-performing snapshots of the W12 method, except from the two snapshots before the first flare which were replaced by the W04 ones that are better, and the snapshot after the second flare where both methods are above the limit and were thus discarded.

Magnetic helicity and energy computations
For each snapshot in the final dataset we computed relative magnetic helicity from its definition, Eq. 1, and also the two gaugeindependent components that it splits into, Eqs. 4, and 5. All the helicities of interest were computed following the method of Moraitis et al. (2014). Briefly, this method first calculates the potential magnetic field that satisfies Eq. 2 so that the relative magnetic helicity given by Eq. 1 is gauge independent. The potential field is obtained from the numerical solution of Laplace's equation with pure Neumann boundary conditions. The two vector potentials are then computed following the recipe of Valori et al. (2012), which makes the clever choice for the gauges, A z = A p,z = 0, that results in the straightforward integration of the equations.
We were also interested in the evolution of the various energy budgets of the AR; the total field energy, E, the potential energy, E p , including any non-solenoidal contribution it may have, and the free energy, E f = E − E p . For a perfectly solenoidal magnetic field this free energy coincides with E j,s as deduced from Eq. 10, and deviates from it proportionally to the value of E div .

Results
The evolution of relative magnetic helicity and its two components in AR 12673 is shown in the top panel of Fig. 5. We notice that relative magnetic helicity is negative, in agreement with previous studies, and that all helicity budgets are also negative. The absolute values of relative magnetic helicity are very high, and reach up to 5 × 10 43 Mx 2 , mostly because of the high magnetic flux of the AR. The current-carrying component of helicity is much smaller than the other two helicities, as was also found in other cases (e.g., Moraitis et al. 2014). The evolution patterns are similar for all helicities, increasing before the first flare, relaxing after it, then again increasing before the second flare and relaxing afterwards.
The bottom panel of Fig. 5 shows the helicity budgets normalized to the square of the magnetic flux, Φ, which is calculated from the B z maps of the NLFF fields as Φ = 1 2 phot |B z |dS . The normalized helicity exhibits much more typical values compared to the helicity in physical units, confirming that the high values of helicity are due to the high flux. This plot reveals another feature of the helicities evolution. The normalized helicities have a much smoother evolution compared to the regular helicities before the first X-class flare, while afterwards both behave similarly. This could mean that the rise of the helicity budgets before the first flare are related to the increase of the flux then, but the later fluctuations are purely flare-related. The evolution of the total field energy, the potential energy, and the free energy is shown in Fig. 6. Again, all budgets attain very high values due to the high magnetic flux of the AR. We notice that the energy of the potential field changes only slightly during the 10 hours of our study, as a consequence of the modest evolution of the normal field on the boundary that is evident in Fig. 2. The change of the normal field is less than that in the horizontal field however, which developed extensive kilogauss bald patches during this period (Sun et al., in preparation). We also note that, although not directly comparable, the evolution pattern of E p is quite different that the one of H pj , despite that both quantities involve the potential field. As a result of the small change of the potential energy, free energy and total field energy show very similar evolution patterns. Moreover, this pattern resembles the one of the helicities, increasing before the flares, and relaxing afterwards. The main purpose of this work was to examine whether an observed eruptive AR is compatible with the results of Pariat et al. (2017) and Zuccarello et al. (2018), that the helicity ratio |H j |/|H| can indicate AR eruptivity. The evolution of this quantity for AR 12673 is shown in Fig. 7. We note that |H j |/|H| increases before the two X-class flares and drops after them. The maximum values of the helicity ratio are |H j |/|H| 0.20 right before the first X-flare, and |H j |/|H| 0.17 before the second. Additionally, these two local maxima are the highest values in the helicity ratio time variation. In other words, a threshold in the value of |H j |/|H| can be identified from Fig. 7 (red dotted line) above which flares occur. Of course, the exact value of this threshold could depend on the conditions of the specific AR and it should be further examined whether a universal threshold exists or not. This result seems to be in agreement with the finding of Pariat et al. (2017) that |H j |/|H| attains its highest values before eruptions. Moreover, the ratio |H j |/|H| rises again at the end of our study interval, possibly indicating the subsequent activity of AR 12673. Figure 7 also displays the evolution of the ratio of free energy to total energy, E f /E, in AR 12673. This parameter has also been examined by Pariat et al. (2017) and Zuccarello et al. (2018), and it was found to be less indicative of eruptivity compared to |H j |/|H|. The energy ratio evolution pattern that we find exhibits some similarities to the helicity ratio one, which could be a result of the relation between free energy and relative magnetic helicity magnitude (Tziotziou et al. 2012;Tziotziou et al. 2014).
The local maximum of the energy ratio before the second flare is however much weaker compared to the corresponding local maximum of the helicity ratio. We note in Fig. 7 that free energy, from the peak of ∼ 34% of the total energy before the first flare, it drops to ∼ 25% between the two flares, and finally to ∼ 15% after the second. Differently than the helicity ratio therefore, the energy ratio cannot be used to set a threshold above which flares occur.

Discussion
This paper dealt with the detailed study of the helicity and energy properties of AR 12673 at the time around its two consecutive X-class flares of 6 September 2017. All involved quantities were accurately computed for the whole period of intense activity, for the first time in such detail. The computations followed a recent finite volume method, and the careful modelling of the 3D magnetic field of the AR.
In the latter, the coronal magnetic field was extrapolated with two different versions of an optimization-based NLFF method. In the newer version of the method, an observationally-derived, empirical weighting that employs the HMI uncertainty estimate was used, for the first time on such methods. This version turned out to be the most accurate, as deduced by a parameter that discriminates extrapolations leading to reliable helicity values from those that do not, but not in all the cases examined. The older version performed better in two snapshots right before the first X-class flare. The best-performing NLFF fields from the two methods were compiled into the final dataset used.
In a very recent work (Thalmann et al. 2019) the authors suggest that the threshold in the parameter E div /E should be lower that the one used in this work, 5% instead of 8%, for a NLFF field to be used in helicity studies. We expect to see differences of the order of 4 − 5% to the derived helicities with such a NLFF field, as follows from Valori et al. (2016, Section 7), and so our results should not be affected by such a change.
The modelling of the magnetic field enabled us to follow the evolution of the relative magnetic helicity and its two components, the non-potential, and the volume-threading one, in AR 12673. The negative sign of all helicity components confirmed the findings of other authors. The values of relative helicity that we estimate are similar in magnitude with those reported by Vemareddy (2019), reaching up to −5 × 10 43 Mx 2 . They were however three orders of magnitude higher than those of Yan et al. (2018), although both cited works used the flux integration method for computing helicity. Compared to Liu et al. (2018), our helicity values are again much larger, but these authors approximated helicity only with its twist, and so the difference is reasonable. The change of helicity during the first flare that we found was also much smaller than theirs.
Additionally, we examined the evolution of the various energy budgets in AR 12673. The evolution pattern of the free energy that we derived seems to agree with Mitra et al. (2018), although a direct comparison is not possible since the authors provide only the ratio E f /E p . The field energy that we derive, which is as high as 2.5 × 10 33 erg, compares also well with that of Vemareddy (2019) that is computed as the sum of the accumulated energy in the system.
The focus of this work was the examination of the behaviour of the helicity ratio |H j |/|H| during the two flares. This first observational determination of the evolution of this ratio in an AR seems to confirm the findings of Pariat et al. (2017); the helicity ratio increases before major flares, and it relaxes afterwards. Moreover, the much smaller current-carrying part of helicity, i.e., the fact that |H j |/|H| < 1, is in agreement with previous results . Also, the examination of the energy ratio E f /E is compatible with the results of Pariat et al. (2017) and Zuccarello et al. (2018); this ratio relates also to AR eruptivity, but to a smaller extent than |H j |/|H|, and without the capability of providing a threshold above which flares occur, unlike the helicity ratio.
In order to establish these results, the evolution of the helicity ratio should be examined in a large number of ARs, with different characteristics regarding their evolutionary stage and/or their eruptivity, and with the highest possible cadence. A step towards this direction is made with the work of Thalmann et al. (in preparation). The present paper nevertheless, provides the first observational support to the relation of the helicity ratio |H j |/|H| with solar eruptivity.