Skip to content

Commit

Permalink
introduce TKE at model layer interfaces (tkeh)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaesung committed Oct 25, 2024
1 parent 36e7b63 commit 1ace72d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 7 additions & 7 deletions physics/PBL/SATMEDMF/satmedmfvdifq.F
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
& psk,rbsoil,zorl,u10m,v10m,fm,fh, &
& tsea,heat,evap,stress,spd1,kpbl, &
& prsi,del,prsl,prslk,phii,phil,delt, &
& dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl,dkt,dku, &
& dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl,dkt,dku,tkeh, &
& kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, &
& rlmx,elmx,sfc_rlm,tc_pbl, &
& ntqv,dtend,dtidx,index_of_temperature,index_of_x_wind, &
Expand Down Expand Up @@ -134,7 +134,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
& dtsfc(:), dqsfc(:), &
& hpbl(:)
real(kind=kind_phys), intent(out) :: &
& dkt(:,:), dku(:,:)
& dkt(:,:), dku(:,:), tkeh(:,:)
!
logical, intent(in) :: dspheat
character(len=*), intent(out) :: errmsg
Expand All @@ -152,7 +152,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
integer lcld(im),kcld(im),krad(im),mrad(im)
integer kx1(im), kb1(im), kpblx(im)
!
real(kind=kind_phys) tke(im,km), tkeh(im,km-1), e2(im,0:km)
real(kind=kind_phys) tke(im,km), tkei(im,km-1), e2(im,0:km)
!
real(kind=kind_phys) theta(im,km),thvx(im,km), thlvx(im,km),
& qlx(im,km), thetae(im,km),thlx(im,km),
Expand Down Expand Up @@ -1561,7 +1561,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
!
do k=1,kps
do i=1,im
tkeh(i,k) = 0.5 * (tke(i,k)+tke(i,k+1))
tkei(i,k) = 0.5 * (tke(i,k)+tke(i,k+1))
enddo
enddo
do k=1,kps
Expand All @@ -1582,7 +1582,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
do k = 1, kps
do i = 1, im
kmx = max(kpbl(i), krad(i))
e_half(i,k) = tkeh(i,k)
e_half(i,k) = tkei(i,k)
if((pcnvflg(i) .or. scuflg(i)) .and. (k < kmx)) then
tem = 0.
if(pcnvflg(i) .and. k < kpbl(i)) then
Expand All @@ -1598,14 +1598,14 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
& rrkp = e_diff(i,k+1) / e_diff(i,k)
phkp = (rrkp+abs(rrkp)) / (1.+abs(rrkp))
e_half(i,k) = tke(i,k+1) +
& phkp*(tkeh(i,k)-tke(i,k+1))
& phkp*(tkei(i,k)-tke(i,k+1))
elseif (tem < 0.) then
rrkp = 0.
if(abs(e_diff(i,k)) > 1.e-22)
& rrkp = e_diff(i,k-1) / e_diff(i,k)
phkp = (rrkp+abs(rrkp)) / (1.+abs(rrkp))
e_half(i,k) = tke(i,k) +
& phkp*(tkeh(i,k)-tke(i,k))
& phkp*(tkei(i,k)-tke(i,k))
endif
endif
enddo
Expand Down
8 changes: 8 additions & 0 deletions physics/PBL/SATMEDMF/satmedmfvdifq.meta
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,14 @@
type = real
kind = kind_phys
intent = out
[tkeh]
standard_name = vertical_turbulent_kinetic_energy_at_interface
long_name = vertical turbulent kinetic energy at model layer interfaces
units = m2 s-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[dkt]
standard_name = atmosphere_heat_diffusivity
long_name = atmospheric heat diffusivity
Expand Down

0 comments on commit 1ace72d

Please sign in to comment.