Changing rotation_angle to output in radians instead of degrees#5280
Merged
Changing rotation_angle to output in radians instead of degrees#5280
Conversation
simone-silvestri
approved these changes
Feb 11, 2026
Member
|
I'd also be ok if you omit the |
Contributor
|
I'm hoping this also resolves the issue in PR #5183. |
navidcy
reviewed
Feb 11, 2026
navidcy
approved these changes
Feb 11, 2026
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5280 +/- ##
==========================================
+ Coverage 68.79% 73.51% +4.72%
==========================================
Files 395 395
Lines 21463 22190 +727
==========================================
+ Hits 14765 16313 +1548
+ Misses 6698 5877 -821
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PR modifies the function
rotation_angleto output the angleθin radians instead of degrees. It also modifies method definitions ofintrinsic_vectorandextrinsic_vectorforOrthogonalSphericalShellGrid, since these use rotation_angle as a helper, and modifies the unit test for rotation_angles to use angles in radians.This PR is made as a response to this issue: CliMA/ClimaOcean.jl#749
In some contexts these functions can be called within GPU/Reactant kernels. Currently they rely on the functions
sind,cosd, andatandwhich do not work in GPU kernels. By switching to radians we bypass that problem.