torch_harmonics.distributed.DistributedRealVectorSHT#

class torch_harmonics.distributed.DistributedRealVectorSHT(
nlat,
nlon,
lmax=None,
mmax=None,
grid='equiangular',
norm='ortho',
csphase=True,
)[source]#

Bases: Module

Distributed version of the forward (real) vector SHT. Precomputes Legendre Gauss nodes, weights and associated Legendre polynomials on these nodes. The SHT is applied to the last three dimensions of the input.

The distribution scheme is the same as for DistributedRealSHT (see its docstring for a step-by-step description of the all-to-all transposes over the N = B * C axis). The additional size-2 vector component dimension is preserved throughout.

See also

torch_harmonics.RealVectorSHT

Serial counterpart with full mathematical description and parameter documentation.

Parameters:
  • nlat (int) – Number of latitude points

  • nlon (int) – Number of longitude points

  • lmax (int) – Maximum spherical harmonic degree

  • mmax (int) – Maximum spherical harmonic order

  • grid (str) – Grid type ("equiangular", "legendre-gauss", "lobatto", "equiangular-trapezoidal"), by default "equiangular"

  • norm (str) – Normalization type ("ortho", "schmidt", "unnorm"), by default "ortho"

  • csphase (bool) – Whether to apply the Condon-Shortley phase factor, by default True

Returns:

Tensor of shape (…, lmax, mmax)

Return type:

torch.Tensor

References

[2], [3]