The global pseudo-spectral code ASH (anelastic spherical harmonics) is written in Fortran90 and solves in a three-dimensional spherical shell ($r,\theta,\phi$) the equations of motion, continuity, energy and induction in the anelastic approximation (Clune et al. 1999, Brun et al. 2004).
Thermodynamic variables, the three components of mass flux ($\rho{\bf u}$) and the magnetic field (${\bf B}$; if studied) are projected into spherical harmonics $Y_\ell^m(\theta,\phi)$ for the horizontal direction (with $N_{\theta}$ latitudinal points or a maximum spherical harmonic degree $\ell_{max}=(2*N_{\theta}-1)/3)$ and $N_{\phi}=2*N_{\theta}$ longitudinal points) and for their radial direction into Chebyshev polynomials $T_n(r)$ (with $N_r$ Gauss-Lobatto collocation points) or via a 4th order finite-difference method on a non-uniform grid. This decomposition into spherical harmonics has the advantage of allowing homogeneous spatial spatial resolution if all $m$ multiplets for a given $\ell$ degree are preserved. The anelastic approximation is used to preserve the important effects of stratification without having to resolve the sound waves. Mass flux and magnetic field remain divergenceless by using a poloidal-toroidal decomposition.
Time-discretization is semi-implicit, using an implicit Crank-Nicholson of order 2 for the linear terms and an explicit Adams-Bashforth of order 2 for the non-linear terms, the Coriolis and Lorentz forces.
The ASH code uses an LES (Large Eddy Simulation) type approach with sub-grid scale (SGS) treatment, either turbulent effective diffusivity or hyperviscosity (i.e. $\nabla^{2n}$, with $n>1$), as well as the possibility of introducing more complex complex formulations based on different methods of closing the equations of motion.
Inter-processor communication uses MPI (Message Passing Interface), cf. Clune et al. (1999, Parallel Computing, 25, 361), for a more complete discussion. The strategy has been improved with ASH2.0 by increasing the size of MPI messages and reducing their number, which has enabled us to make precious gains in the efficient use of new architectures, on a number of cores greater than 10,000.
ASH has successfully participated in an international benchmark for anelastic spherical codes, of which A.S. Brun is one of the co-authors (Jones et al. 2011). Note that in this paper, ASH simulated the equivalent of the geodynamo and the Jovian dynamo, so it's ideally suited to study stellar, planetary, and exoplanetary dynamos. ASH can also use a so-called Lantz-Braginsky formulation for anelastic equations.