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