diff --git a/src/shared/cvmix_kpp.F90 b/src/shared/cvmix_kpp.F90 index b8e62fb00..f7f0dd061 100644 --- a/src/shared/cvmix_kpp.F90 +++ b/src/shared/cvmix_kpp.F90 @@ -1466,7 +1466,10 @@ subroutine cvmix_kpp_compute_OBL_depth_low(Ri_bulk, zw_iface, OBL_depth, & ! Since depth gets more negative as you go deeper, that translates into ! OBL_depth = max(abs(computed depth), abs(Ekman depth), abs(M-O depth)) if (CVmix_kpp_params_in%lEkman) then - if (Coriolis.eq.cvmix_zero) then + ! 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