On 2024 May 1011 the strongest geomagnetic storm since 2003 November occurred with a peak Dst index of 412 nT. The storm was caused by NOAA active region AR 13664 which was the source of a large number of coronal mass ejections and flares including 12 Xclass flares. Starting from about May 7 AR 13664 showed a steep increase in its size and free magnetic energy along with increased flare activity. In this study we perform 3D magnetic field extrapolations with the NF2 nonlinear forcefree code based on physicsinformed neural networks R. Jarolim et al.. In addition we introduce the computation of the vector potential to achieve divergencefree solutions. We extrapolate vector magnetograms from the Solar Dynamics Observatorys Helioseismic and Magnetic Imager at the full 12 minute cadence from 2024 May 5 0000 to 11 0436 UT in order to understand the ARs magnetic evolution and the large eruptions it produced. A decrease in the calculated relative free magnetic energy can be related to solar flares in 90 of the cases and all considered Xclass flares are reflected by a decrease in the relative free magnetic energy. Regions of enhanced free magnetic energy and depleted magnetic energy between the start and end times of major Xclass flares show spatial alignment with brightness increases in extremeultraviolet observations. We provide a detailed analysis of the X3.9class flare on May 10 where we show that the interaction between separated magnetic domains is directly linked to major flaring events. With this study we provide a comprehensive data set of the magnetic evolution of AR 13664 and make it publicly available for further analysis.
['Solar flares', 'Solar activity', 'Solar magnetic fields', 'Solar magnetic reconnection', 'Magnetohydrodynamical simulations', '1496', '1475', '1503', '1504', '1966', 'Astrophysics - Solar and Stellar Astrophysics']
Magnetic Field Evolution of the Solar Active Region 13664
{'No Header': '3', 'Magnetic Field Evolution of the Solar Active Region 13664': 'Robert Jarolim, 1 Astrid M. Veronig, 2, 3 Stefan Purkhart, 2 Peijin Zhang, 4 and Matthias Rempel 1  \n1 High Altitude Observatory, NSF NCAR, 3080 Center Green Dr., Boulder, CO 80301, USA  \n2 University of Graz, Institute of Physics, Universitatsplatz 5, 8010 Graz, Austria  \nUniversity of Graz, Kanzelhohe Observatory for Solar and Environmental Research, Kanzelhohe 19, 9521 Treffen am Ossiacher See, Austria  \n4 New Jersey Institute of Technology, 323 Dr Martin Luther King Jr Blvd, Newark, NJ 07102, USA', 'ABSTRACT': 'On 2024 May 10/11, the strongest geomagnetic storm since November 2003 has occurred, with a peak Dst index of -412 nT. The storm was caused by NOAA Active Region (AR) 13664, which was the source of a large number of coronal mass ejections and flares, including 12 X-class flares. Starting from about May 7, AR 13664 showed a steep increase in its size and (free) magnetic energy, along with increased flare activity. In this study, we perform 3D magnetic field extrapolations with the NF2 nonlinear-force free code based on physics informed neural networks (Jarolim et al. 2023). In addition, we introduce the computation of the vector potential to achieve divergence-free solutions. We extrapolate vector magnetograms from SDO/HMI at the full 12 minute cadence from 2024 May 5-00:00 to 11-04:36 UT, in order to understand the active regions magnetic evolution and the large eruptions it produced. The computed change in magnetic energy and free magnetic energy shows a clear correspondence to the flaring activity. Regions of free magnetic energy and depleted magnetic energy indicate the flare origin and are in good correspondence with observations in Extreme Ultraviolet. Our results suggest that the modeled solar flares are related to significant topological reconfigurations. We provide a detailed analysis of the X4.0-class flare on May 10, where we show that the interaction between separated magnetic domains is directly linked to major flaring events. With this study, we provide a comprehensive data set of the magnetic evolution of AR 13664 and make it publicly available for further analysis.  \nKeywords: Sun: flares, Sun: magnetic fields, methods: numerical', '1. INTRODUCTION': "Solar flares and coronal mass ejections (CMEs) are the most energetic phenomena in our solar system, and can cause severe effects on the space weather at Earth and other solar-system planets. Flares and CMEs are different facets of the same physical process. They are known to result from instabilities in the coronal magnetic field and the impulsive release of vast amounts of energy by magnetic reconnection (Priest & Forbes 2002; Schrijver 2009), which is subsequently converted into kinetic energy of high-energy particles, plasma motions and heating (e.g., Veronig et al. 2005; Fletcher et al. 2011). The magnetic energy that is suddenly released in solar flares (on time scales of minutes to hours) has been previously accumulated and stored (on time scales of days to weeks), through the emergence of magnetic flux from the convection zone to the solar atmosphere and by shearing motions producing strong electric cur-  \nrents in the Active Region's (AR) corona (e.g., Forbes et al. 2006; Sun et al. 2012; Wiegelmann et al. 2014). Therefore, it is important to model the coronal magnetic field and to study the 3D topology of ARs that may lead to major flaring (Wiegelmann et al. 2014; Janvier et al. 2015; Kors'os et al. 2024).  \nStatistical studies have shown that large flares are preferentially produced by large ARs of high magnetic complexity (e.g., Leka & Barnes 2007; Schrijver 2007). Sammis et al. (2000) found that about 60% of the X-class flares (100% of flares ≥ X4) resulted from ARs of Mount Wilson magnetic class βγδ and a size > 1000 µ hem. However, where the bulk of the magnetic energy is stored, and where and how the energy release in flares is triggered is still a topic of intense research (e.g., Green et al. 2018; Kusano et al. 2020; Gupta et al. 2021).  \nDuring 2024 May 2 to 14, NOAA AR 13664 was visible from Earth, and developed to one of the largest and most flare-productive ARs in the recent decades. From May 4 to 7, it grew in size from about 110 to 2700 µ hem (see the overview in Hayakawa et al. 2024), and starting from May 6 it was of magnetic class βγδ . Over its lifetime, AR 13664 produced 12 X-class flare (including an X8.7 flare when it has already rotated behind the Western limb) and 52 M-class flares. Noteworthy, its high activity caused the strongest geomagnetic storm since November 2003, with a peak Dst index of -412 nT on 2024 May 11, around 4 UT.  \nThe exceptional flaring activity and the fast evolution of AR 13664 while it was on the Earth-facing hemisphere, makes it an ideal candidate for a detailed investigation of the evolution of its magnetic complexity, the energy storage in the AR and the energy release during the major flares it produced.  \nIn this study, we model the ARs magnetic field during its transition across the solar disk and analyze the magnetic topology and magnetic energy build-up/release mechanisms. In Sect. 2, we introduce the used data, magnetic model, and analysis methods. Section 3 summarizes the result of our magnetic field extrapolations and the connection to the flaring activity of AR 13664. We investigate the energy build-up and release processes and specifically focus on the X4.0 flare on 2024 May 10. Finally, we provide a summary and interpretation of the model results (Sect. 4).", '2. METHOD': 'In this study, we primarily examine the magnetic topology and evolution of AR 13664. Non-linear ForceFree (NLFF) extrapolations are frequently applied to obtain a realistic estimate of the coronal magnetic field from photospheric vector magnetograms (e.g., Wiegelmann & Sakurai 2021; Wheatland & Leka 2011; Wiegelmann & Inhester 2010). However, NLFF extrapolations typically require additional pre-processing of observational data and are computationally expensive (Wiegelmann et al. 2006; Wiegelmann & Sakurai 2021).  \nPhysics-Informed Neural Networks (PINNs; Raissi et al. 2019) are a novel method for solving partial differential equations and have the ability to smoothly integrate noisy data and incomplete physical models (Karniadakis et al. 2021). In Jarolim et al. (2023), PINNs were introduced for NLFF extrapolations, and demonstrated the ability to provide reliable magnetic field extrapolations in quasi real-time. This specifically enables the efficient computation of extrapolation series at a high temporal resolution.  \nA critical aspect of the NLFF methods is the divergence free condition, which is typically part of the optimization method (e.g., Wiegelmann et al. 2012). Here, we build on the PINN implementation from Jarolim et al. (2023) and introduce in addition extrapolations through the vector potential, instead of directly modeling the magnetic field (Sect. 2.2). With this approach we can intrinsically obtain solenoidal magnetic field solutions.', '2.1. Data': 'We use vector magnetograms from the Helioseismic and Magnetic Imager (HMI; Schou et al. 2012) onboard the Solar Dynamics Observatory (SDO; Pesnell et al. 2012). Specifically, we use Space Weather Active Region Patches (SHARP; Bobra et al. 2014) available with a cadence of 12 min. Here, the vector magnetograms are reprojected to a Cylindrical Equal Area (CEA) grid with B x , B y , B x , which we use as input for our magnetic field extrapolations. For our extrapolations we use the full resolution with a spatial scale of 0.36 Mm per pixel. Note that this resolution is typically not reproduced by our method, due to the disagreement between the force-free assumption and the observation. However, extrapolating the data at full resolution causes no significant increase in computing time. In addition, we use the provided error maps as input to our extrapolation method.  \nFor the evaluation, we use observations in Extreme Ultraviolet (EUV) spectral bands from the Atmospheric Imaging Assembly (AIA; Lemen et al. 2012) onboard SDO. To better visualize flaring activity, we create integrated EUV maps, where we use SDO/AIA observations from a single spectral band at a one minute cadence, and integrate the resulting image stack along the temporal axis. We specifically use the AIA 94 and 131 ˚ A filters, which are most sensitive to the hot flaring plasma, with peaks in the temperature response curves at T ≈ 7 and T ≈ 11 MK, respectively.  \nFor our study, we use observations from 2024 May 5-00:00 to 11-04:36 UT. The series contains SDO/HMI data gaps. The only significant data gap occurs between 8-16:36 and 9-00:00, which coincides with several M-class flares and an X1.0 flare (8-21:08). Therefore, these events were not considered in our analysis.', '2.2. Non-linear force-free extrapolations': 'For the Non-Linear Force Free (NLFF) extrapolations of AR 13664, we use the method from Jarolim et al. (2023), which is based on PINNs. Here, a Neural Network is trained to act as a function approximation of the modeled magnetic field ⃗ B . The model optimization is performed by iteratively sampling points from  \nFigure 1. Overview of the evolution of NOAA AR 13664 from 2024 May 5-00:00 to 11-04:36 UT. a) Evolution of the vertical distribution of free magnetic energy. b) GOES 1-8 ˚ A soft X-ray flux. c) Observed SDO/HMI radial magnetic field maps, SDO/AIA 131 ˚ A EUV maps, and the modeled current density integrated along the vertical axis. We show the initial flux emergence (snapshot at 2024 May 7 00:00 UT) and the major flare eruptions (indicated by dashed lines). The magenta line indicates the point where the right edge of the SHARP reaches 60 · longitude, beyond which the reliability of the vector magnetograms and the modeled coronal field decreases. The circles in the integrated current density maps indicate points of flux domain interactions. An animation of the full time series is available in the online journal. Left top: B z of the modeled photospheric magnetic field. Right top: EUV observations from SDO/AIA 131 ˚ A EUV. Left bottom: maps of integrated current density. Right bottom: maps of integrated free magnetic energy. The movie shows the re-configuration of magnetic domains (dark lines in current density maps) during strong solar eruptions.  \n<!-- image -->  \nthe boundary condition and randomly from within the simulation volume (x, y, z). The coordinate points are used as input to the neural network and mapped to the corresponding magnetic field vector (B x , B y , B z ). For the boundary condition the network is optimized to match the observed magnetic field vector, while for the randomly sampled points the residuals of the force-free  \nequation  \nL ff = ∥ ( ⃗ ∇× ⃗ B ) × ⃗ B ∥ 2 ∥ ⃗ B ∥ 2 + ϵ , (1)  \nand the divergence-free equation  \nL div = | ⃗ ∇· ⃗ B | 2 , (2)  \nare minimized. The derivatives are computed by automatic differentiation and used to construct the partial differential equations. Given that the neural network is fully-differentiable, automatic differentiation can be used to compute smooth derivatives of the model outputs with respect to the input coordinates. As shown in Jarolim et al. (2023), typically it is not possible to achieve a perfect agreement between the observations and the force-free model, and consequently a trade-off between the two conditions is found. This shortcoming is intrinsic to NLFF extrapolations, and can only be mitigated by building on a more complex physical model (e.g., magneto-hydrodynamic modeling) or by additional observational constrains (e.g., chromospheric magnetic field measurements; Jarolim et al. 2024; Fleishman et al. 2019; Yelles Chaouche et al. 2012).  \nFor the optimization of the boundary condition, we take the provided error maps into account. Here, we compute the difference between the modeled ( ⃗ B ) and the reference magnetic field ( ⃗ B 0 )  \n⃗ B diff, 0 = abs( ⃗ B -⃗ B 0 ) . (3)  \nWeaccount for uncertainties in the measurement by subtracting the error map ⃗ B error and clipping negative values  \n⃗ B diff,clipped = max { ⃗ B diff, 0 -⃗ B error , 0 } . (4)  \nTherefore, we only optimize values where the modeled field exceeds the error threshold. For the loss of the boundary magnetic field, we compute the vector norm of the clipped difference vector  \nL B = ∥ ⃗ B diff,clipped ∥ 2 . (5)  \nIn this study, we replace the direct modeling of the magnetic field ⃗ B , with the computation of the vector potential ⃗ A which is derived by taking the curl of ⃗ B  \n⃗ B = ∇× ⃗ A. (6)  \nFrom the fundamental relation of vector calculus this implies ∇· B = ∇· ( ∇× A ) = 0, which directly leads to solenoidal field solution. Note that this computation is performed with auto-differentiation and that a finite-differences approach will show deviations from a perfectly solenoidal field.  \nOmitting the optimization for the divergence-free condition, we obtain the final loss from the force-free and boundary condition  \nL = λ ff L ff + λ B L B . (7)  \nFor our initial extrapolation we exponentially decay λ B from 1 , 000 to 1 over 50 , 000 iterations. We throughout set λ ff to 0.1.', '2.3. Metrics': "From the resulting magnetic field extrapolations we transfer the neural representation to a grid representation by sampling each point in our simulation volume at a resolution of 0.72 Mm per pixel, which corresponds to a rebinning by a factor of 2 from the original SDO/HMI resolution. In addition to the magnetic field vector ⃗ B , we compute the current density ⃗ J according to Ampere's law  \n⃗ J = c 4 π ∇× ⃗ B, (8)  \nwhere c corresponds to the speed of light. Here, we use directly automatic differentiation of the neural representation, to obtain smooth derivatives that are independent of the spatial grid resolution. Note that computed derivatives are in units of the normalized input coordinates and are converted to physical units (Mm) for our evaluation.  \nFrom the resulting cubes we compute measurements of magnetic energy, free magnetic energy, and the quality metrics. The magnetic energy is defined as  \nE = N ∑ i B 2 i 8 π , (9)  \nwhere i refers to the i th grid cell and N to the total number of grid cells. The free magnetic energy corresponds to the difference between the magnetic energy of the NLFF field and the potential field  \nE free = E FF -E PF . (10)  \nHere, we compute the potential field solution using the Green's function approach as proposed by Sakurai (1982). As input for the potential field extrapolation we use the modeled bottom boundary of our NLFF solution (i.e., the adapted boundary).  \nFor the visualization of spatial distribution we compute the local magnetic energy density ( E i = B 2 i / 8 π ), and integrate along the vertical or horizontal axis. We compute energy difference maps analogously, by calculating the energy difference per grid cell (∆ E i = E t2 ,i -E t1 ,i ) and integration along the vertical axis. The total energy difference is computed by integrating over the full simulation domain  \n∆ E total = N ∑ i ∆ E i . (11)  \nTo provide an upper estimate of the released magnetic energy during flares, we compute the total depleted magnetic energy ∆ E -by clipping local energy increases prior to the integration:  \n∆ E -= N ∑ i min(0 , ∆ E i ) . (12)  \nThis excludes the energy build-up that may be continuously ongoing in the AR also during the flaring time (e.g., due to flux emergence). However, we note that also spatial redistribution may falsely count towards released magnetic energy (e.g., movement of magnetic elements). Therefore, this metric can only provide an upper estimate of released magnetic energy, while more advanced metrics would be needed to discern between the parallel processes.  \nWe compute metrics for divergence- and force-freeness to verify the validity of our method. For this we use the normalized divergence  \nL div,n ( ⃗ B ) = ∑ i | ⃗ ∇· ⃗ B i | / ∥ ⃗ B i ∥ . (13)  \nwhich we compute from the sampled grid based on finite differences. In addition, we compute the current weighted angle between the magnetic field and the current density θ J = sin σ J , with  \nσ J ( ⃗ B ) = ( ∑ i ∥ ⃗ J i × ⃗ B i ∥ ∥ ⃗ B i ∥ ) / ∑ i ∥ ⃗ J i ∥ . (14)  \nTo estimate the difference from the boundary condition, we compute the deviation above the error map ⃗ B error as  \n⃗ B diff,clipped = max { ⃗ B diff, 0 -⃗ B error , 0 } , (15)  \nwhere ⃗ B diff, 0 refers to the absolute difference between the modeled and observed magnetogram. From this expression, we compute the vector norm of the clipped difference vector to quantify the deviation from the boundary condition  \n∆ B = ∥ ⃗ B diff,clipped ∥ . (16)", '2.4. Squashing factor and twist number': 'We use the squashing factor (Q-factor) Q ( x, y, z ) and twist ( T w ) to characterize the topology of the magnetic field (Titov et al. 2002; Titov 2007).  \nThe Q-factor is derived from the differential mapping of the magnetic field lines. For a given magnetic field line connecting two surfaces ( S 1 , S 2 ) with on-surface coordinates ([ x 1 , y 1 ], [ x 2 , y 2 ]), the Jacobian matrix of differential mapping is defined as:  \nD 1 2 = ( ∂x 2 ∂x 1 ∂x 2 ∂y 1 ∂y 2 ∂x 1 ∂y 2 ∂y 1 ) ≡ ( a b c d ) (17)  \nand the squashing factor (Q-factor) at [ x 1 , y 1 ] can be expressed as:  \nQ ( x 1 , y 1 ) = a 2 + b 2 + c 2 + d 2 ∣ ∣ ∣ det D 1 2 ∣ ∣ ∣ . (18)  \nThe Q-factor is an invariant along a magnetic field line. A large Q-factor indicates the diverging nature of the local magnetic field.  \nThe twist number ( T w ) characterizes the amount of winding along a magnetic field line, expressed as:  \nT w = ∫ L ∇× ⃗ B · ⃗ B 4 πB 2 d l, (19)  \nwhere the integral range L is a segment of a magnetic field line.  \nIn this study, we use FastQSL (Zhang et al. 2022), which utilizes graphics processing units (GPUs) to perform efficient computations of Q and T w for the full 3D volume.', '3. RESULTS': 'We apply our extrapolation method to the full series of SDO/HMI SHARP vector magnetograms from 2024 May 5-00:00 to 11-04:36 UT, with a 12 min cadence. We make use of the series training approach, using the extrapolation result from the previous time step as initial condition for the training with the next boundary condition. With this approach, we only need to perform a single extrapolation from scratch, while the remaining extrapolations of the series can be obtained in realtime (about 6 minutes per extrapolation with 4 NVIDIA A100 GPUs; for details see Jarolim et al. 2023). Due to the HMI data gap from May 8-16:36 to May 9-00:00 UT, we separate the series into two parts, where we continue the series extrapolation from an additional initial extrapolation on May 9-00:00 UT. From our extrapolation results we render the cubes of magnetic field at a spatial sampling of 0.72 Mm per pixel. Note that the model is trained with a resolution of 0.36 Mm per pixel, however we found the reduced sampling sufficient and the decrease in data volume allows for easier access. The full resolution cubes are available through the model snapshots.  \nIn Fig. 1 we provide an overview of the ARs evolution. The GOES series in panel b shows the flare related increases in X-ray intensity. Panel c shows the radial magnetic field maps, SDO/AIA 131 ˚ A EUV filtergrams and integrated current density throughout the modeled time sequence (dashed lines in panel b). The magnetic energy release related to flares can be seen from the change in free magnetic energy (panel a). The major flux emergence starts on 2024 May 7, as can be seen from the build-up in free magnetic energy and the magnetic field maps (red circle). In Sect. 3.2 we further discuss the relation of energy depletion and the observed intensity increases in EUV. The white circles in panel c indicates supposed separatrix layers that are related to re-configurations during the solar flares (see Sect. 3.3).  \nFigure 2. Overview of the temporal evolution of unsigned magnetic flux, magnetic energy, free magnetic energy, and the ratio between free magnetic energy and magnetic energy ( E free /E ) of AR 13664. Blue lines correspond to the direct quantities, while orange lines refer to the first order time derivatives of those quantities. Blue and orange shaded bars indicate M- and X- class flares, respectively. The bars outline flare start to end times, according to the GOES flare catalog.  \n<!-- image -->', '3.1. Magnetic energy evolution': "We compute the integrated quantities of magnetic energy E (Eq. 9), free magnetic energy E free (Eq. 10), and the ratio of free magnetic energy to magnetic energy E free /E . In addition, we compute the total unsigned magnetic flux from the SHARP vector magnetograms.  \nFigure 2 shows an overview of the computed time series (blue lines) and the corresponding time derivatives (orange lines). The unsigned magnetic flux shows a continuous increase over the modeled time frame, which is also reflected by the energy quantities. A notable shortterm flare-related change in the energy ratio only occurs for the X4.0 and X5.8 flares. This is most probably attributed to the continuous flux emergence which dominates the global energy evolution.  \nFrom the corresponding time derivatives plotted in Fig. 2, we can identify a much better correspondence to the AR's flaring activity. We indicate M- and X-class flares as shaded areas from flare start- to end-time. For all the X-class flares, one can see a distinct depletion of magnetic energy, most prominently for the free magnetic energy and the ratio of free to total magnetic energy E free /E . Note that the trend in the energy change profiles is still positive due to the continuous strong flux emergence. For the X1.1 flare on May 9 17:23 UT we note that the primary drop in magnetic energy occurs after the GOES flare end time. From the SDO/AIA  \nEUV images in Movie 1 , an increased emission at the central flare location and across the AR can be observed up to two hours past the designated flare end time, in agreement with the modeled energy decrease. Similar to the magnetic energy release during X-class flares, also a series of M-class flares can result in a strong energy decrease, as can be seen from the flares on May 10 18:30 19:00 UT and on May 9 06:00 UT (black arrows). Also the M-class flares prior to the X1.0 flare on 2024 May 8 led to a noticeable drop in ∆ E total .  \nDespite the strong energy depletion derived on May 11 01:00 UT, which is in agreement with the observed X5.8 flare, we caution that the used magnetograms are obtained close to the limb and suffer from increased uncertainties (e.g., spectropolarimetric inversions, azimuth disambiguation) and projection effects.", '3.2. Major solar flares': 'We further investigate the change of magnetic energy during seven flare events in the spatially resolved maps, in order to identify the locations of the stored and the released free magnetic energy within the AR. We primarily consider five X-class flares that occurred between May 8 and May 11, and analyze in addition two M-class flares for context. Note that the X1.0 flare on May 8 01:33 is not related to AR 13664, the X1.0 flare on May 8 21:08 UT occurred during the HMI data gap, and the  \nX1.5 flare on May 11 11:15 UT is too close to the solar limb to obtain reliable extrapolations. In Fig. 3 we show maps of EUV emission, time-integrated over the duration of the event, the free magnetic energy prior to the flare eruption, and difference maps in magnetic energy between the post- and pre-flare field. The red contours outline the 10 12 erg/cm 2 threshold of the depleted free magnetic energy E -(Eq. 12).  \nThe maps of free magnetic energy highlight regions with increased flaring potential. The increase in free magnetic energy directly links to the major flux emergence in the eastern part of AR 13664, and also relates to the locations of flare occurrence.  \nFor all X-class flares we note a good agreement between locations of magnetic energy change and increased EUV emission (see Fig. 3). The X1.0 (May 8 - 04:37 UT), the X2.3 (May 9 - 08:45 UT) and the X5.8 (May 11 - 01:10 UT) flares show additional signatures of flux emergence (red regions) during the major energy decrease (surrounding blue regions).  \nFor comparison, we show the same maps also for two of the more than 50 M-class flares that the AR has produced (first and fourth row in Fig. 3). Here, we note a much smaller energy release. Specifically, when comparing the central part of the AR during the M3.1 flare (May 9 - 11:52 UT), which occurs in the western part of the active region, the magnetic energy change mainly shows increases due to emerging flux. In contrast, for the weaker M2.1 flare (May 7 - 20:18 UT) we note regions of energy decrease that align well with the enhanced EUV emission in the central part of the active region.  \nIn Table 1, we summarize the total energy difference and the released magnetic energy for the individual Xand M-class flares. Here, we compare the total energy difference (∆ E total ; Eq. 11) and the estimated total depleted magnetic energy (∆ E -; Eq. 12). We use the first extrapolation prior to the flare start and past the flare end, as defined by the GOES catalog, to compute the energy difference. The continuous energy build-up largely dominates the global energy evolution during the flares, which only results in an energy decrease during the two largest flares (X4.0 and X5.8) and the early M2.1 flare. When only considering the depleted magnetic energy ∆ E -, we can provide an upper estimate of the released magnetic energy during the flare. Here, most of the X-class flares reach > 10 32 erg, in agreement with estimates from X-ray observations, where the estimated total flare energy ranges from 2 . 4 · 10 32 to 6 . 0 · 10 32 erg for flares between X1.0 and X2.8 (Woods et al. 2006). The largest flare in the sequence (X5.8) reaches an upper estimate of 2 . 1 · 10 32 erg in depleted magnetic energy. The modeled M3.1 flare is one magnitude lower in energy.  \nFigure 3. Major solar flares during 2024 May 7-11 and their magnetic energy distribution. The left column shows for each event the AIA 94 ˚ A EUV map time-integrated over the flare duration. The middle column shows the corresponding maps of free magnetic energy E free , which outline the primary regions where energy can be released. The right column shows the change in magnetic energy, indicating where energy is decreased (blue) or increased (red) over the event duration. The red contours in the integrated EUV maps indicate the 10 12 erg/cm 2 level of energy depletion (∆ E -). For all flare events we note a correspondence between the observed EUV emission and regions of magnetic energy change, both in terms of energy depletion (extended blue regions) and energy increase (red regions).  \n<!-- image -->', '3.3. Separatrix layers': 'From the NLFF coronal field extrapolations, we can identify distinct layers that separate different magnetic domains (i.e., quasi-separatrix layers; Demoulin et al. 1996). Figure 4 shows AR 13664 during flaring activity at 2024 May 8 03:00 UT. As can be seen from the EUV maps, the flare loops clearly outline a dark separating layer (see arrow in Fig. 4). We compare this observation to our modeled integrated current density, the squashing factor at a horizontal slice at 5 Mm, and a field line plot. The squashing factor indicates the cross-section of the modeled magnetic domains, where white lines represent the separation layers where field lines strongly diverge (Titov et al. 2002). Similarly, the field line plot shows the magnetic topology of the subframe of the AR.  \nTable 1. Energy change during the major solar eruptions. ∆ E total corresponds to the magnetic energy difference between the flare start- and end-time. ∆ E -refers to the integrated negative magnetic energy change over the flare duration, which provides an upper estimate of released magnetic energy during the event. The X1.0 flare on May 8 - 21:08 UT falls into the HMI data gap, and the active region is too close to the solar limb on May 11 - 11:15 UT (X1.5 flare). Therefore, both flares are not considered in this analysis.  \nSpecifically, the field line traces show the strong separation between the northern flux rope channel and the southern region. The central part of the AR ( x ≈ 250 Mm, y ≈ 75 Mm) shows highly convoluted domains and multiple highly twisted fields.  \nThe integrated current density shows the strongest correspondence to the EUV observation, where we can clearly identify the bright regions as twisted fields in the current density map. In particular, current-free layers show a good agreement both with lines of high squashing factor and the EUV observations. We associate these layers of low current density as a trace of quasi separatrix layers that separate magnetic domains in the active region (c.f. flux-free regions; Janvier et al. 2015).  \nThis is particularly relevant for the modeled flares, where we throughout observe a re-configuration in the current maps associated to solar flares. In Movie 1 we show the temporal evolution of the current density map, where we note rapid motion and closing in of currentfree layers prior to major solar eruptions. We further discuss this in Sect. 3.4, where we provide an analysis of the current density evolution of the X4 flare on 2024 May 10. Figure 1c further highlights the features in the current density maps that we associate with flaring activity and the accompanying movie demonstrates the relation to the flare occurrence.  \n3.4. X4.0 flare on 10 May 2024 and associated filament eruption  \nFigure 4. Example of a supposed separatrix layer and relation to the modeled magnetic field on 2024 May 8-03:00 UT. a) The observed vertical component of the magnetic field with outline of the subregion which is illustrated in panels b)-e). The red arrow indicates the supposed separatrix layer in the SDO/AIA EUV observation in the 131 ˚ A filter during a solar flare event (b). We can identify the separatrix layer as current-free layer in the vertically integrated current density (c). The squashing factor at a height of 5 Mm outlines different magnetic domains (d). Here, the separatrix layer appears as a clear separation line. From the magnetic field line plot we can further identify the different magnetic domains in the solar atmosphere (e). The color coding refers to the local current density j .  \n<!-- image -->  \nIn this section, we focus on the X4.0 flare associated with a filament eruption that occurred on 2024 May 10 with a GOES start time of 06:27:00 UT and a peak time of 06:54:00 UT. Figure 5 shows an overview of the preflare NLFF magnetic field extrapolation at 05:58:43 UT.  \nFigure 5. Magnetic field configuration and parameters prior to the X4.0 solar flare and associated filament eruption, as derived from a pre-flare NLFF coronal magnetic field extrapolation on 2024 May 10-05:58:43 UT. a) Contours of the AIA 1600 ˚ A flare ribbons on top of the pre-flare SHARP LOS magnetogram. The flare contours mark regions that exceed 150, 600, and 2400 ct/s between 06:30 and 07:00 UT. The blue line marks the position of the slice used for panel d. Panel b and c show a zoom-in of the primary flaring region. b) Squashing factor ( Q ) map at the bottom layer of the extrapolation volume ( z = 0 Mm). The red contours are the same as in panel a. c) Overview of selected magnetic field structures, showing the filament channel colored by the local current density, a fan-spine structure in green, and overlying fields connecting both ribbons in gray. d) Twist ( T w ) map along the vertical plane indicated by the blue line in panel a. An animation of the magnetic field line plot is available in the online journal. The series shows the evolution of the magnetic topology from 05:58:43 to 12:58:43 UT, where we note a reconfiguration of the fan-spine structure and a contraction of the central flux rope.  \n<!-- image -->  \nPanel a shows the cumulative flare ribbons and kernels over the impulsive phase of the flare as observed by the AIA 1600 ˚ A channel. The two main flare ribbons are located in the northeastern part of the AR, with the southern ribbon extending along a narrow region of positive magnetic polarity and the northern ribbon covering a weaker region of negative magnetic polarity. The squashing factor map (panel b) shows that this main flare region was strongly separated from the rest of the AR by a separatrix layer running along the narrow positive polarity region.  \nThis configuration resembles the one we already found two days earlier (2024 May 8), shown in Fig. 4. Similarly to that previous event, during the X4.0 flare the southern part of the AR is also involved in the flare, although the main eruption takes place in the strongly separated northeastern part (see the AIA 131 ˚ A time series in Fig. 6). We observe the formation of two separate flare arcades in EUV that both connect to the southern flare ribbon in the narrow positive polarity region.  \nPanel c in Fig. 5 shows the magnetic field configuration of the pre-flare NLFFF extrapolation, but only focuses on structures associated with the main, northern part of the event. The NLFFF extrapolation reveals strongly sheared field lines that form the filament channel and run along the polarity inversion line between the two flare ribbons. Gray field lines start from seed sources placed in selected regions within the northern flare ribbon contours derived from AIA 1600 ˚ A maps. They reveal parts of the field structure above the filament that will be stretched by the erupting filament and reconnected beneath it, resulting in the flare ribbons and flare loops spanning between them. Green field lines show a fan-spine structure near the western anchor point of the filament. This structure corresponds to a circular portion in the AIA 1600 ˚ A contours that connects the two flare ribbons in the west and follows the same strong separatrix layer shown in Fig. 5b (c.f., Masson et al. 2009). Some of the green field lines of the fan-spine structure closely follow the filament channel towards its western anchor point, while others extend further towards the northern part of the northern flare ribbons. This suggests that the fan-spine structure was involved in the reconnection process during the filament eruption.  \nThe movie accompanying Fig. 5 shows the temporal evolution of field structures started from fixed seed sources for each magnetic field extrapolation between 05:58:43 and 12:58:43 UT on 2024 May 10 ( Movie 2 ). The movie shows a shift of the overlying fields, a northward drift and contraction of the western half of the filament channel, and a decay of the extended connec-  \ntion of the fan-spine structure to the northern flare ribbon. Note that the SHARP region moves slightly in relation to the AR during this period and the magnetic field evolves, but the seed sources from which the field lines are drawn are stationary. This means that the movie does not show the evolution of fixed field lines, and some changes can also be due to the relative motion of the magnetic field and the seed sources.  \nIn panel d we show the twist in the pre-flare magnetic field along a cross-section through the western part of the filament. The filament channel is part of the negative twist region between Y = 100 to 120 Mm. This configuration shows an anemone type structure, where the small positive flux region (red) is overlaid by the magnetic flux rope structure (blue in panel d). This shows similarity to the mini-filament eruption mechanism proposed in Sterling et al. (2015) and could also be a triggering mechanism in this large-scale filament eruption.  \nFig. 6 shows maps of integrated current density and SDO/AIA 131 ˚ A maps at 1 hour cadence. The blue arrow indicates the magnetic flux rope which undergoes a re-configuration during the flare event and is supposedly associated with the observed filament eruption. By comparing the flux rope before (2024 May 10-06:00) and after the eruption (2024 May 10- 08:00), a significant topology change can be observed, where the flux rope shows a larger extent after the flare eruption. The black arrow indicates the supposed separatrix configuration, where magnetic field lines of opposite polarity are compressed (c.f., squashing factor in Fig. 5). The reconfiguration during the solar flare can be clearly identified from the observation on 2024 May 10-09:00 UT, where the magnetic domains are merged, and the northern part of the dark separation layer opens, forming the extended magnetic flux rope.', '4. DISCUSSION': "AR 13664 showed a rapid flux emergence from 2024 May 7 that lead to a series of M- and X-class flares, causing a multitude of X- and M-class flares and associated CMEs and being the source of the largest geomagnetic storm with a peak Dst index of -412 nT of the last two decades.  \nIn this study, we provided an in-depth overview of the magnetic topology and evolution of AR 13664, while it was present on the Earth-facing solar hemisphere. We applied NLFF extrapolations to study the 3D magnetic topology and the evolution of the energy build up and flare-associated energy releases from 2024 May 5-00:00 to 11-04:36 UT. All our extrapolation results are publicly available (Section 5) as HDF5 and VTK files. We  \nFigure 6. Comparison of the temporal evolution of the modeled vertically integrated current density (left) and the observed SDO/AIA 131 ˚ A filtergrams (right) for the X4.0 flare and filament eruption on 10 May 2024. The blue arrows indicate the reconfiguration of the magnetic flux rope, visible in the current density map. The black arrow highlights the current-free layer which undergoes substantial reconfiguration during the flare and associated filament eruption.  \n<!-- image -->  \nalso provide the model save states, which are storage efficient ( ∼ 2 MB per file), and codes for extracting and evaluating the data cube 1 .  \nThe resulting data set can be used to (1) further study the relation of the solar flares to coronal mass ejections (Murray et al. 2018). (2) Analyze magnetic parameters from the 3D field prior to the flare eruptions (Kors'os et al. 2024; Kusano et al. 2020). (3) Analyze the temporal evolution of the modeled flaring events (e.g., Purkhart et al. 2023). (4) Complement related observations, from both in-situ and remote sensing instruments (e.g., Hayakawa et al. 2024).  \nOur extrapolations show a realistic approximation of the observed flaring activity. The derived changes in free magnetic energy shows a direct relation to the solar flares, most prominently for the strong X-class flares and for the occurrence of multiple M-class flares over a short time frame (Sect. 3.1). In contrast, the integrated quantities of magnetic energy and free magnetic energy are subject to permanent energy increase which complicates the direct identification of flare related energy release processes. For the estimate of total released energy we are neglecting regions of energy increase, providing an upper estimate of modeled released magnetic energy. For the total depleted magnetic energy E -, we estimate released magnetic energies in the order of > 10 32 erg for X-class flares, while M-class flares typically show a lower energy difference (order of 10 31 erg). To better understand NLFF modeled magnetic energy release processes in the presence of emerging flux, a comparison to MHD simulations could give further insights (e.g., Chen et al. 2023).  \nWe provided a detailed analysis of the X4.0 flare on 2024 May 10-06:27 UT (Sect. 3.4) to demonstrate how our NLFF magnetic field extrapolations can be applied to the interpretation of solar flares and filament eruptions. The magnetic field topology in a pre-flare extrapolation shows a high degree of agreement with AIA 1600 ˚ A flare ribbons and AIA EUV images. They reveal the main event geometry consisting of the filament channel, overlying loops, and a fan-spine structure. The squashing factor map derived from this extrapolation reveals a strong separatrix layer running along the southern flare ribbon, highlighting its additional magnetic connection to the southern part of the AR, which was also active during this flare. This is in agreement with previous studies that compared reconnection signatures with the location of quasi-separatrix layers (e.g., Dud'ık  \net al. 2014; Zhao et al. 2014; Dalmasse et al. 2015; Janvier et al. 2015). Our analysis suggest that we can use layers with strong gradients of current density as reference for separatrix layers that outline magnetic domains (Sect. 3.3). In Fig. 6 we show the magnetic re-configuration during the X4.0 flare, where our model suggests the formation of a new current channel and reconfiguration of magnetic domains. The strong current density build-up, close correspondence between the flare ribbons and the quasi-separatrix layer, and the topological reconfiguration, are strong evidence for magnetic reconnection (Aulanier et al. 2012; Janvier et al. 2013, 2015).  \nFinally, with this study, we provide further extensions to PINN-based NLFF modeling, by introducing the vector potential for solenoidal simulations. While this assures that the fundamental physical law is satisfied, this leads to increased deviations from the (non-divergence free) boundary condition and requires additional compute resources.", '5. DATA AVAILABILITY': 'All our extrapolation results are publicly available.  \n- · Data: https://app.globus.org/file-manager? origin id=4263de78-cfdb-401e-a62b-dae3b935530a& origin path=%2F\n- · Code: https://github.com/RobertJaro/NF2\n- · Documentation for data usage: https://github. com/RobertJaro/NF2/wiki/AR-13664  \nWith this study we provide FastQSL (Zhang et al. 2022) in the NF2 framework (Jarolim et al. 2023).  \nThe SDO HMI and AIA data is provided by JSOC (http://jsoc.stanford.edu/).', '6. ACKNOWLEDGMENTS': 'RJ was supported by the NASA Jack-Eddy Fellowship. This material is based upon work supported by the NSF National Center for Atmospheric Research (NCAR), which is a major facility sponsored by the U.S. National Science Foundation under Cooperative Agreement No. 1852977. We would like to acknowledge highperformance computing support from the Derecho system (doi:10.5065/qx9a-pg09) provided by NCAR, sponsored by the National Science Foundation. This research was funded in part by the Austrian Science Fund (FWF) 10.55776/I4555 (AMV, SP).  \nThis research has made use of SunPy (Mumford et al. 2020; Barnes et al. 2020), AstroPy (Astropy Collaboration et al. 2013), PyTorch (Paszke et al. 2019) and Paraview (Ahrens et al. 2005).  \nFacilities:  \nSDO (HMI, AIA).  \nSoftware: AstroPy (Astropy Collaboration et al. 2013, 2018), SunPy (Barnes et al. 2020; Mumford et al.  \n2020; Glogowski et al. 2019), Pytorch (Paszke et al. 2019), Paraview (Ahrens et al. 2005), NF2 (Jarolim et al. 2023).', 'A. QUALITY': 'We compute quality metrics over the full extrapolation series, to assure the consistency of our results. In Fig. 7 we compare the deviation from the boundary condition, the current-weighted angle between the magnetic field and current density ( θ J ), and the normalized divergence ( L div = | ⃗ ∇· ⃗ B | / ∥ B ∥ ), as well as the arcsine of the θ J angle. The dashed line indicates the approximate start time of increased flux emergence. Note that the divergence is computed from the grid representation based on finite-difference, while the divergence computed based on smooth derivatives is per definition zero (vector potential; < 10 -6 G/Mm). As compared to the divergence estimates in Jarolim et al. (2023) and Jarolim et al. (2024), the normalized divergence is two orders of magnitude lower when the vector potential is applied. The metrics for force-freeness ( θ J and σ J ) show slightly larger values than reported in Jarolim et al. (2023) for the λ ff = 0 . 1 configuration. This is likely caused by the enforced divergence freeness. The decrease in θ J over the time series is related to the flux emergence (i.e., increase in J). As can be seen from the fluctuating behaviour at the end of the sequence, the high projection angle causes significant variations. For this reason, we refrain from performing extrapolations at later points in time.  \nWith the use of the vector potential the solutions are per definition divergence-free. However, since the observations are typically not divergence-free (due to e.g., noise, grid scaling, neglected corrugation, errors from inversion and disambiguation method) this results in an additional deviation from the boundary condition as compared to direct modeling of the magnetic field. Our uncertainty estimates further emphasize that observations close to the solar limb suffer from increased errors (see App. B).  \nThe modeling of the vector potential has further implications for the computation requirements. The extrapolation from scratch requires about 7 hours on 4 NVIDIA A100 GPUs. For the computation of the series we require ∼ 5 min per time step with the same computational setup. Therefore, the extrapolation of the time series can still be performed in quasi real-time, but requires more computational power and computing time than direct modeling of the magnetic field B ( ≈ 1 hour for an extrapolation from scratch).', 'B. UNCERTAINTY QUANTIFICATION': 'We use ensemble modeling to estimate model dependent uncertainties. For all our model fitting we start from a randomly initialized model and use randomly sampled points during the optimization. From this, we expect that regions that are less constrained by the boundary data (e.g., weak field regions, larger errors in the magnetograms), or where the boundary condition and force-free model are in disagreement, show an increased difference among the individual extrapolations.  \nFor our uncertainty estimation we perform five individual extrapolations and compute the standard deviation across the ensemble  \nδB = √ √ √ √ ∑ N i ∥ ∥ ∥ ⃗ B i -⃗ B ∥ ∥ ∥ N , (B1)  \nwhere ⃗ B refers to the average magnetic field vector per grid cell and N to the number of ensemble runs ( N = 5). For the visualization of uncertainty maps we compute the average uncertainty along the vertical axis.  \nThe ensemble modeling requires parallel model training from scratch, therefore we can only provide uncertainty estimates for selected examples. Here, we provide uncertainty estimates for extrapolations on 2024 May 10 06:00 UT prior to the X4.0 flare, and on 2024 May 11 01:00 UT prior to the X5.8 flare. Specifically, the later extrapolation uses observations that are close to the solar limb. In Fig. 8 we show maps of integrated current density of the ensemble runs, the corresponding standard deviation of the current maps, and the uncertainty maps ( δB ). The current density maps show throughout very similar configuration, indicating that our method converges to similar solutions in terms of magnetic topology. This can also be seen from the low standard deviation.  \nFigure 7. Metrics for divergence freeness (top) and force-freeness (bottom) over the evolution of the active region. The dashed line indicates the start of major flux emergence (c.f., Fig. 1). The decrease of θ J can be related to the increase in magnetic currents.  \n<!-- image -->  \nThe uncertainty maps highlight the regions of increased variation, which are primarily located in the southern part and the weak field region between the two polarities. Importantly, the central complex region with mixed polarities shows low uncertainties, which indicates that this region is well constrained by the boundary condition. For both extrapolations we note increased uncertainties close to the boundaries. This further highlights the discrepancy of the assumed potential field boundary conditions. For the second extrapolation, close to the solar limb, we note a drastic increase in uncertainty, particularly towards the solar west. This suggests that extrapolations close to the solar limb should be excluded from further evaluation, particularly for points that exceed 60 · longitude.', 'REFERENCES': 'Ahrens, J., Geveci, B., & Law, C. 2005, The visualization  \nhandbook, 717 Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., et al. 2013, A&A, 558, A33, doi: 10.1051/0004-6361/201322068  \nAstropy Collaboration, Price-Whelan, A. M., Sip"ocz, B. M., et al. 2018, AJ, 156, 123, doi: 10.3847/1538-3881/aabc4f Aulanier, G., Janvier, M., & Schmieder, B. 2012, A&A, 543, A110, doi: 10.1051/0004-6361/201219311  \nBarnes, W. T., Bobra, M. G., Christe, S. D., et al. 2020, The Astrophysical Journal, 890, 68 Bobra, M. G., Sun, X., Hoeksema, J. T., et al. 2014, SoPh, 289, 3549, doi: 10.1007/s11207-014-0529-3 Chen, F., Cheung, M. C. M., Rempel, M., & Chintzoglou, G. 2023, ApJ, 949, 118, doi: 10.3847/1538-4357/acc8c5 Dalmasse, K., Chandra, R., Schmieder, B., & Aulanier, G.  \n2015, A&A, 574, A37, doi: 10.1051/0004-6361/201323206  \nFigure 8. Uncertainty maps prior to the X4.0 and X5.8 flare. We show the vertically integrated current density of the five ensemble runs and the corresponding standard deviation at the top. The bottom plots show the reference magnetogram and the corresponding uncertainty maps. The stronger projection effects on 2024 May 11-01:00 leads to a substantial increase in uncertainty towards the west limb.  \n<!-- image -->  \nDemoulin, P., Henoux, J. C., Priest, E. R., & Mandrini, C. H. 1996, A&A, 308, 643 Dud´ık, J., Janvier, M., Aulanier, G., et al. 2014, ApJ, 784, 144, doi: 10.1088/0004-637X/784/2/144 Fleishman, G., Mysh\'yakov, I., Stupishin, A., Loukitcheva, M., & Anfinogentov, S. 2019, ApJ, 870, 101, doi: 10.3847/1538-4357/aaf384 Fletcher, L., Dennis, B. R., Hudson, H. S., et al. 2011, SSRv, 159, 19, doi: 10.1007/s11214-010-9701-8 Forbes, T. G., Linker, J. A., Chen, J., et al. 2006, SSRv, 123, 251, doi: 10.1007/s11214-006-9019-8 Glogowski, K., Bobra, M. G., Choudhary, N., Amezcua, A. B., & Mumford, S. J. 2019, Journal of Open Source Software, 4, 1614, doi: 10.21105/joss.01614 Green, L. M., T¨or¨ok, T., Vrˇsnak, B., Manchester, W., & Veronig, A. 2018, SSRv, 214, 46, doi: 10.1007/s11214-017-0462-5 Gupta, M., Thalmann, J. K., & Veronig, A. M. 2021, A&A, 653, A69, doi: 10.1051/0004-6361/202140591 Hayakawa, H., Ebihara, Y., Mishev, A., et al. 2024, arXiv e-prints, arXiv:2407.07665, doi: 10.48550/arXiv.2407.07665 Janvier, M., Aulanier, G., & D´emoulin, P. 2015, SoPh, 290, 3425, doi: 10.1007/s11207-015-0710-3 Janvier, M., Aulanier, G., Pariat, E., & D´emoulin, P. 2013,  \nA&A, 555, A77, doi: 10.1051/0004-6361/201321164  \nJarolim, R., Thalmann, J. K., Veronig, A. M., & Podladchikova, T. 2023, Nature Astronomy, doi: 10.1038/s41550-023-02030-9 Jarolim, R., Tremblay, B., Rempel, M., et al. 2024, ApJL, 963, L21, doi: 10.3847/2041-8213/ad2450 Karniadakis, G. E., Kevrekidis, I. G., Lu, L., et al. 2021, Nature Reviews Physics, 3, 422, doi: 10.1038/s42254-021-00314-5 Kors´os, M. B., Jarolim, R., Erd´elyi, R., et al. 2024, ApJ, 962, 171, doi: 10.3847/1538-4357/ad18bd Kusano, K., Iju, T., Bamba, Y., & Inoue, S. 2020, Science, 369, 587, doi: 10.1126/science.aaz2511 Leka, K. D., & Barnes, G. 2007, ApJ, 656, 1173, doi: 10.1086/510282 Lemen, J. R., Title, A. M., Akin, D. J., et al. 2012, SoPh, 275, 17, doi: 10.1007/s11207-011-9776-8 Masson, S., Pariat, E., Aulanier, G., & Schrijver, C. J. 2009, ApJ, 700, 559, doi: 10.1088/0004-637X/700/1/559 Mumford, S. J., Christe, S., Freij, N., et al. 2020, SunPy, v1.1.4, Zenodo, doi: 10.5281/zenodo.3871057 Murray, S. A., Guerra, J. A., Zucca, P., et al. 2018, SoPh, 293, 60, doi: 10.1007/s11207-018-1287-4 Paszke, A., Gross, S., Massa, F., et al. 2019, in Advances in Neural Information Processing Systems 32, ed. H. Wallach, H. Larochelle, A. Beygelzimer, F. d \' Alch´e-Buc, E. Fox, & R. Garnett (Curran Associates, Inc.), 8024-8035'}