-
Notifications
You must be signed in to change notification settings - Fork 14
Description
S2FFT currently supports several spherical grids which define the points on a sphere at which a signal is sampled along with a quadrature rule for computing integrals. The grids supported by S2FFT are biased towards those common in space science. While the supported grids overlap with those common in fields such as climate science, some vary in particular details in the climate setting (for example use of Clenshaw-Curtis quadrature in equiangular schemes) while others such as the octahedral reduced grid used by ECMWF are not supported at all currently.
Multiple grid support is implemented in the package by branching on an argument specifying the scheme to use. The high degree of branching reduces code readability, and makes it difficult to support additional grids as changes need to be applied to multiple different points in the codebase.
An alternative would be to refactor the grid support to use an object-oriented design, with a common interface defined for evaluating the grid specific parts of the transform computations. This would reduce code complexity and make it straightforward to support additional schemes which are variations of those currently supported by subclassing. This would simplify use of the package in climate applications without needing to manually adjust for differences in grid conventions.