Skip to content

Commit

Permalink
Make denominator non-zero to avoid FPE. mom-ocean#194
Browse files Browse the repository at this point in the history
  • Loading branch information
nichannah committed Jul 9, 2015
1 parent 796b299 commit c75dda9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ subroutine add_LOTW_BBL_diffusivity(h, u, v, tv, fluxes, visc, j, N2_int, G, CS,
TKE_remaining = exp(-Idecay*dh) * TKE_remaining

z = z + h(i,j,k) ! Distance between upper interface of layer and the bottom, in m.
D_minus_z = max(total_thickness - z, 0.) ! Thickness above layer, m.
D_minus_z = max(total_thickness - z, G%H_subroundoff*G%H_to_m) ! Thickness above layer, m.

! Diffusivity using law of the wall, limited by rotation, at height z, in m2/s.
! This calculation is at the upper interface of the layer
Expand Down

0 comments on commit c75dda9

Please sign in to comment.