-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
Description
The following code causes floating overflow crash for extremely small Qin values (e.g., 2.e-114):
mizuRoute/route/build/src/hydraulic.f90
Line 409 in 64a49b0
| Coef1 = (sqrt(S)/n/Qin)**3 |
Solved by changing the following line to: if (Qin>1.e-50_dp) then
mizuRoute/route/build/src/hydraulic.f90
Line 356 in 64a49b0
| if (Qin>0._dp) then |
Choice of 1.e-50_dp was based on the value used here:
mizuRoute/route/build/src/tracer.f90
Line 291 in 64a49b0
| if (abs(Qbar)>1.e-50_dp) then |
An alternative could be 1.e-10_dp (unused variable so far):
mizuRoute/route/build/src/public_var.f90
Line 44 in 64a49b0
| real(dp), parameter,public :: MinPosVal=1.e-10_dp ! minimum value for positive value |