PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_lima_rrcolss.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_rrcolss( KSIZE1, KSIZE2, KND, PALPHAS, PNUS, PALPHAR, PNUR, &
13 PESR, PEXMASSR, PFALLS, PEXFALLS, PFALLEXPS, PFALLR, PEXFALLR, &
14 PLBDASMAX, PLBDARMAX, PLBDASMIN, PLBDARMIN, &
15 PDINFTY, PRRCOLSS, 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 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 aggregates and Z
53!! (slope parameter LAMBDA) are discretized with a geometrical rate in a
54!! 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!
89!
90USE modi_general_gamma, ONLY: general_gamma
91!
92USE modd_cst, ONLY: xpi, xrholw
93USE yomhook, ONLY:lhook, dr_hook, jphook
94!
95IMPLICIT NONE
96!
97!
98!* 0.1 Declarations of dummy arguments
99! -------------------------------
100!
101!
102INTEGER, INTENT(IN) :: KSIZE1 !
103INTEGER, INTENT(IN) :: KSIZE2 !
104INTEGER, INTENT(IN) :: KND ! Number of discrete size intervals in DS and DR
105!
106REAL, INTENT(IN) :: PALPHAS ! First shape parameter of the aggregates
107 ! size distribution (generalized gamma law)
108REAL, INTENT(IN) :: PNUS ! Second shape parameter of the aggregates
109 ! size distribution (generalized gamma law)
110REAL, INTENT(IN) :: PALPHAR ! First shape parameter of the rain
111 ! size distribution (generalized gamma law)
112REAL, INTENT(IN) :: PNUR ! Second shape parameter of the rain
113 ! size distribution (generalized gamma law)
114REAL, INTENT(IN) :: PESR ! Efficiency of aggregates collecting rain
115REAL, INTENT(IN) :: PEXMASSR ! Mass exponent of rain
116REAL, INTENT(IN) :: PFALLS ! Fall speed constant of aggregates
117REAL, INTENT(IN) :: PEXFALLS ! Fall speed exponent of aggregates
118REAL, INTENT(IN) :: PFALLEXPS ! Fall speed exponential of aggregates (Thompson 2008)
119REAL, INTENT(IN) :: PFALLR ! Fall speed constant of rain
120REAL, INTENT(IN) :: PEXFALLR ! Fall speed exponent of rain
121REAL, INTENT(IN) :: PLBDASMAX ! Maximun slope of size distribution of aggregates
122REAL, INTENT(IN) :: PLBDARMAX ! Maximun slope of size distribution of rain
123REAL, INTENT(IN) :: PLBDASMIN ! Minimun slope of size distribution of aggregates
124REAL, INTENT(IN) :: PLBDARMIN ! Minimun slope of size distribution of rain
125REAL, INTENT(IN) :: PDINFTY ! Factor to define the largest diameter up to
126 ! which the diameter integration is performed
127REAL, INTENT(IN) :: PAG, PBS, PAS
128!
129REAL, DIMENSION(KSIZE1,KSIZE2), INTENT(INOUT) :: PRRCOLSS! Scaled fall speed difference in
130 ! the mass collection kernel as a
131 ! function of LAMBDAX and LAMBDAZ
132!
133!
134!* 0.2 Declarations of local variables
135! -------------------------------
136!
137!
138INTEGER :: JLBDAS ! Slope index of the size distribution of aggregates
139INTEGER :: JLBDAR ! Slope index of the size distribution of rain
140INTEGER :: JDS ! Diameter index of a particle of aggregates
141INTEGER :: JDR ! Diameter index of a particle of rain
142!
143INTEGER :: INR ! Number of diameter step for the partial integration
144!
145!
146REAL :: ZLBDAS ! Current slope parameter LAMBDA of aggregates
147REAL :: ZLBDAR ! Current slope parameter LAMBDA of rain
148REAL :: ZDLBDAS ! Growth rate of the slope parameter LAMBDA of aggregates
149REAL :: ZDLBDAR ! Growth rate of the slope parameter LAMBDA of rain
150REAL :: ZDDS ! Integration step of the diameter of aggregates
151REAL :: ZDDSCALR! Integration step of the diameter of rain (scaling integral)
152REAL :: ZDDCOLLR! Integration step of the diameter of rain (fallspe integral)
153REAL :: ZDS ! Current diameter of the particle aggregates
154REAL :: ZDR ! Current diameter of the rain
155REAL :: ZDRMAX ! Maximal diameter of the raindrops where the integration ends
156REAL :: ZCOLLR ! Single integral of the mass weighted fall speed difference
157 ! over the spectrum of rain
158REAL :: ZCOLLDRMAX ! Maximum ending point for the partial integral
159REAL :: ZCOLLSR ! Double integral of the mass weighted fall speed difference
160 ! over the spectra of aggregates and rain
161REAL :: ZSCALR ! Single integral of the scaling factor over
162 ! the spectrum of rain
163REAL :: ZSCALSR ! Double integral of the scaling factor over
164 ! the spectra of aggregates and rain
165REAL :: ZFUNC ! Ancillary function
166REAL :: ZCST1
167REAL(KIND=jphook) :: zhook_handle
168!
169!
170!-------------------------------------------------------------------------------
171!
172!
173!* 1 COMPUTE THE SCALED VELOCITY DIFFERENCE IN THE MASS
174!* COLLECTION KERNEL,
175! -------------------------------------------------
176!
177!
178!
179!* 1.0 Initialization
180!
181IF (lhook) CALL dr_hook('LIMA_RRCOLSS', 0, zhook_handle)
182prrcolss(:,:) = 0.0
183zcst1 = (3.0/xpi)/xrholw
184!
185!* 1.1 Compute the growth rate of the slope factors LAMBDA
186!
187zdlbdas = exp( log(plbdasmax/plbdasmin)/real(SIZE(prrcolss(:,:),1)-1) )
188zdlbdar = exp( log(plbdarmax/plbdarmin)/real(SIZE(prrcolss(:,:),2)-1) )
189!
190!* 1.2 Scan the slope factors LAMBDAX and LAMBDAZ
191!
192DO jlbdas = 1,SIZE(prrcolss(:,:),1)
193 zlbdas = plbdasmin * zdlbdas ** (jlbdas-1)
194!
195!* 1.3 Compute the diameter steps
196!
197 zdds = pdinfty / (real(knd) * zlbdas)
198 DO jlbdar = 1,SIZE(prrcolss(:,:),2)
199 zlbdar = plbdarmin * zdlbdar ** (jlbdar-1)
200!
201!* 1.4 Initialize the collection integrals
202!
203 zscalsr = 0.0
204 zcollsr = 0.0
205!
206!* 1.5 Compute the diameter steps
207!
208 zddscalr = pdinfty / (real(knd) * zlbdar)
209!
210!* 1.6 Scan over the diameters DS and DR
211!
212 DO jds = 1,knd-1
213 zds = zdds * real(jds)
214 zscalr = 0.0
215 zcollr = 0.0
216 DO jdr = 1,knd-1
217 zdr = zddscalr * real(jdr)
218!
219!* 1.7 Compute the normalization factor by integration over the
220! dimensional spectrum of rain
221!
222 zscalr = zscalr + (zds+zdr)**2 * zdr**pexmassr &
223 * general_gamma(palphar,pnur,zlbdar,zdr)
224 END DO
225!
226!* 1.8 Compute the scaled fall speed difference by partial
227! integration over the dimensional spectrum of rain
228!
229 zfunc = pag - pas*zds**(pbs-3.0) ! approximate limit is Ds=240 microns
230 IF( zfunc>0.0 ) THEN
231 zdrmax = zds*( zcst1*zfunc )**0.3333333
232 ELSE
233 zdrmax = pdinfty / zlbdar
234 END IF
235 IF( zds>1.0e-4 ) THEN ! allow computation if Ds>100 microns
236 ! corresponding to a maximal density of the aggregates of XRHOLW
237 IF( zdrmax >= 0.5*zddscalr ) THEN
238 inr = ceiling( zdrmax/zddscalr )
239 zddcollr = zdrmax / real(inr)
240 IF (inr>=knd ) THEN
241 inr = knd
242 zddcollr = zddscalr
243 END IF
244 DO jdr = 1,inr-1
245 zdr = zddcollr * real(jdr)
246 zcollr = zcollr + (zds+zdr)**2 * zdr**pexmassr &
247 * pesr * abs(pfalls*zds**pexfalls * exp(-(pfallexps*zds)**palphas)-pfallr*zdr**pexfallr) &
248 * general_gamma(palphar,pnur,zlbdar,zdr)
249 END DO
250 zcolldrmax = (zds+zdrmax)**2 * zdrmax**pexmassr &
251 * pesr * abs(pfalls*zds**pexfalls* exp(-(pfallexps*zds)**palphas)-pfallr*zdrmax**pexfallr) &
252 * general_gamma(palphar,pnur,zlbdar,zdrmax)
253 zcollr = (zcollr + 0.5*zcolldrmax)*(zddcollr/zddscalr)
254!
255!* 1.9 Compute the normalization factor by integration over the
256! dimensional spectrum of aggregates
257!
258 zfunc = general_gamma(palphas,pnus,zlbdas,zds)
259 zscalsr = zscalsr + zscalr * zfunc
260!
261!* 1.10 Compute the scaled fall speed difference by integration over
262! the dimensional spectrum of aggregates
263!
264 zcollsr = zcollsr + zcollr * zfunc
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.11 Scale the fall speed difference
274!
275 IF( zscalsr>0.0 ) prrcolss(jlbdas,jlbdar) = zcollsr / zscalsr
276 END DO
277END DO
278!
279IF (lhook) CALL dr_hook('LIMA_RRCOLSS', 1, zhook_handle)
280END SUBROUTINE lima_rrcolss
281END MODULE mode_lima_rrcolss
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_rrcolss(ksize1, ksize2, knd, palphas, pnus, palphar, pnur, pesr, pexmassr, pfalls, pexfalls, pfallexps, pfallr, pexfallr, plbdasmax, plbdarmax, plbdasmin, plbdarmin, pdinfty, prrcolss, pag, pbs, pas)