SHTns 3.7
|
SHTns also provides vector transforms.
The components of a vector field on a sphere
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).
For a divergenceless 3D vector, the radial scalar Q and the spheroidal scalar S can be derived from the same poloidal scalar P :
which corresponds to the poloidal/toroidal decomposition that ensures the vector field to be divergence-free.