Skip to content

Commit

Permalink
Merge pull request NCAR#377 from climbfuji/gfsv16_netcdf_post_ficein_cpl
Browse files Browse the repository at this point in the history
GFSv16 updates from IPD
  • Loading branch information
climbfuji authored Jan 24, 2020
2 parents 3998189 + 20ff178 commit 01ed01f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
28 changes: 14 additions & 14 deletions physics/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -1554,22 +1554,22 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, &
enddo
enddo
do i = 1, im
betamn = betas
if(islimsk(i) == 1) betamn = betal
if(ntk > 0) then
betamx = betamn + dbeta
if(tkemean(i) > tkemx) then
beta = betamn
else if(tkemean(i) < tkemn) then
beta = betamx
if(cnvflg(i)) then
betamn = betas
if(islimsk(i) == 1) betamn = betal
if(ntk > 0) then
betamx = betamn + dbeta
if(tkemean(i) > tkemx) then
beta = betamn
else if(tkemean(i) < tkemn) then
beta = betamx
else
tem = (betamx - betamn) * (tkemean(i) - tkemn)
beta = betamx - tem / dtke
endif
else
tem = (betamx - betamn) * (tkemean(i) - tkemn)
beta = betamx - tem / dtke
beta = betamn
endif
else
beta = betamn
endif
if(cnvflg(i)) then
dz = (sumx(i)+zi(i,1))/float(kbcon(i))
tem = 1./float(kbcon(i))
xlamd(i) = (1.-beta**tem)/dz
Expand Down
15 changes: 9 additions & 6 deletions physics/satmedmfvdifq.F
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
& buop, shrp, dtn,
& prnum, prmax, prmin, prtke,
& prscu, pr0, ri,
& dw2, dw2min, zk,
& dw2, dw2min, zk,
& elmfac, elefac, dspmax,
& alp, clwt, cql,
& f0, robn, crbmin, crbmax,
Expand All @@ -193,7 +193,8 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
& epsi, beta, chx, cqx,
& rdt, rdz, qmin, qlmin,
& rimin, rbcr, rbint, tdzmin,
& rlmn, rlmn1, rlmx, elmx,
& rlmn, rlmn1, rlmn2,
& rlmx, elmx,
& ttend, utend, vtend, qtend,
& zfac, zfmin, vk, spdk2,
& tkmin, tkminx, xkzinv, xkgdx,
Expand All @@ -205,13 +206,14 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
!
real(kind=kind_phys) qlcr, zstblmax
!
real(kind=kind_phys) h1
real(kind=kind_phys) h1
!!
parameter(wfac=7.0,cfac=3.0)
parameter(gamcrt=3.,gamcrq=0.,sfcfrac=0.1)
parameter(vk=0.4,rimin=-100.)
parameter(rbcr=0.25,zolcru=-0.02,tdzmin=1.e-3)
parameter(rlmn=30.,rlmn1=5.,rlmx=300.,elmx=300.)
parameter(rlmn=30.,rlmn1=5.,rlmn2=10.)
parameter(rlmx=300.,elmx=300.)
parameter(prmin=0.25,prmax=4.0)
parameter(pr0=1.0,prtke=1.0,prscu=0.67)
parameter(f0=1.e-4,crbmin=0.15,crbmax=0.35)
Expand Down Expand Up @@ -751,8 +753,9 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
! if(tem1 > 1.e-5) then
tem1 = tvx(i,k+1)-tvx(i,k)
if(tem1 > 0.) then
xkzo(i,k) = min(xkzo(i,k),xkzinv)
xkzmo(i,k) = min(xkzmo(i,k),xkzinv)
xkzo(i,k) = min(xkzo(i,k), xkzinv)
xkzmo(i,k) = min(xkzmo(i,k), xkzinv)
rlmnz(i,k) = min(rlmnz(i,k), rlmn2)
endif
enddo
enddo
Expand Down

0 comments on commit 01ed01f

Please sign in to comment.