**SPARC: Seismic wave Propagation through Active Regions and Convection**

SPARC is a set of codes (see associated documentation) to simulate the propagation of waves through user-prescribed media in Cartesian geometry, specifically designed to address problems in helioseismology. The methods, validation, and verification are described in detail in the following publications:

Solar Acoustic Simulator: Applications and Results

Hanasoge & Duvall (2007), *Astronomische Nachrichten*, **328**, 319

Forward Modeling In Helioseismology: Sensitivities, Realization Noise Subtraction And Kernels

Hanasoge, Duvall, & Couvidat (2007), *Astrophysical Journal*, **664**, 1234

Impact of Locally Suppressed Wave Sources on Helioseismic Travel Times

Hanasoge, Couvidat, Rajaguru, & Birch (2008), *Monthly Notices of the Royal Astronomical Society*, **391**, 1931

Theoretical Studies of Wave Propagation in the Sun

Hanasoge (2007), Ph.D. Thesis, *Stanford University*

Seismic Halos Around Active Regions: A Magnetohydrodynamic Theory

Hanasoge (2008), *Astrophysical Journal*, **680**, 1457

An absorbing boundary formulation for the stratified, linearized, ideal MHD equations based on an unsplit, convolutional perfectly matched layer

Hanasoge, Komatitsch, & Gizon (2010), *Astronomy & Astrophysics 522, 87, arXiv, 1003.0725*

A code to compute source functions to drive simulations with pseudo-randomly excited waves can be downloaded here.

The background model must be convectively stable. The points at which the grid are sampled are typically distributed according to the criterion that the points per wavelength be maintained roughly constant with depth. Here are a set of routines to compute the appropriately sampled background models (for a polytrope with an isothermal atmosphere; and for the altered model of Hanasoge et al. 2006).

Here are a couple of sample models, ready for use:

Altered form of model S

Polytrope with isothermal atmophere

To compute the power spectrum and collate the output, use this routine.

This IDL code applies the self-similar Schluter-Temesvary technique to compute the magneto-hydrostatic (MHS) state for given flux, tube size, and background model. Note that this code can also be used to convert a cylindrical co-ordinate description of an MHS state to Cartesian co-ordinates.

The following two libraries are required to compile and run the code in its current form:

FITSIO

FFTW

The message passing routines are written in accordance with OpenMPI.

Vertical velocity linear power spectrum from a 12 hour calculation using the highly-efficient Convolutional Perfectly Matched Layer (CPML) wave absorption formulation at the boundaries (Hanasoge et al. 2010).

Many thanks to D. Dombroski (CORA), H. Schunker (MPS), H. Moradi (MPS), D. Przybylski (MPS) for being patient and assisting significantly in debugging the code. A. Birch (MPS), R. Cameron (MPS), and L. Gizon (MPS) have also been very helpful and supportive.

If you encounter bugs or have any comments, please email me.