feat: add spherical geometry utilities for global domain support#561
Closed
arzoo0511 wants to merge 1 commit into
Closed
feat: add spherical geometry utilities for global domain support#561arzoo0511 wants to merge 1 commit into
arzoo0511 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial spherical-geometry utilities intended to support future global-domain workflows in Neural-LAM.
Changes:
- Introduces
lat_lon_to_cartesian()for converting latitude/longitude (degrees) to 3D unit-sphere Cartesian coordinates (PyTorch). - Introduces
get_area_weights()for latitude-based area weighting. - Adds a helper
get_cartesian_coords(currently implemented as a free function).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| geometry.py | Adds spherical-geometry helper functions (lat/lon → Cartesian, latitude area weights, and a Cartesian-coords helper). |
| .cora/analytics/index.json | Adds a generated analytics index artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
#473 is currently a draft PR that addresses these concerns already. it would be great if you could hop over there and contribute to that PR/discussion directly. |
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
This PR introduces basic spherical geometry utilities to support future global forecasting capabilities in Neural-LAM.
Summary of changes
lat_lon_to_cartesian()for converting latitude–longitude coordinates to Cartesian coordinates on the unit sphereget_area_weights()for computing latitude-based area weightingMotivation and context
Current implementations assume planar geometry, which does not extend well to global forecasting. These utilities provide a reusable and modular foundation for geometry-aware graph construction on a spherical domain, aligning with ongoing work toward global support.
Dependencies
Issue Link
Related to global forecasting discussions (no specific issue linked)
Type of change
Checklist before requesting a review
Notes
This PR is intentionally scoped to be small and modular, focusing only on geometry utilities. Future work will build on this to implement global graph construction and integration into the training pipeline.