File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ This does not apply to the map of maximum values.
220220
221221If an exported map is totally empty, it is deleted at the end of the simulation when registered in the STRDS.
222222
223+ When the water depth is zero, the Froude number is set to zero to prevent undefined values.
224+
223225[statistics]
224226------------
225227
Original file line number Diff line number Diff line change @@ -511,8 +511,8 @@ def solve_h(
511511 vdir = vdir + 360. * (vdir < 0 )
512512 arr_vdir[r, c] = vdir
513513
514- # Froude number
515- arr_fr[r, c] = v / c_sqrt(g * h_new)
514+ # Froude number - use epsilon to avoid division by zero
515+ arr_fr[r, c] = v / c_sqrt(g * fmax( h_new, eps)) * (h_new > 0. )
516516
517517
518518@ cython.wraparound (False ) # Disable negative index check
You can’t perform that action at this time.
0 commit comments