-
Notifications
You must be signed in to change notification settings - Fork 92
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
NAG compiler runtime error in FatesHydroWTFMod #790
Comments
Thanks for posting @glemieux |
Using Test path for reference: |
While updating the
fates
suite of regression tests (PR 1275) to use only non-debug nag compiler tests for izumi, I stumbled across this runtime error:The relevant line of code is:
fates/biogeophys/FatesHydroWTFMod.F90
Lines 1058 to 1060 in b5f5041
@rgknox and I determined that the issue has to do with the compiler returning a
-0.0000000
value for thepsi_eff/this%p50
calculation whenpsi_eff
returns zero and thep50
value is negative (which are valid values). NAG apparently doesn't like raising a negative value to a power.Are the expected ranges
psi_eff
andp50
always be non-positive and negative, respectively? If so, thenpsi_eff/this%p50 >= 0
should always be true, in which case we could change the code to be:which I think would work. Alternatively, @rgknox noted we could change the
psi_eff
calculation to usepsi_eff = min(-nearzero,psi)
instead of0._r8
.The text was updated successfully, but these errors were encountered: