PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
modd_icet_param.F90
Go to the documentation of this file.
1
3
4!! AUTHOR
5!! ------
6!! B.J.K.Engdahl 2022 add ICE-T
7!!
8!! MODIFICATIONS
9!! -------------
10!! Original 2022
11!! Rolf H. Myhre 2024 Separated out to adapt to CY49T1
12!-------------------------------------------------------------------------------
13
14 USE modd_precision, ONLY: mnhreal64
16
17 IMPLICIT NONE
18
19 ! Ice initiates with this mass (kg), corresponding diameter calc.
20 ! Min diameters and mass of cloud, rain, snow, and graupel (m, kg).
21 REAL, PARAMETER :: xd0c = 1.e-6
22 REAL, PARAMETER :: xd0r = 50.e-6
23 REAL, PARAMETER :: xd0g = 250.e-6
24 REAL, PARAMETER :: xd0s = 200.e-6
25
26 ! Minimum microphys values
27 ! R1 value, 1.E-12, cannot be set lower because of numerical
28 ! problems with Paul Field's moments and should not be set larger
29 ! because of truncation problems in snow/ice growth.
30 REAL, PARAMETER :: xicet_eps = 1.e-15
31 REAL, PARAMETER :: xicet_r1 = 1.e-12
32
33 ! Lookup table dimensions
34 INTEGER, PARAMETER :: nbins = 100
35 INTEGER, PARAMETER :: nbc = nbins
36 INTEGER, PARAMETER :: nbr = nbins
37 INTEGER, PARAMETER :: nbs = nbins
38 INTEGER, PARAMETER :: ntb_c = 37
39 INTEGER, PARAMETER :: ntb_r = 37
40 INTEGER, PARAMETER :: ntb_g = 28
41 INTEGER, PARAMETER :: ntb_r1 = 37
42 INTEGER, PARAMETER :: ntb_in = 55
43
44 !************ BJKE for ice nucleation 28.11.16 *************************
45 ! Constants in Cooper curve relation for cloud ice number.
46 REAL, PARAMETER :: xtno = 5.0
47 REAL, PARAMETER :: xato = 0.304
48
49 !******************** BJKE Bigg (1953) freezing ++ *********************
50 ! Generalized gamma distributions for rain, graupel and cloud ice.
51 ! N(D) = N_0 * D**mu * exp(-lamda*D); mu=0 is exponential.
52 REAL, PARAMETER :: xmu_r = 0.0
53 REAL, PARAMETER :: xmu_g = 0.0
54 REAL, PARAMETER :: xmu_i = 0.0
55
56 ! Sum of two gamma distrib for snow (Field et al. 2005).
57 ! N(D) = M2**4/M3**3 * [Kap0*exp(-M2*Lam0*D/M3)
58 ! + Kap1*(M2/M3)**mu_s * D**mu_s * exp(-M2*Lam1*D/M3)]
59 ! M2 and M3 are the (XBS)th and (XBS+1)th moments respectively
60 ! calculated as function of ice water content and temperature.
61 REAL, PARAMETER :: xmu_s = 0.6357
62
63 ! Densities of rain, snow, graupel, and cloud ice.
64 REAL, PARAMETER :: xrho_g = 500.0
65 REAL, PARAMETER :: xrho_i = 890.0
66
67 REAL, PARAMETER :: xbm_g = 3.0
68 REAL, PARAMETER :: xbm_i = 3.0
69
70 ! Rho_not used in fallspeed relations (rho_not/rho)**.5 adjustment.
71 REAL, PARAMETER :: xrho_not = 101325.0/(287.05*298.0)
72
73 ! Fallspeed power laws relations: v = (av*D**bv)*exp(-fv*D)
74 ! Rain from Ferrier (1994), ice, snow, and graupel from
75 ! Thompson et al (2008). Coefficient fv is zero for graupel/ice.
76 REAL, PARAMETER :: xbv_r = 1.0
77 REAL, PARAMETER :: xfv_s = 100.0
78 REAL, PARAMETER :: xbv_i = 1.0
79 REAL, PARAMETER :: xbv_c = 2.0
80
81 ! Water vapor and air gas constants at constant pressure
82 REAL, PARAMETER :: xr_thom = 287.04
83
84 ! Y-intercept parameter for graupel is not constant and depends on
85 ! mixing ratio. Also, when mu_g is non-zero, these become equiv
86 ! y-intercept for an exponential distrib and proper values are
87 ! computed based on same mixing ratio and total number concentration.
88 REAL, PARAMETER :: xgonv_min = 1.e4
89 REAL, PARAMETER :: xgonv_max = 3.e6
90
91 REAL, PARAMETER, DIMENSION(2) :: xthvrefz=300. ! Thetav(z) for reference
92 ! state without orography
93
94 ! Lookup tables for cloud water content (kg/m**3).
95 REAL, DIMENSION(NTB_C), PARAMETER :: &
96 xr_c = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &
97 1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
98 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
99 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
100 1.e-2/)
101
102 ! Lookup tables for rain content (kg/m**3).
103 REAL, DIMENSION(NTB_R), PARAMETER :: &
104 xr_r = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, &
105 1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
106 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
107 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
108 1.e-2/)
109
110 ! Lookup tables for graupel content (kg/m**3).
111 REAL, DIMENSION(NTB_G), PARAMETER :: &
112 xr_g = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, &
113 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, &
114 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, &
115 1.e-2/)
116
117 ! Lookup tables for IN concentration (/m**3) from 0.001 to 1000/Liter.
118 REAL, DIMENSION(NTB_IN), PARAMETER :: &
119 xnt_in = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, &
120 1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, &
121 1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, &
122 1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, &
123 1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, &
124 1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, &
125 1.e6/)
126
127 ! Lookup tables for rain y-intercept parameter (/m**4).
128 REAL, DIMENSION(NTB_R1), PARAMETER :: &
129 xn0r_exp = (/1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, &
130 1.e7,2.e7,3.e7,4.e7,5.e7,6.e7,7.e7,8.e7,9.e7, &
131 1.e8,2.e8,3.e8,4.e8,5.e8,6.e8,7.e8,8.e8,9.e8, &
132 1.e9,2.e9,3.e9,4.e9,5.e9,6.e9,7.e9,8.e9,9.e9, &
133 1.e10/)
134
135 ! For snow moments conversions (from Field et al. 2005)
136 REAL, DIMENSION(10), PARAMETER :: &
137 xsa = (/ 5.065339, -0.062659, -3.032362, 0.029469, -0.000285, &
138 0.31255, 0.000204, 0.003199, 0.0, -0.015952/)
139 REAL, DIMENSION(10), PARAMETER :: &
140 xsb = (/ 0.476221, -0.015896, 0.165977, 0.007468, -0.000141, &
141 0.060366, 0.000079, 0.000594, 0.0, -0.003577/)
142
144
145 REAL :: xm0g
146
147 REAL :: xodts, xobmr
148 REAL, DIMENSION(5,15) :: xcc_ex, xcc_gm
149 REAL, DIMENSION(15) :: xocg1, xocg2
150 REAL, DIMENSION(12) :: xcg_e, xcg_g
151 REAL :: xoge1, xogg1, xogg2, xobmg, xt1_qg_qc
152
153 ! Mass power law relations: mass = am*D**bm
154 ! Snow from Field et al. (2005), others assume spherical form.
155 REAL :: xam_g, xam_r, xam_i
156 INTEGER :: nir2, nir3
157 INTEGER :: niin2
158 INTEGER :: nic2, nic1
159 REAL(kind=mnhreal64), DIMENSION(NBINS+1) :: xdx
160 REAL(kind=mnhreal64), DIMENSION(NBC) :: xt_nc
161 REAL(kind=mnhreal64), DIMENSION(NBS) :: xitds
162
163 ! Variables holding a bunch of exponents and gamma values (cloud water,
164 ! cloud ice, rain, snow, then graupel).
165 REAL, DIMENSION(13) :: xcr_ex, xcr_gm
166 REAL, DIMENSION(18) :: xcs_ex, xcs_gm
167 REAL, DIMENSION(7) :: xci_ex, xci_gm
168 REAL :: xoams, xt1_qs_qc
169 REAL :: xore1, xorg1, xorg2
170
171 ! Lookup tables
172 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:,:,:,:) :: xtpi_qrfz, xtpg_qrfz
173 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:,:,:,:) :: xtpi_qcfz
174 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:,:) :: xt_efrw
175 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:,:) :: xt_efsw
176 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:) :: xitdc, xitdtc
177 REAL(kind=mnhreal64), ALLOCATABLE, DIMENSION(:) :: xitdr, xitdtr
178
179 CONTAINS
180
181 PROCEDURE, PUBLIC :: alloc
182 PROCEDURE, PUBLIC :: dealloc
183
184 END TYPE icet_param_t
185
186 TYPE(icet_param_t), DIMENSION(JPMODELMAX), TARGET, SAVE :: ice_t_parameters_model
187 TYPE(icet_param_t), POINTER, SAVE :: ice_t_parameters => null()
188
189CONTAINS
190
191 SUBROUTINE icet_param_goto_model(KTO)
192
193 !! Set ICE_T_PARAMETERS pointer to element KTO in MODEL list
194
195 INTEGER, INTENT(IN) :: KTO
196
198
199 END SUBROUTINE icet_param_goto_model
200
201 SUBROUTINE alloc(SELF)
202
203 !! Allocate arrays in ICET_PARAM_t type
204
205 CLASS(icet_param_t), INTENT(INOUT) :: SELF
206
207 ALLOCATE(self%XTPI_QRFZ(ntb_r, ntb_r1, 45, ntb_in))
208 ALLOCATE(self%XTPG_QRFZ(ntb_r, ntb_r1, 45, ntb_in))
209
210 ALLOCATE(self%XTPI_QCFZ(ntb_c, nbc, 45, ntb_in))
211
212 ALLOCATE(self%XT_EFRW(nbr, nbc))
213 ALLOCATE(self%XT_EFSW(nbs, nbc))
214
215 ALLOCATE(self%XITDC(nbc))
216 ALLOCATE(self%XITDTC(nbc))
217
218 ALLOCATE(self%XITDR(nbr))
219 ALLOCATE(self%XITDTR(nbr))
220
221 END SUBROUTINE alloc
222
223 SUBROUTINE dealloc(SELF)
224
225 !! Dellocate arrays in ICET_PARAM_t type
226 !! Not used anywhere at the moment,
227 !! but everything will be automatically deallocated when
228 !! object goes out of scope.
229
230 CLASS(icet_param_t), INTENT(INOUT) :: SELF
231
232 DEALLOCATE(self%XTPI_QRFZ)
233 DEALLOCATE(self%XTPG_QRFZ)
234
235 DEALLOCATE(self%XTPI_QCFZ)
236
237 DEALLOCATE(self%XT_EFRW)
238 DEALLOCATE(self%XT_EFSW)
239
240 DEALLOCATE(self%XITDC)
241 DEALLOCATE(self%XITDTC)
242
243 DEALLOCATE(self%XITDR)
244 DEALLOCATE(self%XITDTR)
245
246 END SUBROUTINE dealloc
247
248END MODULE modd_icet_param
real, dimension(ntb_r1), parameter xn0r_exp
real, dimension(10), parameter xsa
real, parameter xbm_g
subroutine dealloc(self)
real, parameter xicet_eps
real, parameter xrho_g
real, parameter xicet_r1
real, parameter xd0s
real, parameter xfv_s
integer, parameter ntb_r1
real, dimension(10), parameter xsb
real, parameter xmu_s
real, parameter xmu_i
real, parameter xrho_not
integer, parameter ntb_g
real, dimension(ntb_g), parameter xr_g
real, parameter xd0g
real, dimension(2), parameter xthvrefz
real, parameter xbm_i
real, parameter xmu_g
real, dimension(ntb_in), parameter xnt_in
real, parameter xd0c
real, parameter xr_thom
subroutine icet_param_goto_model(kto)
subroutine alloc(self)
integer, parameter ntb_r
integer, parameter nbs
real, parameter xtno
integer, parameter ntb_c
real, parameter xbv_c
type(icet_param_t), dimension(jpmodelmax), target, save ice_t_parameters_model
integer, parameter ntb_in
real, parameter xgonv_min
type(icet_param_t), pointer, save ice_t_parameters
real, parameter xrho_i
real, parameter xbv_i
integer, parameter nbr
real, dimension(ntb_r), parameter xr_r
real, parameter xgonv_max
real, parameter xbv_r
real, dimension(ntb_c), parameter xr_c
integer, parameter nbins
real, parameter xd0r
integer, parameter nbc
real, parameter xmu_r
real, parameter xato
integer, parameter jpmodelmax
integer, parameter mnhreal64