Is your feature request related to a problem? Please describe.
Anemoi-training already provides a spectral loss in the form of a 2d FFT, mostly relevant for limited area models. A spectral loss for global models requires a differentiable implementation of accurate spherical harmonics in torch.
Describe the solution you'd like
We need the following initial steps for this work:
- An accurate differentiable harmonic transform in torch that
Our baseline here is the spherical harmonic implementation of ectrans.
- A loss module in anemoi-training that handles the spectral transform and computes a loss by e.g. using the power spectrum.
Describe alternatives you've considered
Torch-harmonics:
Torch-harmonics does not currently support reduced gaussian grids.
Additional context
No response
Organisation
No response
Is your feature request related to a problem? Please describe.
Anemoi-training already provides a spectral loss in the form of a 2d FFT, mostly relevant for limited area models. A spectral loss for global models requires a differentiable implementation of accurate spherical harmonics in torch.
Describe the solution you'd like
We need the following initial steps for this work:
deals with loading pre-computed and/or computing the Legendre polynomials
sufficiently efficient to allow computations on standard grid resolutions both with respect to runtime and memory
Our baseline here is the spherical harmonic implementation of ectrans.
Describe alternatives you've considered
Torch-harmonics:
Torch-harmonics does not currently support reduced gaussian grids.
Additional context
No response
Organisation
No response