Skip to content
Open
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
11 changes: 6 additions & 5 deletions bl_shinhong.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ subroutine bl_shinhong_run(ux,vx,tx,qvx,qcx,qix,nmix,qmix,p2d,p2di,pi2d, &
do i = its,ite
if(pblflg(i).and.k < kpbl(i)) then
hgame_c=c_1*0.2*2.5*(g/thvx(i,k))*wstar(i) &
/amax1((0.25*(q2x(i,k+1)+q2x(i,k))),0.01)
/max((0.25*(q2x(i,k+1)+q2x(i,k))),0.01)
hgame_c=min(hgame_c,gamcre)
if(k == kte)then
hgame2d(i,k)=hgame_c*0.5*tvflux_e(i,k)*hpbl(i)
Expand Down Expand Up @@ -1771,7 +1771,7 @@ subroutine bl_shinhong_run(ux,vx,tx,qvx,qcx,qix,nmix,qmix,p2d,p2di,pi2d, &
!---- save the new tke and mixing length.
!
do k = kts,kte
q2x(i,k) = amax1(q2xk(k),epsq2l)
q2x(i,k) = max(q2xk(k),epsq2l)
tke(i,k) = 0.5*q2x(i,k)
if(k/=kts) el_pbl(i,k) = el(k) ! el is not defined at kte
enddo
Expand Down Expand Up @@ -2256,7 +2256,7 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, &
main_integration: do k = kts+1,kte
deltaz=0.5*(z(k+1)-z(k-1))
s2l=s2(k)
q2l=q2(k)
q2l=max(q2(k),epsq2l)
suk=(uxk(k)-uxk(k-1))/deltaz
svk=(vxk(k)-vxk(k-1))/deltaz
gthvk=(thvxk(k)-thvxk(k-1))/deltaz
Expand Down Expand Up @@ -2288,18 +2288,19 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, &
! dissipation
!
disel=min(delxy,ceps*el(k))
disel=max(disel,0.01)
Comment thread
weiwangncar marked this conversation as resolved.
dis=(q2l)**1.5/disel
!
q2l=q2l+2.0*(pr-bpr-dis)*dtturbl
q2(k)=amax1(q2l,epsq2l)
q2(k)=max(q2l,epsq2l)
!
! end of production/dissipation loop
!
enddo main_integration
!
! lower boundary condition for q2
!
q2(kts)=amax1(rc02*ustar*ustar,epsq2l)
q2(kts)=max(rc02*ustar*ustar,epsq2l)
!
end subroutine prodq2
!-------------------------------------------------------------------------------
Expand Down