[WIP] Rayleigh Damping mixed precision fix#32
Draft
FlorianDeconinck wants to merge 5 commits intoNOAA-GFDL:developfrom
Draft
[WIP] Rayleigh Damping mixed precision fix#32FlorianDeconinck wants to merge 5 commits intoNOAA-GFDL:developfrom
FlorianDeconinck wants to merge 5 commits intoNOAA-GFDL:developfrom
Conversation
Fix the implementation check for RayleighDamping and move it closer to the code
Collaborator
Author
|
Poking @oelbert to show mixed precision in dycore in action |
bensonr
reviewed
Dec 2, 2024
pyFV3/stencils/ray_fast.py
Outdated
|
|
||
|
|
||
| SDAY = 86400.0 | ||
| SDAY = Float(86400.0) |
There was a problem hiding this comment.
If seconds per day is used frequently in the the ndsl, dycore, and physics, would it be better to define it in the ndsl constants section to ensure uniformity?
Collaborator
Author
There was a problem hiding this comment.
Yes we probably should be moving that to constant
bensonr
reviewed
Dec 2, 2024
| def compute_rff_vals(pfull, dt, rf_cutoff, tau0, ptop): | ||
| rffvals = compute_rf_vals(pfull, dt, rf_cutoff, tau0, ptop) | ||
| rffvals = 1.0 / (1.0 + rffvals) | ||
| rffvals = f64(1.0) / (f64(1.0) + rffvals) |
There was a problem hiding this comment.
In an f32 run, aren't you only promoting the constants here and not rffvals?
Collaborator
Author
There was a problem hiding this comment.
The upcaster will force in the rffvals to be f64. Alternatively you could, type hint rffvals e.g.
rffvals: f64 = ...
Collaborator
Author
There was a problem hiding this comment.
The upcaster follows basic C up-casting rules
Trigger damping increment calculation exactly once
7 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.
gt4pybut only available on the experimental NASA branch