-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for RUC LSM imprecision issue #6
fix for RUC LSM imprecision issue #6
Conversation
The module_sf_ruclsm has comparisons to zero, which break the code when numbers are very close to 0, such as 1e-322. This happens with the gfortran compiler when compled -DDEBUG=ON since the option to truncate subnormal numbers is turned off. The workaround is to truncate subnormal numbers manually, for the two variables that cause trouble.
Codeowner @tanyasmirnova has requested that:
I'm testing this in the fork (NOAA-GSL#163) and I'll apply the fix to this PR as soon as those tests pass. |
@SamuelTrahanNOAA Since #13 was merged, I think that this one is the next in the UFS merge queue. Please pull in the latest ufs/dev branch to get ready for testing when you get a chance. |
@grantfirl The ccpp-physics seems to be ahead of the higher-level repositories. Are you sure #13 was supposed to be merged? |
Super-repos are still in the process of merging their respective PRs. |
It looks like the only changes are in ccpp/physics, so I can start testing despite the out-of-sync repositories. |
@ChunxiZhang-NOAA @SamuelTrahanNOAA cubed sphere pr 219 was merged in. We can move on to merge this pr. |
@jkbk2004 I can merge this if necessary. I think that ordinarily, @ChunxiZhang-NOAA should have that responsibility for this fork/branch, but @dustinswales and I have the capability if there is ever time pressure. |
@grantfirl sure! please, go ahead. so that @SamuelTrahanNOAA can move to downstream. |
@grantfirl Thanks for merging the PR into this fork timely. I was in a meeting. |
Updated rca calculation with rsmin and rsmax limits.
The module_sf_ruclsm.F90 has comparisons to zero, which break the code when numbers are very close to 0, such as 1e-322. This happens with the gfortran compiler when compled with
-DDEBUG=ON
since the option to truncate subnormal numbers is turned off. It might also happen if the ruc lsm was run in double precision, but I have not seen that yet. My fix is truncate subnormal numbers manually, for the two variables that cause trouble. This new code is in the "sanity checks" regions of lsm_ruc.F90, as requested by @tanyasmirnova.Fixes #5