PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_ini_lima_warm.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 2013-2024 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! #########################
8! #########################
9!
10IMPLICIT NONE
11!
12CONTAINS
13! #########################################
14 SUBROUTINE ini_lima_warm (PTSTEP, PDZMIN)
15! #########################################
16!
17!! PURPOSE
18!! -------
19!! The purpose of this routine is to initialize the constants used in the
20!! microphysical scheme LIMA for the warm phase species and processes.
21!!
22!! AUTHOR
23!! ------
24!! J.-M. Cohard * Laboratoire d'Aerologie*
25!! J.-P. Pinty * Laboratoire d'Aerologie*
26!! S. Berthet * Laboratoire d'Aerologie*
27!! B. Vié * Laboratoire d'Aerologie*
28!!
29!! MODIFICATIONS
30!! -------------
31!! Original ??/??/13
32!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
33! P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function
34!
35!-------------------------------------------------------------------------------
36!
37!* 0. DECLARATIONS
38! ------------
39!
40USE modd_cst, ONLY: xalpw, xbetaw, xcl, xcpd, xcpv, xg, xgamw, xlvtt, xmd, xmv, xpi, xrd, &
41 xrholw, xrv, xtt
59!
60USE modi_hypgeo, ONLY: hypgeo
61USE yomhook, ONLY:lhook, dr_hook, jphook
62!
63IMPLICIT NONE
64!
65!* 0.1 Declarations of dummy arguments :
66!
67REAL, INTENT(IN) :: PTSTEP ! Effective Time step
68REAL, INTENT(IN) :: PDZMIN ! minimun vertical mesh size
69!
70!* 0.2 Declarations of local variables :
71!
72INTEGER :: I1 ! Internal loop indexes
73INTEGER :: IMOD ! Internal loop to index the CCN modes
74!
75REAL, DIMENSION(6) :: ZGAMC, ZGAMR ! parameters involving various moments of
76 ! the generalized gamma law
77!
78REAL :: ZTT ! Temperature in Celsius
79REAL :: ZLV ! Latent heat of vaporization
80REAL :: ZSS ! Supersaturation
81REAL :: ZG ! G function
82REAL :: ZRHO00 ! Surface reference air density
83REAL :: ZSURF_TEN ! Water drop surface tension
84REAL :: ZSMIN, ZSMAX ! Minimal and maximal supersaturation used to
85 ! discretize the HYP functions
86REAL(KIND=jphook) :: zhook_handle
87!
88!
89!INTEGER :: ILUOUT0 ! Logical unit number for output-listing
90!INTEGER :: IRESP ! Return code of FM-routines
91!LOGICAL :: GFLAG ! Logical flag for printing the constatnts on the output
92 ! listing
93!
94!-------------------------------------------------------------------------------
95!
96IF (lhook) CALL dr_hook('INI_LIMA_WARM', 0, zhook_handle)
98!
99!* 1. CHARACTERISTICS OF THE SPECIES
100! ------------------------------
101!
102!
103!* 1.1 Cloud droplet characteristics
104!
105xac = (xpi/6.0)*xrholw
106xbc = 3.0
107xcc = xrholw*xg/(18.0*1.816e-5) ! Stokes flow (Pruppacher eq. 10-138 for T=293K)
108!XCC = XRHOLW*XG/(18.0*1.7E-5) ! Stokes flow (Pruppacher eq. 10-138 for T=273K)
109xdc = 2.0
110!
111xf0c = 1.00
112xf2c = 0.108
113!
114xc1c = 1./2.
115!
116!* 1.2 Raindrops characteristics
117!
118xar = (xpi/6.0)*xrholw
119xbr = 3.0
120xcr = 842.
121xdr = 0.8
122!
123IF (nmom_r.EQ.1) THEN
124 xf0r = 1.
125 xf1r = 0.26
126ELSE
127 xf0r = 0.780
128 !Correction BVIE Pruppacher 1997 eq. 13-61
129 !XF1R = 0.265
130 xf1r = 0.308
131END IF
132!
133!
134!------------------------------------------------------------------------------
135!
136!
137!* 2. DIMENSIONAL DISTRIBUTIONS OF THE SPECIES
138! ----------------------------------------
139!
140!
141!* 2.1 Cloud droplet distribution
142!
143!XALPHAC = 3.0 ! Gamma law of the Cloud droplet (here volume-like distribution)
144!XNUC = 3.0 ! Gamma law with little dispersion
145!
146!* 2.2 Raindrop distribution
147!
148!XALPHAR = 3.0 ! Gamma law of the raindrops (here volume-like distribution)
149!XNUR = 3.0 ! Gamma law for the raindrops
150!XNUR = 0.1
151!
152!* 2.3 Precalculation of the gamma function momentum
153!
154!
155zgamc(1) = gamma(xnuc)
156zgamc(2) = momg(xalphac,xnuc,3.)
157zgamc(3) = momg(xalphac,xnuc,6.)
158zgamc(4) = zgamc(3)-zgamc(2)**2 ! useful for Sig_c
159zgamc(5) = momg(xalphac,xnuc,9.)
160zgamc(6) = momg(xalphac,xnuc,3.)**(2./3.)/momg(xalphac,xnuc,2.)
161!
162zgamr(1) = gamma(xnur)
163zgamr(2) = momg(xalphar,xnur,3.)
164zgamr(3) = momg(xalphar,xnur,6.)
165zgamr(4) = momg(xalphar,xnur,6.)
166zgamr(5) = momg(xalphar,xnur,9.)
167zgamr(6) = momg(xalphar,xnur,3.)**(2./3.)/momg(xalphar,xnur,2.)
168!
169!* 2.4 Csts for the shape parameter
170!
171xlbc = xar*zgamc(2)
172xlbexc = 1.0/xbc
173!
174xnr = 1.0/(xar*momg(xalphar,xnur,xbr))
175xccr = 8.e6
176xcxr = -1.
177IF (nmom_r.EQ.1) THEN
178 xlbexr = 1.0/(xcxr-xbr)
180ELSE
181 xlbr = xar*zgamr(2)
182 xlbexr = 1.0/xbr
183END IF
184!
185!
186!------------------------------------------------------------------------------
187!
188!
189!* 3. CONSTANTS FOR THE SEDIMENTATION
190! -------------------------------
191!
192!
193!* 4.1 Exponent of the fall-speed air density correction
194!
195! Correction
196!ZRHO00 = XP00/(XRD*XTHVREFZ(IKB))
197zrho00 = 1.2041 ! at P=1013.25hPa and T=20°C
198!
199!* 4.2 Constants for sedimentation
200!
202 (zrho00)**xcexvt
204 (zrho00)**xcexvt
206 (zrho00)**xcexvt
208 (zrho00)**xcexvt
209!
210! Shape factor of the raindrop distribution (precipitation scavenging)
212
213!
214xlb(2) = xlbc
215xlbex(2) = xlbexc
216xd(2) = xdc
217xfsedr(2) = xfsedrc
218xfsedc(2) = xfsedcc
219!
220xlb(3) = xlbr
221xlbex(3) = xlbexr
222xd(3) = xdr
223xfsedr(3) = xfsedrr
224xfsedc(3) = xfsedcr
225!
226xgcc = 0.5*gamma(xnuc+1./xalphac)/gamma(xnuc)
227!------------------------------------------------------------------------------
228!
229!
230!* 4. CONSTANTS FOR THE NUCLEATION PROCESS
231! ------------------------------------
232!
233!
234xwmin = 0.01 ! Minimal positive vertical velocity required
235 ! for the activation process in Twomey and CPB scheme
236xtmin = -0.000278 ! Minimal cooling required 1K/h
237!
238xdiva = 226.e-7 ! Diffusivity of water vapor in the air
239xthco = 24.3e-3 ! Air thermal conductivity
240!
241! ( 8 Mw (Sigma)sw )3 Pi*Rho_l
242! XCSTDCRIT = ( -------------- ) * --------
243! ( 3 Ra Rhow ) 6
244!
245zsurf_ten = 76.1e-3 ! Surface tension of a water drop at T=0 C
246xcstdcrit = (xpi/6.)*xrholw*( (8.0*zsurf_ten )/( 3.0*xrv*xrholw ) )**3
247!
248!
249!
250! 4.1 Tabulation of the hypergeometric functions in 'no units'
251! --------------------------------------------------------
252!
253! In LIMA's nucleation parameterization,
254! supersaturation is not in % : Smax=0.01 for a 1% supersaturation.
255! This is accounted for in the modified Beta and C values.
256!
257! Here, we tabulate the
258! F(mu,k/2, k/2+1 ,-Beta S**2) -> XHYPF12
259! F(mu,k/2,(k+3)/2,-Beta S**2) -> XHYPF32 functions
260! using a logarithmic scale for S
261!
262nhyp = 500 ! Number of points for the tabulation
263CALL param_lima_warm_allocate('XHYPF12', nhyp, nmod_ccn)
264CALL param_lima_warm_allocate('XHYPF32', nhyp, nmod_ccn)
265!
266zsmin = 1.0e-5 ! Minimum supersaturation set at 0.001 %
267zsmax = 5.0e-2 ! Maximum supersaturation set at 5 %
268xhypintp1 = real(nhyp-1)/log(zsmax/zsmin)
269xhypintp2 = real(nhyp)-xhypintp1*log(zsmax)
270!
271DO imod = 1,nmod_ccn
272 DO i1 = 1,nhyp
273 zss =zsmax*(zsmin/zsmax)**(real(nhyp-i1)/real(nhyp-1))
274 xhypf12(i1,imod) = hypgeo(xmuhen_multi(imod),0.5*xkhen_multi(imod),&
275 0.5*xkhen_multi(imod)+1.0,xbetahen_multi(imod),zss)
276 xhypf32(i1,imod) = hypgeo(xmuhen_multi(imod),0.5*xkhen_multi(imod),&
277 0.5*xkhen_multi(imod)+1.5,xbetahen_multi(imod),zss)
278 END DO
279ENDDO
280!
281nahen = 81 ! Tabulation for each Kelvin degree in the range XTT-40 to XTT+40
282xahenintp1 = 1.0
283xahenintp2 = 0.5*real(nahen-1) - xtt
284!
285! Compute the tabulation of function of T :
286!
287! 1
288! XAHENG = -----------------------
289! XCSTHEN * G**(3/2)
290!
291! Compute constants for the calculation of Smax.
292! XCSTHEN = 1/(rho_l 2 pi)
293! PSI1
294! PSI3
295! T
296! Lv
297! G
298!
299CALL param_lima_warm_allocate('XAHENG', nahen)
300CALL param_lima_warm_allocate('XAHENG2', nahen)
301CALL param_lima_warm_allocate('XAHENG3', nahen)
302CALL param_lima_warm_allocate('XPSI1', nahen)
303CALL param_lima_warm_allocate('XPSI3', nahen)
304xcsthen = 1.0 / ( xrholw*2.0*xpi )
305DO i1 = 1,nahen
306 ztt = xtt + real(i1-(nahen-1)/2) ! T
307 zlv = xlvtt+(xcpv-xcl)*(ztt-xtt) ! Lv
308 xpsi1(i1) = (xg/(xrd*ztt))*(xmv*zlv/(xmd*xcpd*ztt)-1.) ! Psi1
309 xpsi3(i1) = -1*xmv*zlv/(xmd*xrd*(ztt**2)) ! Psi3
310 zg = 1./( xrholw*( (xrv*ztt)/ & ! G
311 (xdiva*exp(xalpw-(xbetaw/ztt)-(xgamw*log(ztt)))) &
312 + (zlv/ztt)**2/(xthco*xrv) ) )
313 xaheng(i1) = xcsthen/(zg)**(3./2.)
314 xaheng2(i1) = 1/(zg)**(1./2.) * gamma(xnuc+1./xalphac)/gamma(xnuc)
315 xaheng3(i1) = (zg) * gamma(xnuc+1./xalphac)/gamma(xnuc)
316END DO
317!-------------------------------------------------------------------------------
318!
319! Parameters used to initialise the droplet and drop concentration
320! from the respective mixing ratios (used in RESTART_RAIN_C2R2)
321!
322! Droplet case
323!
324!!ALLOCATE(XCONCC_INI(SIZE(PNFS,1),SIZE(PNFS,2),SIZE(PNFS,3),SIZE(PNFS,4))) !NMOD_CCN))
325!! XCONCC_INI(:,:,:,:) = 0.8 * PNFS(:,:,:,:) ! 80% of the maximum CCN conc. is assumed
326!
327! Raindrop case
328!
329xconcr_param_ini = (1.e7)**3/(xpi*xrholw) ! MP law with N_O=1.E7 m-1 is assumed
330!
331!
332!------------------------------------------------------------------------------
333!
334!
335!* 5. CONSTANTS FOR THE COALESCENCE PROCESSES
336! ---------------------------------------
337!
338!
339!* 6.1 Csts for the coalescence processes
340!
341xkera1 = 2.59e15 ! From Long a1=9.44E9 cm-3 so XKERA1= 9.44E9*1E6*(PI/6)**2
342xkera2 = 3.03e3 ! From Long a2=5.78E3 so XKERA2= 5.78E3* (PI/6)
343!
344! Cst for the cloud droplet selfcollection process
345!
346xselfc = xkera1*zgamc(3)
347!
348! Cst for the autoconversion process
349!
350xauto1 = 6.25e18*(zgamc(2))**(1./3.)*sqrt(zgamc(4))
351xauto2 = 0.5e6*(zgamc(4))**(1./6.)
352xlautr = 2.7e-2
354xitautr= 0.27 ! (Notice that T2 of BR74 is uncorrect and that 0.27=1./3.7
356xcautr = 3.5e9
357xr0 = 25.0e-6
358!
359! Cst for the accretion process
360!
361xaccr1 = zgamr(2)**(1./3.)
362xaccr2 = 5.0e-6
363xaccr3 = 12.6e-4
365xaccr5 = 3.5
366xaccr6 = 1.2*xcautr
367xaccr_clarge1 = xkera2*zgamc(2)
368xaccr_clarge2 = xkera2*zgamr(2)
369xaccr_rlarge1 = xkera2*zgamc(3)*xrholw*(xpi/6.0)
370xaccr_rlarge2 = xkera2*zgamc(2)*zgamr(2)*xrholw*(xpi/6.0)
371xaccr_csmall1 = xkera1*zgamc(3)
372xaccr_csmall2 = xkera1*zgamr(3)
373xaccr_rsmall1 = xkera1*zgamc(5)*xrholw*(xpi/6.0)
374xaccr_rsmall2 = xkera1*zgamc(2)*zgamr(3)*xrholw*(xpi/6.0)
375!
376! ICE3 accretion of cloud droplets by rain drops
377!
378xfcaccr = (xpi/4.0)*xccr*xcr*(zrho00**xcexvt)*momg(xalphar,xnur,xdr+2.0)
379xexcaccr = -xdr-3.0
380!
381! Cst for the raindrop self-collection/breakup process
382!
383xscbu2 = xkera2*zgamr(2)
384xscbu3 = xkera1*zgamr(3)
385xscbu_eff1 = 0.6e-3
386xscbu_eff2 = 2.0e-3
387xscbuexp1 = -2500.0
388!
389!
390!------------------------------------------------------------------------------
391!
392!
393!* 6. CONSTANTS FOR THE "SONTANEOUS" BREAK-UP
394! ---------------------------------------
395!
396!
397xsponbud1 = 3.0e-3
398xsponbud2 = 4.0e-3
399xsponbud3 = 5.0e-3
401!
402!
403!------------------------------------------------------------------------------
404!
405!
406!* 7. CONSTANTS FOR EVAPORATION PROCESS
407! ---------------------------------------
408!
409!
410x0cndc = (4.0*xpi)*xc1c*xf0c*momg(xalphac,xnuc,1.)
412!
413! Valeurs utiles pour le calcul de l'évaporation en fonction de N_r
414!
415!XEX0EVAR = -1.0
416!XEX1EVAR = -1.0 - (XDR+1.0)*0.5
417!XEX2EVAR = -0.5*XCEXVT
418!
419!X0EVAR = (2.0*XPI)*XF0R*GAMMA(XNUR+1./XALPHAR)/GAMMA(XNUR)
420!X1EVAR = (2.0*XPI)*XF1R*((ZRHO00)**(XCEXVT)*(XCR/0.15E-4))**0.5* &
421! GAMMA(XNUR+(XDR+3.0)/(2.0*XALPHAR))/GAMMA(XNUR)
422!
423!
424! Valeurs utiles pour le calcul de l'évaporation en fonction de r_r
425!
426xex0evar = 2.0
427xex1evar = 2.0 - (xdr+1.0)*0.5
428xex2evar = -0.5*xcexvt
429!
430x0evar = (12.0)*xf0r*gamma(xnur+1./xalphar)/gamma(xnur+3./xalphar)
431x1evar = (12.0)*xf1r*xcr**0.5* &
432 gamma(xnur+(xdr+3.0)/(2.0*xalphar))/gamma(xnur+3./xalphar)
433!
434xcevap = 0.86
435!
436!------------------------------------------------------------------------------
437!
438!
439!* 8. SET-UP RADIATIVE PARAMETERS
440! ---------------------------
441!
442!
443! R_eff_c = XFREFFC * (rho*r_c/N_c)**(1/3)
444!
445!
446xfreffc = 0.5 * zgamc(6) * (1.0/xac)**(1.0/3.0)
447xfreffr = 0.5 * zgamr(6) * (1.0/xar)**(1.0/3.0)
448!
449! Coefficients used to compute reff when both cloud and rain are present
450!
451xcrec = 1.0/ (zgamc(6) * xac**(2.0/3.0))
452xcrer = 1.0/ (zgamr(6) * xar**(2.0/3.0))
453!
454!
455!------------------------------------------------------------------------------
456!
457!
458!* 9. SOME PRINTS FOR CONTROL
459! -----------------------
460!
461!
462!!$GFLAG = .TRUE.
463!!$IF (GFLAG) THEN
464!!$ ILUOUT0 = TLUOUT0%NLU
465!!$ WRITE(UNIT=ILUOUT0,FMT='(" Summary of the cloud particule characteristics")')
466!!$ WRITE(UNIT=ILUOUT0,FMT='(" CLOUD")')
467!!$ WRITE(UNIT=ILUOUT0,FMT='(" masse: A=",E13.6," B=",E13.6)') &
468!!$ XAR,XBR
469!!$ WRITE(UNIT=ILUOUT0,FMT='(" vitesse: C=",E13.6," D=",E13.6)') &
470!!$ XCC,XDC
471!!$ WRITE(UNIT=ILUOUT0,FMT='(" distribution:AL=",E13.6,"NU=",E13.6)') &
472!!$ XALPHAC,XNUC
473!!$ WRITE(UNIT=ILUOUT0,FMT='(" RAIN")')
474!!$ WRITE(UNIT=ILUOUT0,FMT='(" masse: A=",E13.6," B=",E13.6)') &
475!!$ XAR,XBR
476!!$ WRITE(UNIT=ILUOUT0,FMT='(" vitesse: C=",E13.6," D=",E13.6)') &
477!!$ XCR,XDR
478!!$ WRITE(UNIT=ILUOUT0,FMT='(" distribution:AL=",E13.6,"NU=",E13.6)') &
479!!$ XALPHAR,XNUR
480!!$ WRITE(UNIT=ILUOUT0,FMT='(" Description of the nucleation spectrum")')
481!!$ WRITE(UNIT=ILUOUT0,FMT='(" C=",E13.6," k=",E13.6)') XCHEN, XKHEN
482!!$ WRITE(UNIT=ILUOUT0,FMT='(" Beta=",E13.6," MU=",E13.6)') XBETAHEN, XMUHEN
483!!$ WRITE(UNIT=ILUOUT0,FMT='(" CCN max=",E13.6)') XCONC_CCN
484!!$END IF
485!
486!------------------------------------------------------------------------------
487!
488IF (lhook) CALL dr_hook('INI_LIMA_WARM', 1, zhook_handle)
489CONTAINS
490include "gamma.h"
491include "momg.h"
492END SUBROUTINE ini_lima_warm
493!
494END MODULE mode_ini_lima_warm
elemental real function gamma(px)
Definition gamma.h:14
elemental real function momg(palpha, pnu, pp)
Definition momg.h:12
real, pointer xg
Definition modd_cst.F90:147
real, pointer xgamw
Definition modd_cst.F90:163
real, pointer xrv
Definition modd_cst.F90:153
real, pointer xbetaw
Definition modd_cst.F90:163
real, pointer xtt
Definition modd_cst.F90:158
real, pointer xcpd
Definition modd_cst.F90:155
real, pointer xalpw
Definition modd_cst.F90:163
real, pointer xcpv
Definition modd_cst.F90:155
real, pointer xmv
Definition modd_cst.F90:152
real, pointer xrd
Definition modd_cst.F90:153
real, pointer xpi
Definition modd_cst.F90:139
real, pointer xrholw
Definition modd_cst.F90:156
real, pointer xlvtt
Definition modd_cst.F90:159
real, pointer xmd
Definition modd_cst.F90:152
real, pointer xcl
Definition modd_cst.F90:157
real, dimension(:), pointer xaheng
real, dimension(:), pointer xaheng3
real, dimension(:), pointer xaheng2
real, dimension(:), pointer xpsi1
real, dimension(:,:), pointer xhypf12
real, dimension(:), pointer xpsi3
real, dimension(:,:), pointer xhypf32
subroutine param_lima_warm_allocate(hname, kdim1, kdim2, kdim3, kdim4)
real, dimension(:), pointer xlb
integer, pointer nmod_ccn
real, dimension(:), pointer xfsedr
real, dimension(:), pointer xd
real, pointer xcexvt
real, dimension(:), pointer xmuhen_multi
real, pointer xalphar
real, pointer xalphac
integer, pointer nmom_r
real, dimension(:), pointer xbetahen_multi
real, dimension(:), pointer xlbex
real, dimension(:), pointer xfsedc
real, dimension(:), pointer xkhen_multi
subroutine ini_lima_warm(ptstep, pdzmin)