35 SUBROUTINE calmict_new(P1D,T1D,Q1D,C1D,FI1D,FR1D,FS1D,CUREFL, &
36 qw1,qi1,qr1,qs1,dbz1,dbzr1,dbzi1,dbzc1,nlice1,nrain1)
39 use params_mod, only: dbzmin, epsq, tfrz, eps, rd, d608
40 use ctlblk_mod
, only: jsta, jend, jsta_2l,jend_2u,im
41 use cmassi_mod
, only: t_ice, rqr_drmin, n0rmin, cn0r_dmrmin, &
42 mdrmin, rqr_drmax, cn0r_dmrmax, mdrmax, n0r0, xmrmin, &
43 xmrmax, massi, cn0r0, mdimin, xmimax, mdimax
47 INTEGER indexs, indexr
49 REAL,
PARAMETER :: cice=1.634e13, cwet=1./.189, cboth=cice/.224, &
50 & NLI_min=1.E3, RFmax=45.259, RQmix=0.1E-3,NSI_max=250.E3
52 real,
dimension(IM,jsta_2l:jend_2u),
intent(in) :: p1d,t1d,q1d,c1d,fi1d,fr1d, &
54 real,
dimension(IM,jsta_2l:jend_2u),
intent(inout) :: qw1,qi1,qr1,qs1,dbz1,dbzr1,&
55 dbzi1,dbzc1,nlice1,nrain1
58 real :: tc,frain,fice,rimef,xsimass,qice,qsat,esat,wv,rho,rrho, &
59 & RQR,DRmm,Qsigrd,WVQW,Dum,XLi,Qlice,WC,DLI,NLImax,NSImax, &
60 & RQLICE, N0r,Ztot,Zrain,Zice,Zconv,Zmin,Zmix,NLICE,NSmICE, &
61 & QSmICE,NRAIN,NMIX,Zsmice
62 logical :: large_rf, hail
68 zmin=10.**(0.1*dbzmin)
90 IF (c1d(i,j) <= epsq)
THEN
107 IF (tc<=t_ice .OR. fice>=1.)
THEN
110 ELSE IF (fice <= 0.)
THEN
116 IF (qw1(i,j)>0. .AND. frain>0.)
THEN
117 IF (frain >= 1.)
THEN
121 qr1(i,j)=frain*qw1(i,j)
122 qw1(i,j)=qw1(i,j)-qr1(i,j)
125 wv=q1d(i,j)/(1.-q1d(i,j))
129 esat=1000.*fpvs(t1d(i,j))
130 qsat=eps*esat/(p1d(i,j)-esat)
131 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+d608*q1d(i,j)))
137 IF (qr1(i,j) > epsq)
THEN
139 IF (rqr <= rqr_drmin)
THEN
140 n0r=max(n0rmin, cn0r_dmrmin*rqr)
142 ELSE IF (rqr >= rqr_drmax)
THEN
147 indexr=max( xmrmin, min(cn0r0*rqr**.25, xmrmax) )
152 drmm=1.e-3*
REAL(indexr)
156 nrain=n0r*1.e-6*
REAL(indexr)
158 zrain=0.72*n0r*drmm*drmm*drmm*drmm*drmm*drmm*drmm
165 IF (qi1(i,j) > epsq)
THEN
189 nsimax=max(nsi_max,0.1*rho*qice/massi(mdimin) )
194 nsmice=min(0.01*exp(-0.6*tc), nsimax)
195 dum=rrho*massi(mdimin)
196 nsmice=min(nsmice, qice/dum)
199 qlice=max(0., qice-qsmice)
202 rimef=amax1(1., fs1d(i,j) )
203 rimef=min(rimef, rfmax)
205 dum=xmimax*exp(.0536*tc)
206 indexs=min(mdimax, max(mdimin, int(dum) ) )
216 nlimax=10.e3*exp(-0.017*dum)
218 nlice=rqlice/(rimef*massi(indexs))
219 dum=nli_min*massi(mdimin)
220 new_nlice:
IF (rqlice<dum)
THEN
221 nlice=rqlice/massi(mdimin)
222 ELSE IF (nlice<nli_min .OR. nlice>nlimax)
THEN new_nlice
227 nlice=max(nli_min, min(nlimax, nlice) )
228 xli=rqlice/(nlice*rimef)
229 new_size:
IF (xli <= massi(mdimin) )
THEN
231 ELSE IF (xli <= massi(450) )
THEN new_size
232 dli=9.5885e5*xli**.42066
233 indexs=min(mdimax, max(mdimin, int(dli) ) )
234 ELSE IF (xli <= massi(mdimax) )
THEN new_size
235 dli=3.9751e6*xli**.49870
236 indexs=min(mdimax, max(mdimin, int(dli) ) )
239 IF (large_rf) hail=.true.
241 no_hail:
IF (.NOT. hail)
THEN
242 nlice=rqlice/(rimef*massi(indexs))
256 IF (nsmice > 0.)
THEN
257 zsmice=cice*rho*rho*qsmice*qsmice/nsmice
259 if (nlice1(i,j) /= 0.0) zice=cice*rqlice*rqlice/nlice1(i,j)
260 IF (tc>=0.) zice=cwet*zice
266 dbz_mix:
IF (rqr>rqmix .AND. rqlice>rqmix)
THEN
273 zmix=cboth*dum*dum/nmix
274 IF (zmix > zrain+zice)
THEN
286 ztot=zrain+zice+zconv
287 IF (ztot > zmin) dbz1(i,j)= 10.*alog10(ztot)
288 IF (zrain > zmin) dbzr1(i,j)=10.*alog10(zrain)
289 IF (zice > zmin) dbzi1(i,j)=10.*alog10(zice)
291 IF (zconv > zmin) dbzc1(i,j)=10.*alog10(zconv)
300 SUBROUTINE calmict_old(P1D,T1D,Q1D,C1D,FI1D,FR1D,FS1D,CUREFL, &
301 qw1,qi1,qr1,qs1,dbz1,dbzr1,dbzi1,dbzc1,nlice1,nrain1)
335 use params_mod, only: dbzmin, epsq, tfrz, eps, rd, d608, oneps, nlimin
336 use ctlblk_mod
, only: jsta, jend, jsta_2l, jend_2u, im
337 use rhgrd_mod
, only: rhgrd
338 use cmassi_mod
, only: t_ice, rqr_drmin, n0rmin, cn0r_dmrmin, mdrmin, &
339 rqr_drmax,cn0r_dmrmax, mdrmax, n0r0, xmrmin, xmrmax,flarge2, &
340 massi, cn0r0, mdimin, xmimax, mdimax,nlimax
344 INTEGER indexs, indexr
345 REAL,
PARAMETER :: cice=1.634e13
347 real,
dimension(IM,jsta_2l:jend_2u),
intent(in) :: p1d,t1d,q1d,c1d,fi1d,fr1d, &
349 real,
dimension(IM,jsta_2l:jend_2u),
intent(inout) :: qw1,qi1,qr1,qs1,dbz1,dbzr1,&
350 dbzi1,dbzc1,nlice1,nrain1
352 REAL n0r,ztot,zrain,zice,zconv,zmin
354 real tc, frain,fice,flimass,flarge, &
355 fsmall,rimef,xsimass,qice,qsat,esat,wv,rho,rrho,rqr, &
356 drmm,qsigrd,wvqw,dum,xli,qlice,wc,dli,xlimass
357 real,
external :: fpvs
362 zmin=10.**(0.1*dbzmin)
382 IF (c1d(i,j) <= epsq)
THEN
399 IF (tc<=t_ice .OR. fice>=1.)
THEN
402 ELSE IF (fice <= 0.)
THEN
408 IF (qw1(i,j)>0. .AND. frain>0.)
THEN
409 IF (frain >= 1.)
THEN
413 qr1(i,j)=frain*qw1(i,j)
414 qw1(i,j)=qw1(i,j)-qr1(i,j)
417 wv=q1d(i,j)/(1.-q1d(i,j))
421 esat=1000.*fpvs(t1d(i,j))
422 qsat=eps*esat/(p1d(i,j)-esat)
423 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+d608*q1d(i,j)))
428 IF (qr1(i,j) > epsq)
THEN
430 IF (rqr <= rqr_drmin)
THEN
431 n0r=max(n0rmin, cn0r_dmrmin*rqr)
433 ELSE IF (rqr >= rqr_drmax)
THEN
438 indexr=max( xmrmin, min(cn0r0*rqr**.25, xmrmax) )
443 drmm=1.e-3*
REAL(indexr)
444 zrain=0.72*n0r*drmm*drmm*drmm*drmm*drmm*drmm*drmm
448 nrain1(i,j)=n0r*1.e-6*
REAL(indexr)
454 IF (qi1(i,j) > epsq)
THEN
456 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+oneps*q1d(i,j)))
474 IF (tc>=0. .OR. wvqw<qsigrd)
THEN
480 fsmall=(1.-flarge)/flarge
481 xsimass=rrho*massi(mdimin)*fsmall
482 dum=xmimax*exp(.0536*tc)
483 indexs=min(mdimax, max(mdimin, int(dum) ) )
484 rimef=amax1(1., fs1d(i,j) )
485 xlimass=rrho*rimef*massi(indexs)
486 flimass=xlimass/(xlimass+xsimass)
488 nlice1(i,j)=qlice/xlimass
489 IF (nlice1(i,j)<nlimin .OR. nlice1(i,j)>nlimax)
THEN
493 dum=max(nlimin, min(nlimax, nlice1(i,j)) )
494 xli=rho*(qice/dum-xsimass)/rimef
495 IF (xli <= massi(mdimin) )
THEN
497 ELSE IF (xli <= massi(450) )
THEN
498 dli=9.5885e5*xli**.42066
499 indexs=min(mdimax, max(mdimin, int(dli) ) )
500 ELSE IF (xli <= massi(mdimax) )
THEN
501 dli=3.9751e6*xli**.49870
502 indexs=min(mdimax, max(mdimin, int(dli) ) )
511 rimef=rho*(qice/nlimax-xsimass)/massi(indexs)
513 xlimass=rrho*rimef*massi(indexs)
514 flimass=xlimass/(xlimass+xsimass)
516 nlice1(i,j)=qlice/xlimass
518 qs1(i,j)=amin1(qi1(i,j), qlice)
519 qi1(i,j)=amax1(0., qi1(i,j)-qs1(i,j))
530 zice=cice*rho*rho*qlice*qlice/nlice1(i,j)
534 10 ztot=zrain+zice+zconv
535 IF (ztot > zmin) dbz1(i,j)= 10.*alog10(ztot)
536 IF (zrain > zmin) dbzr1(i,j)=10.*alog10(zrain)
537 IF (zice > zmin) dbzi1(i,j)=10.*alog10(zice)
538 IF (zconv > zmin) dbzc1(i,j)=10.*alog10(zconv)