Skip to content

Commit

Permalink
Avoid kbl > GV%ke in StokesMOST
Browse files Browse the repository at this point in the history
The calculation of kbl in StokesMOST could be > GV%ke.
This patch avoids this issue.
  • Loading branch information
gustavo-marques committed Oct 23, 2024
1 parent a8cb1d8 commit fa6df87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFl
CS%OBLdepth(i,j) = US%m_to_Z * KPP_OBL_depth

if (CS%StokesMOST) then
kbl = nint(CS%kOBL(i,j))
kbl = min(nint(CS%kOBL(i,j)), GV%ke)
SLdepth_0d = CS%surf_layer_ext*CS%OBLdepth(i,j)
surfBuoyFlux = surfBuoyFlux2(kbl)
! find ksfc for cell where "surface layer" sits
Expand Down

0 comments on commit fa6df87

Please sign in to comment.