-
Notifications
You must be signed in to change notification settings - Fork 11
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
Possible NaN is introduced #678
Comments
Thanks, @weiyuan-jiang, for figuring this out! It's of course a problem that the code crashes when run in debug mode because this prevents us from debugging.
before taking the square root. The annoying bit is that I'm not sure we have such a max operator defined for the cat_diagS type. But I suppose it wouldn't be difficult to write one. |
addressed with #679 |
GEOSldas/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/GEOS_LandAssimGridComp.F90
Line 2018 in f8e314e
Because of roundoff error, the result from the subtraction can become very small negative number when the two should be the same and the result should be zero. Then the function sqrt would produce NaN ( if in debug mode, it crashes). I am not sure if that affects @saraqzhang . I insert some codes :
An the print out:
small-big: 659.9205 659.9206
small-big: 713.0347 713.0348
small-big: 679.2969 679.2969
@gmao-rreichle
The text was updated successfully, but these errors were encountered: