Skip to content

Commit

Permalink
Merge branch 'fix_ekman_bug2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed Feb 18, 2020
2 parents 640c15b + 3534d1c commit bbbf5c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shared/cvmix_kpp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1469,11 +1469,11 @@ subroutine cvmix_kpp_compute_OBL_depth_low(Ri_bulk, zw_iface, OBL_depth, &
! Column is stable if surf_buoy > 0
lstable = (surf_buoy.gt.cvmix_zero)

if (Coriolis.eq.cvmix_zero .and. .not. lstable) then !should not apply in unstable conditions
! Rather than divide by zero, set Ekman depth to ocean bottom
Ekman = abs(zt_cntr(nlev))
else
if (Coriolis.ne.cvmix_zero .and. lstable) then
Ekman = 0.7_cvmix_r8*surf_fric/abs(Coriolis)
else
! Rather than divide by zero (or if column is unstable), set Ekman depth to ocean bottom
Ekman = abs(zt_cntr(nlev))
end if
OBL_limit = min(OBL_limit, Ekman)
end if
Expand Down

0 comments on commit bbbf5c8

Please sign in to comment.