Remove duplicate spherical geometry functions#5183
Remove duplicate spherical geometry functions#5183siddharthabishnu wants to merge 7 commits intomainfrom
Conversation
navidcy
left a comment
There was a problem hiding this comment.
Which tagged version of CubedSphere.jl onwards has this implementation? We should ensure the compat requirement is adequate.
|
Reactant fails; is this unrelated? |
It was introduced in PR #48 of |
The duplicate functions were previously retained due to a compatibility issue with Reactant, which I believed had been resolved via PRs #1785 and #1814. However, it now appears that the issue still persists. Specifically, when angles are passed in radians to the latitude–longitude to Cartesian conversion (or returned in radians for the Cartesian-to-latitude–longitude conversion), the problem disappears, and when using degrees, the error remains. @wsmoses, would you mind taking a look at this at your convenience? |
This PR removes redundant spherical geometry function definitions from
rotated_latitude_longitude.jl, specifically the latitude-longitude ↔ Cartesian coordinate conversion routines. The implementation now consistently uses the corresponding utilities provided by theSphericalGeometrymodule from theCubedSphere.jldependency.Previously, these local duplicates were retained as a workaround for compatibility issues in
Reactant.jl. That limitation has since been resolved upstream viaReactant.jlPRs #1785 and #1814. With this fix in place, relying on theCubedSphere.jl-provided implementations is now safe and avoids unnecessary code duplication.