PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_nrcolss.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 nrcolss( KSIZE1, KSIZE2, KND, PALPHAS, PNUS, PALPHAR, PNUR, &
11 PESR, PFALLS, PEXFALLS, PFALLEXPS, PFALLR, PEXFALLR,&
12 PLBDASMAX, PLBDARMAX, PLBDASMIN, PLBDARMIN, &
13 PDINFTY, PNRCOLSS, 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 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 FOR CONCENTRATIONS. 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 aggregates and Z
51!! (slope parameter LAMBDA) are discretized with a geometrical rate in a
52!! 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 rrcolss for concentration
78!! J. Wurtz 03/2022 New snow characteristics
79!!
80!-------------------------------------------------------------------------------
81!
82!
83!* 0. DECLARATIONS
84! ------------
85!
86!
87USE modi_general_gamma, ONLY: general_gamma
88!
89USE modd_cst, ONLY:xpi, xrholw
90USE yomhook, ONLY:lhook, dr_hook, jphook
91!
92IMPLICIT NONE
93!
94!
95!* 0.1 Declarations of dummy arguments
96! -------------------------------
97!
98!
99INTEGER, INTENT(IN) :: KSIZE1 !
100INTEGER, INTENT(IN) :: KSIZE2 !
101INTEGER, INTENT(IN) :: KND ! Number of discrete size intervals in DS and DR
102!
103REAL, INTENT(IN) :: PALPHAS ! First shape parameter of the aggregates
104 ! size distribution (generalized gamma law)
105REAL, INTENT(IN) :: PNUS ! Second shape parameter of the aggregates
106 ! size distribution (generalized gamma law)
107REAL, INTENT(IN) :: PALPHAR ! First shape parameter of the rain
108 ! size distribution (generalized gamma law)
109REAL, INTENT(IN) :: PNUR ! Second shape parameter of the rain
110 ! size distribution (generalized gamma law)
111REAL, INTENT(IN) :: PESR ! Efficiency of aggregates collecting rain
112REAL, INTENT(IN) :: PFALLS ! Fall speed constant of aggregates
113REAL, INTENT(IN) :: PEXFALLS ! Fall speed exponent of aggregates
114REAL, INTENT(IN) :: PFALLEXPS ! Fall speed exponential of aggregates (Thompson 2008)
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 aggregates
118REAL, INTENT(IN) :: PLBDARMAX ! Maximun slope of size distribution of rain
119REAL, INTENT(IN) :: PLBDASMIN ! Minimun slope of size distribution of 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(KSIZE1,KSIZE2), INTENT(OUT) :: PNRCOLSS! 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 aggregates
135INTEGER :: JLBDAR ! Slope index of the size distribution of rain
136INTEGER :: JDS ! Diameter index of a particle of aggregates
137INTEGER :: JDR ! Diameter index of a particle of rain
138!
139INTEGER :: INR ! Number of diameter step for the partial integration
140!
141!
142REAL :: ZLBDAS ! Current slope parameter LAMBDA of aggregates
143REAL :: ZLBDAR ! Current slope parameter LAMBDA of rain
144REAL :: ZDLBDAS ! Growth rate of the slope parameter LAMBDA of aggregates
145REAL :: ZDLBDAR ! Growth rate of the slope parameter LAMBDA of rain
146REAL :: ZDDS ! Integration step of the diameter of aggregates
147REAL :: ZDDSCALR! Integration step of the diameter of rain (scaling integral)
148REAL :: ZDDCOLLR! Integration step of the diameter of rain (fallspe integral)
149REAL :: ZDS ! Current diameter of the particle aggregates
150REAL :: ZDR ! Current diameter of the rain
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 :: ZCOLLDRMAX ! Maximum ending point for the partial integral
155REAL :: ZCOLLSR ! Double integral of the mass weighted fall speed difference
156 ! over the spectra of 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 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!
175!* 1.0 Initialization
176!
177IF (lhook) CALL dr_hook('NRCOLSS', 0, zhook_handle)
178pnrcolss(:,:) = 0.0
179zcst1 = (3.0/xpi)/xrholw
180!
181!* 1.1 Compute the growth rate of the slope factors LAMBDA
182!
183zdlbdas = exp( log(plbdasmax/plbdasmin)/real(SIZE(pnrcolss(:,:),1)-1) )
184zdlbdar = exp( log(plbdarmax/plbdarmin)/real(SIZE(pnrcolss(:,:),2)-1) )
185!
186!* 1.2 Scan the slope factors LAMBDAX and LAMBDAZ
187!
188DO jlbdas = 1,SIZE(pnrcolss(:,:),1)
189 zlbdas = plbdasmin * zdlbdas ** (jlbdas-1)
190!
191!* 1.3 Compute the diameter steps
192!
193 zdds = pdinfty / (real(knd) * zlbdas)
194 DO jlbdar = 1,SIZE(pnrcolss(:,:),2)
195 zlbdar = plbdarmin * zdlbdar ** (jlbdar-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 zddscalr = pdinfty / (real(knd) * zlbdar)
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 zdrmax = zds*( zcst1*zfunc )**0.3333333
227 ELSE
228 zdrmax = pdinfty / zlbdar
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 >= 0.5*zddscalr ) THEN
233 inr = ceiling( zdrmax/zddscalr )
234 zddcollr = zdrmax / real(inr)
235 IF (inr>=knd ) THEN
236 inr = knd
237 zddcollr = zddscalr
238 END IF
239 DO jdr = 1,inr-1
240 zdr = zddcollr * real(jdr)
241 zcollr = zcollr + (zds+zdr)**2 &
242 * pesr * abs(pfalls*zds**pexfalls * exp(-(pfallexps*zds)**palphas)-pfallr*zdr**pexfallr) &
243 * general_gamma(palphar,pnur,zlbdar,zdr)
244 END DO
245 zcolldrmax = (zds+zdrmax)**2 &
246 * pesr * abs(pfalls*zds**pexfalls* exp(-(pfallexps*zds)**palphas)-pfallr*zdrmax**pexfallr) &
247 * general_gamma(palphar,pnur,zlbdar,zdrmax)
248 zcollr = (zcollr + 0.5*zcolldrmax)*(zddcollr/zddscalr)
249!
250!* 1.9 Compute the normalization factor by integration over the
251! dimensional spectrum of aggregates
252!
253 zfunc = general_gamma(palphas,pnus,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 aggregates
258!
259 zcollsr = zcollsr + zcollr * zfunc
260 END IF
261!
262! Otherwise ZDRMAX = 0.0 so the density of the graupel cannot be reached
263! and so PRRCOLSS(JLBDAS,JLBDAR) = 0.0 !
264!
265 END IF
266 END DO
267!
268!* 1.11 Scale the fall speed difference
269!
270 IF( zscalsr>0.0 ) pnrcolss(jlbdas,jlbdar) = zcollsr / zscalsr
271 END DO
272END DO
273!
274IF (lhook) CALL dr_hook('NRCOLSS', 1, zhook_handle)
275END SUBROUTINE nrcolss
276END MODULE mode_nrcolss
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 nrcolss(ksize1, ksize2, knd, palphas, pnus, palphar, pnur, pesr, pfalls, pexfalls, pfallexps, pfallr, pexfallr, plbdasmax, plbdarmax, plbdasmin, plbdarmin, pdinfty, pnrcolss, pag, pbs, pas)