PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_lima_rscolrg.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1995-2019 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
11CONTAINS
12 SUBROUTINE lima_rscolrg( KSIZE1, KSIZE2, KND, PALPHAS, PZNUS, PALPHAR, PNUR, &
13 PESR, PEXMASSS, PFALLS, PEXFALLS, PFALLEXPS, PFALLR, PEXFALLR, &
14 PLBDASMAX, PLBDARMAX, PLBDASMIN, PLBDARMIN, &
15 PDINFTY, PRSCOLRG,PAG, PBS, PAS )
16! ########################################################################
17!
18!
19!
20!!**** * - Build up a look-up table containing the scaled fall speed
21!! difference between size distributed particles of the aggregates and Z
22!!
23!!
24!! PURPOSE
25!! -------
26!! The purpose of this routine is to integrate numerically the scaled fall
27!! speed difference between aggregates and rain for use in collection
28!! kernels. A first integral of the form
29!!
30!! infty Dz_max
31!! / /
32!! |{| }
33!! |{| E_xz (Dx+Dz)^2 |cxDx^dx-czDz^dz| Dz^bz n(Dz) dDz} n(Dx) dDx
34!! |{| }
35!! / /
36!! 0 Dz_min
37!!
38!! is evaluated and normalised by a second integral of the form
39!!
40!! infty
41!! / /
42!! |{| }
43!! |{| (Dx+Dz)^2 Dz^bz n(Dz) dDz} n(Dx) dDx
44!! |{| }
45!! / /
46!! 0
47!!
48!! The result is stored in a two-dimensional array.
49!!
50!!** METHOD
51!! ------
52!! The free parameters of the size distribution function of the aggregates
53!! and Z (slope parameter LAMBDA) are discretized with a geometrical rate
54!! in a specific range
55!! LAMBDA = exp( (Log(LAMBDA_max) - Log(LAMBDA_min))/N_interval )
56!! The two above integrals are performed using the trapezoidal scheme.
57!!
58!! EXTERNAL
59!! --------
60!! MODI_GENERAL_GAMMA: Generalized gamma distribution law
61!!
62!! IMPLICIT ARGUMENTS
63!! ------------------
64!! MODD_CST : XPI,XRHOLW
65!! MODD_RAIN_ICE_DESCR: XAS,XAS,XBS
66!!
67!! REFERENCE
68!! ---------
69!! B.S. Ferrier , 1994 : A Double-Moment Multiple-Phase Four-Class
70!! Bulk Ice Scheme,JAS,51,249-280.
71!!
72!! AUTHOR
73!! ------
74!! J.-P. Pinty * Laboratoire d'Aerologie *
75!!
76!! MODIFICATIONS
77!! -------------
78!! Original 8/11/95
79!!
80! P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function
81! J. Wurtz 03/2022: new snow characteristics
82!
83!-------------------------------------------------------------------------------
84!
85!
86!* 0. DECLARATIONS
87! ------------
88!
89USE modi_general_gamma, ONLY: general_gamma
90!
91USE modd_cst, ONLY: xpi, xrholw
92USE yomhook, ONLY:lhook, dr_hook, jphook
93!
94IMPLICIT NONE
95!
96!* 0.1 Declarations of dummy arguments
97! -------------------------------
98!
99!
100INTEGER, INTENT(IN) :: KSIZE1
101INTEGER, INTENT(IN) :: KSIZE2
102INTEGER, INTENT(IN) :: KND ! Number of discrete size intervals in DS and DR
103!
104REAL, INTENT(IN) :: PALPHAS ! First shape parameter of the aggregates
105 ! size distribution (generalized gamma law)
106REAL, INTENT(IN) :: PZNUS ! Second shape parameter of the aggregates
107 ! size distribution (generalized gamma law)
108REAL, INTENT(IN) :: PALPHAR ! First shape parameter of the rain
109 ! size distribution (generalized gamma law)
110REAL, INTENT(IN) :: PNUR ! Second shape parameter of the rain
111 ! size distribution (generalized gamma law)
112REAL, INTENT(IN) :: PESR ! Efficiency of the aggregates collecting rain
113REAL, INTENT(IN) :: PEXMASSS ! Mass exponent of the aggregates
114REAL, INTENT(IN) :: PFALLS ! Fall speed constant of the aggregates
115REAL, INTENT(IN) :: PEXFALLS ! Fall speed exponent of the aggregates
116REAL, INTENT(IN) :: PFALLEXPS ! Fall speed exponential constant of the aggregates
117REAL, INTENT(IN) :: PFALLR ! Fall speed constant of rain
118REAL, INTENT(IN) :: PEXFALLR ! Fall speed exponent of rain
119REAL, INTENT(IN) :: PLBDASMAX ! Maximun slope of size distribution of the aggregates
120REAL, INTENT(IN) :: PLBDARMAX ! Maximun slope of size distribution of rain
121REAL, INTENT(IN) :: PLBDASMIN ! Minimun slope of size distribution of the aggregates
122REAL, INTENT(IN) :: PLBDARMIN ! Minimun slope of size distribution of rain
123REAL, INTENT(IN) :: PDINFTY ! Factor to define the largest diameter up to
124 ! which the diameter integration is performed
125REAL, INTENT(IN) :: PAG, PBS, PAS
126!
127REAL, DIMENSION(KSIZE1,KSIZE2), INTENT(INOUT) :: PRSCOLRG! Scaled fall speed difference in
128 ! the mass collection kernel as a
129 ! function of LAMBDAX and LAMBDAZ
130!
131!
132!* 0.2 Declarations of local variables
133! -------------------------------
134!
135!
136INTEGER :: JLBDAS ! Slope index of the size distribution of the aggregates
137INTEGER :: JLBDAR ! Slope index of the size distribution of rain
138INTEGER :: JDS ! Diameter index of a particle of the aggregates
139INTEGER :: JDR ! Diameter index of a particle of rain
140!
141INTEGER :: INR ! Number of diameter step for the partial integration
142!
143REAL :: ZLBDAS ! Current slope parameter LAMBDA of the aggregates
144REAL :: ZLBDAR ! Current slope parameter LAMBDA of rain
145REAL :: ZDLBDAS ! Growth rate of the slope parameter LAMBDA of the aggregates
146REAL :: ZDLBDAR ! Growth rate of the slope parameter LAMBDA of rain
147REAL :: ZDDS ! Integration step of the diameter of the aggregates
148REAL :: ZDDSCALR! Integration step of the diameter of rain (scaling integral)
149REAL :: ZDDCOLLR! Integration step of the diameter of rain (fallspe integral)
150REAL :: ZDS ! Current diameter of the particle aggregates
151REAL :: ZDR ! Current diameter of the raindrops
152REAL :: ZDRMIN ! Minimal diameter of the raindrops where the integration starts
153REAL :: ZDRMAX ! Maximal diameter of the raindrops where the integration ends
154REAL :: ZCOLLR ! Single integral of the mass weighted fall speed difference
155 ! over the spectrum of rain
156REAL :: ZCOLLDRMIN ! Minimum ending point for the partial integral
157REAL :: ZCOLLSR ! Double integral of the mass weighted fall speed difference
158 ! over the spectra of the aggregates and rain
159REAL :: ZSCALR ! Single integral of the scaling factor over
160 ! the spectrum of rain
161REAL :: ZSCALSR ! Double integral of the scaling factor over
162 ! the spectra of the aggregates and rain
163REAL :: ZFUNC ! Ancillary function
164REAL :: ZCST1
165REAL(KIND=jphook) :: zhook_handle
166!
167!
168!-------------------------------------------------------------------------------
169!
170!
171!* 1 COMPUTE THE SCALED VELOCITY DIFFERENCE IN THE MASS
172!* COLLECTION KERNEL,
173! -------------------------------------------------
174!
175!
176!* 1.0 Initialization
177!
178IF (lhook) CALL dr_hook('LIMA_RSCOLRG', 0, zhook_handle)
179prscolrg(:,:) = 0.0
180zcst1 = (3.0/xpi)/xrholw
181!
182!* 1.1 Compute the growth rate of the slope factors LAMBDA
183!
184zdlbdar = exp( log(plbdarmax/plbdarmin)/real(SIZE(prscolrg(:,:),1)-1) )
185zdlbdas = exp( log(plbdasmax/plbdasmin)/real(SIZE(prscolrg(:,:),2)-1) )
186!
187!* 1.2 Scan the slope factors LAMBDAX and LAMBDAZ
188!
189DO jlbdar = 1,SIZE(prscolrg(:,:),1)
190 zlbdar = plbdarmin * zdlbdar ** (jlbdar-1)
191 zdrmax = pdinfty / zlbdar
192!
193!* 1.3 Compute the diameter steps
194!
195 zddscalr = pdinfty / (real(knd) * zlbdar)
196 DO jlbdas = 1,SIZE(prscolrg(:,:),2)
197 zlbdas = plbdasmin * zdlbdas ** (jlbdas-1)
198!
199!* 1.4 Initialize the collection integrals
200!
201 zscalsr = 0.0
202 zcollsr = 0.0
203!
204!* 1.5 Compute the diameter steps
205!
206 zdds = pdinfty / (real(knd) * zlbdas)
207!
208!* 1.6 Scan over the diameters DS and DR
209!
210 DO jds = 1,knd-1
211 zds = zdds * real(jds)
212 zscalr = 0.0
213 zcollr = 0.0
214 DO jdr = 1,knd-1
215 zdr = zddscalr * real(jdr)
216!
217!* 1.7 Compute the normalization factor by integration over the
218! dimensional spectrum of rain
219!
220 zscalr = zscalr + (zds+zdr)**2 * general_gamma(palphar,pnur,zlbdar,zdr)
221 END DO
222!
223!* 1.8 Compute the scaled fall speed difference by partial
224! integration over the dimensional spectrum of rain
225!
226 zfunc = pag - pas*zds**(pbs-3.0) ! approximate limit is Ds=240 microns
227 IF( zfunc>0.0 ) THEN
228 zdrmin = zds*( zcst1*zfunc )**0.3333333
229 ELSE
230 zdrmin = 0.0
231 END IF
232 IF( zds>1.0e-4 ) THEN ! allow computation if Ds>100 microns
233 ! corresponding to a maximal density of the aggregates of XRHOLW
234 IF( (zdrmax-zdrmin) >= 0.5*zddscalr ) THEN
235 inr = ceiling( (zdrmax-zdrmin)/zddscalr )
236 zddcollr = (zdrmax-zdrmin) / real(inr)
237 DO jdr = 1,inr-1
238 zdr = zddcollr * real(jdr) + zdrmin
239 zcollr = zcollr + (zds+zdr)**2 &
240 * general_gamma(palphar,pnur,zlbdar,zdr) &
241 * pesr * abs(pfalls*zds**pexfalls*exp(-(zds*pfallexps)**palphas)-pfallr*zdr**pexfallr)
242 END DO
243 IF( zdrmin>0.0 ) THEN
244 zcolldrmin = (zds+zdrmin)**2 &
245 * general_gamma(palphar,pnur,zlbdar,zdrmin) &
246 * pesr * abs(pfalls*zds**pexfalls*exp(-(zds*pfallexps)**palphas)-pfallr*zdrmin**pexfallr)
247 ELSE
248 zcolldrmin = 0.0
249 END IF
250 zcollr = (zcollr + 0.5*zcolldrmin)*(zddcollr/zddscalr)
251!
252!* 1.9 Compute the normalization factor by integration over the
253! dimensional spectrum of the aggregates
254!
255 zfunc = (zds**pexmasss) * general_gamma(palphas,pznus,zlbdas,zds)
256 zscalsr = zscalsr + zscalr * zfunc
257!
258!* 1.10 Compute the scaled fall speed difference by integration over
259! the dimensional spectrum of the aggregates
260!
261 zcollsr = zcollsr + zcollr * zfunc
262!
263! Otherwise ZDRMIN>ZDRMAX so PRRCOLSS(JLBDAS,JLBDAR) = 0.0 !
264!
265 END IF
266!
267! Otherwise ZDRMAX = 0.0 so the density of the graupel cannot be reached
268! and so PRRCOLSS(JLBDAS,JLBDAR) = 0.0 !
269!
270 END IF
271 END DO
272!
273!* 1.10 Scale the fall speed difference
274!
275 IF( zscalsr>0.0 ) prscolrg(jlbdar,jlbdas) = zcollsr / zscalsr
276 END DO
277END DO
278!
279IF (lhook) CALL dr_hook('LIMA_RSCOLRG', 1, zhook_handle)
280END SUBROUTINE lima_rscolrg
281END MODULE mode_lima_rscolrg
real function general_gamma(palpha, pnu, plbda, px)
real, pointer xpi
Definition modd_cst.F90:139
real, pointer xrholw
Definition modd_cst.F90:156
subroutine lima_rscolrg(ksize1, ksize2, knd, palphas, pznus, palphar, pnur, pesr, pexmasss, pfalls, pexfalls, pfallexps, pfallr, pexfallr, plbdasmax, plbdarmax, plbdasmin, plbdarmin, pdinfty, prscolrg, pag, pbs, pas)