Skip to content

Commit 640c15b

Browse files
committed
Merge remote-tracking branch 'luke/ekmanLimiterFix'
2 parents 16fefa2 + 78a9c7f commit 640c15b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/shared/cvmix_kpp.F90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,10 @@ subroutine cvmix_kpp_compute_OBL_depth_low(Ri_bulk, zw_iface, OBL_depth, &
14661466
! Since depth gets more negative as you go deeper, that translates into
14671467
! OBL_depth = max(abs(computed depth), abs(Ekman depth), abs(M-O depth))
14681468
if (CVmix_kpp_params_in%lEkman) then
1469-
if (Coriolis.eq.cvmix_zero) then
1469+
! Column is stable if surf_buoy > 0
1470+
lstable = (surf_buoy.gt.cvmix_zero)
1471+
1472+
if (Coriolis.eq.cvmix_zero .and. .not. lstable) then !should not apply in unstable conditions
14701473
! Rather than divide by zero, set Ekman depth to ocean bottom
14711474
Ekman = abs(zt_cntr(nlev))
14721475
else

0 commit comments

Comments
 (0)