Newer
Older
!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!-----------------------------------------------------------------
! ##################
MODULE MODE_RZCOLX
! ##################
!
IMPLICIT NONE
CONTAINS
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
SUBROUTINE RZCOLX( KND, PALPHAX, PNUX, PALPHAZ, PNUZ, &
PEXZ, PEXMASSZ, PFALLX, PEXFALLX, PFALLZ, PEXFALLZ, &
PLBDAXMAX, PLBDAZMAX, PLBDAXMIN, PLBDAZMIN, &
PDINFTY, PRZCOLX )
USE PARKIND1, ONLY : JPRB
USE YOMHOOK , ONLY : LHOOK, DR_HOOK
! ########################################################################
!
!
!
!!**** * - Build up a look-up table containing the scaled fall speed
!! difference between size distributed particles of specy X and Z
!!
!!
!! PURPOSE
!! -------
!! The purpose of this routine is to integrate numerically the scaled fall
!! speed difference between specy X and specy Z for use in collection
!! kernels. A first integral of the form
!!
!! infty
!! / /
!! |{| }
!! |{| E_xz (Dx+Dz)^2 |cxDx^dx-czDz^dz| Dz^bz g(Dz) dDz} g(Dx) dDx
!! |{| }
!! / /
!! 0
!!
!! is evaluated and normalised by a second integral of the form
!!
!! infty
!! / /
!! |{| }
!! |{| (Dx+Dz)^2 Dz^bz g(Dz) dDz} g(Dx) dDx
!! |{| }
!! / /
!! 0
!!
!! where E_xz is a collection efficiency, g(D) is the generalized Gamma
!! distribution law. The 'infty' diameter is defined according to the
!! current value of the Lbda that is D_x=PDINFTY/Lbda_x or
!! D_z=PINFTY/Lbda_z.
!! The result is stored in a two-dimensional array.
!!
!!** METHOD
!! ------
!! The free parameters of the size distribution function of specy X and Z
!! (slope parameter LAMBDA) are discretized with a geometrical rate in a
!! specific range
!! LAMBDA = exp( (Log(LAMBDA_max) - Log(LAMBDA_min))/N_interval )
!! The two above integrals are performed using the trapezoidal scheme and
!! the [0,infty] interval is discretized over KND values of D_x or D_z.
!!
!! EXTERNAL
!! --------
!! MODI_GENERAL_GAMMA: Generalized gamma distribution law
!!
!! IMPLICIT ARGUMENTS
!! ------------------
!! None
!!
!! REFERENCE
!! ---------
!! B.S. Ferrier , 1994 : A Double-Moment Multiple-Phase Four-Class
!! Bulk Ice Scheme,JAS,51,249-280.
!!
!! AUTHOR
!! ------
!! J.-P. Pinty * Laboratoire d'Aerologie *
!!
!! MODIFICATIONS
!! -------------
!! Original 8/11/95
!!
! P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function
!
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
!-------------------------------------------------------------------------------
!
!
!* 0. DECLARATIONS
! ------------
!
USE MODI_GENERAL_GAMMA
!
IMPLICIT NONE
!
!
!* 0.1 Declarations of dummy arguments
! -------------------------------
!
!
INTEGER, INTENT(IN) :: KND ! Number of discrete size intervals in DX and DZ
!
!
REAL, INTENT(IN) :: PALPHAX ! First shape parameter of the specy X
! size distribution (generalized gamma law)
REAL, INTENT(IN) :: PNUX ! Second shape parameter of the specy X
! size distribution (generalized gamma law)
REAL, INTENT(IN) :: PALPHAZ ! First shape parameter of the specy Z
! size distribution (generalized gamma law)
REAL, INTENT(IN) :: PNUZ ! Second shape parameter of the specy Z
! size distribution (generalized gamma law)
REAL, INTENT(IN) :: PEXZ ! Efficiency of specy X collecting specy Z
REAL, INTENT(IN) :: PEXMASSZ ! Mass exponent of specy Z
REAL, INTENT(IN) :: PFALLX ! Fall speed constant of specy X
REAL, INTENT(IN) :: PEXFALLX ! Fall speed exponent of specy X
REAL, INTENT(IN) :: PFALLZ ! Fall speed constant of specy Z
REAL, INTENT(IN) :: PEXFALLZ ! Fall speed exponent of specy Z
REAL, INTENT(IN) :: PLBDAXMAX ! Maximun slope of size distribution of specy X
REAL, INTENT(IN) :: PLBDAZMAX ! Maximun slope of size distribution of specy Z
REAL, INTENT(IN) :: PLBDAXMIN ! Minimun slope of size distribution of specy X
REAL, INTENT(IN) :: PLBDAZMIN ! Minimun slope of size distribution of specy Z
REAL, INTENT(IN) :: PDINFTY ! Factor to define the largest diameter up to
! which the diameter integration is performed
!
REAL, DIMENSION(:,:), INTENT(INOUT) :: PRZCOLX ! Scaled fall speed difference in
! the mass collection kernel as a
! function of LAMBDAX and LAMBDAZ
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
!
!
!* 0.2 Declarations of local variables
! -------------------------------
!
!
INTEGER :: JLBDAX ! Slope index of the size distribution of specy X
INTEGER :: JLBDAZ ! Slope index of the size distribution of specy Z
INTEGER :: JDX ! Diameter index of a particle of specy X
INTEGER :: JDZ ! Diameter index of a particle of specy Z
!
!
REAL :: ZLBDAX ! Current slope parameter LAMBDA of specy X
REAL :: ZLBDAZ ! Current slope parameter LAMBDA of specy Z
REAL :: ZDLBDAX ! Growth rate of the slope parameter LAMBDA of specy X
REAL :: ZDLBDAZ ! Growth rate of the slope parameter LAMBDA of specy Z
REAL :: ZDDX ! Integration step of the diameter of specy X
REAL :: ZDDZ ! Integration step of the diameter of specy Z
REAL :: ZDX ! Current diameter of the particle specy X
REAL :: ZDZ ! Current diameter of the particle specy Z
REAL :: ZCOLLZ ! Single integral of the mass weighted fall speed difference
! over the spectrum of specy Z
REAL :: ZCOLLXZ ! Double integral of the mass weighted fall speed difference
! over the spectra of specy X and specy Z
REAL :: ZSCALZ ! Single integral of the scaling factor over
! the spectrum of specy Z
REAL :: ZSCALXZ ! Double integral of the scaling factor over
! the spectra of specy X and specy Z
REAL :: ZFUNC ! Ancillary function
!
!
!-------------------------------------------------------------------------------
!
!
!* 1 COMPUTE THE SCALED VELOCITZ DIFFERENCE IN THE MASS
!* COLLECTION KERNEL,
! -------------------------------------------------
!
!
!
!* 1.1 Compute the growth rate of the slope factors LAMBDA
!
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK('RZCOLX',0,ZHOOK_HANDLE)
ZDLBDAX = EXP( LOG(PLBDAXMAX/PLBDAXMIN)/REAL(SIZE(PRZCOLX(:,:),1)-1) )
ZDLBDAZ = EXP( LOG(PLBDAZMAX/PLBDAZMIN)/REAL(SIZE(PRZCOLX(:,:),2)-1) )
!
!* 1.2 Scan the slope factors LAMBDAX and LAMBDAZ
!
DO JLBDAX = 1,SIZE(PRZCOLX(:,:),1)
ZLBDAX = PLBDAXMIN * ZDLBDAX ** (JLBDAX-1)
DO JLBDAZ = 1,SIZE(PRZCOLX(:,:),2)
ZLBDAZ = PLBDAZMIN * ZDLBDAZ ** (JLBDAZ-1)
!
!* 1.3 Initialize the collection integrals
!
ZSCALXZ = 0.0
ZCOLLXZ = 0.0
!
!* 1.4 Compute the diameter steps
!
ZDDX = PDINFTY / (REAL(KND) * ZLBDAX)
ZDDZ = PDINFTY / (REAL(KND) * ZLBDAZ)
!
!* 1.5 Scan over the diameters DX and DZ
!
DO JDX = 1,KND-1
!
ZSCALZ = 0.0
ZCOLLZ = 0.0
DO JDZ = 1,KND-1
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
!
!* 1.6 Compute the normalization factor by integration over the
! dimensional spectrum of specy Z
!
ZFUNC = (ZDX+ZDZ)**2 * ZDZ**PEXMASSZ &
* GENERAL_GAMMA(PALPHAZ,PNUZ,ZLBDAZ,ZDZ)
ZSCALZ = ZSCALZ + ZFUNC
!
!* 1.7 Compute the scaled fall speed difference by integration over
! the dimensional spectrum of specy Z
!
ZCOLLZ = ZCOLLZ + ZFUNC &
* PEXZ * ABS(PFALLX*ZDX**PEXFALLX-PFALLZ*ZDZ**PEXFALLZ)
END DO
!
!* 1.8 Compute the normalization factor by integration over the
! dimensional spectrum of specy X
!
ZFUNC = GENERAL_GAMMA(PALPHAX,PNUX,ZLBDAX,ZDX)
ZSCALXZ = ZSCALXZ + ZSCALZ * ZFUNC
!
!* 1.9 Compute the scaled fall speed difference by integration over
! the dimensional spectrum of specy X
!
ZCOLLXZ = ZCOLLXZ + ZCOLLZ * ZFUNC
END DO
!
!* 1.10 Scale the fall speed difference
!
PRZCOLX(JLBDAX,JLBDAZ) = ZCOLLXZ / ZSCALXZ
END DO
END DO
!
IF (LHOOK) CALL DR_HOOK('RZCOLX',1,ZHOOK_HANDLE)
END SUBROUTINE RZCOLX