1 !WRF:MODEL_LAYER:PHYSICS
3 !--- The code is based on Lin and Colle (A New Bulk Microphysical Scheme
4 ! that Includes Riming Intensity and Temperature Dependent Ice Characteristics, 2011, MWR)
5 ! and Lin et al. (Parameterization of riming intensity and its impact on ice fall speed using ARM data, 2011, MWR)
6 !--- NOTE: 1) Prognose variables are: qi,PI(precipitating ice, qs, which includes snow, partially rimed snow and graupel),qw,qr
7 !--- 2) Sedimentation flux is based on Prudue Lin scheme
8 !--- 2) PI has varying properties depending on riming intensity (Ri, diagnosed currently following Lin et al. (2011, MWR) and T
9 !--- 3) Autoconverion is based on Liu and Daum (2004)
10 !--- 4) PI size distribution assuming Gamma distribution, but mu_s=0 (Exponential) currently
11 !--- 5) No density dependent fall speed since the V-D is derived using Best number approach, which already includes density effect
12 !--- 6) Future work will include radar equivalent reflectivity using the new PI property (A-D, M-D, N(D)). If you use RIP for reflectivity
13 !--- computation, please note that snow is (1-Ri)*qs and graupel is Ri*qs. Otherwise, reflectivity will be underestimated.
14 !--- 7) The Liu and Daum autoconverion is quite sensitive on Nt_c. For mixed-phase cloud and marine environment, Nt_c of 10 or 20 is suggested.
15 !--- default value is 10E.6. Change accordingly for your use.
18 MODULE module_mp_sbu_ylin
21 !..Parameters user might change based on their need
22 REAL, PARAMETER, PRIVATE :: RH = 1.0
23 REAL, PARAMETER, PRIVATE :: xnor = 8.0e6
24 REAL, PARAMETER, PRIVATE :: Nt_c = 10.E6
25 !..Water vapor and air gas constants at constant pressure
26 REAL, PARAMETER, PRIVATE :: Rvapor = 461.5
27 REAL, PARAMETER, PRIVATE :: oRv = 1./Rvapor
28 REAL, PARAMETER, PRIVATE :: Rair = 287.04
29 REAL, PARAMETER, PRIVATE :: Cp = 1004.0
30 REAL, PARAMETER, PRIVATE :: grav = 9.81
31 REAL, PARAMETER, PRIVATE :: rhowater = 1000.0
32 REAL, PARAMETER, PRIVATE :: rhosnow = 100.0
34 REAL, PARAMETER, PRIVATE :: SVP1=0.6112
35 REAL, PARAMETER, PRIVATE :: SVP2=17.67
36 REAL, PARAMETER, PRIVATE :: SVP3=29.65
37 REAL, PARAMETER, PRIVATE :: SVPT0=273.15
38 REAL, PARAMETER, PRIVATE :: EP1=Rvapor/Rair-1.
39 REAL, PARAMETER, PRIVATE :: EP2=Rair/Rvapor
40 !..Enthalpy of sublimation, vaporization, and fusion at 0C.
41 REAL, PARAMETER, PRIVATE :: XLS = 2.834E6
42 REAL, PARAMETER, PRIVATE :: XLV = 2.5E6
43 REAL, PARAMETER, PRIVATE :: XLF = XLS - XLV
46 REAL, PARAMETER, PRIVATE :: &
47 qi0 = 1.0e-3, & !--- ice aggregation to snow threshold
48 xmi50 = 4.8e-10, xmi40 = 2.46e-10, &
49 xni0 = 1.0e-2, xmnin = 1.05e-18, bni = 0.5, &
50 di50 = 1.0e-4, xmi = 4.19e-13, & !--- parameters used in BF process
51 bv_r = 0.8, bv_i = 0.25, &
52 o6 = 1./6., cdrag = 0.6, &
53 avisc = 1.49628e-6, adiffwv = 8.7602e-5, &
54 axka = 1.4132e3, cw = 4.187e3, ci = 2.093e3
57 !-------------------------------------------------------------------
58 ! Lin et al., 1983, JAM, 1065-1092, and
59 ! Rutledge and Hobbs, 1984, JAS, 2949-2972
60 !-------------------------------------------------------------------
61 SUBROUTINE sbu_ylin(th &
68 ,ids,ide, jds,jde, kds,kde &
69 ,ims,ime, jms,jme, kms,kme &
70 ,its,ite, jts,jte, kts,kte &
72 !-------------------------------------------------------------------
74 !-------------------------------------------------------------------
77 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde , &
78 ims,ime, jms,jme, kms,kme , &
79 its,ite, jts,jte, kts,kte
81 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
89 ! Adding RI3D as a variable to the interface
90 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
95 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
103 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN) :: ht
104 REAL, INTENT(IN ) :: dt_in
106 REAL, DIMENSION( ims:ime , jms:jme ), &
107 INTENT(INOUT) :: RAINNC, &
112 INTEGER :: min_q, max_q
114 REAL, DIMENSION( its:ite , jts:jte ) &
117 REAL, DIMENSION( kts:kte ) :: qvz, qlz, qrz, &
125 ! Added vertical profile of Ri (riz) as a variable
126 REAL, DIMENSION( kts:kte ) :: riz
129 REAL :: dt, pptice, pptrain, pptsnow, pptgraul, rhoe_s
136 j_loop: DO j = jts, jte
137 i_loop: DO i = its, ite
139 !- write data from 3-D to 1-D
151 ! sqrhoz(k)=sqrt(rhoe_s*orhoz(k))
152 ! no density dependence of fall speed as Note #5, you can turn it on to increase fall speed at low pressure.
163 ! CALL wrf_debug ( 100 , 'microphysics_driver: calling clphy1d_ylin' )
165 CALL clphy1d_ylin( dt, qvz, qlz, qrz, qiz, qsz, &
166 thz, tothz, rhoz, orhoz, sqrhoz, &
167 prez, zz, dzw, ht(I,J), &
168 pptrain, pptsnow, pptice, &
169 kts, kte, i, j, riz )
172 ! Precipitation from cloud microphysics -- only for one time step
174 ! unit is transferred from m to mm
180 RAINNCV(i,j)= pptrain + pptsnow + pptice
181 RAINNC(i,j) = RAINNC(i,j) + pptrain + pptsnow + pptice
184 !- update data from 1-D back to 3-D
199 END SUBROUTINE sbu_ylin
202 !-----------------------------------------------------------------------
203 SUBROUTINE clphy1d_ylin(dt, qvz, qlz, qrz, qiz, qsz, &
204 thz, tothz, rho, orho, sqrho, &
205 prez, zz, dzw, zsfc, pptrain, pptsnow,pptice, &
207 !-----------------------------------------------------------------------
209 !-----------------------------------------------------------------------
210 ! This program handles the vertical 1-D cloud micphysics
211 !-----------------------------------------------------------------------
212 ! avisc: constant in empirical formular for dynamic viscosity of air
213 ! =1.49628e-6 [kg/m/s] = 1.49628e-5 [g/cm/s]
214 ! adiffwv: constant in empirical formular for diffusivity of water
216 ! = 8.7602e-5 [kgm/s3] = 8.7602 [gcm/s3]
217 ! axka: constant in empirical formular for thermal conductivity of air
218 ! = 1.4132e3 [m2/s2/K] = 1.4132e7 [cm2/s2/K]
219 ! qi0: mixing ratio threshold for cloud ice aggregation [kg/kg]
220 ! xmi50: mass of a 50 micron ice crystal
221 ! = 4.8e-10 [kg] =4.8e-7 [g]
222 ! xmi40: mass of a 40 micron ice crystal
223 ! = 2.46e-10 [kg] = 2.46e-7 [g]
224 ! di50: diameter of a 50 micro (radius) ice crystal
226 ! xmi: mass of one cloud ice crystal
227 ! =4.19e-13 [kg] = 4.19e-10 [g]
230 ! xni0=1.0e-2 [m-3] The value given in Lin et al. is wrong.(see
231 ! Hsie et al.(1980) and Rutledge and Hobbs(1983) )
233 ! xmnin: mass of a natural ice nucleus
234 ! = 1.05e-18 [kg] = 1.05e-15 [g] This values is suggested by
236 ! = 1.0e-12 [kg] suggested by Rutlegde and Hobbs (1983)
238 ! av_r: av_r in empirical formular for terminal
239 ! velocity of raindrop
240 ! =2115.0 [cm**(1-b)/s] = 2115.0*0.01**(1-b) [m**(1-b)/s]
241 ! bv_r: bv_r in empirical formular for terminal
242 ! velocity of raindrop
244 ! av_i: av_i in empirical formular for terminal
246 ! =152.93 [cm**(1-d)/s] = 152.93*0.01**(1-d) [m**(1-d)/s]
247 ! bv_i: bv_i in empirical formular for terminal
250 ! vf1r: ventilation factors for rain =0.78
251 ! vf2r: ventilation factors for rain =0.31
252 ! vf1s: ventilation factors for snow =0.65
253 ! vf2s: ventilation factors for snow =0.44
255 !----------------------------------------------------------------------
257 INTEGER, INTENT(IN ) :: kts, kte, i, j
259 REAL, DIMENSION( kts:kte ), &
260 INTENT(INOUT) :: qvz, qlz, qrz, qiz, qsz, &
263 REAL, DIMENSION( kts:kte ), &
264 INTENT(IN ) :: tothz, rho, orho, sqrho, &
268 REAL, INTENT(INOUT) :: pptrain, pptsnow, pptice
270 REAL, INTENT(IN ) :: dt, zsfc
274 REAL :: obp4, bp3, bp5, bp6, odp4, &
279 REAL :: tmp, tmp0, tmp1, tmp2,tmp3, &
280 tmp4, tmpa,tmpb,tmpc,tmpd,alpha1, &
281 qic, abi,abr, abg, odtberg, &
282 vti50,eiw,eri,esi,esr, esw, &
283 erw,delrs,term0,term1, &
285 factor, tmp_r, tmp_s,tmp_g, &
286 qlpqi, rsat, a1, a2, xnin
289 REAL, DIMENSION( kts:kte ) :: oprez, tem, temcc, theiz, qswz, &
290 qsiz, qvoqswz, qvoqsiz, qvzodt, &
291 qlzodt, qizodt, qszodt, qrzodt
293 !--- microphysical processes
295 REAL, DIMENSION( kts:kte ) :: psnow, psaut, psfw, psfi, praci, &
296 piacr, psaci, psacw, psdep, pssub, &
297 pracs, psacr, psmlt, psmltevp, &
298 prain, praut, pracw, prevp, pvapor, &
299 pclw, pladj, pcli, pimlt, pihom, &
304 REAL, DIMENSION( kts:kte ) :: qvsbar, rs0, viscmu, visc, diffwv, &
306 !---- new snow parameters
308 REAL, DIMENSION( kts:kte ):: ab_s,ab_r,ab_riming,lamc
309 REAL, DIMENSION( kts:kte ):: cap_s !---- capacitance of snow
311 REAL, PARAMETER :: vf1s = 0.65, vf2s = 0.44, vf1r =0.78 , vf2r = 0.31
313 REAL, PARAMETER :: am_c1=0.004, am_c2= 6e-5, am_c3=0.15
314 REAL, PARAMETER :: bm_c1=1.85, bm_c2= 0.003, bm_c3=1.25
315 REAL, PARAMETER :: aa_c1=1.28, aa_c2= -0.012, aa_c3=-0.6
316 REAL, PARAMETER :: ba_c1=1.5, ba_c2= 0.0075, ba_c3=0.5
318 REAL, PARAMETER :: best_a=1.08 , best_b = 0.499
319 REAL, DIMENSION(kts:kte):: am_s,bm_s,av_s,bv_s,Ri,N0_s,tmp_ss,lams
320 REAL, DIMENSION(kts:kte):: aa_s,ba_s,tmp_sa
321 REAL, PARAMETER :: mu_s=0.,mu_i=0.,mu_r=0.
323 REAL :: tc0, disp, Dc_liu, eta, mu_c, R6c !--- for Liu's autoconversion
325 ! Adding variable Riz, which will duplicate Ri but be a copy passed upward
327 REAL, DIMENSION(kts:kte) :: Riz
329 REAL, DIMENSION( kts:kte ) :: vtr, vts, &
330 vtrold, vtsold, vtiold, &
331 xlambdar, xlambdas, &
334 REAL :: episp0k, dtb, odtb, pi, pio4, &
335 pio6, oxLf, xLvocp, xLfocp, av_r, &
336 av_i, ocdrag, gambp4, gamdp4, &
337 gam4pt5, Cpor, oxmi, gambp3, gamdp3,&
338 gambp6, gam3pt5, gam2pt75, gambp5o2,&
339 gamdp5o2, cwoxlf, ocp, xni50, es
342 REAL :: temc1,save1,save2,xni50mx
344 ! for terminal velocity flux
346 INTEGER :: min_q, max_q, max_ri_k, k
348 REAL :: t_del_tv, del_tv, flux, fluxin, fluxout ,tmpqrz
351 mu_c = AMIN1(15., (1000.E6/Nt_c + 2.))
352 R6c = 10.0E-6 !---- 10 micron, threshold radius of cloud droplet
365 av_r=2115.0*0.01**(1-bv_r)
366 av_i=152.93*0.01**(1-bv_i)
368 episp0k=RH*ep2*1000.*svp1
370 gambp4=ggamma(bv_r+4.)
371 gamdp4=ggamma(bv_i+4.)
372 gambp3=ggamma(bv_r+3.)
373 gambp6=ggamma(bv_r+6)
374 gambp5o2=ggamma((bv_r+5.)/2.)
375 gamdp5o2=ggamma((bv_i+5.)/2.)
377 ! oprez 1./prez ( prez : pressure)
378 ! qsw saturated mixing ratio on water surface
379 ! qsi saturated mixing ratio on ice surface
380 ! episp0k RH*e*saturated pressure at 273.15 K = 611.2 hPa (Rogers and Yau 1989)
388 ! temcc temperature in dregee C
402 qlz(k)=amax1( 0.0,qlz(k) )
403 qiz(k)=amax1( 0.0,qiz(k) )
404 qvz(k)=amax1( qvmin,qvz(k) )
405 qsz(k)=amax1( 0.0,qsz(k) )
406 qrz(k)=amax1( 0.0,qrz(k) )
407 tem(k)=thz(k)*tothz(k)
408 temcc(k)=tem(k)-273.15
409 es=1000.*svp1*exp( svp2*temcc(k)/(tem(k)-svp3) ) !--- RY89 Eq(2.17)
410 qswz(k)=ep2*es/(prez(k)-es)
411 if (tem(k) .lt. 273.15 ) then
412 es=1000.*svp1*exp( 21.8745584*(tem(k)-273.16)/(tem(k)-7.66) )
413 qsiz(k)=ep2*es/(prez(k)-es)
414 if (temcc(k) .lt. -40.0) qswz(k)=qsiz(k)
419 qvoqswz(k)=qvz(k)/qswz(k)
420 qvoqsiz(k)=qvz(k)/qsiz(k)
421 qvzodt(k)=amax1( 0.0,odtb*qvz(k) )
422 qlzodt(k)=amax1( 0.0,odtb*qlz(k) )
423 qizodt(k)=amax1( 0.0,odtb*qiz(k) )
424 qszodt(k)=amax1( 0.0,odtb*qsz(k) )
425 qrzodt(k)=amax1( 0.0,odtb*qrz(k) )
426 theiz(k)=thz(k)+(xlvocp*qvz(k)-xlfocp*qiz(k))/tothz(k)
467 !***********************************************************************
468 !***** compute viscosity,difusivity,thermal conductivity, and ******
469 !***** Schmidt number ******
470 !***********************************************************************
471 !c------------------------------------------------------------------
472 !c viscmu: dynamic viscosity of air kg/m/s
473 !c visc: kinematic viscosity of air = viscmu/rho (m2/s)
474 !c avisc=1.49628e-6 kg/m/s=1.49628e-5 g/cm/s
475 !c viscmu=1.718e-5 kg/m/s in RH
476 !c diffwv: Diffusivity of water vapor in air
477 !c adiffwv = 8.7602e-5 (8.794e-5 in MM5) kgm/s3
478 !c = 8.7602 (8.794 in MM5) gcm/s3
479 !c diffwv(k)=2.26e-5 m2/s
480 !c schmidt: Schmidt number=visc/diffwv
481 !c xka: thermal conductivity of air J/m/s/K (Kgm/s3/K)
482 !c xka(k)=2.43e-2 J/m/s/K in RH
483 !c axka=1.4132e3 (1.414e3 in MM5) m2/s2/k = 1.4132e7 cm2/s2/k
484 !c------------------------------------------------------------------
486 viscmu(k)=avisc*tem(k)**1.5/(tem(k)+120.0)
487 visc(k)=viscmu(k)*orho(k)
488 diffwv(k)=adiffwv*tem(k)**1.81*oprez(k)
489 schmidt(k)=visc(k)/diffwv(k)
490 xka(k)=axka*viscmu(k)
491 rs0(k)=ep2*1000.*svp1/(prez(k)-1000.*svp1)
494 ! ---- YLIN, set snow variables
496 !---- A+B in depositional growth, the first try just take from Rogers and Yau(1989)
497 ! ab_s(k) = lsub*lsub*orv/(tcond(k)*temp(k))+&
498 ! rv*temp(k)/(diffu(k)*qvsi(k))
502 if (rho(k)*qlz(k) .gt. 1e-5 .AND. rho(k)*qsz(k) .gt. 1e-5) then
503 Ri(k) = 1.0/(1.0+6e-5/(rho(k)**1.170*qlz(k)*qsz(k)**0.170))
509 !--- make sure Ri does not decrease downward in a column
511 max_ri_k = MAXLOC(Ri,dim=1)
518 !--- YLIN, get PI properties
520 Ri(k) = AMAX1(0.,AMIN1(Ri(k),1.0))
521 ! Store the value of Ri(k) as Riz(k)
524 cap_s(k)= 0.25*(1+Ri(k))
525 tc0 = AMIN1(-0.1, tem(k)-273.15)
526 N0_s(k) = amin1(2.0E8, 2.0E6*exp(-0.12*tc0))
527 am_s(k) = am_c1+am_c2*tc0+am_c3*Ri(k)*Ri(k) !--- Heymsfield 2007
528 am_s(k) = AMAX1(0.000023,am_s(k)) !--- use the a_min in table 1 of Heymsfield
529 bm_s(k) = bm_c1+bm_c2*tc0+bm_c3*Ri(k)
530 bm_s(k) = AMIN1(bm_s(k),3.0) !---- capped by 3
531 !--- converting from cgs to SI unit
532 am_s(k) = 10**(2*bm_s(k)-3.0)*am_s(k)
533 aa_s(k) = aa_c1 + aa_c2*tc0 + aa_c3*Ri(k)
534 ba_s(k) = ba_c1 + ba_c2*tc0 + ba_c3*Ri(k)
535 !--- convert to SI unit as in paper
536 aa_s(k) = (1e-2)**(2.0-ba_s(k))*aa_s(k)
537 !---- get v from Mitchell 1996
538 av_s(k) = best_a*viscmu(k)*(2*grav*am_s(k)/rho(k)/aa_s(k)/(viscmu(k)**2))**best_b
539 bv_s(k) = best_b*(bm_s(k)-ba_s(k)+2)-1
541 tmp_ss(k)= bm_s(k)+mu_s+1
542 tmp_sa(k)= ba_s(k)+mu_s+1
547 !***********************************************************************
548 ! Calculate precipitation fluxes due to terminal velocities.
549 !***********************************************************************
551 !- Calculate termianl velocity (vt?) of precipitation q?z
552 !- Find maximum vt? to determine the small delta t
556 ! CALL wrf_debug ( 100 , 'module_ylin, start precip fluxes' )
568 if (qrz(k) .gt. 1.0e-8) then
571 tmp1=sqrt(pi*rhowater*xnor/rho(k)/qrz(k))
573 vtrold(k)=o6*av_r*gambp4*sqrho(k)/tmp1**bv_r
575 del_tv=amin1(del_tv,0.9*(zz(k)-zsfc)/vtrold(k))
577 del_tv=amin1(del_tv,0.9*(zz(k)-zz(k-1))/vtrold(k))
584 if (max_q .ge. min_q) then
586 !- Check if the summation of the small delta t >= big delta t
587 ! (t_del_tv) (del_tv) (dtb)
589 t_del_tv=t_del_tv+del_tv
591 if ( t_del_tv .ge. dtb ) then
593 del_tv=dtb+del_tv-t_del_tv
598 fluxout=rho(k)*vtrold(k)*qrz(k)
599 flux=(fluxin-fluxout)/rho(k)/dzw(k)
601 qrz(k)=qrz(k)+del_tv*flux
604 if (min_q .eq. 1) then
605 pptrain=pptrain+fluxin*del_tv
607 qrz(min_q-1)=qrz(min_q-1)+del_tv* &
608 fluxin/rho(min_q-1)/dzw(min_q-1)
629 if (qsz(k) .gt. 1.0e-8) then
633 tmp1= (am_s(k)*N0_s(k)*ggamma(tmp_ss(k))*orho(k)/qsz(k))&
636 vtsold(k)= sqrho(k)*av_s(k)*ggamma(bv_s(k)+tmp_ss(k))/ &
637 ggamma(tmp_ss(k))/(tmp1**bv_s(k))
640 del_tv=amin1(del_tv,0.9*(zz(k)-zsfc)/vtsold(k))
642 del_tv=amin1(del_tv,0.9*(zz(k)-zz(k-1))/vtsold(k))
649 if (max_q .ge. min_q) then
652 !- Check if the summation of the small delta t >= big delta t
653 ! (t_del_tv) (del_tv) (dtb)
655 t_del_tv=t_del_tv+del_tv
657 if ( t_del_tv .ge. dtb ) then
659 del_tv=dtb+del_tv-t_del_tv
664 fluxout=rho(k)*vtsold(k)*qsz(k)
665 flux=(fluxin-fluxout)/rho(k)/dzw(k)
666 qsz(k)=qsz(k)+del_tv*flux
667 qsz(k)=amax1(0.,qsz(k))
670 if (min_q .eq. 1) then
671 pptsnow=pptsnow+fluxin*del_tv
673 qsz(min_q-1)=qsz(min_q-1)+del_tv* &
674 fluxin/rho(min_q-1)/dzw(min_q-1)
684 !-- cloud ice (03/21/02) using Heymsfield and Donner (1990) Vi=3.29*qi^0.16
696 if (qiz(k) .gt. 1.0e-8) then
699 vtiold(k)= 3.29 * (rho(k)* qiz(k))** 0.16 ! Heymsfield and Donner
701 del_tv=amin1(del_tv,0.9*(zz(k)-zsfc)/vtiold(k))
703 del_tv=amin1(del_tv,0.9*(zz(k)-zz(k-1))/vtiold(k))
710 if (max_q .ge. min_q) then
712 !- Check if the summation of the small delta t >= big delta t
713 ! (t_del_tv) (del_tv) (dtb)
715 t_del_tv=t_del_tv+del_tv
717 if ( t_del_tv .ge. dtb ) then
719 del_tv=dtb+del_tv-t_del_tv
724 fluxout=rho(k)*vtiold(k)*qiz(k)
725 flux=(fluxin-fluxout)/rho(k)/dzw(k)
726 qiz(k)=qiz(k)+del_tv*flux
727 qiz(k)=amax1(0.,qiz(k))
730 if (min_q .eq. 1) then
731 pptice=pptice+fluxin*del_tv
733 qiz(min_q-1)=qiz(min_q-1)+del_tv* &
734 fluxin/rho(min_q-1)/dzw(min_q-1)
743 ! CALL wrf_debug ( 100 , 'module_ylin: end precip flux' )
745 ! Microphpysics processes
749 qvzodt(k)=amax1( 0.0,odtb*qvz(k) )
750 qlzodt(k)=amax1( 0.0,odtb*qlz(k) )
751 qizodt(k)=amax1( 0.0,odtb*qiz(k) )
752 qszodt(k)=amax1( 0.0,odtb*qsz(k) )
753 qrzodt(k)=amax1( 0.0,odtb*qrz(k) )
755 !***********************************************************************
756 !***** diagnose mixing ratios (qrz,qsz), terminal *****
757 !***** velocities (vtr,vts), and slope parameters in size *****
758 !***** distribution(xlambdar,xlambdas) of rain and snow *****
759 !***** follows Nagata and Ogura, 1991, MWR, 1309-1337. Eq (A7) *****
760 !***********************************************************************
762 !**** assuming no cloud water can exist in the top two levels due to
763 !**** radiation consideration
767 !! no cloud water, rain, ice, snow
769 !! skip these processes and jump to line 2000
772 tmp=qiz(k)+qlz(k)+qsz(k)+qrz(k)
773 if( qvz(k)+qlz(k)+qiz(k) .lt. qsiz(k) &
774 .and. tmp .eq. 0.0 ) go to 2000
776 !! calculate terminal velocity of rain
778 if (qrz(k) .gt. 1.0e-8) then
779 tmp1=sqrt(pi*rhowater*xnor*orho(k)/qrz(k))
780 xlambdar(k)=sqrt(tmp1)
781 olambdar(k)=1.0/xlambdar(k)
782 vtrold(k)=o6*av_r*gambp4*sqrho(k)*olambdar(k)**bv_r
788 if (qrz(k) .gt. 1.0e-8) then
789 tmp1=sqrt(pi*rhowater*xnor*orho(k)/qrz(k))
790 xlambdar(k)=sqrt(tmp1)
791 olambdar(k)=1.0/xlambdar(k)
792 vtr(k)=o6*av_r*gambp4*sqrho(k)*olambdar(k)**bv_r
798 !! calculate terminal velocity of snow
800 if (qsz(k) .gt. 1.0e-8) then
801 tmp1= (am_s(k)*N0_s(k)*ggamma(tmp_ss(k))*orho(k)/qsz(k))&
804 vtsold(k)= sqrho(k)*av_s(k)*ggamma(bv_s(k)+tmp_ss(k))/ &
805 ggamma(tmp_ss(k))/(tmp1**bv_s(k))
812 if (qsz(k) .gt. 1.0e-8) then
813 tmp1= (am_s(k)*N0_s(k)*ggamma(tmp_ss(k))*orho(k)/qsz(k))&
816 vts(k)= sqrho(k)*av_s(k)*ggamma(bv_s(k)+tmp_ss(k))/ &
817 ggamma(tmp_ss(k))/(tmp1**bv_s(k))
824 !---------- start of snow/ice processes below freezing
826 if (tem(k) .lt. 273.15) then
829 !***********************************************************************
830 !********* snow production processes for T < 0 C **********
831 !***********************************************************************
833 !c (1) ICE CRYSTAL AGGREGATION TO SNOW (Psaut): Lin (21)
834 !c! psaut=alpha1*(qi-qi0)
835 !c! alpha1=1.0e-3*exp(0.025*(T-T0))
837 alpha1=1.0e-3*exp( 0.025*temcc(k) )
839 if(temcc(k) .lt. -20.0) then
840 tmp1=-7.6+4.0*exp( -0.2443e-3*(abs(temcc(k))-20)**2.455 )
841 qic=1.0e-3*exp(tmp1)*orho(k)
846 tmp1=odtb*(qiz(k)-qic)*(1.0-exp(-alpha1*dtb))
847 psaut(k)=amax1( 0.0,tmp1 )
850 !c (2) BERGERON PROCESS TRANSFER OF CLOUD WATER TO SNOW (Psfw)
851 !c this process only considered when -31 C < T < 0 C
852 !c Lin (33) and Hsie (17)
855 !c! parama1 and parama2 functions must be user supplied
858 if( qlz(k) .gt. 1.0e-10 ) then
859 temc1=amax1(-30.99,temcc(k))
863 !! change unit from cgs to mks
865 !! dtberg is the time needed for a crystal to grow from 40 to 50 um
866 !! odtberg=1.0/dtberg
867 odtberg=(a1*tmp1)/(xmi50**tmp1-xmi40**tmp1)
869 !! compute terminal velocity of a 50 micron ice cystal
871 vti50=av_i*di50**bv_i*sqrho(k)
875 save2=0.25*pi*eiw*rho(k)*di50*di50*vti50
877 tmp2=( save1 + save2*qlz(k) )
879 !! maximum number of 50 micron crystals limited by the amount
880 !! of supercool water
882 xni50mx=qlzodt(k)/tmp2
884 !! number of 50 micron crystals produced
886 xni50=qiz(k)*( 1.0-exp(-dtb*odtberg) )/xmi50
887 xni50=amin1(xni50,xni50mx)
889 tmp3=odtb*tmp2/save2*( 1.0-exp(-save2*xni50*dtb) )
890 psfw(k)=amin1( tmp3,qlzodt(k) )
892 !c (3) REDUCTION OF CLOUD ICE BY BERGERON PROCESS (Psfi): Lin (34)
893 !c this process only considered when -31 C < T < 0 C
895 tmp1=xni50*xmi50-psfw(k)
896 psfi(k)=amin1(tmp1,qizodt(k))
900 if(qrz(k) .le. 0.0) go to 1000
902 ! Processes (4) and (5) only need when qrz > 0.0
905 !c (4) CLOUD ICE ACCRETION BY RAIN (Praci): Lin (25)
909 save1=pio4*eri*xnor*av_r*sqrho(k)
910 tmp1=save1*gambp3*olambdar(k)**bp3
911 praci(k)=qizodt(k)*( 1.0-exp(-tmp1*dtb) )
914 !c (5) RAIN ACCRETION BY CLOUD ICE (Piacr): Lin (26)
916 tmp2=qiz(k)*save1*rho(k)*pio6*rhowater*gambp6*oxmi* &
918 piacr(k)=amin1( tmp2,qrzodt(k) )
923 if(qsz(k) .le. 0.0) go to 1200
925 ! Compute the following processes only when qsz > 0.0
928 !c (6) ICE CRYSTAL ACCRETION BY SNOW (Psaci): Lin (22)
930 esi=exp( 0.025*temcc(k) )
931 save1 = aa_s(k)*sqrho(k)*N0_s(k)* &
932 ggamma(bv_s(k)+tmp_sa(k))*olambdas(k)**(bv_s(k)+tmp_sa(k))
935 psaci(k)=qizodt(k)*( 1.0-exp(-tmp1*dtb) )
938 !c (7) CLOUD WATER ACCRETION BY SNOW (Psacw): Lin (24)
942 psacw(k)=qlzodt(K)*( 1.0-exp(-tmp1*dtb) )
945 !c (8) DEPOSITION/SUBLIMATION OF SNOW (Psdep/Pssub): Lin (31)
946 !c includes consideration of ventilation effect
948 tmpa=rvapor*xka(k)*tem(k)*tem(k)
949 tmpb=xls*xls*rho(k)*qsiz(k)*diffwv(k)
950 tmpc=tmpa*qsiz(k)*diffwv(k)
951 abi=4.0*pi*cap_s(k)*(qvoqsiz(k)-1.0)*tmpc/(tmpa+tmpb)
952 tmp1=av_s(k)*sqrho(k)*olambdas(k)**(5+bv_s(k)+2*mu_s)/visc(k)
954 !---- YLIN, here there is some approximation assuming mu_s =1, so gamma(2)=1, etc.
956 tmp2= abi*N0_s(k)*( vf1s*olambdas(k)*olambdas(k)+ &
957 vf2s*schmidt(k)**0.33334* &
958 ggamma(2.5+0.5*bv_s(k)+mu_s)*sqrt(tmp1) )
960 tmp3=odtb*( qvz(k)-qsiz(k) )
962 if( tmp2 .le. 0.0) then
963 tmp2=amax1( tmp2,tmp3)
964 pssub(k)=amax1( tmp2,-qszodt(k) )
967 psdep(k)=amin1( tmp2,tmp3 )
972 if(qrz(k) .le. 0.0) go to 1200
974 ! Compute processes (9) and (10) only when qsz > 0.0 and qrz > 0.0
975 ! these two terms need to be refined in the future, they should be equal
977 !c (9) ACCRETION OF SNOW BY RAIN (Pracs): Lin (27)
980 tmpa=olambdar(k)*olambdar(k)
981 tmpb=olambdas(k)*olambdas(k)
982 tmpc=olambdar(k)*olambdas(k)
983 tmp1=pi*pi*esr*xnor*N0_s(k)*abs( vtr(k)-vts(k) )*orho(k)
984 tmp2=tmpb*tmpb*olambdar(k)*(5.0*tmpb+2.0*tmpc+0.5*tmpa)
985 tmp3=tmp1*rhosnow*tmp2
986 pracs(k)=amin1( tmp3,qszodt(k) )
989 !c (10) ACCRETION OF RAIN BY SNOW (Psacr): Lin (28)
991 tmp3=tmpa*tmpa*olambdas(k)*(5.0*tmpa+2.0*tmpc+0.5*tmpb)
992 tmp4=tmp1*rhowater*tmp3
993 psacr(k)=amin1( tmp4,qrzodt(k) )
996 !c (2) FREEZING OF RAIN TO FORM GRAUPEL (pgfr): Lin (45), added to PI
998 !c Constant in Bigg freezing Aplume=Ap=0.66 /k
999 !c Constant in raindrop freezing equ. Bplume=Bp=100./m/m/m/s
1002 if (qrz(k) .gt. 1.e-8 ) then
1005 tmp1=olambdar(k)*olambdar(k)*olambdar(k)
1006 tmp2=20.*pi*pi*Bp*xnor*rhowater*orho(k)* &
1007 (exp(-Ap*temcc(k))-1.0)*tmp1*tmp1*olambdar(k)
1008 pgfr(k)=amin1( tmp2,qrzodt(k) )
1019 !***********************************************************************
1020 !********* snow production processes for T > 0 C **********
1021 !***********************************************************************
1023 if (qsz(k) .le. 0.0) go to 1400
1025 !c (1) CLOUD WATER ACCRETION BY SNOW (Psacw): Lin (24)
1029 save1 =aa_s(k)*sqrho(k)*N0_s(k)* &
1030 ggamma(bv_s(k)+tmp_sa(k))*olambdas(k)**(bv_s(k)+tmp_sa(k))
1033 psacw(k)=qlzodt(k)*( 1.0-exp(-tmp1*dtb) )
1036 !c (2) ACCRETION OF RAIN BY SNOW (Psacr): Lin (28)
1039 tmpa=olambdar(k)*olambdar(k)
1040 tmpb=olambdas(k)*olambdas(k)
1041 tmpc=olambdar(k)*olambdas(k)
1042 tmp1=pi*pi*esr*xnor*N0_s(k)*abs( vtr(k)-vts(k) )*orho(k)
1043 tmp2=tmpa*tmpa*olambdas(k)*(5.0*tmpa+2.0*tmpc+0.5*tmpb)
1044 tmp3=tmp1*rhowater*tmp2
1045 psacr(k)=amin1( tmp3,qrzodt(k) )
1047 !c (3) MELTING OF SNOW (Psmlt): Lin (32)
1048 !c Psmlt is negative value
1051 term1=2.0*pi*orho(k)*( xlv*diffwv(k)*rho(k)*delrs- &
1053 tmp1= av_s(k)*sqrho(k)*olambdas(k)**(5+bv_s(k)+2*mu_s)/visc(k)
1054 tmp2= N0_s(k)*( vf1s*olambdas(k)*olambdas(k)+ &
1055 vf2s*schmidt(k)**0.33334* &
1056 ggamma(2.5+0.5*bv_s(k)+mu_s)*sqrt(tmp1) )
1057 tmp3=term1*oxlf*tmp2-cwoxlf*temcc(k)*( psacw(k)+psacr(k) )
1058 tmp4=amin1(0.0,tmp3)
1059 psmlt(k)=amax1( tmp4,-qszodt(k) )
1061 !c (4) EVAPORATION OF MELTING SNOW (Psmltevp): HR (A27)
1062 !c but use Lin et al. coefficience
1063 !c Psmltevp is a negative value
1065 tmpa=rvapor*xka(k)*tem(k)*tem(k)
1066 tmpb=xlv*xlv*rho(k)*qswz(k)*diffwv(k)
1067 tmpc=tmpa*qswz(k)*diffwv(k)
1068 tmpd=amin1( 0.0,(qvoqswz(k)-0.90)*qswz(k)*odtb )
1070 abr=2.0*pi*(qvoqswz(k)-0.90)*tmpc/(tmpa+tmpb)
1072 !**** allow evaporation to occur when RH less than 90%
1073 !**** here not using 100% because the evaporation cooling
1074 !**** of temperature is not taking into account yet; hence,
1075 !**** the qsw value is a little bit larger. This will avoid
1076 !**** evaporation can generate cloud.
1078 tmp1=av_s(k)*sqrho(k)*olambdas(k)**(5+bv_s(k)+2*mu_s)/visc(k)
1079 tmp2= N0_s(k)*( vf1s*olambdas(k)*olambdas(k)+ &
1080 vf2s*schmidt(k)**0.33334* &
1081 ggamma(2.5+0.5*bv_s(k)+mu_s)*sqrt(tmp1) )
1082 tmp3=amin1(0.0,tmp2)
1083 tmp3=amax1( tmp3,tmpd )
1084 psmltevp(k)=amax1( tmp3,-qszodt(k) )
1087 end if !---- end of snow/ice processes
1089 ! CALL wrf_debug ( 100 , 'module_ylin: finish ice/snow processes' )
1092 !***********************************************************************
1093 !********* rain production processes **********
1094 !***********************************************************************
1097 !c (1) AUTOCONVERSION OF RAIN (Praut): using Liu and Daum (2004)
1100 !---- YLIN, autoconversion use Liu and Daum (2004), unit = g cm-3 s-1, in the scheme kg/kg s-1, so
1102 if (qlz(k) .gt. 1e-6) then
1103 lamc(k) = (Nt_c*rhowater*pi*ggamma(4.+mu_c)/(6.*rho(k)*qlz(k))/ & !--- N(D) = N0*D^mu*exp(-lamc*D)
1104 ggamma(1+mu_c))**0.3333
1105 Dc_liu = (ggamma(6+1+mu_c)/ggamma(1+mu_c))**(1./6.)/lamc(k) !----- R6 in m
1107 if (Dc_liu .gt. R6c) then
1108 disp = 1./(mu_c+1.) !--- square of relative dispersion
1109 eta = (0.75/pi/(1e-3*rhowater))**2*1.9e11*((1+3*disp)*(1+4*disp)*&
1110 (1+5*disp)/(1+disp)/(1+2*disp))
1111 praut(k) = eta*(1e-3*rho(k)*qlz(k))**3/(1e-6*Nt_c) !--- g cm-3 s-1
1112 praut(k) = praut(k)/(1e-3*rho(k)) !--- kg kg-1 s-1
1121 !c (2) ACCRETION OF CLOUD WATER BY RAIN (Pracw): Lin (51)
1125 tmp1=pio4*erw*xnor*av_r*sqrho(k)* &
1126 gambp3*olambdar(k)**bp3
1127 pracw(k)=qlzodt(k)*( 1.0-exp(-tmp1*dtb) )
1130 !c (3) EVAPORATION OF RAIN (Prevp): Lin (52)
1131 !c Prevp is negative value
1133 !c Sw=qvoqsw : saturation ratio
1135 tmpa=rvapor*xka(k)*tem(k)*tem(k)
1136 tmpb=xlv*xlv*rho(k)*qswz(k)*diffwv(k)
1137 tmpc=tmpa*qswz(k)*diffwv(k)
1138 tmpd=amin1(0.0,(qvoqswz(k)-0.90)*qswz(k)*odtb)
1140 abr=2.0*pi*(qvoqswz(k)-0.90)*tmpc/(tmpa+tmpb)
1141 tmp1=av_r*sqrho(k)*olambdar(k)**bp5/visc(k)
1142 tmp2=abr*xnor*( vf1r*olambdar(k)*olambdar(k)+ &
1143 vf2r*schmidt(k)**0.33334*gambp5o2*sqrt(tmp1) )
1144 tmp3=amin1( 0.0,tmp2 )
1145 tmp3=amax1( tmp3,tmpd )
1146 prevp(k)=amax1( tmp3,-qrzodt(k) )
1148 ! CALL wrf_debug ( 100 , 'module_ylin: finish rain processes' )
1151 !c**********************************************************************
1152 !c***** combine all processes together and avoid negative *****
1153 !c***** water substances
1154 !***********************************************************************
1156 if ( temcc(k) .lt. 0.0) then
1158 !c combined water vapor depletions
1161 if ( tmp .gt. qvzodt(k) ) then
1162 factor=qvzodt(k)/tmp
1163 psdep(k)=psdep(k)*factor
1166 !c combined cloud water depletions
1168 tmp=praut(k)+psacw(k)+psfw(k)+pracw(k)
1169 if ( tmp .gt. qlzodt(k) ) then
1170 factor=qlzodt(k)/tmp
1171 praut(k)=praut(k)*factor
1172 psacw(k)=psacw(k)*factor
1173 psfw(k)=psfw(k)*factor
1174 pracw(k)=pracw(k)*factor
1177 !c combined cloud ice depletions
1179 tmp=psaut(k)+psaci(k)+praci(k)+psfi(k)
1180 if (tmp .gt. qizodt(k) ) then
1181 factor=qizodt(k)/tmp
1182 psaut(k)=psaut(k)*factor
1183 psaci(k)=psaci(k)*factor
1184 praci(k)=praci(k)*factor
1185 psfi(k)=psfi(k)*factor
1188 !c combined all rain processes
1190 tmp_r=piacr(k)+psacr(k)-prevp(k)-praut(k)-pracw(k)+pgfr(k)
1191 if (tmp_r .gt. qrzodt(k) ) then
1192 factor=qrzodt(k)/tmp_r
1193 piacr(k)=piacr(k)*factor
1194 psacr(k)=psacr(k)*factor
1195 prevp(k)=prevp(k)*factor
1196 pgfr(k)=pgfr(k)*factor
1199 !c combined all snow processes
1201 tmp_s=-pssub(k)-(psaut(k)+psaci(k)+psacw(k)+psfw(k)+pgfr(k)+ &
1202 psfi(k)+praci(k)+piacr(k)+ &
1203 psdep(k)+psacr(k)-pracs(k))
1204 if ( tmp_s .gt. qszodt(k) ) then
1205 factor=qszodt(k)/tmp_s
1206 pssub(k)=pssub(k)*factor
1207 Pracs(k)=Pracs(k)*factor
1211 !c calculate new water substances, thetae, tem, and qvsbar
1214 pvapor(k)=-pssub(k)-psdep(k)-prevp(k)
1215 qvz(k)=amax1( qvmin,qvz(k)+dtb*pvapor(k) )
1216 pclw(k)=-praut(k)-pracw(k)-psacw(k)-psfw(k)
1217 qlz(k)=amax1( 0.0,qlz(k)+dtb*pclw(k) )
1218 pcli(k)=-psaut(k)-psfi(k)-psaci(k)-praci(k)
1219 qiz(k)=amax1( 0.0,qiz(k)+dtb*pcli(k) )
1220 tmp_r=piacr(k)+psacr(k)-prevp(k)-praut(k)-pracw(k)+pgfr(k)-pracs(k)
1222 qrz(k)=amax1( 0.0,qrz(k)+dtb*prain(k) )
1223 tmp_s=-pssub(k)-(psaut(k)+psaci(k)+psacw(k)+psfw(k)+pgfr(k)+ &
1224 psfi(k)+praci(k)+piacr(k)+ &
1225 psdep(k)+psacr(k)-pracs(k))
1227 qsz(k)=amax1( 0.0,qsz(k)+dtb*psnow(k) )
1229 qschg(k)=qschg(k)+psnow(k)
1232 tmp=ocp/tothz(k)*xLf*qschg(k)
1233 theiz(k)=theiz(k)+dtb*tmp
1234 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1235 tem(k)=thz(k)*tothz(k)
1237 temcc(k)=tem(k)-273.15
1239 if( temcc(k) .lt. -40.0 ) qswz(k)=qsiz(k)
1241 if ( qlpqi .eq. 0.0 ) then
1244 qvsbar(k)=( qiz(k)*qsiz(k)+qlz(k)*qswz(k) )/qlpqi
1250 !c combined cloud water depletions
1252 tmp=praut(k)+psacw(k)+pracw(k)
1253 if ( tmp .gt. qlzodt(k) ) then
1254 factor=qlzodt(k)/tmp
1255 praut(k)=praut(k)*factor
1256 psacw(k)=psacw(k)*factor
1257 pracw(k)=pracw(k)*factor
1260 !c combined all snow processes
1262 tmp_s=-(psmlt(k)+psmltevp(k))
1263 if (tmp_s .gt. qszodt(k) ) then
1264 factor=qszodt(k)/tmp_s
1265 psmlt(k)=psmlt(k)*factor
1266 psmltevp(k)=psmltevp(k)*factor
1269 !c combined all rain processes
1271 tmp_r=-prevp(k)-(praut(k)+pracw(k)+psacw(k)-psmlt(k))
1272 if (tmp_r .gt. qrzodt(k) ) then
1273 factor=qrzodt(k)/tmp_r
1274 prevp(k)=prevp(k)*factor
1277 !c calculate new water substances and thetae
1279 pvapor(k)=-psmltevp(k)-prevp(k)
1280 qvz(k)=amax1( qvmin,qvz(k)+dtb*pvapor(k))
1281 pclw(k)=-praut(k)-pracw(k)-psacw(k)
1282 qlz(k)=amax1( 0.0,qlz(k)+dtb*pclw(k) )
1284 qiz(k)=amax1( 0.0,qiz(k)+dtb*pcli(k) )
1285 tmp_r=-prevp(k)-(praut(k)+pracw(k)+psacw(k)-psmlt(k))
1288 qrz(k)=amax1( 0.0,qrz(k)+dtb*prain(k) )
1289 tmp_s=-(psmlt(k)+psmltevp(k))
1291 qsz(k)=amax1( 0.0,qsz(k)+dtb*psnow(k) )
1294 tmp=ocp/tothz(k)*xLf*qschg(k)
1295 theiz(k)=theiz(k)+dtb*tmp
1296 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1298 tem(k)=thz(k)*tothz(k)
1299 temcc(k)=tem(k)-273.15
1300 es=1000.*svp1*exp( svp2*temcc(k)/(tem(k)-svp3) )
1301 qswz(k)=ep2*es/(prez(k)-es)
1306 ! CALL wrf_debug ( 100 , 'module_ylin: finish sum of all processes' )
1309 !***********************************************************************
1310 !********** saturation adjustment **********
1311 !***********************************************************************
1313 ! allow supersaturation exits linearly from 0% at 500 mb to 50%
1315 ! 5.0e-5=1.0/(500mb-300mb)
1318 if( qvz(k)+qlz(k)+qiz(k) .lt. rsat*qvsbar(k) ) then
1323 qvz(k)=qvz(k)+qlz(k)+qiz(k)
1327 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1328 tem(k)=thz(k)*tothz(k)
1329 temcc(k)=tem(k)-273.15
1341 CALL satadj(qvz, qlz, qiz, prez, theiz, thz, tothz, kts, kte, &
1342 k, xLvocp, xLfocp, episp0k, EP2,SVP1,SVP2,SVP3,SVPT0)
1345 pladj(k)=odtb*(qlz(k)-pladj(k))
1346 piadj(k)=odtb*(qiz(k)-piadj(k))
1348 pclw(k)=pclw(k)+pladj(k)
1349 pcli(k)=pcli(k)+piadj(k)
1350 pvapor(k)=pvapor(k)-( pladj(k)+piadj(k) )
1352 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1353 tem(k)=thz(k)*tothz(k)
1355 temcc(k)=tem(k)-273.15
1357 es=1000.*svp1*exp( svp2*temcc(k)/(tem(k)-svp3) )
1358 qswz(k)=ep2*es/(prez(k)-es)
1359 if (tem(k) .lt. 273.15 ) then
1360 es=1000.*svp1*exp( 21.8745584*(tem(k)-273.16)/(tem(k)-7.66) )
1361 qsiz(k)=ep2*es/(prez(k)-es)
1362 if (temcc(k) .lt. -40.0) qswz(k)=qsiz(k)
1367 if ( qlpqi .eq. 0.0 ) then
1370 qvsbar(k)=( qiz(k)*qsiz(k)+qlz(k)*qswz(k) )/qlpqi
1376 !***********************************************************************
1377 !***** melting and freezing of cloud ice and cloud water *****
1378 !***********************************************************************
1380 if(qlpqi .le. 0.0) go to 1800
1383 !c (1) HOMOGENEOUS NUCLEATION WHEN T< -40 C (Pihom)
1385 if(temcc(k) .lt. -40.0) pihom(k)=qlz(k)*odtb
1387 !c (2) MELTING OF ICE CRYSTAL WHEN T> 0 C (Pimlt)
1389 if(temcc(k) .gt. 0.0) pimlt(k)=qiz(k)*odtb
1391 !c (3) PRODUCTION OF CLOUD ICE BY BERGERON PROCESS (Pidw): Hsie (p957)
1392 !c this process only considered when -31 C < T < 0 C
1394 if(temcc(k) .lt. 0.0 .and. temcc(k) .gt. -31.0) then
1396 !c! parama1 and parama2 functions must be user supplied
1398 a1=parama1( temcc(k) )
1399 a2=parama2( temcc(k) )
1400 !! change unit from cgs to mks
1401 a1=a1*0.001**(1.0-a2)
1402 xnin=xni0*exp(-bni*temcc(k))
1403 pidw(k)=xnin*orho(k)*(a1*xmnin**a2)
1406 pcli(k)=pcli(k)+pihom(k)-pimlt(k)+pidw(k)
1407 pclw(k)=pclw(k)-pihom(k)+pimlt(k)-pidw(k)
1408 qlz(k)=amax1( 0.0,qlz(k)+dtb*(-pihom(k)+pimlt(k)-pidw(k)) )
1409 qiz(k)=amax1( 0.0,qiz(k)+dtb*(pihom(k)-pimlt(k)+pidw(k)) )
1412 CALL satadj(qvz, qlz, qiz, prez, theiz, thz, tothz, kts, kte, &
1413 k, xLvocp, xLfocp, episp0k ,EP2,SVP1,SVP2,SVP3,SVPT0)
1415 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1416 tem(k)=thz(k)*tothz(k)
1418 temcc(k)=tem(k)-273.15
1420 es=1000.*svp1*exp( svp2*temcc(k)/(tem(k)-svp3) )
1421 qswz(k)=ep2*es/(prez(k)-es)
1423 if (tem(k) .lt. 273.15 ) then
1424 es=1000.*svp1*exp( 21.8745584*(tem(k)-273.16)/(tem(k)-7.66) )
1425 qsiz(k)=ep2*es/(prez(k)-es)
1426 if (temcc(k) .lt. -40.0) qswz(k)=qsiz(k)
1432 if ( qlpqi .eq. 0.0 ) then
1435 qvsbar(k)=( qiz(k)*qsiz(k)+qlz(k)*qswz(k) )/qlpqi
1440 !***********************************************************************
1441 !********** integrate the productions of rain and snow **********
1442 !***********************************************************************
1447 !**** below if qv < qvmin then qv=qvmin, ql=0.0, and qi=0.0
1450 if ( qvz(k) .lt. qvmin ) then
1453 qvz(k)=amax1( qvmin,qvz(k)+qlz(k)+qiz(k) )
1458 ! CALL wrf_debug ( 100 , 'module_ylin: finish saturation adjustment' )
1460 END SUBROUTINE clphy1d_ylin
1465 !---------------------------------------------------------------------
1466 ! SATURATED ADJUSTMENT
1467 !---------------------------------------------------------------------
1468 SUBROUTINE satadj(qvz, qlz, qiz, prez, theiz, thz, tothz, &
1469 kts, kte, k, xLvocp, xLfocp, episp0k, EP2,SVP1,SVP2,SVP3,SVPT0)
1470 !---------------------------------------------------------------------
1472 !---------------------------------------------------------------------
1473 ! This program use Newton's method for finding saturated temperature
1474 ! and saturation mixing ratio.
1476 ! In this saturation adjustment scheme we assume
1477 ! (1) the saturation mixing ratio is the mass weighted average of
1478 ! saturation values over liquid water (qsw), and ice (qsi)
1479 ! following Lord et al., 1984 and Tao, 1989
1481 ! (2) the percentage of cloud liquid and cloud ice will
1482 ! be fixed during the saturation calculation
1483 !---------------------------------------------------------------------
1486 INTEGER, INTENT(IN ) :: kts, kte, k
1488 REAL, DIMENSION( kts:kte ), &
1489 INTENT(INOUT) :: qvz, qlz, qiz
1491 REAL, DIMENSION( kts:kte ), &
1492 INTENT(IN ) :: prez, theiz, tothz
1494 REAL, INTENT(IN ) :: xLvocp, xLfocp, episp0k
1495 REAL, INTENT(IN ) :: EP2,SVP1,SVP2,SVP3,SVPT0
1501 REAL, DIMENSION( kts:kte ) :: thz, tem, temcc, qsiz, &
1504 REAL :: qsat, qlpqi, ratql, t0, t1, tmp1, ratqi, tsat, absft, &
1505 denom1, denom2, dqvsbar, ftsat, dftsat, qpz,es
1507 !---------------------------------------------------------------------
1509 thz(k)=theiz(k)-(xLvocp*qvz(k)-xLfocp*qiz(k))/tothz(k)
1511 tem(k)=tothz(k)*thz(k)
1512 if (tem(k) .gt. 273.15) then
1513 ! qsat=episp0k/prez(k)* &
1514 ! exp( svp2*(tem(k)-273.15)/(tem(k)-svp3) )
1515 es=1000.*svp1*exp( svp2*(tem(k)-svpt0)/(tem(k)-svp3) )
1516 qsat=ep2*es/(prez(k)-es)
1518 qsat=episp0k/prez(k)* &
1519 exp( 21.8745584*(tem(k)-273.15)/(tem(k)-7.66) )
1521 qpz=qvz(k)+qlz(k)+qiz(k)
1522 if (qpz .lt. qsat) then
1529 if( qlpqi .ge. 1.0e-5) then
1536 tmp1=( t0-tem(k) )/(t0-t1)
1537 tmp1=amin1(1.0,tmp1)
1538 tmp1=amax1(0.0,tmp1)
1544 !-- saturation mixing ratios over water and ice
1545 !-- at the outset we will follow Bolton 1980 MWR for
1546 !-- the water and Murray JAS 1967 for the ice
1548 !-- dqvsbar=d(qvsbar)/dT
1550 !-- dftsat=d(F(T))/dT
1552 ! First guess of tsat
1558 denom1=1.0/(tsat-svp3)
1559 denom2=1.0/(tsat-7.66)
1560 ! qswz(k)=episp0k/prez(k)* &
1561 ! exp( svp2*denom1*(tsat-273.15) )
1562 es=1000.*svp1*exp( svp2*denom1*(tsat-svpt0) )
1563 qswz(k)=ep2*es/(prez(k)-es)
1564 if (tem(k) .lt. 273.15) then
1565 ! qsiz(k)=episp0k/prez(k)* &
1566 ! exp( 21.8745584*denom2*(tsat-273.15) )
1567 es=1000.*svp1*exp( 21.8745584*denom2*(tsat-273.15) )
1568 qsiz(k)=ep2*es/(prez(k)-es)
1569 if (tem(k) .lt. 233.15) qswz(k)=qsiz(k)
1573 qvsbar(k)=ratql*qswz(k)+ratqi*qsiz(k)
1575 ! if( absft .lt. 0.01 .and. n .gt. 3 ) go to 300
1576 if( absft .lt. 0.01 ) go to 300
1578 dqvsbar=ratql*qswz(k)*svp2*243.5*denom1*denom1+ &
1579 ratqi*qsiz(k)*21.8745584*265.5*denom2*denom2
1580 ftsat=tsat+(xlvocp+ratqi*xlfocp)*qvsbar(k)- &
1581 tothz(k)*theiz(k)-xlfocp*ratqi*(qvz(k)+qlz(k)+qiz(k))
1582 dftsat=1.0+(xlvocp+ratqi*xlfocp)*dqvsbar
1583 tsat=tsat-ftsat/dftsat
1587 9020 format(1x,'point can not converge, absft,n=',e12.5,i5)
1590 if( qpz .gt. qvsbar(k) ) then
1592 qiz(k)=ratqi*( qpz-qvz(k) )
1593 qlz(k)=ratql*( qpz-qvz(k) )
1601 END SUBROUTINE satadj
1604 !----------------------------------------------------------------
1605 REAL FUNCTION parama1(temp)
1606 !----------------------------------------------------------------
1608 !----------------------------------------------------------------
1609 ! This program calculate the parameter for crystal growth rate
1610 ! in Bergeron process
1611 !----------------------------------------------------------------
1613 REAL, INTENT (IN ) :: temp
1614 REAL, DIMENSION(32) :: a1
1618 data a1/0.100e-10,0.7939e-7,0.7841e-6,0.3369e-5,0.4336e-5, &
1619 0.5285e-5,0.3728e-5,0.1852e-5,0.2991e-6,0.4248e-6, &
1620 0.7434e-6,0.1812e-5,0.4394e-5,0.9145e-5,0.1725e-4, &
1621 0.3348e-4,0.1725e-4,0.9175e-5,0.4412e-5,0.2252e-5, &
1622 0.9115e-6,0.4876e-6,0.3473e-6,0.4758e-6,0.6306e-6, &
1623 0.8573e-6,0.7868e-6,0.7192e-6,0.6513e-6,0.5956e-6, &
1624 0.5333e-6,0.4834e-6/
1628 ratio=-(temp)-float(i1-1)
1629 parama1=a1(i1)+ratio*( a1(i1p1)-a1(i1) )
1631 END FUNCTION parama1
1633 !----------------------------------------------------------------
1634 REAL FUNCTION parama2(temp)
1635 !----------------------------------------------------------------
1637 !----------------------------------------------------------------
1638 ! This program calculate the parameter for crystal growth rate
1639 ! in Bergeron process
1640 !----------------------------------------------------------------
1642 REAL, INTENT (IN ) :: temp
1643 REAL, DIMENSION(32) :: a2
1647 data a2/0.0100,0.4006,0.4831,0.5320,0.5307,0.5319,0.5249, &
1648 0.4888,0.3849,0.4047,0.4318,0.4771,0.5183,0.5463, &
1649 0.5651,0.5813,0.5655,0.5478,0.5203,0.4906,0.4447, &
1650 0.4126,0.3960,0.4149,0.4320,0.4506,0.4483,0.4460, &
1651 0.4433,0.4413,0.4382,0.4361/
1654 ratio=-(temp)-float(i1-1)
1655 parama2=a2(i1)+ratio*( a2(i1p1)-a2(i1) )
1657 END FUNCTION parama2
1659 !+---+-----------------------------------------------------------------+
1660 ! THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS
1661 ! A FUNCTION OF TEMPERATURE AND PRESSURE
1663 REAL FUNCTION RSLF(P,T)
1666 REAL, INTENT(IN):: P, T
1668 REAL, PARAMETER:: C0= .611583699E03
1669 REAL, PARAMETER:: C1= .444606896E02
1670 REAL, PARAMETER:: C2= .143177157E01
1671 REAL, PARAMETER:: C3= .264224321E-1
1672 REAL, PARAMETER:: C4= .299291081E-3
1673 REAL, PARAMETER:: C5= .203154182E-5
1674 REAL, PARAMETER:: C6= .702620698E-8
1675 REAL, PARAMETER:: C7= .379534310E-11
1676 REAL, PARAMETER:: C8=-.321582393E-13
1678 X=MAX(-80.,T-273.16)
1680 ! ESL=612.2*EXP(17.67*X/(T-29.65))
1681 ESL=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))
1682 RSLF=.622*ESL/(P-ESL)
1686 !+---+-----------------------------------------------------------------+
1687 ! THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A
1688 ! FUNCTION OF TEMPERATURE AND PRESSURE
1690 REAL FUNCTION RSIF(P,T)
1693 REAL, INTENT(IN):: P, T
1695 REAL, PARAMETER:: C0= .609868993E03
1696 REAL, PARAMETER:: C1= .499320233E02
1697 REAL, PARAMETER:: C2= .184672631E01
1698 REAL, PARAMETER:: C3= .402737184E-1
1699 REAL, PARAMETER:: C4= .565392987E-3
1700 REAL, PARAMETER:: C5= .521693933E-5
1701 REAL, PARAMETER:: C6= .307839583E-7
1702 REAL, PARAMETER:: C7= .105785160E-9
1703 REAL, PARAMETER:: C8= .161444444E-12
1705 X=MAX(-80.,T-273.16)
1706 ESI=C0+X*(C1+X*(C2+X*(C3+X*(C4+X*(C5+X*(C6+X*(C7+X*C8)))))))
1707 RSIF=.622*ESI/(P-ESI)
1710 !+---+-----------------------------------------------------------------+
1712 !----------------------------------------------------------------
1713 REAL FUNCTION ggamma(X)
1714 !----------------------------------------------------------------
1716 !----------------------------------------------------------------
1717 REAL, INTENT(IN ) :: x
1718 REAL, DIMENSION(8) :: B
1720 REAL ::PF, G1TO2 ,TEMP
1722 DATA B/-.577191652,.988205891,-.897056937,.918206857, &
1723 -.756704078,.482199394,-.193527818,.035868343/
1728 IF (TEMP .LE. 2) GO TO 20
1731 ! 100 FORMAT(//,5X,'module_mp_lin: INPUT TO GAMMA FUNCTION TOO LARGE, X=',E12.5)
1732 ! WRITE(wrf_err_message,100)X
1733 ! CALL wrf_error_fatal(wrf_err_message)
1737 30 G1TO2=G1TO2 + B(K1)*TEMP**K1
1742 !----------------------------------------------------------------
1744 END MODULE module_mp_sbu_ylin