PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_ice4_fast_ri_rs.F90
Go to the documentation of this file.
2IMPLICIT NONE
3CONTAINS
4SUBROUTINE ice4_fast_ri_rs(CST, PARAMI, ICEP, ICED, D, LDSOFT, LDCOMPUTE, &
5 &PRHODREF, PLSFACT, &
6 &PAI, PCIT, PESI, PPRES, &
7 &PSSI, PSSIO, PSSIU, PICLDFR, PIFR, &
8 &PRVT, PRIT, PRST, PT, &
9 &PRILARS, PRVDEPI)
10
11!$ACDC singlecolumn --dummy
12
13!!
14!!** PURPOSE
15!! -------
16!! Computes the deposition/evaporation of ice and conversion of large ice crystals into snow.
17!!
18!! AUTHOR
19!! ------
20!! K. I Ivarsson (Feb 2023)
21!!
22!! MODIFICATIONS
23!! -------------
24!!
25!
26!
27!* 0. DECLARATIONS
28! ------------
29!
31USE modd_cst, ONLY: cst_t
35USE yomhook , ONLY : lhook, dr_hook, jphook
36!
37IMPLICIT NONE
38!
39!* 0.1 Declarations of dummy arguments :
40!
41TYPE(cst_t), INTENT(IN) :: CST
42TYPE(param_ice_t), INTENT(IN) :: PARAMI
43TYPE(rain_ice_param_t), INTENT(IN) :: ICEP
44TYPE(rain_ice_descr_t), INTENT(IN) :: ICED
45TYPE(dimphyex_t), INTENT(IN) :: D
46LOGICAL, INTENT(IN) :: LDSOFT
47LOGICAL, DIMENSION(D%NIJT), INTENT(IN) :: LDCOMPUTE
48REAL, DIMENSION(D%NIJT), INTENT(IN) :: PRHODREF ! Reference density
49REAL, DIMENSION(D%NIJT), INTENT(IN) :: PLSFACT
50REAL, DIMENSION(D%NIJT), INTENT(IN) :: PAI ! Thermodynamical function
51REAL, DIMENSION(D%NIJT), INTENT(IN) :: PCIT ! Pristine ice conc. at t
52REAL, DIMENSION(D%NIJT), INTENT(IN) :: PT ! Temperature
53REAL, DIMENSION(D%NIJT), INTENT(IN) :: PRVT ! Water vapor m.r. at t
54REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSSI ! Supersaturation over ice
55REAL, DIMENSION(D%NIJT), INTENT(IN) :: PRIT ! Pristine ice m.r. at t
56REAL, DIMENSION(D%NIJT), INTENT(IN) :: PRST ! Snow/aggregate m.r. at t
57REAL, DIMENSION(D%NIJT), INTENT(IN) :: PESI ! Saturation pressure over ice
58REAL, DIMENSION(D%NIJT), INTENT(IN) :: PPRES ! Pressure
59REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSSIO ! Super-saturation with respect to ice in the
60 ! supersaturated fraction
61REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSSIU ! Sub-saturation with respect to ice in the
62 ! subsaturated fraction
63REAL, DIMENSION(D%NIJT), INTENT(IN) :: PICLDFR ! Ice cloud fraction (fraction with supersat. with respect to ice)
64REAL, DIMENSION(D%NIJT), INTENT(IN) :: PIFR ! Ratio cloud ice moist part to dry part
65
66REAL, DIMENSION(D%NIJT), INTENT(OUT) :: PRVDEPI ! Conversion vapour to ice, non spherical effect
67REAL, DIMENSION(D%NIJT), INTENT(OUT) :: PRILARS ! Conversion of large ice crystals to snow
68
69!
70!* 0.2 declaration of local variables
71!
72REAL, DIMENSION(D%NIJT) :: ZZW, &
73 ZZWC, &
74 ZCRYSHA, &
75 ZCI2S, &
76 ZW2D, &
77 ZXW2D13, &
78 ZWCITRED, &
79 ZWCITRED23
80REAL :: ZDICRIT, ZTIMESC, ZKVO, ZTC, ZHU, ZQIMAX
81
82INTEGER :: JIJ
83
84REAL(KIND=jphook) :: zhook_handle
85!-------------------------------------------------------------------------------
86!
87IF (lhook) CALL dr_hook('ICE4_FAST_RI_RS',0,zhook_handle)
88!
89!-------------------------------------------------------------------------------
90!
91!* 8.1 Turn large ice crystals to snow
92!
93ztimesc = icep%XFRMIN(14) ! Time scale for few large ice crystal conversion to snow
94
95zdicrit = icep%XFRMIN(15) ! Critical diameter of ice crystal to define what
96 ! is cloud ice and what is snow (m)
97
98
99IF(parami%LMODICEDEP .AND. ztimesc >0.)THEN
100
101 zdicrit = (700.*cst%XPI/iced%XAI/6.)**(1./iced%XBI)*zdicrit**(3./iced%XBI) ! from spherical diameter to maximum diameter
102 zkvo = ((iced%XALPHAI*iced%XNUI + iced%XBI -1.)/iced%XALPHAI)**(1./iced%XALPHAI)
103 zkvo = zkvo/zdicrit/ztimesc
104 ! PIFR = 1. ! Value of this parameter is very uncertain
105 ! IF(XFRMIN(36)>0. )PIFR= XFRMIN(36)
106ENDIF
107
108prilars(:) = 0.
109zwcitred(:)= 0.1 ! ratio of ice crystal concentration wet to dry
110 ! part of a gridbox
111DO jij=d%NIJB, d%NIJE
112 IF( .NOT. ldsoft) THEN
113 zzw(jij) = 0.
114 IF(parami%LMODICEDEP .AND. ztimesc > 0. )THEN
115 ! Turn ice to snow if ice crystal distribution is such that
116 ! the ice crystal diameter for the (mass x N_i) maximum
117 ! is larger than a prescribed size,
118 ! (ZDICRIT).
119 zzwc(jij) = (icenumber3(prit(jij),pt(jij))+pcit(jij))* &
120 prhodref(jij)
121
122 IF (prit(jij)>0.0 .AND. zzwc(jij)>0.0) THEN
123 zzw(jij) = min(1.e8,iced%XLBI*( prhodref(jij)*prit(jij)/zzwc(jij) )**iced%XLBEXI) ! LAMBDA for ICE
124 zzw(jij) = min(0.5, 1. - 0.5**( zkvo /zzw(jij)))
125 zzw(jij) = min(0.9*prit(jij), zzw(jij)*prit(jij))
126 prilars(jij) = zzw(jij)
127 ENDIF
128 ELSE
129 ! Turn ice crystals lagrer than a precribed size into snow:
130 ! (For the moment sperical ice crystals are assumed)
131 IF ( (prit(jij)>0.0) .AND.(pssi(jij)>0.001) ) THEN
132 zzw(jij) = min(prit(jij),prit(jij)/(87.5*(zdicrit)**2*pai(jij)/ pssi(jij)))
133 prilars(jij) = zzw(jij)
134 ENDIF
135 ENDIF
136 ENDIF
137ENDDO
138
139prvdepi(:) = 0.
140zzw(:) = 0.
141zw2d(:) = 1./(pifr(:)*picldfr(:) + 1. -picldfr(:))
142zzwc(:) = 0.
143DO jij=d%NIJB, d%NIJE
144 IF( .NOT. ldsoft) THEN
145 IF(parami%LMODICEDEP)THEN
146 zzwc(jij) = (icenumber3(prit(jij),pt(jij))+pcit(jij))* &
147 prhodref(jij)
148 IF( (ppres(jij)*0.5 - pesi(jij))>0. .AND. zzwc(jij)>0. .AND. ldcompute(jij)) THEN
149 zxw2d13(jij)= pifr(jij)**(-iced%XLBEXI)
150 zwcitred23(jij)=zwcitred(jij)**(1.+ iced%XLBEXI)
151 zzw(jij)= icep%X0DEPI/(iced%XLBI*pai(jij)) *(zzwc(jij)/prhodref(jij))**(1.+iced%XLBEXI) * &
152 & (max(iced%XRTMIN(4),prit(jij))*zw2d(jij) )**(-iced%XLBEXI)
153 zzw(jij)= zzw(jij)* ( pssio(jij)* picldfr(jij)* zxw2d13(jij) + zwcitred23(jij)*pssiu(jij)* &
154 & (1.-picldfr(jij)) )
155 ENDIF
156 prvdepi(jij) = prvdepi(jij) + zzw(jij)
157 ELSE
158 IF ( (ppres(jij)*0.5 - pesi(jij))>0. .AND. pcit(jij)>0. .AND. ldcompute(jij) ) THEN
159 zxw2d13(jij)=pifr(jij)**0.333
160 zwcitred23(jij)=zwcitred(jij)**0.667
161 ztc = max(-18.,min(-1.,pt(jij)-cst%XTT))
162 zhu = min(0.15,max(0.,pssi(jij)))
163 zcrysha(jij)=1.1+ 3.*zhu*(1.+ sin(0.64*ztc -1.3))
164 ! icedensity*4/3 *pi /8. =366.5 ; icedensity=700 kg/m3
165 zqimax = 366.5 * zdicrit**3 * pcit(jij)*zwcitred(jij)/prhodref(jij)
166 zci2s(jij) = 0.
167 IF(prit(jij) > 1.0e-12 .AND. ztimesc > 0. )THEN
168 zci2s(jij) = prit(jij)*(1. - min(1., 0.5*zqimax /prit(jij)))* &
169 & (1.-picldfr(jij))*zw2d(jij)/(ztimesc*0.5)
170 ENDIF
171
172 zzwc(jij)=zcrysha(jij)*0.878/pai(jij)*(pcit(jij)/prhodref(jij))**0.667 &
173 &*(max(iced%XRTMIN(4),prit(jij))*zw2d(jij))**0.333
174 ! Ice supersaturated part of grid box:
175 IF( pssio(jij)>0. .AND. picldfr(jij) > 0.02 ) THEN
176 zzw(jij) = zzwc(jij)*zxw2d13(jij)*pssio(jij)*picldfr(jij)
177 prvdepi(jij) = prvdepi(jij) + zzw(jij)
178 ENDIF
179 ! Ice subsaturated part of grid box:
180 IF ( pssiu(jij)<0. .AND. picldfr(jij) <0.98 ) THEN
181 prilars(jij) = prilars(jij) + zci2s(jij)
182 zzw(jij) = zzwc(jij)*zwcitred23(jij)*pssiu(jij)*(1. - picldfr(jij))
183 prvdepi(jij) = prvdepi(jij) + zzw(jij)
184 ENDIF
185 ENDIF
186 ENDIF
187 ENDIF
188ENDDO
189
190
191IF (lhook) CALL dr_hook('ICE4_FAST_RI_RS', 1, zhook_handle)
192!
193CONTAINS
194!
195 ELEMENTAL FUNCTION icenumber3 (Q_ICE, T3D) RESULT (RET)
196
197 IMPLICIT NONE
198!$acc routine seq
199 REAL, PARAMETER :: ice_density = 890.0
200 REAL, PARAMETER :: pi = 3.1415926536
201 INTEGER :: idx_rei
202 REAL, INTENT(IN) :: q_ice, t3d
203 REAL :: corr, reice, deice, ret
204 DOUBLE PRECISION :: lambda
205
206 !+---+-----------------------------------------------------------------+
207 !..Table of lookup values of radiative effective radius of ice crystals
208 !.. as a function of Temperature from -94C to 0C. Taken from WRF RRTMG
209 !.. radiation code where it is attributed to Jon Egill Kristjansson
210 !.. and coauthors.
211 !+---+-----------------------------------------------------------------+
212
213 REAL, DIMENSION(95), PARAMETER :: retab = (/ &
214 5.92779, 6.26422, 6.61973, 6.99539, 7.39234, &
215 7.81177, 8.25496, 8.72323, 9.21800, 9.74075, 10.2930, &
216 10.8765, 11.4929, 12.1440, 12.8317, 13.5581, 14.2319, &
217 15.0351, 15.8799, 16.7674, 17.6986, 18.6744, 19.6955, &
218 20.7623, 21.8757, 23.0364, 24.2452, 25.5034, 26.8125, &
219 27.7895, 28.6450, 29.4167, 30.1088, 30.7306, 31.2943, &
220 31.8151, 32.3077, 32.7870, 33.2657, 33.7540, 34.2601, &
221 34.7892, 35.3442, 35.9255, 36.5316, 37.1602, 37.8078, &
222 38.4720, 39.1508, 39.8442, 40.5552, 41.2912, 42.0635, &
223 42.8876, 43.7863, 44.7853, 45.9170, 47.2165, 48.7221, &
224 50.4710, 52.4980, 54.8315, 57.4898, 60.4785, 63.7898, &
225 65.5604, 71.2885, 75.4113, 79.7368, 84.2351, 88.8833, &
226 93.6658, 98.5739, 103.603, 108.752, 114.025, 119.424, &
227 124.954, 130.630, 136.457, 142.446, 148.608, 154.956, &
228 161.503, 168.262, 175.248, 182.473, 189.952, 197.699, &
229 205.728, 214.055, 222.694, 231.661, 240.971, 250.639/)
230
231 !+---+-----------------------------------------------------------------+
232 !..From the model 3D temperature field, subtract 179K for which
233 !.. index value of retab as a start. Value of corr is for
234 !.. interpolating between neighboring values in the table.
235 !+---+-----------------------------------------------------------------+
236
237 idx_rei = int(t3d-179.)
238 idx_rei = min(max(idx_rei,1),95)
239 corr = t3d - int(t3d)
240 reice = retab(idx_rei)*(1.-corr) + retab(min(95,idx_rei+1))*corr
241 deice = 2.*reice * 1.e-6
242
243 !+---+-----------------------------------------------------------------+
244 !..Now we have the final radiative effective size of ice (as function
245 !.. of temperature only). This size represents 3rd moment divided by
246 !.. second moment of the ice size distribution, so we can compute a
247 !.. number concentration from the mean size and mass mixing ratio.
248 !.. The mean (radiative effective) diameter is 3./Slope for an inverse
249 !.. exponential size distribution. So, starting with slope, work
250 !.. backwords to get number concentration.
251 !+---+-----------------------------------------------------------------+
252
253 lambda = 3.0 / deice
254 ret = q_ice * lambda*lambda*lambda / (pi*ice_density)
255
256 !+---+-----------------------------------------------------------------+
257 !..Example1:Common ice size coming from Thompson scheme is about 30 microns.
258 !.. An example ice mixing ratio could be 0.001 g/kg for a temp. of -50C.
259 !.. Remember to convert both into MKS units. This gives N_ice=357652 per kg.
260 !..Example2: Lower in atmosphere at T=-10C matching ~162 microns in retab,
261 !.. and assuming we have 0.1 g/kg mixing ratio, then N_ice=28122 per kg,
262 !.. which is 28 crystals per liter of air if the air density is 1.0.
263 !+---+-----------------------------------------------------------------+
264
265 END FUNCTION icenumber3
266!
267END SUBROUTINE ice4_fast_ri_rs
268END MODULE mode_ice4_fast_ri_rs
elemental real function icenumber3(q_ice, t3d)
subroutine ice4_fast_ri_rs(cst, parami, icep, iced, d, ldsoft, ldcompute, prhodref, plsfact, pai, pcit, pesi, ppres, pssi, pssio, pssiu, picldfr, pifr, prvt, prit, prst, pt, prilars, prvdepi)