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