89 subroutine moninedmf(ix,im,km,ntrac,ntcw,dv,du,tau,rtg,
90 & u1,v1,t1,q1,swh,hlw,xmu,
91 & psk,rbsoil,zorl,u10m,v10m,fm,fh,
92 & tsea,qss,heat,evap,stress,spd1,kpbl,
93 & prsi,del,prsl,prslk,phii,phil,delt,dspheat,
94 & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt,
95 & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr)
97 use machine
, only : kind_phys
98 use funcphys
, only : fpvs
100 &, hvap =>
con_hvap, fv => con_fvirt
107 integer ix, im, km, ntrac, ntcw, kpbl(im), kinver(im)
109 real(kind=kind_phys) delt, xkzm_m, xkzm_h, xkzm_s
110 real(kind=kind_phys) dv(im,km), du(im,km),
111 & tau(im,km), rtg(im,km,ntrac),
112 & u1(ix,km), v1(ix,km),
113 & t1(ix,km), q1(ix,km,ntrac),
114 & swh(ix,km), hlw(ix,km),
116 & rbsoil(im), zorl(im),
117 & u10m(im), v10m(im),
121 & prsi(ix,km+1), del(ix,km),
122 & prsl(ix,km), prslk(ix,km),
123 & phii(ix,km+1), phil(ix,km),
124 & dusfc(im), dvsfc(im),
125 & dtsfc(im), dqsfc(im),
126 & hpbl(im), hpblx(im),
127 & hgamt(im), hgamq(im)
134 integer i,iprt,is,iun,k,kk,km1,kmpbl,latd,lond
135 integer lcld(im),icld(im),kcld(im),krad(im)
136 integer kx1(im), kpblx(im)
139 real(kind=kind_phys) evap(im), heat(im), phih(im),
140 & phim(im), rbdn(im), rbup(im),
141 & stress(im),beta(im), sflux(im),
142 & z0(im), crb(im), wstar(im),
143 & zol(im), ustmin(im), ustar(im),
144 & thermal(im),wscale(im), wscaleu(im)
146 real(kind=kind_phys) theta(im,km),thvx(im,km), thlvx(im,km),
147 & qlx(im,km), thetae(im,km),
148 & qtx(im,km), bf(im,km-1), diss(im,km),
150 & govrth(im), hrad(im),
152 & radmin(im), vrad(im),
153 & zd(im), zdd(im), thlvx1(im)
155 real(kind=kind_phys) rdzt(im,km-1),dktx(im,km-1),
156 & zi(im,km+1), zl(im,km), xkzo(im,km-1),
157 & dku(im,km-1), dkt(im,km-1), xkzmo(im,km-1),
158 & cku(im,km-1), ckt(im,km-1),
159 & ti(im,km-1), shr2(im,km-1),
160 & al(im,km-1), ad(im,km),
161 & au(im,km-1), a1(im,km),
164 real(kind=kind_phys) tcko(im,km), qcko(im,km,ntrac),
165 & ucko(im,km), vcko(im,km), xmf(im,km)
167 real(kind=kind_phys) prinv(im), rent(im)
169 logical pblflg(im), sfcflg(im), scuflg(im), flg(im)
170 logical ublflg(im), pcnvflg(im)
175 real(kind=kind_phys) aphi16, aphi5, bvf2, wfac,
176 & cfac, conq, cont, conw,
178 & dq1, dsdz2, dsdzq, dsdzt,
180 & dsig, dt2, dthe1, dtodsd,
181 & dtodsu, dw2, dw2min, g,
182 & gamcrq, gamcrt, gocp,
184 & prnum, prmax, prmin, pfac, crbcon,
185 & qmin, tdzmin, qtend, crbmin,crbmax,
186 & rbint, rdt, rdz, qlmin,
187 & ri, rimin, rl2, rlam, rlamun,
188 & rone, rzero, sfcfrac,
189 & spdk2, sri, zol1, zolcr, zolcru,
193 & vtend, zfac, vpert, cteit,
194 & rentf1, rentf2, radfac,
195 & zfmin, zk, tem, tem1, tem2,
196 & xkzm, xkzmu, xkzminv,
197 & ptem, ptem1, ptem2, tx1(im), tx2(im)
199 real(kind=kind_phys) zstblmax,h1, h2, qlcr, actei,
202 parameter(gravi=1.0/grav)
205 parameter(cont=cp/g,conq=hvap/g,conw=1.0/g)
207 parameter(rlam=30.0,vk=0.4,vk2=vk*vk)
208 parameter(prmin=0.25,prmax=4.,zolcr=0.2,zolcru=-0.5)
209 parameter(dw2min=0.0001,dkmin=0.0,dkmax=1000.,rimin=-100.)
210 parameter(crbcon=0.25,crbmin=0.15,crbmax=0.35)
211 parameter(wfac=7.0,cfac=6.5,pfac=2.0,sfcfrac=0.1)
213 parameter(qmin=1.e-8, zfmin=1.e-8,aphi5=5.,aphi16=16.)
214 parameter(tdzmin=1.e-3,qlmin=1.e-12,f0=1.e-4)
215 parameter(h1=0.33333333,h2=0.66666667)
216 parameter(cldtime=500.,xkzminv=0.3)
219 parameter(gamcrt=3.,gamcrq=0.,rlamun=150.0)
220 parameter(rentf1=0.2,rentf2=1.0,radfac=0.85)
227 parameter(zstblmax = 2500., qlcr=3.5e-5)
229 parameter(actei = 0.7)
233 601
format(1x,
' moninp lat lon step hour ',3i6,f6.1)
234 602
format(1x,
' k',
' z',
' t',
' th',
235 1
' tvh',
' q',
' u',
' v',
237 603
format(1x,i5,8f9.1)
238 604
format(1x,
' sfc',9x,f9.1,18x,f9.1)
239 605
format(1x,
' k zl spd2 thekv the1v'
241 606
format(1x,i5,6f8.2)
242 607
format(1x,
' kpbl hpbl fm fh hgamt',
243 1
' hgamq ws ustar cd ch')
244 608
format(1x,i5,9f8.2)
245 609
format(1x,
' k pr dkt dku ',i5,3f8.2)
246 610
format(1x,
' k pr dkt dku ',i5,3f8.2,
' l2 ri t2',
247 1
' sr2 ',2f8.2,2e10.2)
271 zi(i,k) = phii(i,k) * gravi
272 zl(i,k) = phil(i,k) * gravi
276 zi(i,km+1) = phii(i,km+1) * gravi
281 rdzt(i,k) = 1.0 / (zl(i,k+1) - zl(i,k))
287 tx1(i) = 1.0 / prsi(i,1)
295 if (k < kinver(i))
then
297 ptem = prsi(i,k+1) * tx1(i)
299 tem1 = tem1 * tem1 * 10.0
300 xkzo(i,k) = xkzm_h * min(1.0, exp(-tem1))
303 if (ptem >= xkzm_s)
then
307 if (k == kx1(i) .and. k > 1) tx2(i) = 1.0 / prsi(i,k)
308 tem1 = 1.0 - prsi(i,k+1) * tx2(i)
309 tem1 = tem1 * tem1 * 5.0
310 xkzmo(i,k) = xkzm_m * min(1.0, exp(-tem1))
325 if(zi(i,k+1) > 250.)
then
326 tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k)
327 if(tem1 > 1.e-5)
then
328 xkzo(i,k) = min(xkzo(i,k),xkzminv)
335 z0(i) = 0.01 * zorl(i)
347 if(rbsoil(i) > 0.) sfcflg(i) = .false.
366 theta(i,k) = t1(i,k) * psk(i) / prslk(i,k)
367 qlx(i,k) = max(q1(i,k,ntcw),qlmin)
368 qtx(i,k) = max(q1(i,k,1),qmin)+qlx(i,k)
370 ptem1 = hvap*max(q1(i,k,1),qmin)/(cp*t1(i,k))
371 thetae(i,k)= theta(i,k)*(1.+ptem1)
372 thvx(i,k) = theta(i,k)*(1.+fv*max(q1(i,k,1),qmin)-ptem)
373 ptem2 = theta(i,k)-(hvap/cp)*ptem
374 thlvx(i,k) = ptem2*(1.+fv*qtx(i,k))
385 tem = zi(i,k+1)-zi(i,k)
386 radx(i,k) = tem*(swh(i,k)*xmu(i)+hlw(i,k))
395 if(flg(i).and.zl(i,k) >= zstblmax)
then
407 bf(i,k) = (thvx(i,k+1)-thvx(i,k))*rdz
408 ti(i,k) = 2./(t1(i,k)+t1(i,k+1))
409 dw2 = (u1(i,k)-u1(i,k+1))**2
410 & + (v1(i,k)-v1(i,k+1))**2
411 shr2(i,k) = max(dw2,dw2min)*rdz*rdz
416 govrth(i) = g/theta(i,1)
420 beta(i) = dt2 / (zi(i,2)-zi(i,1))
424 ustar(i) = sqrt(stress(i))
428 sflux(i) = heat(i) + evap(i)*fv*theta(i,1)
429 if(.not.sfcflg(i) .or. sflux(i) <= 0.) pblflg(i)=.false.
442 thermal(i) = thvx(i,1)
445 thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin))
446 tem = sqrt(u10m(i)**2+v10m(i)**2)
448 robn = tem / (f0 * z0(i))
450 crb(i) = 0.16 * (tem1 ** (-0.18))
451 crb(i) = max(min(crb(i), crbmax), crbmin)
466 spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.)
467 rbup(i) = (thvx(i,k)-thermal(i))*
468 & (g*zl(i,k)/thvx(i,1))/spdk2
470 flg(i) = rbup(i) > crb(i)
478 if(rbdn(i) >= crb(i))
then
480 elseif(rbup(i) <= crb(i))
then
483 rbint = (crb(i)-rbdn(i))/(rbup(i)-rbdn(i))
485 hpbl(i) = zl(i,k-1) + rbint*(zl(i,k)-zl(i,k-1))
486 if(hpbl(i) < zi(i,kpbl(i))) kpbl(i) = kpbl(i) - 1
512 zol(i) = max(rbsoil(i)*fm(i)*fm(i)/fh(i),rimin)
514 zol(i) = min(zol(i),-zfmin)
516 zol(i) = max(zol(i),zfmin)
518 zol1 = zol(i)*sfcfrac*hpbl(i)/zl(i,1)
522 tem = 1.0 / (1. - aphi16*zol1)
524 phim(i) = sqrt(phih(i))
526 phim(i) = 1. + aphi5*zol1
529 wscale(i) = ustar(i)/phim(i)
530 ustmin(i) = ustar(i)/aphi5
531 wscale(i) = max(wscale(i),ustmin(i))
535 if(zol(i) < zolcru .and. kpbl(i) > 1)
then
540 wst3 = govrth(i)*sflux(i)*hpbl(i)
543 wscaleu(i) = (ust3+wfac*vk*wst3*sfcfrac)**h1
544 wscaleu(i) = max(wscaleu(i),ustmin(i))
553 hgamt(i) = min(cfac*heat(i)/wscaleu(i),gamcrt)
554 hgamq(i) = min(cfac*evap(i)/wscaleu(i),gamcrq)
555 vpert = hgamt(i) + hgamq(i)*fv*theta(i,1)
556 vpert = min(vpert,gamcrt)
557 thermal(i)= thermal(i)+max(vpert,0.)
558 hgamt(i) = max(hgamt(i),0.0)
559 hgamq(i) = max(hgamq(i),0.0)
576 spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.)
577 rbup(i) = (thvx(i,k)-thermal(i))*
578 & (g*zl(i,k)/thvx(i,1))/spdk2
580 flg(i) = rbup(i) > crb(i)
587 if(rbdn(i) >= crb(i))
then
589 elseif(rbup(i) <= crb(i))
then
592 rbint = (crb(i)-rbdn(i))/(rbup(i)-rbdn(i))
594 hpbl(i) = zl(i,k-1) + rbint*(zl(i,k)-zl(i,k-1))
595 if(hpbl(i) < zi(i,kpbl(i))) kpbl(i) = kpbl(i) - 1
596 if(kpbl(i) <= 1)
then
611 if(flg(i) .and. k <= lcld(i))
then
612 if(qlx(i,k).ge.qlcr)
then
620 if(scuflg(i) .and. kcld(i)==km1) scuflg(i)=.false.
628 if(flg(i) .and. k <= kcld(i))
then
629 if(qlx(i,k) >= qlcr)
then
630 if(radx(i,k) < radmin(i))
then
641 if(scuflg(i) .and. krad(i) <= 1) scuflg(i)=.false.
642 if(scuflg(i) .and. radmin(i)>=0.) scuflg(i)=.false.
650 if(flg(i) .and. k <= krad(i))
then
651 if(qlx(i,k) >= qlcr)
then
660 if(scuflg(i) .and. icld(i) < 1) scuflg(i)=.false.
665 hrad(i) = zi(i,krad(i)+1)
671 if(scuflg(i) .and. hrad(i)<zi(i,2)) scuflg(i)=.false.
677 tem = zi(i,k+1)-zi(i,k)
678 tem1 = cldtime*radmin(i)/tem
679 thlvx1(i) = thlvx(i,k)+tem1
689 if(flg(i) .and. k <= krad(i))
then
690 if(thlvx1(i) <= thlvx(i,k))
then
691 tem=zi(i,k+1)-zi(i,k)
702 kk = max(1, krad(i)+1-icld(i))
703 zdd(i) = hrad(i)-zi(i,kk)
709 zd(i) = max(zd(i),zdd(i))
710 zd(i) = min(zd(i),hrad(i))
711 tem = govrth(i)*zd(i)*(-radmin(i))
721 tem = phih(i)/phim(i)+cfac*vk*sfcfrac
723 tem = phih(i)/phim(i)
726 prinv(i) = min(prinv(i),prmax)
727 prinv(i) = max(prinv(i),prmin)
730 if(zol(i) > zolcr)
then
743 zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin)
744 tem = zi(i,k+1) * (zfac**pfac)
746 tem1 = vk * wscaleu(i) * tem
750 dkt(i,k) = tem1 * prinv(i)
752 tem1 = vk * wscale(i) * tem
756 dkt(i,k) = tem1 * prinv(i)
758 dku(i,k) = min(dku(i,k),dkmax)
759 dku(i,k) = max(dku(i,k),xkzmo(i,k))
760 dkt(i,k) = min(dkt(i,k),dkmax)
761 dkt(i,k) = max(dkt(i,k),xkzo(i,k))
804 if(k >= kpbl(i))
then
805 bvf2 = g*bf(i,k)*ti(i,k)
806 ri = max(bvf2/shr2(i,k),rimin)
809 rl2 = zk*rlamun/(rlamun+zk)
810 dk = rl2*rl2*sqrt(shr2(i,k))
814 dku(i,k) = dk*(1+8.*(-ri)/(1+1.746*sri))
815 dkt(i,k) = dk*(1+8.*(-ri)/(1+1.286*sri))
817 rl2 = zk*rlam/(rlam+zk)
820 dk = rl2*rl2*sqrt(shr2(i,k))
821 tem1 = dk/(1+5.*ri)**2
823 if(k >= kpblx(i))
then
825 prnum = min(prnum,prmax)
831 dku(i,k) = tem1 * prnum
835 dku(i,k) = min(dku(i,k),dkmax)
836 dku(i,k) = max(dku(i,k),xkzmo(i,k))
837 dkt(i,k) = min(dkt(i,k),dkmax)
838 dkt(i,k) = max(dkt(i,k),xkzo(i,k))
863 qcko(i,k,kk) = q1(i,k,kk)
869 call mfpbl(im,ix,km,ntrac,dt2,pcnvflg,
870 & zl,zi,thvx,q1,t1,u1,v1,hpbl,kpbl,
871 & sflux,ustar,wstar,xmf,tcko,qcko,ucko,vcko)
891 tem = thetae(i,k) - thetae(i,k+1)
892 tem1 = qtx(i,k) - qtx(i,k+1)
893 if (tem > 0. .and. tem1 > 0.)
then
894 cteit= cp*tem/(hvap*tem1)
895 if(cteit > actei) rent(i) = rentf2
902 tem1 = max(bf(i,k),tdzmin)
903 ckt(i,k) = -rent(i)*radmin(i)/tem1
910 if(scuflg(i) .and. k < krad(i))
then
915 if(ptem.ge.1.) ptem= 1.
916 ptem= tem2*ptem*sqrt(1.-ptem)
917 ckt(i,k) = radfac*vk*vrad(i)*ptem
918 cku(i,k) = 0.75*ckt(i,k)
919 ckt(i,k) = max(ckt(i,k),dkmin)
920 ckt(i,k) = min(ckt(i,k),dkmax)
921 cku(i,k) = max(cku(i,k),dkmin)
922 cku(i,k) = min(cku(i,k),dkmax)
934 dkt(i,k) = dkt(i,k)+ckt(i,k)
935 dku(i,k) = dku(i,k)+cku(i,k)
936 dkt(i,k) = min(dkt(i,k),dkmax)
937 dku(i,k) = min(dku(i,k),dkmax)
948 a1(i,1) = t1(i,1) + beta(i) * heat(i)
949 a2(i,1) = q1(i,1,1) + beta(i) * evap(i)
956 a2(i,1+is) = q1(i,1,k)
963 dtodsd = dt2/del(i,k)
964 dtodsu = dt2/del(i,k+1)
965 dsig = prsl(i,k)-prsl(i,k+1)
967 tem1 = dsig * dkt(i,k) * rdz
969 au(i,k) = -dtodsd*dsdz2
970 al(i,k) = -dtodsu*dsdz2
972 if(pcnvflg(i) .and. k < kpbl(i))
then
974 ptem = 0.5 * tem2 * xmf(i,k)
975 ptem1 = dtodsd * ptem
976 ptem2 = dtodsu * ptem
977 ad(i,k) = ad(i,k)-au(i,k)-ptem1
978 ad(i,k+1) = 1.-al(i,k)+ptem2
979 au(i,k) = au(i,k)-ptem1
980 al(i,k) = al(i,k)+ptem2
981 ptem = tcko(i,k) + tcko(i,k+1)
983 a1(i,k) = a1(i,k)+dtodsd*dsdzt-ptem1*ptem
984 a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt+ptem2*ptem
985 ptem = qcko(i,k,1) + qcko(i,k+1,1)
986 a2(i,k) = a2(i,k) - ptem1 * ptem
987 a2(i,k+1) = q1(i,k+1,1) + ptem2 * ptem
988 elseif(ublflg(i) .and. k < kpbl(i))
then
989 ptem1 = dsig * dktx(i,k) * rdz
991 dsdzt = tem1 * gocp - ptem1 * hgamt(i) * tem
992 dsdzq = - ptem1 * hgamq(i) * tem
993 ad(i,k) = ad(i,k)-au(i,k)
994 ad(i,k+1) = 1.-al(i,k)
995 a1(i,k) = a1(i,k)+dtodsd*dsdzt
996 a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt
997 a2(i,k) = a2(i,k)+dtodsd*dsdzq
998 a2(i,k+1) = q1(i,k+1,1)-dtodsu*dsdzq
1000 ad(i,k) = ad(i,k)-au(i,k)
1001 ad(i,k+1) = 1.-al(i,k)
1003 a1(i,k) = a1(i,k)+dtodsd*dsdzt
1004 a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt
1005 a2(i,k+1) = q1(i,k+1,1)
1016 if(pcnvflg(i) .and. k < kpbl(i))
then
1017 dtodsd = dt2/del(i,k)
1018 dtodsu = dt2/del(i,k+1)
1019 dsig = prsl(i,k)-prsl(i,k+1)
1020 tem = dsig * rdzt(i,k)
1021 ptem = 0.5 * tem * xmf(i,k)
1022 ptem1 = dtodsd * ptem
1023 ptem2 = dtodsu * ptem
1024 tem1 = qcko(i,k,kk) + qcko(i,k+1,kk)
1025 a2(i,k+is) = a2(i,k+is) - ptem1*tem1
1026 a2(i,k+1+is)= q1(i,k+1,kk) + ptem2*tem1
1028 a2(i,k+1+is) = q1(i,k+1,kk)
1038 call tridin(im,km,ntrac,al,ad,au,a1,a2,au,a1,a2)
1046 ttend = (a1(i,k)-t1(i,k)) * rdt
1047 qtend = (a2(i,k)-q1(i,k,1))*rdt
1048 tau(i,k) = tau(i,k)+ttend
1049 rtg(i,k,1) = rtg(i,k,1)+qtend
1050 dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend
1051 dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend
1059 qtend = (a2(i,k+is)-q1(i,k,kk))*rdt
1060 rtg(i,k,kk) = rtg(i,k,kk)+qtend
1074 diss(i,k) = dku(i,k)*shr2(i,k)-g*ti(i,k)*dkt(i,k)*bf(i,k)
1083 tem = govrth(i)*sflux(i)
1084 tem1 = tem + stress(i)*spd1(i)/zl(i,1)
1085 tem2 = 0.5 * (tem1+diss(i,1))
1086 tem2 = max(tem2, 0.)
1088 tau(i,1) = tau(i,1)+0.5*ttend
1095 tem = 0.5 * (diss(i,k-1)+diss(i,k))
1098 tau(i,k) = tau(i,k) + 0.5*ttend
1109 ad(i,1) = 1.0 + beta(i) * stress(i) / spd1(i)
1116 dtodsd = dt2/del(i,k)
1117 dtodsu = dt2/del(i,k+1)
1118 dsig = prsl(i,k)-prsl(i,k+1)
1120 tem1 = dsig*dku(i,k)*rdz
1122 au(i,k) = -dtodsd*dsdz2
1123 al(i,k) = -dtodsu*dsdz2
1125 if(pcnvflg(i) .and. k < kpbl(i))
then
1127 ptem = 0.5 * tem2 * xmf(i,k)
1128 ptem1 = dtodsd * ptem
1129 ptem2 = dtodsu * ptem
1130 ad(i,k) = ad(i,k)-au(i,k)-ptem1
1131 ad(i,k+1) = 1.-al(i,k)+ptem2
1132 au(i,k) = au(i,k)-ptem1
1133 al(i,k) = al(i,k)+ptem2
1134 ptem = ucko(i,k) + ucko(i,k+1)
1135 a1(i,k) = a1(i,k) - ptem1 * ptem
1136 a1(i,k+1) = u1(i,k+1) + ptem2 * ptem
1137 ptem = vcko(i,k) + vcko(i,k+1)
1138 a2(i,k) = a2(i,k) - ptem1 * ptem
1139 a2(i,k+1) = v1(i,k+1) + ptem2 * ptem
1141 ad(i,k) = ad(i,k)-au(i,k)
1142 ad(i,k+1) = 1.-al(i,k)
1143 a1(i,k+1) = u1(i,k+1)
1144 a2(i,k+1) = v1(i,k+1)
1152 call tridi2(im,km,al,ad,au,a1,a2,au,a1,a2)
1159 utend = (a1(i,k)-u1(i,k))*rdt
1160 vtend = (a2(i,k)-v1(i,k))*rdt
1161 du(i,k) = du(i,k) + utend
1162 dv(i,k) = dv(i,k) + vtend
1163 dusfc(i) = dusfc(i) + conw*del(i,k)*utend
1164 dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend
1195 subroutine tridi2(l,n,cl,cm,cu,r1,r2,au,a1,a2)
1197 use machine
, only : kind_phys
1200 real(kind=kind_phys) fk
1202 real(kind=kind_phys) cl(l,2:n),cm(l,n),cu(l,n-1),r1(l,n),r2(l,n),
1203 & au(l,n-1),a1(l,n),a2(l,n)
1207 au(i,1) = fk*cu(i,1)
1208 a1(i,1) = fk*r1(i,1)
1209 a2(i,1) = fk*r2(i,1)
1213 fk = 1./(cm(i,k)-cl(i,k)*au(i,k-1))
1214 au(i,k) = fk*cu(i,k)
1215 a1(i,k) = fk*(r1(i,k)-cl(i,k)*a1(i,k-1))
1216 a2(i,k) = fk*(r2(i,k)-cl(i,k)*a2(i,k-1))
1220 fk = 1./(cm(i,n)-cl(i,n)*au(i,n-1))
1221 a1(i,n) = fk*(r1(i,n)-cl(i,n)*a1(i,n-1))
1222 a2(i,n) = fk*(r2(i,n)-cl(i,n)*a2(i,n-1))
1226 a1(i,k) = a1(i,k)-au(i,k)*a1(i,k+1)
1227 a2(i,k) = a2(i,k)-au(i,k)*a2(i,k+1)
1238 subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2)
1240 use machine
, only : kind_phys
1242 integer is,k,kk,n,nt,l,i
1243 real(kind=kind_phys) fk(l)
1245 real(kind=kind_phys) cl(l,2:n), cm(l,n), cu(l,n-1),
1246 & r1(l,n), r2(l,n*nt),
1247 & au(l,n-1), a1(l,n), a2(l,n*nt),
1252 au(i,1) = fk(i)*cu(i,1)
1253 a1(i,1) = fk(i)*r1(i,1)
1258 a2(i,1+is) = fk(i) * r2(i,1+is)
1263 fkk(i,k) = 1./(cm(i,k)-cl(i,k)*au(i,k-1))
1264 au(i,k) = fkk(i,k)*cu(i,k)
1265 a1(i,k) = fkk(i,k)*(r1(i,k)-cl(i,k)*a1(i,k-1))
1272 a2(i,k+is) = fkk(i,k)*(r2(i,k+is)-cl(i,k)*a2(i,k+is-1))
1277 fk(i) = 1./(cm(i,n)-cl(i,n)*au(i,n-1))
1278 a1(i,n) = fk(i)*(r1(i,n)-cl(i,n)*a1(i,n-1))
1283 a2(i,n+is) = fk(i)*(r2(i,n+is)-cl(i,n)*a2(i,n+is-1))
1288 a1(i,k) = a1(i,k) - au(i,k)*a1(i,k+1)
1295 a2(i,k+is) = a2(i,k+is) - au(i,k)*a2(i,k+is+1)
real(kind=kind_phys), parameter con_g
gravity ( )
subroutine tridi2(l, n, cl, cm, cu, r1, r2, au, a1, a2)
Routine to solve the tridiagonal system to calculate temperature and moisture at ; part of two-part p...
subroutine tridin(l, n, nt, cl, cm, cu, r1, r2, au, a1, a2)
Routine to solve the tridiagonal system to calculate u- and v-momentum at ; part of two-part process ...
subroutine mfpbl(im, ix, km, ntrac, delt, cnvflg, zl, zm, thvx, q1, t1, u1, v1, hpbl, kpbl, sflx, ustar, wstar, xmf, tcko, qcko, ucko, vcko)
This subroutine is used for calculating the mass flux and updraft properties.
real(kind=kind_phys), parameter con_cp
spec heat air at p ( )
real(kind=kind_phys), parameter con_hvap
lat heat H2O cond ( )
subroutine moninedmf(ix, im, km, ntrac, ntcw, dv, du, tau, rtg, u1, v1, t1, q1, swh, hlw, xmu, psk, rbsoil, zorl, u10m, v10m, fm, fh, tsea, qss, heat, evap, stress, spd1, kpbl, prsi, del, prsl, prslk, phii, phil, delt, dspheat, dusfc, dvsfc, dtsfc, dqsfc, hpbl, hgamt, hgamq, dkt, kinver, xkzm_m, xkzm_h, xkzm_s, lprnt, ipr)
This subroutine contains all of logic for the Hybrid EDMF PBL scheme except for the calculation of th...
real(kind=kind_phys), parameter con_rd
gas constant air ( )