2 # include "module_mp_wsm3_accel.F"
14 USE module_model_constants, only : RE_QC_BG, RE_QI_BG, RE_QS_BG
16 REAL, PARAMETER, PRIVATE :: dtcldcr = 120. ! maximum time step for minor loops
17 REAL, PARAMETER, PRIVATE :: n0r = 8.e6 ! intercept parameter rain
18 REAL, PARAMETER, PRIVATE :: avtr = 841.9 ! a constant for terminal velocity of rain
19 REAL, PARAMETER, PRIVATE :: bvtr = 0.8 ! a constant for terminal velocity of rain
20 REAL, PARAMETER, PRIVATE :: r0 = .8e-5 ! 8 microm in contrast to 10 micro m
21 REAL, PARAMETER, PRIVATE :: peaut = .55 ! collection efficiency
22 REAL, PARAMETER, PRIVATE :: xncr = 3.e8 ! maritime cloud in contrast to 3.e8 in tc80
23 REAL, PARAMETER, PRIVATE :: xmyu = 1.718e-5 ! the dynamic viscosity kgm-1s-1
24 REAL, PARAMETER, PRIVATE :: avts = 11.72 ! a constant for terminal velocity of snow
25 REAL, PARAMETER, PRIVATE :: bvts = .41 ! a constant for terminal velocity of snow
26 REAL, PARAMETER, PRIVATE :: n0smax = 1.e11 ! maximum n0s (t=-90C unlimited)
27 REAL, PARAMETER, PRIVATE :: lamdarmax = 8.e4 ! limited maximum value for slope parameter of rain
28 REAL, PARAMETER, PRIVATE :: lamdasmax = 1.e5 ! limited maximum value for slope parameter of snow
29 REAL, PARAMETER, PRIVATE :: lamdagmax = 6.e4 ! limited maximum value for slope parameter of graupel
30 REAL, PARAMETER, PRIVATE :: dicon = 11.9 ! constant for the cloud-ice diamter
31 REAL, PARAMETER, PRIVATE :: dimax = 500.e-6 ! limited maximum value for the cloud-ice diamter
32 REAL, PARAMETER, PRIVATE :: n0s = 2.e6 ! temperature dependent intercept parameter snow
33 REAL, PARAMETER, PRIVATE :: alpha = .12 ! .122 exponen factor for n0s
34 REAL, PARAMETER, PRIVATE :: qcrmin = 1.e-9 ! minimun values for qr, qs, and qg
37 bvtr1,bvtr2,bvtr3,bvtr4,g1pbr, &
38 g3pbr,g4pbr,g5pbro2,pvtr,eacrr,pacrr, &
39 precr1,precr2,xmmax,roqimax,bvts1, &
40 bvts2,bvts3,bvts4,g1pbs,g3pbs,g4pbs, &
41 g5pbso2,pvts,pacrs,precs1,precs2,pidn0r, &
43 rslopermax,rslopesmax,rslopegmax, &
44 rsloperbmax,rslopesbmax,rslopegbmax, &
45 rsloper2max,rslopes2max,rslopeg2max, &
46 rsloper3max,rslopes3max,rslopeg3max
48 ! Specifies code-inlining of fpvs function in WSM32D below. JM 20040507
51 !===================================================================
53 SUBROUTINE wsm3(th, q, qci, qrs &
54 , w, den, pii, p, delz &
55 , delt,g, cpd, cpv, rd, rv, t0c &
57 , XLS, XLV0, XLF0, den0, denr &
62 , has_reqc, has_reqi, has_reqs & ! for radiation
63 , re_cloud, re_ice, re_snow & ! for radiation
64 , ids,ide, jds,jde, kds,kde &
65 , ims,ime, jms,jme, kms,kme &
66 , its,ite, jts,jte, kts,kte &
68 !-------------------------------------------------------------------
70 !-------------------------------------------------------------------
72 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde , &
73 ims,ime, jms,jme, kms,kme , &
74 its,ite, jts,jte, kts,kte
75 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
81 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
87 REAL, INTENT(IN ) :: delt, &
105 REAL, DIMENSION( ims:ime , jms:jme ), &
106 INTENT(INOUT) :: rain, &
108 REAL, DIMENSION( ims:ime , jms:jme ), OPTIONAL, &
109 INTENT(INOUT) :: snow, &
112 ! for radiation connecting
113 INTEGER, INTENT(IN):: &
117 REAL, DIMENSION(ims:ime, kms:kme, jms:jme), &
124 REAL, DIMENSION( its:ite , kts:kte ) :: t
127 ! to calculate effective radius for radiation
128 REAL, DIMENSION( kts:kte ) :: t1d
129 REAL, DIMENSION( kts:kte ) :: den1d
130 REAL, DIMENSION( kts:kte ) :: qc1d
131 REAL, DIMENSION( kts:kte ) :: qi1d
132 REAL, DIMENSION( kts:kte ) :: qs1d
133 REAL, DIMENSION( kts:kte ) :: re_qc, re_qi, re_qs
135 !-------------------------------------------------------------------
139 t(i,k)=th(i,k,j)*pii(i,k,j)
142 CALL wsm32D(t, q(ims,kms,j), qci(ims,kms,j) &
143 ,qrs(ims,kms,j),w(ims,kms,j), den(ims,kms,j) &
144 ,p(ims,kms,j), delz(ims,kms,j) &
145 ,delt,g, cpd, cpv, rd, rv, t0c &
147 ,XLS, XLV0, XLF0, den0, denr &
150 ,rain(ims,j), rainncv(ims,j) &
151 ,snow(ims,j),snowncv(ims,j) &
153 ,ids,ide, jds,jde, kds,kde &
154 ,ims,ime, jms,jme, kms,kme &
155 ,its,ite, jts,jte, kts,kte &
159 th(i,k,j)=t(i,k)/pii(i,k,j)
163 if (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) then
170 t1d(k) = th(i,k,j)*pii(i,k,j)
172 if(t(i,k).ge.t0c) then
182 call effectRad_wsm3(t1d, qc1d, qi1d, qs1d, den1d, &
183 qmin, t0c, re_qc, re_qi, re_qs, &
186 re_cloud(i,k,j) = MAX(RE_QC_BG, MIN(re_qc(k), 50.E-6))
187 re_ice(i,k,j) = MAX(RE_QI_BG, MIN(re_qi(k), 125.E-6))
188 re_snow(i,k,j) = MAX(RE_QS_BG, MIN(re_qs(k), 999.E-6))
191 endif ! has_reqc, etc...
195 !===================================================================
197 SUBROUTINE wsm32D(t, q &
198 ,qci, qrs,w, den, p, delz &
199 ,delt,g, cpd, cpv, rd, rv, t0c &
201 ,XLS, XLV0, XLF0, den0, denr &
207 ,ids,ide, jds,jde, kds,kde &
208 ,ims,ime, jms,jme, kms,kme &
209 ,its,ite, jts,jte, kts,kte &
211 !-------------------------------------------------------------------
213 !-------------------------------------------------------------------
215 ! This code is a 3-class simple ice microphyiscs scheme (WSM3) of the
216 ! Single-Moment MicroPhyiscs (WSMMP). The WSMMP assumes that ice nuclei
217 ! number concentration is a function of temperature, and seperate assumption
218 ! is developed, in which ice crystal number concentration is a function
219 ! of ice amount. A theoretical background of the ice-microphysics and related
220 ! processes in the WSMMPs are described in Hong et al. (2004).
221 ! Production terms in the WSM6 scheme are described in Hong and Lim (2006).
222 ! All units are in m.k.s. and source/sink terms in kgkg-1s-1.
226 ! Developed by Song-You Hong (Yonsei Univ.), Jimy Dudhia (NCAR)
227 ! and Shu-Hua Chen (UC Davis)
230 ! Implemented by Song-You Hong (Yonsei Univ.) and Jimy Dudhia (NCAR)
233 ! further modifications :
234 ! semi-lagrangian sedimentation (JH,2010),hong, aug 2009
235 ! ==> higher accuracy and efficient at lower resolutions
236 ! effective radius of hydrometeors, bae from kiaps, jan 2015
237 ! ==> consistency in solar insolation of rrtmg radiation
239 ! Reference) Hong, Dudhia, Chen (HDC, 2004) Mon. Wea. Rev.
240 ! Dudhia (D89, 1989) J. Atmos. Sci.
241 ! Hong and Lim (HL, 2006) J. Korean Meteor. Soc.
242 ! Juang and Hong (JH, 2010) Mon. Wea. Rev.
244 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde, &
245 ims,ime, jms,jme, kms,kme, &
246 its,ite, jts,jte, kts,kte, &
248 REAL, DIMENSION( its:ite , kts:kte ), &
251 REAL, DIMENSION( ims:ime , kms:kme ), &
256 REAL, DIMENSION( ims:ime , kms:kme ), &
261 REAL, INTENT(IN ) :: delt, &
279 REAL, DIMENSION( ims:ime ), &
280 INTENT(INOUT) :: rain, &
282 REAL, DIMENSION( ims:ime ), OPTIONAL, &
283 INTENT(INOUT) :: snow, &
287 REAL, DIMENSION( its:ite , kts:kte ) :: &
298 REAL, DIMENSION( its:ite , kts:kte ) :: &
305 REAL, DIMENSION( its:ite , kts:kte ) :: &
321 REAL, DIMENSION( its:ite ) :: delqrs,&
323 REAL, DIMENSION(its:ite) :: tstepsnow
324 INTEGER, DIMENSION( its:ite ) :: kwork1,&
326 INTEGER, DIMENSION( its:ite ) :: mstep, &
328 LOGICAL, DIMENSION( its:ite ) :: flgcld
330 cpmcal, xlcal, diffus, &
331 viscos, xka, venfac, conden, diffac, &
332 x, y, z, a, b, c, d, e, &
333 fallsum, fallsum_qsi, vt2i,vt2s,acrfac, &
334 qdt, pvt, qik, delq, facq, qrsci, frzmlt, &
335 snomlt, hold, holdrs, facqci, supcol, coeres, &
336 supsat, dtcld, xmi, qciik, delqci, eacrs, satdt, &
337 qimax, diameter, xni0, roqi0, supice,holdc, holdci
338 INTEGER :: i, j, k, mstepmax, &
339 iprt, latd, lond, loop, loops, ifsat, kk, n, idim, kdim
340 ! Temporaries used for inlining fpvs function
341 REAL :: dldti, xb, xai, tr, xbi, xa, hvap, cvap, hsub, dldt, ttp
342 ! variables for optimization
343 REAL, DIMENSION( its:ite ) :: tvec1
345 !=================================================================
346 ! compute internal functions
348 cpmcal(x) = cpd*(1.-max(x,qmin))+max(x,qmin)*cpv
349 xlcal(x) = xlv0-xlv1*(x-t0c)
350 !----------------------------------------------------------------
351 ! diffus: diffusion coefficient of the water vapor
352 ! viscos: kinematic viscosity(m2s-1)
353 ! Optimizatin : A**B => exp(log(A)*(B))
355 diffus(x,y) = 8.794e-5 * exp(log(x)*(1.81)) / y ! 8.794e-5*x**1.81/y
356 viscos(x,y) = 1.496e-6 * (x*sqrt(x)) /(x+120.)/y ! 1.496e-6*x**1.5/(x+120.)/y
357 xka(x,y) = 1.414e3*viscos(x,y)*y
358 diffac(a,b,c,d,e) = d*a*a/(xka(c,d)*rv*c*c)+1./(e*diffus(c,b))
359 venfac(a,b,c) = exp(log((viscos(b,c)/diffus(b,a)))*((.3333333))) &
360 /sqrt(viscos(b,c))*sqrt(sqrt(den0/c))
361 conden(a,b,c,d,e) = (max(b,qmin)-c)/(1.+d*d/(rv*e)*c/(a*a))
366 !----------------------------------------------------------------
367 ! paddint 0 for negative values generated by dynamics
371 qci(i,k) = max(qci(i,k),0.0)
372 qrs(i,k) = max(qrs(i,k),0.0)
376 !----------------------------------------------------------------
377 ! latent heat for phase changes and heat capacity. neglect the
378 ! changes during microphysical process calculation
383 cpm(i,k) = cpmcal(q(i,k))
384 xl(i,k) = xlcal(t(i,k))
389 delz_tmp(i,k) = delz(i,k)
390 den_tmp(i,k) = den(i,k)
394 !----------------------------------------------------------------
395 ! initialize the surface rain, snow
399 if(PRESENT (snowncv) .AND. PRESENT (snow)) snowncv(i) = 0.
401 ! new local array to catch step snow
405 !----------------------------------------------------------------
406 ! compute the minor time steps.
408 loops = max(nint(delt/dtcldcr),1)
410 if(delt.le.dtcldcr) dtcld = delt
414 !----------------------------------------------------------------
415 ! initialize the large scale variables
422 CALL VREC( tvec1(its), den(its,k), ite-its+1)
424 tvec1(i) = tvec1(i)*den0
426 CALL VSQRT( denfac(its,k), tvec1(its), ite-its+1)
429 ! Inline expansion for fpvs
430 ! qs(i,k) = fpvs(t(i,k),1,rd,rv,cpv,cliq,cice,xlv0,xls,psat,t0c)
431 ! qs0(i,k) = fpvs(t(i,k),0,rd,rv,cpv,cliq,cice,xlv0,xls,psat,t0c)
441 xbi=xai+hsub/(rv*ttp)
445 if(t(i,k).lt.ttp) then
446 qs(i,k) =psat*(exp(log(tr)*(xai)))*exp(xbi*(1.-tr))
448 qs(i,k) =psat*(exp(log(tr)*(xa)))*exp(xb*(1.-tr))
450 qs0(i,k) =psat*(exp(log(tr)*(xa)))*exp(xb*(1.-tr))
451 qs0(i,k) = (qs0(i,k)-qs(i,k))/qs(i,k)
452 qs(i,k) = min(qs(i,k),0.99*p(i,k))
453 qs(i,k) = ep2 * qs(i,k) / (p(i,k) - qs(i,k))
454 qs(i,k) = max(qs(i,k),qmin)
455 rh(i,k) = max(q(i,k) / qs(i,k),qmin)
459 !----------------------------------------------------------------
460 ! initialize the variables for microphysical physics
478 !-------------------------------------------------------------
479 ! Ni: ice crystal number concentraiton [HDC 5c]
480 !-------------------------------------------------------------
483 xni(i,k) = min(max(5.38e7 &
484 *exp(log((den(i,k)*max(qci(i,k),qmin)))*(0.75)),1.e3),1.e6)
488 !----------------------------------------------------------------
489 ! compute the fallout term:
490 ! first, vertical terminal velosity for minor loops
491 !---------------------------------------------------------------
494 qrs_tmp(i,k) = qrs(i,k)
497 call slope_wsm3(qrs_tmp,den_tmp,denfac,t,rslope,rslopeb,rslope2,rslope3, &
498 work1,its,ite,kts,kte)
501 ! forward semi-laglangian scheme (JH), PCM (piecewise constant), (linear)
505 denqrs(i,k) = den(i,k)*qrs(i,k)
508 call nislfv_rain_plm(idim,kdim,den_tmp,denfac,t,delz_tmp,work1,denqrs, &
512 qrs(i,k) = max(denqrs(i,k)/den(i,k),0.)
513 fall(i,k) = denqrs(i,k)*work1(i,k)/delz(i,k)
517 fall(i,1) = delqrs(i)/delz(i,1)/dtcld
519 !---------------------------------------------------------------
520 ! Vice [ms-1] : fallout of ice crystal [HDC 5a]
521 !---------------------------------------------------------------
524 if(t(i,k).lt.t0c.and.qci(i,k).gt.0.) then
525 xmi = den(i,k)*qci(i,k)/xni(i,k)
526 diameter = max(dicon * sqrt(xmi), 1.e-25)
527 work1c(i,k) = 1.49e4*exp(log(diameter)*(1.31))
534 ! forward semi-laglangian scheme (JH), PCM (piecewise constant), (linear)
538 denqci(i,k) = den(i,k)*qci(i,k)
541 call nislfv_rain_plm(idim,kdim,den_tmp,denfac,t,delz_tmp,work1c,denqci, &
545 qci(i,k) = max(denqci(i,k)/den(i,k),0.)
549 fallc(i,1) = delqi(i)/delz(i,1)/dtcld
552 !----------------------------------------------------------------
553 ! compute the freezing/melting term. [D89 B16-B17]
554 ! freezing occurs one layer above the melting level
562 if(t(i,k).ge.t0c) then
571 if(mstep(i).ne.0) then
572 if (w(i,mstep(i)).gt.0.) then
573 kwork1(i) = mstep(i) + 1
582 qrsci = qrs(i,k) + qci(i,k)
583 if(qrsci.gt.0..or.fall(i,kk).gt.0.) then
584 frzmlt = min(max(-w(i,k)*qrsci/delz(i,k),-qrsci/dtcld), &
586 snomlt = min(max(fall(i,kk)/den(i,kk),-qrs(i,k)/dtcld), &
589 t(i,k) = t(i,k) - xlf0/cpm(i,k)*(frzmlt+snomlt)*dtcld
591 t(i,k) = t(i,k) - xlf0/cpm(i,k)*frzmlt*dtcld
592 t(i,kk) = t(i,kk) - xlf0/cpm(i,kk)*snomlt*dtcld
598 !----------------------------------------------------------------
599 ! rain (unit is mm/sec;kgm-2s-1: /1000*delt ===> m)==> mm for wrf
604 if((t0c-t(i,1)).gt.0) then
605 fallsum = fallsum+fallc(i,1)
606 fallsum_qsi = fall(i,1)+fallc(i,1)
608 if(fallsum.gt.0.) then
609 rainncv(i) = fallsum*delz(i,1)/denr*dtcld*1000. + rainncv(i)
610 rain(i) = fallsum*delz(i,1)/denr*dtcld*1000. + rain(i)
612 if(fallsum_qsi.gt.0.) then
613 tstepsnow(i) = fallsum_qsi*delz(i,kts)/denr*dtcld*1000. &
615 IF ( PRESENT (snowncv) .AND. PRESENT (snow)) THEN
616 snowncv(i) = fallsum_qsi*delz(i,kts)/denr*dtcld*1000. + snowncv(i)
617 snow(i) = fallsum_qsi*delz(i,kts)/denr*dtcld*1000. + snow(i)
620 IF ( PRESENT (snowncv) ) THEN
621 if(fallsum.gt.0.) sr(i) = snowncv(i)/(rainncv(i)+1.e-12)
623 if(fallsum.gt.0.) sr(i) = tstepsnow(i)/(rainncv(i)+1.e-12)
627 !----------------------------------------------------------------
628 ! update the slope parameters for microphysics computation
632 qrs_tmp(i,k) = qrs(i,k)
635 call slope_wsm3(qrs_tmp,den_tmp,denfac,t,rslope,rslopeb,rslope2,rslope3, &
636 work1,its,ite,kts,kte)
638 ! work1: the thermodynamic term in the denominator associated with
639 ! heat conduction and vapor diffusion
640 ! work2: parameter associated with the ventilation effects(y93)
644 if(t(i,k).ge.t0c) then
645 work1(i,k) = diffac(xl(i,k),p(i,k),t(i,k),den(i,k),qs(i,k))
647 work1(i,k) = diffac(xls,p(i,k),t(i,k),den(i,k),qs(i,k))
649 work2(i,k) = venfac(p(i,k),t(i,k),den(i,k))
655 supsat = max(q(i,k),qmin)-qs(i,k)
657 if(t(i,k).ge.t0c) then
659 !===============================================================
661 ! warm rain processes
663 ! - follows the processes in RH83 and LFO except for autoconcersion
665 !===============================================================
666 !---------------------------------------------------------------
667 ! praut: auto conversion rate from cloud to rain [HDC 16]
669 !---------------------------------------------------------------
670 if(qci(i,k).gt.qc0) then
671 ! paut(i,k) = qck1*qci(i,k)**(7./3.)
672 paut(i,k) = qck1*exp(log(qci(i,k))*((7./3.)))
673 paut(i,k) = min(paut(i,k),qci(i,k)/dtcld)
675 !---------------------------------------------------------------
676 ! pracw: accretion of cloud water by rain [HL A40] [D89 B15]
678 !---------------------------------------------------------------
679 if(qrs(i,k).gt.qcrmin.and.qci(i,k).gt.qmin) then
680 pacr(i,k) = min(pacrr*rslope3(i,k)*rslopeb(i,k) &
681 *qci(i,k)*denfac(i,k),qci(i,k)/dtcld)
683 !---------------------------------------------------------------
684 ! prevp: evaporation/condensation rate of rain [HDC 14]
686 !---------------------------------------------------------------
687 if(qrs(i,k).gt.0.) then
688 coeres = rslope2(i,k)*sqrt(rslope(i,k)*rslopeb(i,k))
689 pres(i,k) = (rh(i,k)-1.)*(precr1*rslope2(i,k) &
690 +precr2*work2(i,k)*coeres)/work1(i,k)
691 if(pres(i,k).lt.0.) then
692 pres(i,k) = max(pres(i,k),-qrs(i,k)/dtcld)
693 pres(i,k) = max(pres(i,k),satdt/2)
695 pres(i,k) = min(pres(i,k),satdt/2)
700 !===============================================================
702 ! cold rain processes
704 ! - follows the revised ice microphysics processes in HDC
705 ! - the processes same as in RH83 and LFO behave
706 ! following ice crystal hapits defined in HDC, inclduing
707 ! intercept parameter for snow (n0s), ice crystal number
708 ! concentration (ni), ice nuclei number concentration
709 ! (n0i), ice diameter (d)
711 !===============================================================
714 n0sfac(i,k) = max(min(exp(alpha*supcol),n0smax/n0s),1.)
716 !-------------------------------------------------------------
717 ! Ni: ice crystal number concentraiton [HDC 5c]
718 !-------------------------------------------------------------
719 xni(i,k) = min(max(5.38e7 &
720 *exp(log((den(i,k)*max(qci(i,k),qmin)))*(0.75)),1.e3),1.e6)
721 eacrs = exp(0.07*(-supcol))
722 if(qrs(i,k).gt.qcrmin.and.qci(i,k).gt.qmin) then
723 xmi = den(i,k)*qci(i,k)/xni(i,k)
724 diameter = min(dicon * sqrt(xmi),dimax)
725 vt2i = 1.49e4*diameter**1.31
726 vt2s = pvts*rslopeb(i,k)*denfac(i,k)
727 !-------------------------------------------------------------
728 ! praci: Accretion of cloud ice by rain [HL A15] [LFO 25]
730 !-------------------------------------------------------------
731 acrfac = 2.*rslope3(i,k)+2.*diameter*rslope2(i,k) &
732 +diameter**2*rslope(i,k)
733 pacr(i,k) = min(pi*qci(i,k)*eacrs*n0s*n0sfac(i,k) &
734 *abs(vt2s-vt2i)*acrfac/4.,qci(i,k)/dtcld)
736 !-------------------------------------------------------------
737 ! pidep: Deposition/Sublimation rate of ice [HDC 9]
738 ! (T<T0: V->I or I->V)
739 !-------------------------------------------------------------
740 if(qci(i,k).gt.0.) then
741 xmi = den(i,k)*qci(i,k)/xni(i,k)
742 diameter = dicon * sqrt(xmi)
743 pisd(i,k) = 4.*diameter*xni(i,k)*(rh(i,k)-1.)/work1(i,k)
744 if(pisd(i,k).lt.0.) then
745 pisd(i,k) = max(pisd(i,k),satdt/2)
746 pisd(i,k) = max(pisd(i,k),-qci(i,k)/dtcld)
748 pisd(i,k) = min(pisd(i,k),satdt/2)
750 if(abs(pisd(i,k)).ge.abs(satdt)) ifsat = 1
752 !-------------------------------------------------------------
753 ! psdep: deposition/sublimation rate of snow [HDC 14]
755 !-------------------------------------------------------------
756 if(qrs(i,k).gt.0..and.ifsat.ne.1) then
757 coeres = rslope2(i,k)*sqrt(rslope(i,k)*rslopeb(i,k))
758 pres(i,k) = (rh(i,k)-1.)*n0sfac(i,k)*(precs1*rslope2(i,k) &
759 +precs2*work2(i,k)*coeres)/work1(i,k)
760 supice = satdt-pisd(i,k)
761 if(pres(i,k).lt.0.) then
762 pres(i,k) = max(pres(i,k),-qrs(i,k)/dtcld)
763 pres(i,k) = max(max(pres(i,k),satdt/2),supice)
765 pres(i,k) = min(min(pres(i,k),satdt/2),supice)
767 if(abs(pisd(i,k)+pres(i,k)).ge.abs(satdt)) ifsat = 1
769 !-------------------------------------------------------------
770 ! pigen: generation(nucleation) of ice from vapor [HDC 7-8]
772 !-------------------------------------------------------------
773 if(supsat.gt.0.and.ifsat.ne.1) then
774 supice = satdt-pisd(i,k)-pres(i,k)
775 xni0 = 1.e3*exp(0.1*supcol)
776 roqi0 = 4.92e-11*exp(log(xni0)*(1.33))
777 pgen(i,k) = max(0.,(roqi0/den(i,k)-max(qci(i,k),0.))/dtcld)
778 pgen(i,k) = min(min(pgen(i,k),satdt),supice)
780 !-------------------------------------------------------------
781 ! psaut: conversion(aggregation) of ice to snow [HDC 12]
783 !-------------------------------------------------------------
784 if(qci(i,k).gt.0.) then
785 qimax = roqimax/den(i,k)
786 paut(i,k) = max(0.,(qci(i,k)-qimax)/dtcld)
792 !----------------------------------------------------------------
793 ! check mass conservation of generation terms and feedback to the
798 qciik = max(qmin,qci(i,k))
799 delqci = (paut(i,k)+pacr(i,k)-pgen(i,k)-pisd(i,k))*dtcld
800 if(delqci.ge.qciik) then
801 facqci = qciik/delqci
802 paut(i,k) = paut(i,k)*facqci
803 pacr(i,k) = pacr(i,k)*facqci
804 pgen(i,k) = pgen(i,k)*facqci
805 pisd(i,k) = pisd(i,k)*facqci
807 qik = max(qmin,q(i,k))
808 delq = (pres(i,k)+pgen(i,k)+pisd(i,k))*dtcld
811 pres(i,k) = pres(i,k)*facq
812 pgen(i,k) = pgen(i,k)*facq
813 pisd(i,k) = pisd(i,k)*facq
815 work2(i,k) = -pres(i,k)-pgen(i,k)-pisd(i,k)
816 q(i,k) = q(i,k)+work2(i,k)*dtcld
817 qci(i,k) = max(qci(i,k)-(paut(i,k)+pacr(i,k)-pgen(i,k)-pisd(i,k)) &
819 qrs(i,k) = max(qrs(i,k)+(paut(i,k)+pacr(i,k)+pres(i,k))*dtcld,0.)
820 if(t(i,k).lt.t0c) then
821 t(i,k) = t(i,k)-xls*work2(i,k)/cpm(i,k)*dtcld
823 t(i,k) = t(i,k)-xl(i,k)*work2(i,k)/cpm(i,k)*dtcld
837 xbi=xai+hsub/(rv*ttp)
841 qs(i,k)=psat*(exp(log(tr)*(xa)))*exp(xb*(1.-tr))
842 qs(i,k) = min(qs(i,k),0.99*p(i,k))
843 qs(i,k) = ep2 * qs(i,k) / (p(i,k) - qs(i,k))
844 qs(i,k) = max(qs(i,k),qmin)
845 denfac(i,k) = sqrt(den0/den(i,k))
849 !----------------------------------------------------------------
850 ! pcond: condensational/evaporational rate of cloud water [HL A46] [RH83 A6]
851 ! if there exists additional water vapor condensated/if
852 ! evaporation of cloud water is not enough to remove subsaturation
856 work1(i,k) = conden(t(i,k),q(i,k),qs(i,k),xl(i,k),cpm(i,k))
857 work2(i,k) = qci(i,k)+work1(i,k)
858 pcon(i,k) = min(max(work1(i,k),0.),max(q(i,k),0.))/dtcld
859 if(qci(i,k).gt.0..and.work1(i,k).lt.0.and.t(i,k).gt.t0c) &
860 pcon(i,k) = max(work1(i,k),-qci(i,k))/dtcld
861 q(i,k) = q(i,k)-pcon(i,k)*dtcld
862 qci(i,k) = max(qci(i,k)+pcon(i,k)*dtcld,0.)
863 t(i,k) = t(i,k)+pcon(i,k)*xl(i,k)/cpm(i,k)*dtcld
867 !----------------------------------------------------------------
868 ! padding for small values
872 if(qci(i,k).le.qmin) qci(i,k) = 0.0
873 if(qrs(i,k).le.qcrmin) qrs(i,k) = 0.0
878 END SUBROUTINE wsm32D
879 ! ...................................................................
880 REAL FUNCTION rgmma(x)
881 !-------------------------------------------------------------------
883 !-------------------------------------------------------------------
884 ! rgmma function: use infinite product form
886 PARAMETER (euler=0.577215664901532)
895 rgmma=rgmma*(1.000+x/y)*exp(-x/y)
901 !--------------------------------------------------------------------------
902 REAL FUNCTION fpvs(t,ice,rd,rv,cvap,cliq,cice,hvap,hsub,psat,t0c)
903 !--------------------------------------------------------------------------
905 !--------------------------------------------------------------------------
906 REAL t,rd,rv,cvap,cliq,cice,hvap,hsub,psat,t0c,dldt,xa,xb,dldti, &
909 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
916 xbi=xai+hsub/(rv*ttp)
918 if(t.lt.ttp.and.ice.eq.1) then
919 fpvs=psat*(tr**xai)*exp(xbi*(1.-tr))
921 fpvs=psat*(tr**xa)*exp(xb*(1.-tr))
923 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
925 !-------------------------------------------------------------------
926 SUBROUTINE wsm3init(den0,denr,dens,cl,cpv,allowed_to_read)
927 !-------------------------------------------------------------------
929 !-------------------------------------------------------------------
930 !.... constants which may not be tunable
931 REAL, INTENT(IN) :: den0,denr,dens,cl,cpv
932 LOGICAL, INTENT(IN) :: allowed_to_read
937 qc0 = 4./3.*pi*denr*r0**3*xncr/den0 ! 0.419e-3 -- .61e-3
938 qck1 = .104*9.8*peaut/(xncr*denr)**(1./3.)/xmyu*den0**(4./3.) ! 7.03
939 pidnc = pi*denr/6. ! syb
947 g4pbr = rgmma(bvtr4) ! 17.837825
948 g5pbro2 = rgmma(bvtr2) ! 1.8273
951 pacrr = pi*n0r*avtr*g3pbr*.25*eacrr
952 precr1 = 2.*pi*n0r*.78
953 precr2 = 2.*pi*n0r*.31*avtr**.5*g5pbro2
954 xmmax = (dimax/dicon)**2
955 roqimax = 2.08e22*dimax**8
961 g1pbs = rgmma(bvts1) !.8875
963 g4pbs = rgmma(bvts4) ! 12.0786
964 g5pbso2 = rgmma(bvts2)
966 pacrs = pi*n0s*avts*g3pbs*.25
968 precs2 = 4.*n0s*.44*avts**.5*g5pbso2
972 rslopermax = 1./lamdarmax
973 rslopesmax = 1./lamdasmax
974 rsloperbmax = rslopermax ** bvtr
975 rslopesbmax = rslopesmax ** bvts
976 rsloper2max = rslopermax * rslopermax
977 rslopes2max = rslopesmax * rslopesmax
978 rsloper3max = rsloper2max * rslopermax
979 rslopes3max = rslopes2max * rslopesmax
981 END SUBROUTINE wsm3init
983 subroutine slope_wsm3(qrs,den,denfac,t,rslope,rslopeb,rslope2,rslope3,vt,its,ite,kts,kte)
985 INTEGER :: its,ite, jts,jte, kts,kte
986 REAL, DIMENSION( its:ite , kts:kte ) :: &
996 REAL, PARAMETER :: t0c = 273.15
997 REAL, DIMENSION( its:ite , kts:kte ) :: &
999 REAL :: lamdar,lamdas,x, y, z, supcol, pvt
1001 !----------------------------------------------------------------
1002 ! size distributions: (x=mixing ratio, y=air density):
1003 ! valid for mixing ratio > 1.e-9 kg/kg.
1005 lamdar(x,y)= sqrt(sqrt(pidn0r/(x*y))) ! (pidn0r/(x*y))**.25
1006 lamdas(x,y,z)= sqrt(sqrt(pidn0s*z/(x*y))) ! (pidn0s*z/(x*y))**.25
1010 if(t(i,k).ge.t0c) then
1012 if(qrs(i,k).le.qcrmin)then
1013 rslope(i,k) = rslopermax
1014 rslopeb(i,k) = rsloperbmax
1015 rslope2(i,k) = rsloper2max
1016 rslope3(i,k) = rsloper3max
1018 rslope(i,k) = 1./lamdar(qrs(i,k),den(i,k))
1019 rslopeb(i,k) = exp(log(rslope(i,k))*(bvtr))
1020 rslope2(i,k) = rslope(i,k)*rslope(i,k)
1021 rslope3(i,k) = rslope2(i,k)*rslope(i,k)
1025 n0sfac(i,k) = max(min(exp(alpha*supcol),n0smax/n0s),1.)
1027 if(qrs(i,k).le.qcrmin)then
1028 rslope(i,k) = rslopesmax
1029 rslopeb(i,k) = rslopesbmax
1030 rslope2(i,k) = rslopes2max
1031 rslope3(i,k) = rslopes3max
1033 rslope(i,k) = 1./lamdas(qrs(i,k),den(i,k),n0sfac(i,k))
1034 rslopeb(i,k) = exp(log(rslope(i,k))*(bvts))
1035 rslope2(i,k) = rslope(i,k)*rslope(i,k)
1036 rslope3(i,k) = rslope2(i,k)*rslope(i,k)
1039 vt(i,k) = pvt*rslopeb(i,k)*denfac(i,k)
1040 if(qrs(i,k).le.0.0) vt(i,k) = 0.0
1043 END subroutine slope_wsm3
1044 !-------------------------------------------------------------------
1045 SUBROUTINE nislfv_rain_pcm(im,km,denl,denfacl,tkl,dzl,wwl,rql,precip,dt,id,iter)
1046 !-------------------------------------------------------------------
1048 ! for non-iteration semi-Lagrangain forward advection for cloud
1049 ! with mass conservation and positive definite advection
1050 ! 2nd order interpolation with monotonic piecewise linear method
1051 ! this routine is under assumption of decfl < 1 for semi_Lagrangian
1053 ! dzl depth of model layer in meter
1054 ! wwl terminal velocity at model layer m/s
1055 ! rql cloud density*mixing ration
1056 ! precip precipitation
1058 ! id kind of precip: 0 test case; 1 raindrop
1059 ! iter how many time to guess mean terminal velocity: 0 pure forward.
1060 ! 0 : use departure wind for advection
1061 ! 1 : use mean wind for advection
1062 ! > 1 : use mean wind after iter-1 iterations
1064 ! author: hann-ming henry juang <henry.juang@noaa.gov>
1065 ! implemented by song-you hong
1070 real dzl(im,km),wwl(im,km),rql(im,km),precip(im)
1071 real denl(im,km),denfacl(im,km),tkl(im,km)
1073 integer i,k,n,m,kk,kb,kt,iter
1074 real tl,tl2,qql,dql,qqd
1076 real zsum,qsum,dim,dip,c1,con1,fa1,fa2
1077 real zsumt,qsumt,zsumb,qsumb
1078 real allold, allnew, zz, dzamin, cflmax, decfl
1079 real dz(km), ww(km), qq(km), wd(km), wa(km), was(km)
1080 real den(km), denfac(km), tk(km)
1081 real wi(km+1), zi(km+1), za(km+1)
1082 real qn(km), qr(km),tmp(km),tmp1(km),tmp2(km),tmp3(km)
1083 real dza(km+1), qa(km+1), qmi(km+1), qpi(km+1)
1088 ! -----------------------------------
1093 denfac(:) = denfacl(i,:)
1095 ! skip for no precipitation for all layers
1098 allold = allold + qq(k)
1100 if(allold.le.0.0) then
1104 ! compute interface values
1107 zi(k+1) = zi(k)+dz(k)
1110 ! save departure wind
1114 ! pcm is 1st order, we should use 2nd order wi
1115 ! 2nd order interpolation to get wi
1118 wi(k) = (ww(k)*dz(k-1)+ww(k-1)*dz(k))/(dz(k-1)+dz(k))
1122 ! terminate of top of raingroup
1124 if( ww(k).eq.0.0 ) wi(k)=ww(k-1)
1130 decfl = (wi(k+1)-wi(k))*dt/dz(k)
1131 if( decfl .gt. con1 ) then
1132 wi(k) = wi(k+1) - con1*dz(k)/dt
1135 ! compute arrival point
1137 za(k) = zi(k) - wi(k)*dt
1141 dza(k) = za(k+1)-za(k)
1143 dza(km+1) = zi(km+1) - za(km+1)
1145 ! computer deformation at arrival point
1147 qa(k) = qq(k)*dz(k)/dza(k)
1148 qr(k) = qa(k)/den(k)
1151 ! call maxmin(km,1,qa,' arrival points ')
1153 ! compute arrival terminal velocity, and estimate mean terminal velocity
1154 ! then back to use mean terminal velocity
1155 if( n.le.iter ) then
1156 call slope_wsm3(qr,den,denfac,tk,tmp,tmp1,tmp2,tmp3,wa,1,1,1,km)
1157 if( n.eq.2 ) wa(1:km) = 0.5*(wa(1:km)+was(1:km))
1160 ! print*,' slope_wsm3 ',qr(k)*1000.,den(k),denfac(k),tk(k),tmp(k),tmp1(k),tmp2(k),ww(k),wa(k)
1162 ! mean wind is average of departure and new arrival winds
1163 ww(k) = 0.5* ( wd(k)+wa(k) )
1171 ! interpolation to regular point
1179 if( zi(k).ge.za(km+1) ) then
1182 find_kb : do kk=kb,km
1183 if( zi(k).le.za(kk+1) ) then
1190 find_kt : do kk=kt,km
1191 if( zi(k+1).le.za(kk) ) then
1198 ! compute q with piecewise constant method
1199 if( kt-kb.eq.1 ) then
1201 else if( kt-kb.ge.2 ) then
1202 zsumb = za(kb+1)-zi(k)
1203 qsumb = qa(kb) * zsumb
1204 zsumt = zi(k+1)-za(kt-1)
1205 qsumt = qa(kt-1) * zsumt
1208 if( kt-kb.ge.3 ) then
1210 qsum = qsum + qa(m) * dza(m)
1211 zsum = zsum + dza(m)
1214 qn(k) = (qsumb+qsum+qsumt)/(zsumb+zsum+zsumt)
1222 sum_precip: do k=1,km
1223 if( za(k).lt.0.0 .and. za(k+1).lt.0.0 ) then
1224 precip(i) = precip(i) + qa(k)*dza(k)
1226 else if ( za(k).lt.0.0 .and. za(k+1).ge.0.0 ) then
1227 precip(i) = precip(i) + qa(k)*(0.0-za(k))
1233 ! replace the new values
1236 ! ----------------------------------
1239 END SUBROUTINE nislfv_rain_pcm
1240 !-------------------------------------------------------------------
1241 SUBROUTINE nislfv_rain_plm(im,km,denl,denfacl,tkl,dzl,wwl,rql,precip,dt,id,iter)
1242 !-------------------------------------------------------------------
1244 ! for non-iteration semi-Lagrangain forward advection for cloud
1245 ! with mass conservation and positive definite advection
1246 ! 2nd order interpolation with monotonic piecewise linear method
1247 ! this routine is under assumption of decfl < 1 for semi_Lagrangian
1249 ! dzl depth of model layer in meter
1250 ! wwl terminal velocity at model layer m/s
1251 ! rql cloud density*mixing ration
1252 ! precip precipitation
1254 ! id kind of precip: 0 test case; 1 raindrop
1255 ! iter how many time to guess mean terminal velocity: 0 pure forward.
1256 ! 0 : use departure wind for advection
1257 ! 1 : use mean wind for advection
1258 ! > 1 : use mean wind after iter-1 iterations
1260 ! author: hann-ming henry juang <henry.juang@noaa.gov>
1261 ! implemented by song-you hong
1266 real dzl(im,km),wwl(im,km),rql(im,km),precip(im)
1267 real denl(im,km),denfacl(im,km),tkl(im,km)
1269 integer i,k,n,m,kk,kb,kt,iter
1270 real tl,tl2,qql,dql,qqd
1272 real zsum,qsum,dim,dip,c1,con1,fa1,fa2
1273 real allold, allnew, zz, dzamin, cflmax, decfl
1274 real dz(km), ww(km), qq(km), wd(km), wa(km), was(km)
1275 real den(km), denfac(km), tk(km)
1276 real wi(km+1), zi(km+1), za(km+1)
1277 real qn(km), qr(km),tmp(km),tmp1(km),tmp2(km),tmp3(km)
1278 real dza(km+1), qa(km+1), qmi(km+1), qpi(km+1)
1283 ! -----------------------------------
1288 denfac(:) = denfacl(i,:)
1290 ! skip for no precipitation for all layers
1293 allold = allold + qq(k)
1295 if(allold.le.0.0) then
1299 ! compute interface values
1302 zi(k+1) = zi(k)+dz(k)
1305 ! save departure wind
1309 ! plm is 2nd order, we can use 2nd order wi or 3rd order wi
1310 ! 2nd order interpolation to get wi
1314 wi(k) = (ww(k)*dz(k-1)+ww(k-1)*dz(k))/(dz(k-1)+dz(k))
1316 ! 3rd order interpolation to get wi
1320 wi(2) = 0.5*(ww(2)+ww(1))
1322 wi(k) = fa1*(ww(k)+ww(k-1))-fa2*(ww(k+1)+ww(k-2))
1324 wi(km) = 0.5*(ww(km)+ww(km-1))
1327 ! terminate of top of raingroup
1329 if( ww(k).eq.0.0 ) wi(k)=ww(k-1)
1335 decfl = (wi(k+1)-wi(k))*dt/dz(k)
1336 if( decfl .gt. con1 ) then
1337 wi(k) = wi(k+1) - con1*dz(k)/dt
1340 ! compute arrival point
1342 za(k) = zi(k) - wi(k)*dt
1346 dza(k) = za(k+1)-za(k)
1348 dza(km+1) = zi(km+1) - za(km+1)
1350 ! computer deformation at arrival point
1352 qa(k) = qq(k)*dz(k)/dza(k)
1353 qr(k) = qa(k)/den(k)
1356 ! call maxmin(km,1,qa,' arrival points ')
1358 ! compute arrival terminal velocity, and estimate mean terminal velocity
1359 ! then back to use mean terminal velocity
1360 if( n.le.iter ) then
1361 call slope_wsm3(qr,den,denfac,tk,tmp,tmp1,tmp2,tmp3,wa,1,1,1,km)
1362 if( n.ge.2 ) wa(1:km)=0.5*(wa(1:km)+was(1:km))
1365 ! print*,' slope_wsm3 ',qr(k)*1000.,den(k),denfac(k),tk(k),tmp(k),tmp1(k),tmp2(k),ww(k),wa(k)
1367 ! mean wind is average of departure and new arrival winds
1368 ww(k) = 0.5* ( wd(k)+wa(k) )
1375 ! estimate values at arrival cell interface with monotone
1377 dip=(qa(k+1)-qa(k))/(dza(k+1)+dza(k))
1378 dim=(qa(k)-qa(k-1))/(dza(k-1)+dza(k))
1379 if( dip*dim.le.0.0 ) then
1383 qpi(k)=qa(k)+0.5*(dip+dim)*dza(k)
1384 qmi(k)=2.0*qa(k)-qpi(k)
1385 if( qpi(k).lt.0.0 .or. qmi(k).lt.0.0 ) then
1396 ! interpolation to regular point
1404 if( zi(k).ge.za(km+1) ) then
1407 find_kb : do kk=kb,km
1408 if( zi(k).le.za(kk+1) ) then
1415 find_kt : do kk=kt,km
1416 if( zi(k+1).le.za(kk) ) then
1424 ! compute q with piecewise constant method
1426 tl=(zi(k)-za(kb))/dza(kb)
1427 th=(zi(k+1)-za(kb))/dza(kb)
1430 qqd=0.5*(qpi(kb)-qmi(kb))
1431 qqh=qqd*th2+qmi(kb)*th
1432 qql=qqd*tl2+qmi(kb)*tl
1433 qn(k) = (qqh-qql)/(th-tl)
1434 else if( kt.gt.kb ) then
1435 tl=(zi(k)-za(kb))/dza(kb)
1437 qqd=0.5*(qpi(kb)-qmi(kb))
1438 qql=qqd*tl2+qmi(kb)*tl
1440 zsum = (1.-tl)*dza(kb)
1442 if( kt-kb.gt.1 ) then
1444 zsum = zsum + dza(m)
1445 qsum = qsum + qa(m) * dza(m)
1448 th=(zi(k+1)-za(kt))/dza(kt)
1450 qqd=0.5*(qpi(kt)-qmi(kt))
1451 dqh=qqd*th2+qmi(kt)*th
1452 zsum = zsum + th*dza(kt)
1453 qsum = qsum + dqh*dza(kt)
1462 sum_precip: do k=1,km
1463 if( za(k).lt.0.0 .and. za(k+1).lt.0.0 ) then
1464 precip(i) = precip(i) + qa(k)*dza(k)
1466 else if ( za(k).lt.0.0 .and. za(k+1).ge.0.0 ) then
1467 precip(i) = precip(i) + qa(k)*(0.0-za(k))
1473 ! replace the new values
1476 ! ----------------------------------
1479 END SUBROUTINE nislfv_rain_plm
1481 !-----------------------------------------------------------------------
1482 subroutine effectRad_wsm3 (t, qc, qi, qs, rho, qmin, t0c, &
1483 re_qc, re_qi, re_qs, kts, kte, ii, jj)
1485 !-----------------------------------------------------------------------
1486 ! Compute radiation effective radii of cloud water, ice, and snow for
1487 ! single-moment microphysics.
1488 ! These are entirely consistent with microphysics assumptions, not
1489 ! constant or otherwise ad hoc as is internal to most radiation
1491 ! Coded and implemented by Soo ya Bae, KIAPS, January 2015.
1492 !-----------------------------------------------------------------------
1497 integer, intent(in) :: kts, kte, ii, jj
1498 real, intent(in) :: qmin
1499 real, intent(in) :: t0c
1500 real, dimension( kts:kte ), intent(in):: t
1501 real, dimension( kts:kte ), intent(in):: qc
1502 real, dimension( kts:kte ), intent(in):: qi
1503 real, dimension( kts:kte ), intent(in):: qs
1504 real, dimension( kts:kte ), intent(in):: rho
1505 real, dimension( kts:kte ), intent(inout):: re_qc
1506 real, dimension( kts:kte ), intent(inout):: re_qi
1507 real, dimension( kts:kte ), intent(inout):: re_qs
1511 real, dimension( kts:kte ):: ni
1512 real, dimension( kts:kte ):: rqc
1513 real, dimension( kts:kte ):: rqi
1514 real, dimension( kts:kte ):: rni
1515 real, dimension( kts:kte ):: rqs
1518 real :: supcol, n0sfac, lamdas
1519 real :: diai ! diameter of ice in m
1520 logical :: has_qc, has_qi, has_qs
1521 !..Minimum microphys values
1522 real, parameter :: R1 = 1.E-12
1523 real, parameter :: R2 = 1.E-6
1524 !..Mass power law relations: mass = am*D**bm
1525 real, parameter :: bm_r = 3.0
1526 real, parameter :: obmr = 1.0/bm_r
1527 real, parameter :: nc0 = 3.E8
1528 !-----------------------------------------------------------------------
1535 rqc(k) = max(R1, qc(k)*rho(k))
1536 if (rqc(k).gt.R1) has_qc = .true.
1538 rqi(k) = max(R1, qi(k)*rho(k))
1539 temp = (rho(k)*max(qi(k),qmin))
1540 temp = sqrt(sqrt(temp*temp*temp))
1541 ni(k) = min(max(5.38e7*temp,1.e3),1.e6)
1542 rni(k)= max(R2, ni(k)*rho(k))
1543 if (rqi(k).gt.R1 .and. rni(k).gt.R2) has_qi = .true.
1545 rqs(k) = max(R1, qs(k)*rho(k))
1546 if (rqs(k).gt.R1) has_qs = .true.
1551 if (rqc(k).le.R1) CYCLE
1552 lamdac = (pidnc*nc0/rqc(k))**obmr
1553 re_qc(k) = max(2.51E-6,min(1.5*(1.0/lamdac),50.E-6))
1559 if (rqi(k).le.R1 .or. rni(k).le.R2) CYCLE
1560 diai = 11.9*sqrt(rqi(k)/ni(k))
1561 re_qi(k) = max(10.01E-6,min(0.75*0.163*diai,125.E-6))
1567 if (rqs(k).le.R1) CYCLE
1569 n0sfac = max(min(exp(alpha*supcol),n0smax/n0s),1.)
1570 lamdas = sqrt(sqrt(pidn0s*n0sfac/rqs(k)))
1571 re_qs(k) = max(25.E-6,min(0.5*(1./lamdas), 999.E-6))
1575 end subroutine effectRad_wsm3
1576 !-----------------------------------------------------------------------
1577 END MODULE module_mp_wsm3