SHTns  3.4.6
Vector Spherical Harmonics as implemented in SHTns

SHTns also provides vector transforms.

# Radial - Spheroidal - Toroidal decomposition

The components of a vector field on a sphere in canonical spherical coordinates cannot be transformed as scalars, because they do not behave like scalar fields under rotation for example (actually only the radial component does).

To overcome this, we use the following decomposition:

where Q, S and T are respectively the radial, spheroidal and toroidal scalar fields. We have explicitely:

Expanding Q, S and T (which are scalar fields) in spherical harmonics gives:

If this only involves a simple scalar transform for the radial component, it does involve derivatives of spherical harmonics for the tangential components.

The functions SHqst_to_spat and spat_to_SHqst transform vector fields from their spherical coordinate spatial representation Vr, Vt, Vp to their spectral representation using Qlm, Slm and Tlm.

The functions SHsphtor_to_spat and spat_to_SHsphtor do the same for a tangential vector on the sphere (without radial component).