Skip to content

Commit bbbf5c8

Browse files
committed
Merge branch 'fix_ekman_bug2'
2 parents 640c15b + 3534d1c commit bbbf5c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/shared/cvmix_kpp.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,11 +1469,11 @@ subroutine cvmix_kpp_compute_OBL_depth_low(Ri_bulk, zw_iface, OBL_depth, &
14691469
! Column is stable if surf_buoy > 0
14701470
lstable = (surf_buoy.gt.cvmix_zero)
14711471

1472-
if (Coriolis.eq.cvmix_zero .and. .not. lstable) then !should not apply in unstable conditions
1473-
! Rather than divide by zero, set Ekman depth to ocean bottom
1474-
Ekman = abs(zt_cntr(nlev))
1475-
else
1472+
if (Coriolis.ne.cvmix_zero .and. lstable) then
14761473
Ekman = 0.7_cvmix_r8*surf_fric/abs(Coriolis)
1474+
else
1475+
! Rather than divide by zero (or if column is unstable), set Ekman depth to ocean bottom
1476+
Ekman = abs(zt_cntr(nlev))
14771477
end if
14781478
OBL_limit = min(OBL_limit, Ekman)
14791479
end if

0 commit comments

Comments
 (0)