scieee AI-readable full text Open interactive document viewer

SWiG: Open-source Empirical Solar Wind Generator

Caplan, Ronald; Linker, Jon; Downs, Cooper; Riley, Pete; Stulajter, Miko

Abstract

Empirical solar wind models (ESWM) have a long history of use for space weather and heliospheric research applications, and continue to be widely used today. By relying on potential field models of the solar corona, they can be calculated much faster compared to more complex models (.e.g Magnetohydrodynamic models). The most widely used ESWM is the Wang-Sheely-Arge (WSA) model, which has gone under several revisions over the years. Another popular model is the DCHB model included in the CORHEL modeling suite. While ESWM models have been available publicly for runs-on-request for some time, there are few (if any) that are open-source. Open-source packages do exist for potential field calculations, but ESWMs also require accurate field line tracing and the empirical prescriptions themselves. As part of a Space Weather with Quantified Uncertainty project, we have released the open-source Solar Wind Generator (SWiG). SWiG (github.com/predsci/swig) includes a high-performance accurate potential field solver (POT3D) and field-line tracing code (MapFL), controlled by python scripts to easily generate either WSA or DCHB solar wind models given a full-Sun magnetogram. In this presentation, we introduce SWiG, describe its components, show example results, and give instructions on how to easily download, build, and run the model. The importance of open-source for reproducibility is also discussed.

Full text

SWiG: Open-source Empirical Solar Wind Generator Ronald M. Caplan, Jon A. Linker, Cooper Downs, Pete Riley, and Miko M. Stulajter github.com/predsci/swig 2 SWiG, an Open-source Empirical Solar Wind Generator Space Weather with Quantified Uncertainty SWiG is an open-source empirical solar wind generator based on a PFSS+CS model of the coronal magnetic field, and includes both WSA and DCHB models Many WSA models exist and some are available for runs-on-request at CCMC As part of an SWQU project, lower heliospheric solar wind boundary conditions were needed, and the project had an open-source requirement We therefore extracted/adapted/updated the techniques/codes used in the CORHEL model suite into a new open-source code package called SWiG swig.py cor_pfss_cs_pot3d.py eswim.py mag_trace_analysis.py Computes PFSS+CS model Performs field-line tracings Calculates solar wind model 3 PFSS+CS Model for Coronal Magnetic Field 4 POT3D github.com/ predsci/pot3d POT3D is a code that computes potential field approximations of the solar coronal magnetic field using observations of the solar surface magnetic field as a boundary condition The code is parallelized for use on CPUs and GPUs using MPI+OpenMP and Fortran Standard Parallelism (do concurrent) The HDF5 file format is used for input/output 5 DCHB and Expansion Factor The empirical solar wind models in SWiG require the distance to coronal hole (open field) boundaries (DCHB) and/or the expansion factor (from R0 to Rss) Important to have accurate field line tracing MapFL is a Fortran code that traces field lines through a 3D field defined on a non-uniform spherical gird MapFL uses an adaptive tracing step size with a 2nd-order predictorcorrector scheme 6 MAPFL github.com/ predsci/mapfl Parallelized across multiple CPU threads using OpenMP With DCHB and Expansion Factor, compute Vr Python script eswim.py does this using 3 models With Vr, set empirical density and temperature: 7 Empirical Solar Wind Models (ESWiM) wsa: wsa2: psi(DCHB): PREREQUISITE! Make sure to process the input map so structures are resolved for the resolution of the map (if map is under-resolved, field line tracing may fail) An installation of our public Open-source Flux Transport (OFT) (github.com/predsci/oft) includes map processing capabilities with the psi_map_prep.py script 8 Running SWiG: Process the Map! 9 Running SWiG swig.py [-h] [-oidx OIDX] [-rnum RNUM] [-rundir RUNDIR] [-np NP] [-sw_model SW_MODEL] [-sw_model_params SW_MODEL_PARAMS] [-rss RSS] [-r1 R1] [-r0_trace R0_TRACE] [-noplot] input_map swig_run_multiple_maps.py [-h] [-outdir OUTDIR] [-swig_path SWIG_PATH] [-np NP] [-sw_model SW_MODEL] [-sw_model_params SW_MODEL_PARAMS] [-rss RSS] [-r1 R1] [-r0_trace R0_TRACE] [-noplot] input_directory More options/features can be added (pull requests welcome!)