Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Probing the solar coronal magnetic field with physics-informed neural networks

Abstract

While the photospheric magnetic field of our Sun is routinely measured, its extent into the upper atmosphere is typically not accessible by direct observations. Here we present an approach for coronal magnetic-field extrapolation, using a neural network that integrates observational data and the physical force-free magnetic-field model. Our method flexibly finds a trade-off between the observation and force-free magnetic-field assumption, improving the understanding of the connection between the observation and the underlying physics. We utilize meta-learning concepts to simulate the evolution of active region NOAA 11158. Our simulation of 5 days of observations at full cadence (12 minutes) requires less than 12 hours of total computation time, allowing for real-time force-free magnetic-field extrapolations. The application to an analytical magnetic-field solution, a systematic analysis of the time evolution of free magnetic energy and magnetic helicity in the coronal volume, as well as comparison with extreme-ultraviolet observations, demonstrates the validity of our approach. The obtained temporal and spatial depletion of free magnetic energy unambiguously relates to the observed flare activity.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Overview of the proposed method for force-free magnetic-field extrapolation.
Fig. 2: Evaluation of different parameter settings and trade-off between measurement and physical model, using the vector magnetogram from 15 February 2011 at 00:00 UT.
Fig. 3: Simulated series of active region NOAA 11158 and comparison of extracted parameters with observations.
Fig. 4: Simulated magnetic topology of active region NOAA 11158 and comparison with observations in the EUV.

Similar content being viewed by others

Data availability

All our simulation results are publicly available (parameter variation, time series, 66 individual active regions) at https://doi.org/10.6084/m9.figshare.21983486. See also the project page at https://github.com/RobertJaro/NF2. The SDO HMI and AIA data are provided by JSOC (http://jsoc.stanford.edu/). We provide automatic download scripts with SunPy42,43.

Code availability

Our codes are publicly available. We provide Python notebooks that perform simulations for arbitrary regions without any pre-requirements. We provide GPU accelerated code for computing the potential-field solution based on the Green’s function method32 at https://github.com/RobertJaro/NF2.

References

  1. Wiegelmann, T., Petrie, G. J. D. & Riley, P. Coronal magnetic field models. Space Sci. Rev. 210, 249–274 (2017).

    Article  ADS  Google Scholar 

  2. Green, L. M., Török, T., Vršnak, B., Manchester, W. & Veronig, A. The origin, early evolution and predictability of solar eruptions. Space Sci. Rev. 214, 46 (2018).

    Article  ADS  Google Scholar 

  3. Wiegelmann, T. & Sakurai, T. Solar force-free magnetic fields. Living Rev. Sol. Phys. 18, 1 (2021).

    Article  ADS  Google Scholar 

  4. Metcalf, T. R., Jiao, L., McClymont, A. N., Canfield, R. C. & Uitenbroek, H. Is the solar chromospheric magnetic field force-free? Astrophys. J. 439, 474 (1995).

    Article  ADS  Google Scholar 

  5. Wiegelmann, T., Inhester, B. & Sakurai, T. Preprocessing of vector magnetograph data for a nonlinear force-free magnetic field reconstruction. Sol. Phys. 233, 215–232 (2006).

    Article  ADS  Google Scholar 

  6. Fuhrmann, M., Seehafer, N., Valori, G. & Wiegelmann, T. A comparison of preprocessing methods for solar force-free magnetic field extrapolation. Astron. Astrophys. 526, A70 (2011).

    Article  ADS  Google Scholar 

  7. Wiegelmann, T. & Inhester, B. How to deal with measurement errors and lacking data in nonlinear force-free coronal magnetic field modelling? Astron. Astrophys. 516, A107 (2010).

    Article  ADS  Google Scholar 

  8. Wheatland, M. S. & Régnier, S. A self-consistent nonlinear force-free solution for a solar active region magnetic field. Astrophys. J. Lett. 700, L88–L91 (2009).

    Article  ADS  Google Scholar 

  9. Wheatland, M. S. & Leka, K. D. Achieving self-consistent nonlinear force-free modeling of solar active regions. Astrophys. J. 728, 112 (2011).

    Article  ADS  Google Scholar 

  10. Wiegelmann, T. et al. How should one optimize nonlinear force-free coronal magnetic field extrapolations from SDO/HMI vector magnetograms? Sol. Phys. 281, 37–51 (2012).

    ADS  Google Scholar 

  11. DeRosa, M. L. et al. The influence of spatial resolution on nonlinear force-free modeling. Astrophys. J. 811, 107 (2015).

    Article  ADS  Google Scholar 

  12. Raissi, M., Perdikaris, P. & Karniadakis, G. E. Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 378, 686–707 (2019).

    Article  ADS  MathSciNet  MATH  Google Scholar 

  13. Karniadakis, G. E. et al. Physics-informed machine learning. Nat. Rev. Phys. 3, 422–440 (2021).

    Article  Google Scholar 

  14. Raissi, M., Yazdani, A. & Karniadakis, G. E. Hidden fluid mechanics: learning velocity and pressure fields from flow visualizations. Science 367, 1026–1030 (2020).

    Article  ADS  MathSciNet  MATH  Google Scholar 

  15. Mishra, S. & Molinaro, R. Physics informed neural networks for simulating radiative transfer. J. Quant. Spectrosc. Radiat. Transf. 270, 107705 (2021).

    Article  Google Scholar 

  16. Mathews, A., Hughes, J., Francisquez, M., Hatch, D. & White, A. Uncovering edge plasma dynamics via deep learning of partial observations. In APS Division of Plasma Physics Meeting Abstracts: APS Meeting Abstracts Vol. 2020, TO10.007 (APS, 2020).

  17. Peter, H., Warnecke, J., Chitta, L. P. & Cameron, R. H. Limitations of force-free magnetic field extrapolations: revisiting basic assumptions. Astron. Astrophys. 584, A68 (2015).

    Article  ADS  Google Scholar 

  18. Borrero, J. M. et al. VFISV: Very Fast Inversion of the Stokes Vector for the Helioseismic and Magnetic Imager. Sol. Phys. 273, 267–293 (2011).

    Article  ADS  Google Scholar 

  19. Low, B. C. & Lou, Y. Q. Modeling solar force-free magnetic fields. Astrophys. J. 352, 343 (1990).

    Article  ADS  Google Scholar 

  20. Schrijver, C. J. et al. Nonlinear force-free modeling of coronal magnetic fields part I: a quantitative comparison of methods. Sol. Phys. 235, 161–190 (2006).

    Article  ADS  Google Scholar 

  21. Wheatland, M. S., Sturrock, P. A. & Roumeliotis, G. An optimization approach to reconstructing force-free fields. Astrophys. J. 540, 1150–1155 (2000).

    Article  ADS  Google Scholar 

  22. Lemen, J. R. et al. The Atmospheric Imaging Assembly (AIA) on the Solar Dynamics Observatory (SDO). Sol. Phys. 275, 17–40 (2012).

    Article  ADS  Google Scholar 

  23. Pesnell, W. D., Thompson, B. J. & Chamberlin, P. C. The Solar Dynamics Observatory (SDO). Sol. Phys. 275, 3–15 (2012).

    Article  ADS  Google Scholar 

  24. Sun, X. et al. Evolution of magnetic field and energy in a major eruptive active region based on SDO/HMI observation. Astrophys. J. 748, 77 (2012).

    Article  ADS  Google Scholar 

  25. Thalmann, J. K., Sun, X., Moraitis, K. & Gupta, M. Deducing the reliability of relative helicities from nonlinear force-free coronal models. Astron. Astrophys. 643, A153 (2020).

    Article  ADS  Google Scholar 

  26. Hudson, H. S. Implosions in coronal transients. Astrophys. J. Lett. 531, L75–L77 (2000).

    Article  ADS  Google Scholar 

  27. Camporeale, E. The challenge of machine learning in space weather: nowcasting and forecasting. Space Weather 17, 1166–1207 (2019).

    Article  ADS  Google Scholar 

  28. Kusano, K., Iju, T., Bamba, Y. & Inoue, S. A physics-based method that can predict imminent large solar flares. Science 369, 587–591 (2020).

    Article  ADS  MathSciNet  MATH  Google Scholar 

  29. Valori, G. et al. Magnetic helicity estimations in models and observations of the solar magnetic field. Part I: finite volume methods. Space Sci. Rev. 201, 147–200 (2016).

    Article  ADS  Google Scholar 

  30. Thalmann, J. K., Linan, L., Pariat, E. & Valori, G. On the reliability of magnetic energy and helicity computations based on nonlinear force-free coronal magnetic field models. Astrophys. J. Lett. 880, L6 (2019).

    Article  ADS  Google Scholar 

  31. Wiegelmann, T. & Neukirch, T. Including stereoscopic information in the reconstruction of coronal magnetic fields. Sol. Phys. 208, 233–251 (2002).

    Article  ADS  Google Scholar 

  32. Sakurai, T. Green’s function methods for potential magnetic fields. Sol. Phys. 76, 301–321 (1982).

    Article  ADS  Google Scholar 

  33. Bobra, M. G. et al. The Helioseismic and Magnetic Imager (HMI) vector magnetic field pipeline: SHARPs—Space-Weather HMI Active Region Patches. Sol. Phys. 289, 3549–3578 (2014).

    Article  ADS  Google Scholar 

  34. Sitzmann, V., Martel, J., Bergman, A., Lindell, D. & Wetzstein, G. Implicit neural representations with periodic activation functions. Adv. Neural Inf. Process. Syst. 33, 7462–7473 (2020).

    Google Scholar 

  35. Tancik, M. et al. Fourier features let networks learn high frequency functions in low dimensional domains. Adv. Neural Inf. Process. Syst. 33, 7537–7547 (2020).

    Google Scholar 

  36. Alissandrakis, C. On the computation of constant alpha force-free magnetic field. Astron. Astrophys. 100, 197–200 (1981).

    ADS  Google Scholar 

  37. Berger, M. A. & Field, G. B. The topological properties of magnetic helicity. J. Fluid Mech. 147, 133–148 (1984).

    Article  ADS  MathSciNet  Google Scholar 

  38. Finn, J. & Antonsen, T. J. Magnetic helicity: what is it and what is it good for? Plasma Phys. Control. Fusion 9, 111 (1984).

    ADS  Google Scholar 

  39. Berger, M. A. Introduction to magnetic helicity. Plasma Phys. Control. Fusion 41, B167–B175 (1999).

    Article  ADS  Google Scholar 

  40. Berger, M. A. Topological Quantities in Magnetohydrodynamics 345–374 (CRC Press, 2019).

  41. Thalmann, J. K., Inhester, B. & Wiegelmann, T. Estimating the relative helicity of coronal magnetic fields. Sol. Phys. 272, 243–255 (2011).

    Article  ADS  Google Scholar 

  42. Zacharov, I. et al. ‘Zhores’—petaflops supercomputer for data-driven modeling, machine learning and artificial intelligence installed in Skolkovo Institute of Science and Technology. Open Eng. 9, 59 (2019).

    Article  Google Scholar 

  43. Glogowski, K., Bobra, M. G., Choudhary, N., Amezcua, A. B. & Mumford, S. J. drms: a Python package for accessing HMI and AIA data. J. Open Source Softw. 4, 1614 (2019).

    Article  ADS  Google Scholar 

  44. Mumford, S. J. et al. SunPy. Zenodo (2020).

  45. Barnes, W. T. et al. The SunPy project: open source development and status of the version 1.0 core package. Astrophys. J. 890, 68 (2020).

    Article  ADS  Google Scholar 

  46. Astropy Collaboration et al. AstropPy: a community Python package for astronomy. Astron. Astrophys. 558, A33 (2013).

    Article  Google Scholar 

  47. Paszke, A. et al. PyTorch: an imperative style, high-performance deep learning library. Adv. Neural Inf. Process. Syst. 32, 8024–8035 (2019).

  48. Ahrens, J., Geveci, B. & Law, C. in Visualization Handbook (eds Hansen, C. D. & Johnson, C. R.) 717–731 (Butterworth-Heinemann, 2005).

Download references

Acknowledgements

R.J., A.M.V. and T.P. have received financial support from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 824135 (SOLARNET). J.K.T. and A.M.V. acknowledge the Austrian Science Fund (FWF): P31413-N27. We acknowledge the use of the Skoltech Zhores cluster for obtaining the results presented in this paper44. This research has made use of SunPy v3.0.042,45, AstroPy46, PyTorch47 and Paraview48. We acknowledge M. Gupta for running the optimization-based NLFF models used for comparison with our method in Supplementary Section B.

Author information

Authors and Affiliations

Authors

Contributions

R.J. developed the method and led the writing of the paper. J.K.T. performed the evaluation and comparison to existing NLFF methods, and contributed to the writing of the paper. A.M.V. contributed to the conceptualization of the study and writing of the paper. T.P. contributed to the HPC computations. All authors discussed the results and commented on the paper.

Corresponding author

Correspondence to R. Jarolim.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Astronomy thanks Michael Wheatland, Yong-Jae Moon and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Supplementary Figs. 1–5 and Sections A–D.

Supplementary Video 1

Evolution of the active region NOAA 11158. Top row: observations of SDO/AIA 131 Å, SDO/HMI Bz component, and SDO/AIA 1,600 Å. Bottom row: maps of vertically integrated current density, free magnetic energy and running difference of released free magnetic energy computed from the magnetic-field extrapolations.

Supplementary Data 1

Full set of performance metrics for the λ = 1 series shown in Supplementary Fig. 3.

Supplementary Data 2

Full set of performance metrics for the λ = 0.1 series shown in Supplementary Fig. 3.

Supplementary Data 3

Full set of performance metrics for the λ = 0.1 extrapolations from scratch shown in Supplementary Fig. 3.

Supplementary Data 4

Full set of performance metrics for the series from ref. 10 using wd = 1, shown in Supplementary Fig. 3.

Supplementary Data 5

Full set of performance metrics for the series from ref. 10 using wd = 2, shown in Supplementary Fig. 3.

Supplementary Data 6

Full evaluation and extended information for quality evaluation of 66 extrapolated active regions, shown in Supplementary Fig. 5.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Jarolim, R., Thalmann, J.K., Veronig, A.M. et al. Probing the solar coronal magnetic field with physics-informed neural networks. Nat Astron 7, 1171–1179 (2023). https://doi.org/10.1038/s41550-023-02030-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41550-023-02030-9

This article is cited by

Search

Quick links

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: AI and Robotics