Skip to content

Commit

Permalink
fix divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Dec 31, 2019
1 parent cb79e97 commit 7951a84
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,14 @@ subroutine get_StokesSL_LiFoxKemper(ustar, hbl, GV, US, UStokes_SL, LA)
sqrt( 2.0 * PI *kstar * z0) * &
erfc( sqrt( 2.0 * kstar * z0 ) )
UStokes_sl = UStokes * (0.715 + r1 + r2 + r3 + r4)
LA = sqrt(US%Z_to_m*US%s_to_T*ustar / UStokes_sl)
else
UStokes_sl = 0.0
LA=1.e8
if(UStokes_sl .ne. 0.0)then
LA = sqrt(US%Z_to_m*US%s_to_T*ustar / UStokes_sl)
else
LA=1.e8
endif
!else
! UStokes_sl = 0.0
! LA=1.e8
endif

end subroutine Get_StokesSL_LiFoxKemper
Expand Down

0 comments on commit 7951a84

Please sign in to comment.