Skip to content

Spherical grid modularization #340

@matt-graham

Description

@matt-graham

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions