UPP (develop)
Loading...
Searching...
No Matches
CALMICT.f
Go to the documentation of this file.
1
38!-----------------------------------------------------------------------
64!-----------------------------------------------------------------------
65 SUBROUTINE calmict_new(P1D,T1D,Q1D,C1D,FI1D,FR1D,FS1D,CUREFL, &
66 QW1,QI1,QR1,QS1,DBZ1,DBZR1,DBZI1,DBZC1,NLICE1,NRAIN1)
67
68!
69 use params_mod, only: dbzmin, epsq, tfrz, eps, rd, d608
70 use ctlblk_mod, only: jsta, jend, jsta_2l, jend_2u,im, &
71 ista, iend, ista_2l, iend_2u
72 use cmassi_mod, only: t_ice, rqr_drmin, n0rmin, cn0r_dmrmin, &
73 mdrmin, rqr_drmax, cn0r_dmrmax, mdrmax, n0r0, xmrmin, &
74 xmrmax, massi, cn0r0, mdimin, xmimax, mdimax
75!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
76 implicit none
77!
78 INTEGER INDEXS, INDEXR
79!aligo
80 REAL, PARAMETER :: Cice=1.634e13, cwet=1./.189, cboth=cice/.224, &
81 & nli_min=1.e3, rfmax=45.259, rqmix=0.1e-3,nsi_max=250.e3
82!aligo
83 real,dimension(ista_2l:iend_2u,jsta_2l:jend_2u),intent(in) :: P1D,T1D,Q1D,C1D,FI1D,FR1D, &
84 fs1d,curefl
85 real,dimension(ista_2l:iend_2u,jsta_2l:jend_2u),intent(inout) :: QW1,QI1,QR1,QS1,DBZ1,DBZR1,&
86 dbzi1,dbzc1,nlice1,nrain1
87
88 integer I,J
89 real :: TC,Frain,Fice,RimeF,Xsimass,Qice,Qsat,ESAT,WV,RHO,RRHO, &
90 & rqr,drmm,qsigrd,wvqw,dum,xli,qlice,wc,dli,nlimax,nsimax, &
91 & rqlice, n0r,ztot,zrain,zice,zconv,zmin,zmix,nlice,nsmice, &
92 & qsmice,nrain,nmix,zsmice
93 logical :: LARGE_RF, HAIL
94 real,external :: fpvs
95!************************************************************************
96!--- Determine composition of condensate in the form of cloud water,
97! total ice (cloud ice & snow), & rain following GSMDRIVE in NMM model
98!
99 zmin=10.**(0.1*dbzmin)
100 DO j=jsta,jend
101 DO i=ista,iend
102 qw1(i,j)=0.
103 qi1(i,j)=0.
104 qr1(i,j)=0.
105 qs1(i,j)=0.
106 nlice1(i,j)=0.
107 nrain1(i,j)=0.
108 dbz1(i,j)=dbzmin
109 dbzr1(i,j)=dbzmin
110 dbzi1(i,j)=dbzmin
111 dbzc1(i,j)=dbzmin
112 ENDDO
113 ENDDO
114 DO j=jsta,jend
115 DO i=ista,iend
116 ztot=0. !--- Total radar reflectivity
117 zrain=0. !--- Radar reflectivity from rain
118 zice=0. !--- Radar reflectivity from ice
119 zsmice=0. !--- Radar reflectivity from small ice
120 zconv=curefl(i,j) !--- Radar reflectivity from convection
121 IF (c1d(i,j) <= epsq) THEN
122!
123!--- Skip rest of calculatiions if no condensate is present
124!
125 GO TO 10
126 ELSE
127 wc=c1d(i,j)
128 ENDIF
129!
130!--- Code below is from GSMDRIVE for determining:
131! QI1 - total ice (cloud ice & snow) mixing ratio
132! QW1 - cloud water mixing ratio
133! QR1 - rain mixing ratio
134!
135 tc=t1d(i,j)-tfrz
136 fice=fi1d(i,j)
137 frain=fr1d(i,j)
138 IF (tc<=t_ice .OR. fice>=1.) THEN
139! IF (Fice>=1.) THEN
140 qi1(i,j)=wc
141 ELSE IF (fice <= 0.) THEN
142 qw1(i,j)=wc
143 ELSE
144 qi1(i,j)=fice*wc
145 qw1(i,j)=wc-qi1(i,j)
146 ENDIF
147 IF (qw1(i,j)>0. .AND. frain>0.) THEN
148 IF (frain >= 1.) THEN
149 qr1(i,j)=qw1(i,j)
150 qw1(i,j)=0.
151 ELSE
152 qr1(i,j)=frain*qw1(i,j)
153 qw1(i,j)=qw1(i,j)-qr1(i,j)
154 ENDIF
155 ENDIF
156 wv=q1d(i,j)/(1.-q1d(i,j))
157!
158!--- Saturation vapor pressure w/r/t water ( >=0C ) or ice ( <0C )
159!
160 esat=1000.*fpvs(t1d(i,j))
161 qsat=eps*esat/(p1d(i,j)-esat)
162 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+d608*q1d(i,j)))
163 rrho=1./rho
164 !
165 !--- Based on code from GSMCOLUMN in model to determine reflectivity from rain
166 !
167 rqr=0.
168 IF (qr1(i,j) > epsq) THEN
169 rqr=rho*qr1(i,j)
170 IF (rqr <= rqr_drmin) THEN
171 n0r=max(n0rmin, cn0r_dmrmin*rqr)
172 indexr=mdrmin
173 ELSE IF (rqr >= rqr_drmax) THEN
174 n0r=cn0r_dmrmax*rqr
175 indexr=mdrmax
176 ELSE
177 n0r=n0r0
178 indexr=max( xmrmin, min(cn0r0*rqr**.25, xmrmax) )
179 ENDIF
180 !
181 !--- INDEXR is the mean drop size in microns; convert to mm
182 !
183 drmm=1.e-3*real(indexr)
184 !
185 !--- Number concentration of rain drops (convert INDEXR to m)
186 !
187 nrain=n0r*1.e-6*real(indexr)
188 nrain1(i,j)=nrain
189 zrain=0.72*n0r*drmm*drmm*drmm*drmm*drmm*drmm*drmm
190 ENDIF !--- End IF (QR1(I,J) > EPSQ) block
191!
192!--- Based on code from GSMCOLUMN in model to determine partition of
193! total ice into cloud ice & snow (precipitation ice)
194!
195 rqlice=0.
196 IF (qi1(i,j) > epsq) THEN
197 qice=qi1(i,j)
198!
199! -> Small ice particles are assumed to have a mean diameter of 50 microns.
200! * INDEXS - mean size of snow to the nearest micron (units of microns)
201! * RimeF - Rime Factor, which is the mass ratio of total (unrimed &
202! rimed) ice mass to the unrimed ice mass (>=1)
203! * QTICE - time-averaged mixing ratio of total ice
204! * QLICE - mixing ratio of large ice
205! * RQLICE - mass content of large ice
206! * NLICE1 - time-averaged number concentration of large ice
207!
208 IF (tc>=0.) THEN
209 !
210 !--- Eliminate small ice particle contributions for melting & sublimation
211 !
212 nsmice=0.
213 qsmice=0.
214 ELSE
215!
216!--- Max # conc of small ice crystals based on 10% of total ice content
217!
218! NSImax=0.1*RHO*QICE/MASSI(MDImin)
219!aligo
220 nsimax=max(nsi_max,0.1*rho*qice/massi(mdimin) )
221!aligo
222!
223!-- Specify Fletcher, Cooper, Meyers, etc. here for ice nuclei concentrations
224!
225 nsmice=min(0.01*exp(-0.6*tc), nsimax) !- Fletcher (1962)
226 dum=rrho*massi(mdimin)
227 nsmice=min(nsmice, qice/dum)
228 qsmice=nsmice*dum
229 ENDIF ! End IF (TC>=0.) THEN
230 qlice=max(0., qice-qsmice)
231 qs1(i,j)=qlice
232 qi1(i,j)=qsmice
233 rimef=amax1(1., fs1d(i,j) )
234 rimef=min(rimef, rfmax)
235 rqlice=rho*qlice
236 dum=xmimax*exp(.0536*tc)
237 indexs=min(mdimax, max(mdimin, int(dum) ) )
238!
239!-- Specify NLImax depending on presence of high density ice (rime factors >10)
240!
241 IF (rimef>10.) THEN
242 large_rf=.true. !-- For convective precipitation
243 nlimax=1.e3
244 ELSE
245 large_rf=.false. !-- For non-convective precipitation
246 dum=max(tc, t_ice)
247 nlimax=10.e3*exp(-0.017*dum)
248 ENDIF
249 nlice=rqlice/(rimef*massi(indexs))
250 dum=nli_min*massi(mdimin) !-- Minimum large ice mixing ratio
251new_nlice: IF (rqlice<dum) THEN
252 nlice=rqlice/massi(mdimin)
253 ELSE IF (nlice<nli_min .OR. nlice>nlimax) THEN new_nlice
254!
255!--- Force NLICE to be between NLI_min and NLImax, but allow for exceptions
256!
257 hail=.false.
258 nlice=max(nli_min, min(nlimax, nlice) )
259 xli=rqlice/(nlice*rimef)
260new_size: IF (xli <= massi(mdimin) ) THEN
261 indexs=mdimin
262 ELSE IF (xli <= massi(450) ) THEN new_size
263 dli=9.5885e5*xli**.42066 ! DLI in microns
264 indexs=min(mdimax, max(mdimin, int(dli) ) )
265 ELSE IF (xli <= massi(mdimax) ) THEN new_size
266 dli=3.9751e6*xli**.49870 ! DLI in microns
267 indexs=min(mdimax, max(mdimin, int(dli) ) )
268 ELSE new_size
269 indexs=mdimax
270 IF (large_rf) hail=.true.
271 ENDIF new_size
272no_hail: IF (.NOT. hail) THEN
273 nlice=rqlice/(rimef*massi(indexs)) !-- NLICE > NLImax
274 ENDIF no_hail
275 ENDIF new_nlice
276 nlice1(i,j)=nlice
277 !
278 !--- Equation (C.8) in Ferrier (1994, JAS, p. 272), which when
279 ! converted from cgs units to mks units results in the same
280 ! value for Cice, which is equal to the {} term below:
281 !
282 ! Zi={.224*720*(10**18)/[(PI*RHOL)**2]}*(RHO*QLICE)**2/NLICE1(I,J),
283 ! where RHOL=1000 kg/m**3 is the density of liquid water
284 !
285 !--- Valid only for exponential ice distributions
286 !
287 IF (nsmice > 0.) THEN
288 zsmice=cice*rho*rho*qsmice*qsmice/nsmice
289 ENDIF
290 if (nlice1(i,j) /= 0.0) zice=cice*rqlice*rqlice/nlice1(i,j)
291 IF (tc>=0.) zice=cwet*zice ! increased for wet ice
292 ENDIF ! End IF (QI1(I,J) > 0.) THEN
293!
294!--- Assumed enhanced radar reflectivity when rain and ice coexist
295! above an assumed threshold mass content, RQmix
296!
297dbz_mix: IF (rqr>rqmix .AND. rqlice>rqmix) THEN
298 IF (rqr>rqlice) THEN
299 nmix=nrain
300 ELSE
301 nmix=nlice1(i,j)
302 ENDIF
303 dum=rqr+rqlice
304 zmix=cboth*dum*dum/nmix
305 IF (zmix > zrain+zice) THEN
306 IF (rqr>rqlice) THEN
307 zrain=zmix-zice
308 ELSE
309 zice=zmix-zrain
310 ENDIF
311 ENDIF
312 ENDIF dbz_mix
313!
314!--- Calculate total (convective + grid-scale) radar reflectivity
315!
31610 zice=zice+zsmice
317 ztot=zrain+zice+zconv
318 IF (ztot > zmin) dbz1(i,j)= 10.*alog10(ztot)
319 IF (zrain > zmin) dbzr1(i,j)=10.*alog10(zrain)
320 IF (zice > zmin) dbzi1(i,j)=10.*alog10(zice)
321! IF (Zconv > Zmin) DBZC1(I,J)=10.*ALOG10(Zsmice)
322 IF (zconv > zmin) dbzc1(i,j)=10.*alog10(zconv)
323 ENDDO
324 ENDDO
325!
326 RETURN
327 END
328!
329!-- For the old version of the microphysics:
330!
331 SUBROUTINE calmict_old(P1D,T1D,Q1D,C1D,FI1D,FR1D,FS1D,CUREFL, &
332 QW1,QI1,QR1,QS1,DBZ1,DBZR1,DBZI1,DBZC1,NLICE1,NRAIN1)
333!-----------------------------------------------------------------------
369 use params_mod, only: dbzmin, epsq, tfrz, eps, rd, d608, oneps, nlimin
370 use ctlblk_mod, only: jsta, jend, jsta_2l, jend_2u, im, &
371 ista, iend, ista_2l, iend_2u
372 use rhgrd_mod, only: rhgrd
373 use cmassi_mod, only: t_ice, rqr_drmin, n0rmin, cn0r_dmrmin, mdrmin, &
374 rqr_drmax,cn0r_dmrmax, mdrmax, n0r0, xmrmin, xmrmax,flarge2, &
375 massi, cn0r0, mdimin, xmimax, mdimax,nlimax
376!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
377 implicit none
378!
379 INTEGER INDEXS, INDEXR
380 REAL, PARAMETER :: Cice=1.634e13
381
382 real,dimension(ista_2l:iend_2u,jsta_2l:jend_2u),intent(in) :: P1D,T1D,Q1D,C1D,FI1D,FR1D, &
383 FS1D,CUREFL
384 real,dimension(ista_2l:iend_2u,jsta_2l:jend_2u),intent(inout) :: QW1,QI1,QR1,QS1,DBZ1,DBZR1,&
385 dbzi1,dbzc1,nlice1,nrain1
386
387 REAL N0r,Ztot,Zrain,Zice,Zconv,Zmin
388 integer I,J
389 real TC, Frain,Fice,Flimass,FLARGE, &
390 fsmall,rimef,xsimass,qice,qsat,esat,wv,rho,rrho,rqr, &
391 drmm,qsigrd,wvqw,dum,xli,qlice,wc,dli,xlimass
392 real,external :: fpvs
393!************************************************************************
394!--- Determine composition of condensate in the form of cloud water,
395! total ice (cloud ice & snow), & rain following GSMDRIVE in NMM model
396!
397 zmin=10.**(0.1*dbzmin)
398 DO j=jsta,jend
399 DO i=ista,iend
400 qw1(i,j)=0.
401 qi1(i,j)=0.
402 qr1(i,j)=0.
403 qs1(i,j)=0.
404 nlice1(i,j)=0.
405 nrain1(i,j)=0.
406 dbz1(i,j)=dbzmin
407 dbzr1(i,j)=dbzmin
408 dbzi1(i,j)=dbzmin
409 dbzc1(i,j)=dbzmin
410 ENDDO
411 ENDDO
412 DO j=jsta,jend
413 DO i=ista,iend
414 zrain=0. !--- Radar reflectivity from rain
415 zice=0. !--- Radar reflectivity from ice
416 zconv=curefl(i,j) !--- Radar reflectivity from convection
417 IF (c1d(i,j) <= epsq) THEN
418!
419!--- Skip rest of calculatiions if no condensate is present
420!
421 GO TO 10
422 ELSE
423 wc=c1d(i,j)
424 ENDIF
425!
426!--- Code below is from GSMDRIVE for determining:
427! QI1 - total ice (cloud ice & snow) mixing ratio
428! QW1 - cloud water mixing ratio
429! QR1 - rain mixing ratio
430!
431 tc=t1d(i,j)-tfrz
432 fice=fi1d(i,j)
433 frain=fr1d(i,j)
434 IF (tc<=t_ice .OR. fice>=1.) THEN
435! IF (Fice>=1.) THEN
436 qi1(i,j)=wc
437 ELSE IF (fice <= 0.) THEN
438 qw1(i,j)=wc
439 ELSE
440 qi1(i,j)=fice*wc
441 qw1(i,j)=wc-qi1(i,j)
442 ENDIF
443 IF (qw1(i,j)>0. .AND. frain>0.) THEN
444 IF (frain >= 1.) THEN
445 qr1(i,j)=qw1(i,j)
446 qw1(i,j)=0.
447 ELSE
448 qr1(i,j)=frain*qw1(i,j)
449 qw1(i,j)=qw1(i,j)-qr1(i,j)
450 ENDIF
451 ENDIF
452 wv=q1d(i,j)/(1.-q1d(i,j))
453!
454!--- Saturation vapor pressure w/r/t water ( >=0C ) or ice ( <0C )
455!
456 esat=1000.*fpvs(t1d(i,j))
457 qsat=eps*esat/(p1d(i,j)-esat)
458 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+d608*q1d(i,j)))
459 rrho=1./rho
460 !
461 !--- Based on code from GSMCOLUMN in model to determine reflectivity from rain
462 !
463 IF (qr1(i,j) > epsq) THEN
464 rqr=rho*qr1(i,j)
465 IF (rqr <= rqr_drmin) THEN
466 n0r=max(n0rmin, cn0r_dmrmin*rqr)
467 indexr=mdrmin
468 ELSE IF (rqr >= rqr_drmax) THEN
469 n0r=cn0r_dmrmax*rqr
470 indexr=mdrmax
471 ELSE
472 n0r=n0r0
473 indexr=max( xmrmin, min(cn0r0*rqr**.25, xmrmax) )
474 ENDIF
475 !
476 !--- INDEXR is the mean drop size in microns; convert to mm
477 !
478 drmm=1.e-3*real(indexr)
479 zrain=0.72*n0r*drmm*drmm*drmm*drmm*drmm*drmm*drmm
480 !
481 !--- Number concentration of rain drops (convert INDEXR to m)
482 !
483 nrain1(i,j)=n0r*1.e-6*real(indexr)
484 ENDIF !--- End IF (QR1(I,J) > EPSQ) block
485!
486!--- Based on code from GSMCOLUMN in model to determine partition of
487! total ice into cloud ice & snow (precipitation ice)
488!
489 IF (qi1(i,j) > epsq) THEN
490 qice=qi1(i,j)
491 rho=p1d(i,j)/(rd*t1d(i,j)*(1.+oneps*q1d(i,j)))
492 rrho=1./rho
493 qsigrd=rhgrd*qsat
494 wvqw=wv+qw1(i,j)
495!
496! * FLARGE - ratio of number of large ice to total (large & small) ice
497! * FSMALL - ratio of number of small ice crystals to large ice particles
498! -> Small ice particles are assumed to have a mean diameter of 50 microns.
499! * XSIMASS - used for calculating small ice mixing ratio
500! * XLIMASS - used for calculating large ice mixing ratio
501! * INDEXS - mean size of snow to the nearest micron (units of microns)
502! * RimeF - Rime Factor, which is the mass ratio of total (unrimed &
503! rimed) ice mass to the unrimed ice mass (>=1)
504! * FLIMASS - mass fraction of large ice
505! * QTICE - time-averaged mixing ratio of total ice
506! * QLICE - time-averaged mixing ratio of large ice
507! * NLICE1 - time-averaged number concentration of large ice
508!
509 IF (tc>=0. .OR. wvqw<qsigrd) THEN
510 flarge=1.
511 ELSE
512 flarge=flarge2 !-- specified in MICROINIT.f
513!! IF (TC>=-8. .AND. TC<=-3.) FLARGE=.5*FLARGE
514 ENDIF
515 fsmall=(1.-flarge)/flarge
516 xsimass=rrho*massi(mdimin)*fsmall
517 dum=xmimax*exp(.0536*tc)
518 indexs=min(mdimax, max(mdimin, int(dum) ) )
519 rimef=amax1(1., fs1d(i,j) )
520 xlimass=rrho*rimef*massi(indexs)
521 flimass=xlimass/(xlimass+xsimass)
522 qlice=flimass*qice
523 nlice1(i,j)=qlice/xlimass
524 IF (nlice1(i,j)<nlimin .OR. nlice1(i,j)>nlimax) THEN
525!
526!--- Force NLICE1 to be between NLImin and NLImax
527!
528 dum=max(nlimin, min(nlimax, nlice1(i,j)) )
529 xli=rho*(qice/dum-xsimass)/rimef
530 IF (xli <= massi(mdimin) ) THEN
531 indexs=mdimin
532 ELSE IF (xli <= massi(450) ) THEN
533 dli=9.5885e5*xli**.42066 ! DLI in microns
534 indexs=min(mdimax, max(mdimin, int(dli) ) )
535 ELSE IF (xli <= massi(mdimax) ) THEN
536 dli=3.9751e6*xli**.49870 ! DLI in microns
537 indexs=min(mdimax, max(mdimin, int(dli) ) )
538 ELSE
539 indexs=mdimax
540!
541!--- 8/22/01: Increase density of large ice if maximum limits
542! are reached for number concentration (NLImax) and mean size
543! (MDImax). Done to increase fall out of ice.
544!
545 IF (dum >= nlimax) &
546 rimef=rho*(qice/nlimax-xsimass)/massi(indexs)
547 ENDIF ! End IF (XLI <= MASSI(MDImin) )
548 xlimass=rrho*rimef*massi(indexs)
549 flimass=xlimass/(xlimass+xsimass)
550 qlice=flimass*qice
551 nlice1(i,j)=qlice/xlimass
552 ENDIF ! End IF (NLICE<NLImin ...
553 qs1(i,j)=amin1(qi1(i,j), qlice)
554 qi1(i,j)=amax1(0., qi1(i,j)-qs1(i,j))
555 !
556 !--- Equation (C.8) in Ferrier (1994, JAS, p. 272), which when
557 ! converted from cgs units to mks units results in the same
558 ! value for Cice, which is equal to the {} term below:
559 !
560 ! Zi={.224*720*(10**18)/[(PI*RHOL)**2]}*(RHO*QLICE)**2/NLICE1(I,J),
561 ! where RHOL=1000 kg/m**3 is the density of liquid water
562 !
563 !--- Valid only for exponential ice distributions
564 !
565 zice=cice*rho*rho*qlice*qlice/nlice1(i,j)
566 ENDIF ! End IF (QI1(I,J) > 0.) THEN
567!
568!--- Calculate total (convective + grid-scale) radar reflectivity
56910 ztot=zrain+zice+zconv
570 IF (ztot > zmin) dbz1(i,j)= 10.*alog10(ztot)
571 IF (zrain > zmin) dbzr1(i,j)=10.*alog10(zrain)
572 IF (zice > zmin) dbzi1(i,j)=10.*alog10(zice)
573 IF (zconv > zmin) dbzc1(i,j)=10.*alog10(zconv)
574 ENDDO
575 ENDDO
576!
577 RETURN
578 END
subroutine calmict_new(p1d, t1d, q1d, c1d, fi1d, fr1d, fs1d, curefl, qw1, qi1, qr1, qs1, dbz1, dbzr1, dbzi1, dbzc1, nlice1, nrain1)
Subroutine that computes hydrometeors.
Definition CALMICT.f:67
subroutine calmict_old(p1d, t1d, q1d, c1d, fi1d, fr1d, fs1d, curefl, qw1, qi1, qr1, qs1, dbz1, dbzr1, dbzi1, dbzc1, nlice1, nrain1)
Definition CALMICT.f:333
real function fpvs(t)
fpvs() computes saturation vapor pressure.
Definition GPVS.f:85