Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix surface layer average for Stokes Most #316

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1158,14 +1158,17 @@ subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFl
surfHu = (uE_H(ksfc) + uSbar_SLD) * delH
surfHv = (vE_H(ksfc) + vSbar_SLD) * delH
hTot = delH
do ktmp = 1,ksfc-1 ! if ksfc >=2
delH = h(i,j,ktmp)*GV%H_to_Z
hTot = hTot + delH
surfHtemp = surfHtemp + Temp(i,j,ktmp) * delH
surfHsalt = surfHsalt + Salt(i,j,ktmp) * delH
surfHu = surfHu + (uE_H(ktmp) + uSbar_H(ktmp)) * delH
surfHv = surfHv + (vE_H(ktmp) + vSbar_H(ktmp)) * delH
enddo
! only loop if ksfc >=2
if (ksfc >=2) then
do ktmp = 1,ksfc-1
delH = h(i,j,ktmp)*GV%H_to_Z
hTot = hTot + delH
surfHtemp = surfHtemp + Temp(i,j,ktmp) * delH
surfHsalt = surfHsalt + Salt(i,j,ktmp) * delH
surfHu = surfHu + (uE_H(ktmp) + uSbar_H(ktmp)) * delH
surfHv = surfHv + (vE_H(ktmp) + vSbar_H(ktmp)) * delH
enddo
endif
I_hTot = 1./hTot
surfTemp = surfHtemp * I_hTot
surfSalt = surfHsalt * I_hTot
Expand Down
Loading