1 | !WRF:MEDIATION_LAYER:PHYSICS |
---|
2 | ! *** add new modules of schemes here |
---|
3 | ! |
---|
4 | MODULE module_microphysics_driver |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | SUBROUTINE microphysics_driver( & |
---|
8 | th, rho, pi_phy, p & |
---|
9 | ,ht, dz8w, p8w, dt,dx,dy & |
---|
10 | ,mp_physics, spec_zone & |
---|
11 | ,specified, channel_switch & |
---|
12 | ,warm_rain & |
---|
13 | ,t8w & |
---|
14 | ,chem_opt, progn & |
---|
15 | ,cldfra, cldfra_old, exch_h, nsource & |
---|
16 | ,qlsink, precr, preci, precs, precg & |
---|
17 | ,xland,itimestep & |
---|
18 | ,f_ice_phy,f_rain_phy,f_rimef_phy & |
---|
19 | ,lowlyr,sr, id & |
---|
20 | ,ids,ide, jds,jde, kds,kde & |
---|
21 | ,ims,ime, jms,jme, kms,kme & |
---|
22 | ,ips,ipe, jps,jpe, kps,kpe & |
---|
23 | ,i_start,i_end,j_start,j_end,kts,kte & |
---|
24 | ,num_tiles, naer & |
---|
25 | ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr & |
---|
26 | ,qndrop_curr,qni_curr,qh_curr,qnh_curr & |
---|
27 | ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr & |
---|
28 | ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr & |
---|
29 | ,f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni & |
---|
30 | ,f_qns,f_qnr,f_qng,f_qnc,f_qnn,f_qh,f_qnh & |
---|
31 | , f_qzr,f_qzi,f_qzs,f_qzg,f_qzh & |
---|
32 | ,qrcuten, qscuten, qicuten, mu & |
---|
33 | ,qt_curr,f_qt & |
---|
34 | ,mp_restart_state,tbpvs_state,tbpvs0_state & ! for etampnew |
---|
35 | ,hail,ice2 & ! for mp_gsfcgce |
---|
36 | ! ,ccntype & ! for mp_milbrandt2mom |
---|
37 | ,w ,z & |
---|
38 | ,rainnc, rainncv & |
---|
39 | ,snownc, snowncv & |
---|
40 | ,hailnc, hailncv & |
---|
41 | ,graupelnc, graupelncv & |
---|
42 | ,refl_10cm & ! HM, 9/22/09, add for refl |
---|
43 | ! YLIN |
---|
44 | ! Added the RI_CURR array to the call |
---|
45 | ,ri_curr & |
---|
46 | ) |
---|
47 | ! Framework |
---|
48 | #if(NMM_CORE==1) |
---|
49 | USE module_state_description, ONLY : & |
---|
50 | KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME & |
---|
51 | ,WSM6SCHEME, ETAMPNEW, etamp_HWRF,THOMPSON, MORR_TWO_MOMENT & |
---|
52 | ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME & |
---|
53 | ,MILBRANDT2MOM !,MILBRANDT3MOM |
---|
54 | #else |
---|
55 | USE module_state_description, ONLY : & |
---|
56 | KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME & |
---|
57 | ,WSM6SCHEME, ETAMPNEW,THOMPSON, MORR_TWO_MOMENT & |
---|
58 | ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME & |
---|
59 | ,MILBRANDT2MOM !,MILBRANDT3MOM |
---|
60 | #endif |
---|
61 | |
---|
62 | ! Model Layer |
---|
63 | USE module_model_constants |
---|
64 | USE module_wrf_error |
---|
65 | |
---|
66 | ! *** add new modules of schemes here |
---|
67 | |
---|
68 | USE module_mp_kessler |
---|
69 | USE module_mp_lin |
---|
70 | USE module_mp_sbu_ylin |
---|
71 | USE module_mp_wsm3 |
---|
72 | USE module_mp_wsm5 |
---|
73 | USE module_mp_wsm6 |
---|
74 | USE module_mp_etanew |
---|
75 | USE module_mp_thompson |
---|
76 | USE module_mp_gsfcgce |
---|
77 | USE module_mp_morr_two_moment |
---|
78 | USE module_mp_wdm5 |
---|
79 | USE module_mp_wdm6 |
---|
80 | USE module_mp_milbrandt2mom |
---|
81 | ! USE module_mp_milbrandt3mom |
---|
82 | |
---|
83 | USE module_mp_HWRF |
---|
84 | USE module_mixactivate, only: prescribe_aerosol_mixactivate |
---|
85 | |
---|
86 | !---------------------------------------------------------------------- |
---|
87 | ! This driver calls subroutines for the microphys. |
---|
88 | ! |
---|
89 | ! Schemes |
---|
90 | ! |
---|
91 | ! Kessler scheme |
---|
92 | ! Lin et al. (1983), Rutledge and Hobbs (1984) |
---|
93 | ! WRF Single-Moment 3-class, Hong, Dudhia and Chen (2004) |
---|
94 | ! WRF Single-Moment 5-class, Hong, Dudhia and Chen (2004) |
---|
95 | ! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop) |
---|
96 | ! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier) |
---|
97 | ! Milbrandt and Yau (2005) |
---|
98 | |
---|
99 | !---------------------------------------------------------------------- |
---|
100 | IMPLICIT NONE |
---|
101 | !====================================================================== |
---|
102 | ! Grid structure in physics part of WRF |
---|
103 | !---------------------------------------------------------------------- |
---|
104 | ! The horizontal velocities used in the physics are unstaggered |
---|
105 | ! relative to temperature/moisture variables. All predicted |
---|
106 | ! variables are carried at half levels except w, which is at full |
---|
107 | ! levels. Some arrays with names (*8w) are at w (full) levels. |
---|
108 | ! |
---|
109 | !---------------------------------------------------------------------- |
---|
110 | ! In WRF, kms (smallest number) is the bottom level and kme (largest |
---|
111 | ! number) is the top level. In your scheme, if 1 is at the top level, |
---|
112 | ! then you have to reverse the order in the k direction. |
---|
113 | ! |
---|
114 | ! kme - half level (no data at this level) |
---|
115 | ! kme ----- full level |
---|
116 | ! kme-1 - half level |
---|
117 | ! kme-1 ----- full level |
---|
118 | ! . |
---|
119 | ! . |
---|
120 | ! . |
---|
121 | ! kms+2 - half level |
---|
122 | ! kms+2 ----- full level |
---|
123 | ! kms+1 - half level |
---|
124 | ! kms+1 ----- full level |
---|
125 | ! kms - half level |
---|
126 | ! kms ----- full level |
---|
127 | ! |
---|
128 | !====================================================================== |
---|
129 | ! Definitions |
---|
130 | !----------- |
---|
131 | ! Rho_d dry density (kg/m^3) |
---|
132 | ! Theta_m moist potential temperature (K) |
---|
133 | ! Qv water vapor mixing ratio (kg/kg) |
---|
134 | ! Qc cloud water mixing ratio (kg/kg) |
---|
135 | ! Qr rain water mixing ratio (kg/kg) |
---|
136 | ! Qi cloud ice mixing ratio (kg/kg) |
---|
137 | ! Qs snow mixing ratio (kg/kg) |
---|
138 | ! Qg graupel mixing ratio (kg/kg) |
---|
139 | ! Qh hail mixing ratio (kg/kg) |
---|
140 | ! Qndrop droplet number mixing ratio (#/kg) |
---|
141 | ! Qni cloud ice number concentration (#/kg) |
---|
142 | ! Qns snow number concentration (#/kg) |
---|
143 | ! Qnr rain number concentration (#/kg) |
---|
144 | ! Qng graupel number concentration (#/kg) |
---|
145 | ! Qnh hail number concentration (#/kg) |
---|
146 | |
---|
147 | ! Qzr rain reflectivity (m6/kg) |
---|
148 | ! Qzi ice reflectivity (m6/kg) |
---|
149 | ! Qzs snow reflectivity (m6/kg) |
---|
150 | ! Qzg graupel reflectivity (m6/kg) |
---|
151 | ! Qzh hail reflectivity (m6/kg) |
---|
152 | |
---|
153 | ! |
---|
154 | !---------------------------------------------------------------------- |
---|
155 | !-- th potential temperature (K) |
---|
156 | !-- moist_new updated moisture array (kg/kg) |
---|
157 | !-- moist_old Old moisture array (kg/kg) |
---|
158 | !-- rho density of air (kg/m^3) |
---|
159 | !-- pi_phy exner function (dimensionless) |
---|
160 | !-- p pressure (Pa) |
---|
161 | !-- RAINNC grid scale precipitation (mm) |
---|
162 | !-- RAINNCV one time step grid scale precipitation (mm/step) |
---|
163 | !-- SNOWNC grid scale snow and ice (mm) |
---|
164 | !-- SNOWNCV one time step grid scale snow and ice (mm/step) |
---|
165 | !-- GRAUPELNC grid scale graupel (mm) |
---|
166 | !-- GRAUPELNCV one time step grid scale graupel (mm/step) |
---|
167 | !-- HAILNC grid scale hail (mm) |
---|
168 | !-- HAILNCV one time step grid scale hail (mm/step) |
---|
169 | !-- SR one time step mass ratio of snow to total precip |
---|
170 | !-- z Height above sea level (m) |
---|
171 | !-- dt Time step (s) |
---|
172 | !-- G acceleration due to gravity (m/s^2) |
---|
173 | !-- CP heat capacity at constant pressure for dry air (J/kg/K) |
---|
174 | !-- R_d gas constant for dry air (J/kg/K) |
---|
175 | !-- R_v gas constant for water vapor (J/kg/K) |
---|
176 | !-- XLS latent heat of sublimation (J/kg) |
---|
177 | !-- XLV latent heat of vaporization (J/kg) |
---|
178 | !-- XLF latent heat of melting (J/kg) |
---|
179 | !-- rhowater water density (kg/m^3) |
---|
180 | !-- rhosnow snow density (kg/m^3) |
---|
181 | !-- F_ICE_PHY Fraction of ice. |
---|
182 | !-- F_RAIN_PHY Fraction of rain. |
---|
183 | !-- F_RIMEF_PHY Mass ratio of rimed ice (rime factor) |
---|
184 | !-- t8w temperature at layer interfaces |
---|
185 | !-- cldfra, cldfra_old, current, previous cloud fraction |
---|
186 | !-- exch_h vertical diffusivity (m2/s) |
---|
187 | !-- qlsink Fractional cloud water sink (/s) |
---|
188 | !-- precr rain precipitation rate at all levels (kg/m2/s) |
---|
189 | !-- preci ice precipitation rate at all levels (kg/m2/s) |
---|
190 | !-- precs snow precipitation rate at all levels (kg/m2/s) |
---|
191 | !-- precg graupel precipitation rate at all levels (kg/m2/s) & |
---|
192 | !-- P_QV species index for water vapor |
---|
193 | !-- P_QC species index for cloud water |
---|
194 | !-- P_QR species index for rain water |
---|
195 | !-- P_QI species index for cloud ice |
---|
196 | !-- P_QS species index for snow |
---|
197 | !-- P_QG species index for graupel |
---|
198 | !-- P_QH species index for hail |
---|
199 | !-- P_QNDROP species index for cloud drop mixing ratio |
---|
200 | !-- P_QNR species index for rain number concentration, |
---|
201 | !-- P_QNI species index for cloud ice number concentration |
---|
202 | !-- P_QNS species index for snow number concentration, |
---|
203 | !-- P_QNG species index for graupel number concentration, |
---|
204 | !-- P_QNH species index for hail number concentration, |
---|
205 | !-- P_QZR species index for rain reflectivity |
---|
206 | !-- P_QZI species index for ice reflectivity |
---|
207 | !-- P_QZS species index for snow reflectivity |
---|
208 | !-- P_QZG species index for graupel reflectivity |
---|
209 | !-- P_QZH species index for hail reflectivity |
---|
210 | !-- id grid id number |
---|
211 | !-- ids start index for i in domain |
---|
212 | !-- ide end index for i in domain |
---|
213 | !-- jds start index for j in domain |
---|
214 | !-- jde end index for j in domain |
---|
215 | !-- kds start index for k in domain |
---|
216 | !-- kde end index for k in domain |
---|
217 | !-- ims start index for i in memory |
---|
218 | !-- ime end index for i in memory |
---|
219 | !-- jms start index for j in memory |
---|
220 | !-- jme end index for j in memory |
---|
221 | !-- kms start index for k in memory |
---|
222 | !-- kme end index for k in memory |
---|
223 | !-- i_start start indices for i in tile |
---|
224 | !-- i_end end indices for i in tile |
---|
225 | !-- j_start start indices for j in tile |
---|
226 | !-- j_end end indices for j in tile |
---|
227 | !-- its start index for i in tile |
---|
228 | !-- ite end index for i in tile |
---|
229 | !-- jts start index for j in tile |
---|
230 | !-- jte end index for j in tile |
---|
231 | !-- kts start index for k in tile |
---|
232 | !-- kte end index for k in tile |
---|
233 | !-- num_tiles number of tiles |
---|
234 | ! |
---|
235 | !====================================================================== |
---|
236 | |
---|
237 | INTEGER, INTENT(IN ) :: mp_physics |
---|
238 | LOGICAL, INTENT(IN ) :: specified |
---|
239 | INTEGER, OPTIONAL, INTENT(IN ) :: chem_opt, progn |
---|
240 | INTEGER, OPTIONAL, INTENT(IN ) :: hail, ice2 !, ccntype |
---|
241 | ! |
---|
242 | INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde |
---|
243 | INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme |
---|
244 | INTEGER, OPTIONAL, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe |
---|
245 | INTEGER, INTENT(IN ) :: kts,kte |
---|
246 | INTEGER, INTENT(IN ) :: itimestep,num_tiles,spec_zone |
---|
247 | INTEGER, DIMENSION(num_tiles), INTENT(IN) :: & |
---|
248 | & i_start,i_end,j_start,j_end |
---|
249 | |
---|
250 | LOGICAL, INTENT(IN ) :: warm_rain |
---|
251 | ! |
---|
252 | REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), & |
---|
253 | INTENT(INOUT) :: th |
---|
254 | ! |
---|
255 | |
---|
256 | ! |
---|
257 | REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), & |
---|
258 | INTENT(IN ) :: & |
---|
259 | rho, & |
---|
260 | dz8w, & |
---|
261 | p8w, & |
---|
262 | pi_phy, & |
---|
263 | p |
---|
264 | |
---|
265 | |
---|
266 | REAL, INTENT(INOUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: & |
---|
267 | F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY |
---|
268 | !!$#ifdef WRF_CHEM |
---|
269 | ! REAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: & |
---|
270 | REAL, OPTIONAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: & |
---|
271 | !!$#else |
---|
272 | !!$ REAL, DIMENSION(ims:ime, kms:kme, jms:jme ) :: & |
---|
273 | !!$#endif |
---|
274 | qlsink, & ! cloud water sink (/s) |
---|
275 | precr, & ! rain precipitation rate at all levels (kg/m2/s) |
---|
276 | preci, & ! ice precipitation rate at all levels (kg/m2/s) |
---|
277 | precs, & ! snow precipitation rate at all levels (kg/m2/s) |
---|
278 | precg ! graupel precipitation rate at all levels (kg/m2/s) |
---|
279 | |
---|
280 | ! |
---|
281 | |
---|
282 | REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN) :: XLAND |
---|
283 | |
---|
284 | REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(OUT) :: SR |
---|
285 | |
---|
286 | REAL, INTENT(IN ) :: dt,dx,dy |
---|
287 | |
---|
288 | INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: LOWLYR |
---|
289 | |
---|
290 | ! |
---|
291 | ! Optional |
---|
292 | ! |
---|
293 | REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: refl_10cm |
---|
294 | |
---|
295 | LOGICAL, OPTIONAL, INTENT(IN ) :: channel_switch |
---|
296 | REAL, OPTIONAL, INTENT(INOUT ) :: naer ! aerosol number concentration (/kg) |
---|
297 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
298 | OPTIONAL, & |
---|
299 | INTENT(INOUT ) :: & |
---|
300 | w, z, t8w & |
---|
301 | ,cldfra, cldfra_old, exch_h & |
---|
302 | ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr & |
---|
303 | ,qt_curr,qndrop_curr,qni_curr,qh_curr,qnh_curr & |
---|
304 | ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr & |
---|
305 | ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr |
---|
306 | |
---|
307 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
308 | OPTIONAL, & |
---|
309 | INTENT(IN) :: qrcuten, qscuten, qicuten |
---|
310 | REAL, DIMENSION( ims:ime, jms:jme ), & |
---|
311 | OPTIONAL, & |
---|
312 | INTENT(IN) :: mu |
---|
313 | ! YLIN |
---|
314 | ! Added RI_CURR similar to microphysics fields above |
---|
315 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
316 | OPTIONAL, & |
---|
317 | INTENT(INOUT) :: ri_curr |
---|
318 | |
---|
319 | |
---|
320 | REAL, DIMENSION(ims:ime, kms:kme, jms:jme ), & |
---|
321 | OPTIONAL, & |
---|
322 | INTENT(OUT ) :: & |
---|
323 | nsource |
---|
324 | |
---|
325 | ! |
---|
326 | REAL, DIMENSION( ims:ime , jms:jme ), & |
---|
327 | INTENT(INOUT), & |
---|
328 | OPTIONAL :: & |
---|
329 | RAINNC & |
---|
330 | ,RAINNCV & |
---|
331 | ,SNOWNC & |
---|
332 | ,SNOWNCV & |
---|
333 | ,GRAUPELNC & |
---|
334 | ,GRAUPELNCV & |
---|
335 | ,HAILNC & |
---|
336 | ,HAILNCV |
---|
337 | INTEGER,OPTIONAL,INTENT(IN ) :: id |
---|
338 | |
---|
339 | REAL , DIMENSION( ims:ime , jms:jme ) , OPTIONAL , & |
---|
340 | INTENT(IN) :: ht |
---|
341 | |
---|
342 | REAL, DIMENSION (:), OPTIONAL, INTENT(INOUT) :: mp_restart_state & |
---|
343 | ,tbpvs_state,tbpvs0_state |
---|
344 | ! |
---|
345 | |
---|
346 | LOGICAL, OPTIONAL :: f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni,f_qt & |
---|
347 | ,f_qns,f_qnr,f_qng,f_qnn,f_qnc,f_qh,f_qnh,f_qzr & |
---|
348 | ,f_qzi,f_qzs,f_qzg,f_qzh |
---|
349 | |
---|
350 | ! LOCAL VAR |
---|
351 | |
---|
352 | INTEGER :: i,j,k,its,ite,jts,jte,ij,sz,n |
---|
353 | LOGICAL :: channel |
---|
354 | |
---|
355 | !--------------------------------------------------------------------- |
---|
356 | ! check for microphysics type. We need a clean way to |
---|
357 | ! specify these things! |
---|
358 | !--------------------------------------------------------------------- |
---|
359 | |
---|
360 | channel = .FALSE. |
---|
361 | IF ( PRESENT ( channel_switch ) ) channel = channel_switch |
---|
362 | |
---|
363 | if (mp_physics .eq. 0) return |
---|
364 | IF( specified ) THEN |
---|
365 | sz = spec_zone |
---|
366 | ELSE |
---|
367 | sz = 0 |
---|
368 | ENDIF |
---|
369 | |
---|
370 | #ifndef RUN_ON_GPU |
---|
371 | !$OMP PARALLEL DO & |
---|
372 | !$OMP PRIVATE ( ij, its, ite, jts, jte, i,j,k,n ) |
---|
373 | |
---|
374 | DO ij = 1 , num_tiles |
---|
375 | IF (channel) THEN |
---|
376 | its = max(i_start(ij),ids) |
---|
377 | ite = min(i_end(ij),ide-1) |
---|
378 | ELSE |
---|
379 | its = max(i_start(ij),ids+sz) |
---|
380 | ite = min(i_end(ij),ide-1-sz) |
---|
381 | ENDIF |
---|
382 | jts = max(j_start(ij),jds+sz) |
---|
383 | jte = min(j_end(ij),jde-1-sz) |
---|
384 | #else |
---|
385 | DO ij = 1 , 1 |
---|
386 | IF (channel) THEN |
---|
387 | its = max(ips,ids) |
---|
388 | ite = min(ipe,ide-1) |
---|
389 | ELSE |
---|
390 | its = max(ips,ids+sz) |
---|
391 | ite = min(ipe,ide-1-sz) |
---|
392 | ENDIF |
---|
393 | jts = max(jps,jds+sz) |
---|
394 | jte = min(jpe,jde-1-sz) |
---|
395 | #endif |
---|
396 | |
---|
397 | |
---|
398 | ! 2009-06009 rce - zero all these for safety |
---|
399 | IF( PRESENT(qlsink) ) qlsink(its:ite,kts:kte,jts:jte) = 0. |
---|
400 | IF( PRESENT(precr ) ) precr(its:ite,kts:kte,jts:jte) = 0. |
---|
401 | IF( PRESENT(preci ) ) preci(its:ite,kts:kte,jts:jte) = 0. |
---|
402 | IF( PRESENT(precs ) ) precs(its:ite,kts:kte,jts:jte) = 0. |
---|
403 | IF( PRESENT(precg ) ) precg(its:ite,kts:kte,jts:jte) = 0. |
---|
404 | |
---|
405 | !----------- |
---|
406 | IF( PRESENT(chem_opt) .AND. PRESENT(progn) ) THEN |
---|
407 | IF( chem_opt==0 .AND. progn==1 .AND. (mp_physics==LINSCHEME .OR. mp_physics==MORR_TWO_MOMENT)) THEN |
---|
408 | IF( PRESENT( QNDROP_CURR ) ) THEN |
---|
409 | CALL wrf_debug ( 100 , 'microphysics_driver: calling prescribe_aerosol_mixactivate' ) |
---|
410 | ! 06-nov-2005 rce - id & itimestep added to arg list |
---|
411 | call prescribe_aerosol_mixactivate ( & |
---|
412 | id, itimestep, dt, naer, & |
---|
413 | rho, th, pi_phy, w, cldfra, cldfra_old, & |
---|
414 | z, dz8w, p8w, t8w, exch_h, & |
---|
415 | qv_curr, qc_curr, qi_curr, qndrop_curr, & |
---|
416 | nsource, & |
---|
417 | ids,ide, jds,jde, kds,kde, & |
---|
418 | ims,ime, jms,jme, kms,kme, & |
---|
419 | its,ite, jts,jte, kts,kte, & |
---|
420 | F_QC=f_qc, F_QI=f_qi ) |
---|
421 | END IF |
---|
422 | ELSE IF( progn==1 .AND. mp_physics/=LINSCHEME .AND. mp_physics/=MORR_TWO_MOMENT) THEN |
---|
423 | call wrf_error_fatal("SETTINGS ERROR: Prognostic cloud droplet number can only be used with the mp_physics=LINSCHEME or MORRISON.") |
---|
424 | END IF |
---|
425 | END IF |
---|
426 | |
---|
427 | micro_select: SELECT CASE(mp_physics) |
---|
428 | |
---|
429 | CASE (KESSLERSCHEME) |
---|
430 | CALL wrf_debug ( 100 , 'microphysics_driver: calling kessler' ) |
---|
431 | IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND. & |
---|
432 | PRESENT( QR_CURR ) .AND. & |
---|
433 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
434 | PRESENT( Z )) THEN |
---|
435 | CALL kessler( & |
---|
436 | T=th & |
---|
437 | ,QV=qv_curr & |
---|
438 | ,QC=qc_curr & |
---|
439 | ,QR=qr_curr & |
---|
440 | ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp & |
---|
441 | ,EP2=ep_2,SVP1=svp1,SVP2=svp2 & |
---|
442 | ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater & |
---|
443 | ,DZ8W=dz8w & |
---|
444 | ,RAINNC=rainnc,RAINNCV=rainncv & |
---|
445 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
446 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
447 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
448 | ) |
---|
449 | ELSE |
---|
450 | CALL wrf_error_fatal ( 'arguments not present for calling kessler' ) |
---|
451 | ENDIF |
---|
452 | |
---|
453 | ! |
---|
454 | CASE (THOMPSON) |
---|
455 | CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' ) |
---|
456 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
457 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
458 | PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. & |
---|
459 | PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. & |
---|
460 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN |
---|
461 | CALL mp_gt_driver( & |
---|
462 | QV=qv_curr, & |
---|
463 | QC=qc_curr, & |
---|
464 | QR=qr_curr, & |
---|
465 | QI=qi_curr, & |
---|
466 | QS=qs_curr, & |
---|
467 | QG=qg_curr, & |
---|
468 | NI=qni_curr, & |
---|
469 | NR=qnr_curr, & |
---|
470 | TH=th, & |
---|
471 | PII=pi_phy, & |
---|
472 | P=p, & |
---|
473 | DZ=dz8w, & |
---|
474 | DT_IN=dt, & |
---|
475 | ITIMESTEP=itimestep, & |
---|
476 | RAINNC=RAINNC, & |
---|
477 | RAINNCV=RAINNCV, & |
---|
478 | SNOWNC=SNOWNC, & |
---|
479 | SNOWNCV=SNOWNCV, & |
---|
480 | GRAUPELNC=GRAUPELNC, & |
---|
481 | GRAUPELNCV=GRAUPELNCV, & |
---|
482 | SR=SR & |
---|
483 | ! refl_10cm, grid_clock, grid_alarms, & |
---|
484 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
485 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
486 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte) |
---|
487 | ELSE |
---|
488 | CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' ) |
---|
489 | ENDIF |
---|
490 | ! |
---|
491 | |
---|
492 | CASE (MORR_TWO_MOMENT) |
---|
493 | CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment') |
---|
494 | IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. & |
---|
495 | PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. & |
---|
496 | PRESENT (QS_CURR) .AND. PRESENT (QG_CURR) .AND. & |
---|
497 | PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. & |
---|
498 | PRESENT (QNS_CURR) .AND. PRESENT (QNI_CURR).AND. & |
---|
499 | PRESENT (QNR_CURR) .AND. PRESENT (QNG_CURR).AND. & |
---|
500 | PRESENT (MU) .AND. PRESENT (QSCUTEN).AND. & |
---|
501 | PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. & |
---|
502 | PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. & |
---|
503 | PRESENT (Z ) .AND.PRESENT ( W ) ) THEN |
---|
504 | CALL mp_morr_two_moment( & |
---|
505 | ITIMESTEP=itimestep, & !* |
---|
506 | TH=th, & !* |
---|
507 | QV=qv_curr, & !* |
---|
508 | QC=qc_curr, & !* |
---|
509 | QR=qr_curr, & !* |
---|
510 | QI=qi_curr, & !* |
---|
511 | QS=qs_curr, & !* |
---|
512 | QG=qg_curr, & !* |
---|
513 | NI=qni_curr, & !* |
---|
514 | NS=qns_curr, & !* ! VVT |
---|
515 | NR=qnr_curr, & !* ! VVT |
---|
516 | NG=qng_curr, & !* ! VVT |
---|
517 | RHO=rho, & !* |
---|
518 | PII=pi_phy, & !* |
---|
519 | P=p, & !* |
---|
520 | DT_IN=dt, & !* |
---|
521 | DZ=dz8w, & !* !hm |
---|
522 | HT=ht, & !* |
---|
523 | W=w & !* |
---|
524 | ,RAINNC=RAINNC & !* |
---|
525 | ,RAINNCV=RAINNCV & !* |
---|
526 | ,SR=SR & !* !hm |
---|
527 | ,qrcuten=qrcuten & ! hm |
---|
528 | ,qscuten=qscuten & ! hm |
---|
529 | ,qicuten=qicuten & ! hm |
---|
530 | ,mu=mu & ! hm |
---|
531 | ,F_QNDROP=f_qndrop & ! hm for wrf-chem |
---|
532 | ,QNDROP=qndrop_curr & ! hm for wrf-chem |
---|
533 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
534 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
535 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
536 | ,QLSINK=qlsink & ! jdf for wrf-chem |
---|
537 | ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & ! jdf for wrf-chem |
---|
538 | ) |
---|
539 | ELSE |
---|
540 | Call wrf_error_fatal( 'arguments not present for calling morrison two moment') |
---|
541 | ENDIF |
---|
542 | |
---|
543 | |
---|
544 | CASE (MILBRANDT2MOM) |
---|
545 | CALL wrf_debug(100, 'microphysics_driver: calling milbrandt2mom') |
---|
546 | IF (PRESENT (QV_CURR) .AND. & |
---|
547 | PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. & |
---|
548 | PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. & |
---|
549 | PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. & |
---|
550 | PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. & |
---|
551 | PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. & |
---|
552 | PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. & |
---|
553 | PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. & |
---|
554 | PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. & |
---|
555 | PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. & |
---|
556 | PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. & |
---|
557 | PRESENT (Z ) .AND. PRESENT ( W ) ) THEN |
---|
558 | ! PRESENT (ccntype) & |
---|
559 | |
---|
560 | CALL mp_milbrandt2mom_driver( & |
---|
561 | ITIMESTEP=itimestep, & |
---|
562 | TH=th, & |
---|
563 | QV=qv_curr, & |
---|
564 | QC=qc_curr, & |
---|
565 | QR=qr_curr, & |
---|
566 | QI=qi_curr, & |
---|
567 | QS=qs_curr, & |
---|
568 | QG=qg_curr, & |
---|
569 | QH=qh_curr, & |
---|
570 | NC=qnc_curr, & |
---|
571 | NR=qnr_curr, & |
---|
572 | NI=qni_curr, & |
---|
573 | NS=qns_curr, & |
---|
574 | NG=qng_curr, & |
---|
575 | NH=qnh_curr, & |
---|
576 | PII=pi_phy, & |
---|
577 | P=p, & |
---|
578 | DT_IN=dt, & |
---|
579 | DZ=dz8w, & |
---|
580 | W=w, & |
---|
581 | RAINNC = RAINNC, & |
---|
582 | RAINNCV = RAINNCV, & |
---|
583 | SNOWNC = SNOWNC, & |
---|
584 | SNOWNCV = SNOWNCV, & |
---|
585 | HAILNC = HAILNC, & |
---|
586 | HAILNCV = HAILNCV, & |
---|
587 | GRPLNC = GRAUPELNC, & |
---|
588 | GRPLNCV = GRAUPELNCV, & |
---|
589 | SR=SR, & |
---|
590 | ! ccntype = ccntype, & |
---|
591 | Zet = refl_10cm, & ! HM, 9/22/09 for refl |
---|
592 | IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, & |
---|
593 | IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, & |
---|
594 | ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
595 | ) |
---|
596 | ELSE |
---|
597 | Call wrf_error_fatal( 'arguments not present for calling milbrandt2mom') |
---|
598 | ENDIF |
---|
599 | |
---|
600 | |
---|
601 | ! CASE (MILBRANDT3MOM) |
---|
602 | ! CALL wrf_debug(100, 'microphysics_driver: calling milbrandt3mom') |
---|
603 | ! IF (PRESENT (QV_CURR) .AND. & |
---|
604 | ! PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. & |
---|
605 | ! PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. PRESENT (QZR_CURR) .AND. & |
---|
606 | ! PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. PRESENT (QZI_CURR) .AND. & |
---|
607 | ! PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. PRESENT (QZS_CURR) .AND. & |
---|
608 | ! PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. PRESENT (QZG_CURR) .AND. & |
---|
609 | ! PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. PRESENT (QZH_CURR) .AND. & |
---|
610 | ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. & |
---|
611 | ! PRESENT (Z ) .AND. PRESENT ( W ) ) THEN |
---|
612 | ! CALL mp_milbrandt3mom_driver( & |
---|
613 | ! ITIMESTEP=itimestep, & !* |
---|
614 | ! TH=th, & !* |
---|
615 | ! QV=qv_curr, & !* |
---|
616 | ! QC=qc_curr, & !* |
---|
617 | ! QR=qr_curr, & !* |
---|
618 | ! QI=qi_curr, & !* |
---|
619 | ! QS=qs_curr, & !* |
---|
620 | ! QG=qg_curr, & !* |
---|
621 | ! QH=qh_curr, & !* |
---|
622 | ! NC=qnc_curr, & !* |
---|
623 | ! NR=qnr_curr, & !* |
---|
624 | ! NI=qni_curr, & !* |
---|
625 | ! NS=qns_curr, & !* |
---|
626 | ! NG=qng_curr, & !* |
---|
627 | ! NH=qnh_curr, & !* |
---|
628 | ! ZR=qzr_curr, & !* |
---|
629 | ! ZI=qzi_curr, & !* |
---|
630 | ! ZS=qzs_curr, & !* |
---|
631 | ! ZG=qzg_curr, & !* |
---|
632 | ! ZH=qzh_curr, & !* |
---|
633 | ! PII=pi_phy, & !* |
---|
634 | ! P=p, & !* |
---|
635 | ! DT_IN=dt, & !* |
---|
636 | ! DZ=dz8w, & !* ! h |
---|
637 | ! W=w & !* |
---|
638 | ! ,RAINNC=RAINNC & !* |
---|
639 | ! ,RAINNCV=RAINNCV & !* |
---|
640 | ! ,SR=SR & !* !hm |
---|
641 | ! ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
642 | ! ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
643 | ! ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
644 | ! ) |
---|
645 | ! ELSE |
---|
646 | ! Call wrf_error_fatal( 'arguments not present for calling milbrandt3mom') |
---|
647 | ! ENDIF |
---|
648 | |
---|
649 | ! |
---|
650 | CASE (GSFCGCESCHEME) |
---|
651 | CALL wrf_debug ( 100 , 'microphysics_driver: calling GSFCGCE' ) |
---|
652 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
653 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
654 | PRESENT( QS_CURR ) .AND. & |
---|
655 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
656 | PRESENT( HAIL ) .AND. PRESENT ( ICE2 ) .AND. & |
---|
657 | PRESENT( Z ) .AND. PRESENT ( W ) ) THEN |
---|
658 | CALL gsfcgce( & |
---|
659 | TH=th & |
---|
660 | ,QV=qv_curr & |
---|
661 | ,QL=qc_curr & |
---|
662 | ,QR=qr_curr & |
---|
663 | ,QI=qi_curr & |
---|
664 | ,QS=qs_curr & |
---|
665 | ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z & |
---|
666 | ,HT=ht, DZ8W=dz8w, GRAV=G & |
---|
667 | ,RHOWATER=rhowater, RHOSNOW=rhosnow & |
---|
668 | ,ITIMESTEP=itimestep & |
---|
669 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
670 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
671 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
672 | ,RAINNC=rainnc, RAINNCV=rainncv & |
---|
673 | ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr & |
---|
674 | ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv & |
---|
675 | ,F_QG=f_qg & |
---|
676 | ,QG=qg_curr & |
---|
677 | ,IHAIL=hail, ICE2=ice2 & |
---|
678 | ) |
---|
679 | ! HAIL = 1, run gsfcgce with hail option |
---|
680 | ! 0, run gsfcgce with graupel option <---- default |
---|
681 | ! note: no effect if ice2 = 1 |
---|
682 | ! ICE2 = 1, run gsfcgce with only snow, ice |
---|
683 | ! 2, run gsfcgce with only graupel, ice |
---|
684 | ! 0, run gsfcgce with snow, ice and hail/graupel <---- default |
---|
685 | |
---|
686 | ELSE |
---|
687 | CALL wrf_error_fatal ( 'arguments not present for calling GSFCGCE' ) |
---|
688 | ENDIF |
---|
689 | |
---|
690 | CASE (LINSCHEME) |
---|
691 | CALL wrf_debug ( 100 , 'microphysics_driver: calling lin_et_al' ) |
---|
692 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
693 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
694 | PRESENT( QS_CURR ) .AND. & |
---|
695 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
696 | PRESENT( Z ) ) THEN |
---|
697 | CALL lin_et_al( & |
---|
698 | TH=th & |
---|
699 | ,QV=qv_curr & |
---|
700 | ,QL=qc_curr & |
---|
701 | ,QR=qr_curr & |
---|
702 | ,QI=qi_curr & |
---|
703 | ,QS=qs_curr & |
---|
704 | ,QLSINK=qlsink & |
---|
705 | ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z & |
---|
706 | ,HT=ht, DZ8W=dz8w, GRAV=G, CP=cp & |
---|
707 | ,RAIR=r_d, RVAPOR=R_v & |
---|
708 | ,XLS=xls, XLV=xlv, XLF=xlf & |
---|
709 | ,RHOWATER=rhowater, RHOSNOW=rhosnow & |
---|
710 | ,EP2=ep_2,SVP1=svp1,SVP2=svp2 & |
---|
711 | ,SVP3=svp3,SVPT0=svpt0 & |
---|
712 | ,RAINNC=rainnc, RAINNCV=rainncv & |
---|
713 | ,SNOWNC=snownc, SNOWNCV=snowncv & |
---|
714 | ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr & |
---|
715 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
716 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
717 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
718 | ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & |
---|
719 | ,F_QG=f_qg, F_QNDROP=f_qndrop & |
---|
720 | ,QG=qg_curr & |
---|
721 | ,QNDROP=qndrop_curr & |
---|
722 | ) |
---|
723 | ELSE |
---|
724 | CALL wrf_error_fatal ( 'arguments not present for calling lin_et_al' ) |
---|
725 | ENDIF |
---|
726 | |
---|
727 | CASE (SBU_YLINSCHEME) |
---|
728 | CALL wrf_debug ( 100 , 'microphysics_driver: calling sbu_ylin' ) |
---|
729 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
730 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
731 | PRESENT( QS_CURR ) .AND. & |
---|
732 | PRESENT( RI_CURR ) .AND. & |
---|
733 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
734 | PRESENT( Z ) ) THEN |
---|
735 | CALL sbu_ylin( & |
---|
736 | TH=th & |
---|
737 | ,QV=qv_curr & |
---|
738 | ,QL=qc_curr & |
---|
739 | ,QR=qr_curr & |
---|
740 | ,QI=qi_curr & |
---|
741 | ,QS=qs_curr & |
---|
742 | ,RI3D=ri_curr & |
---|
743 | ! ,QLSINK=qlsink & |
---|
744 | ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z & |
---|
745 | ,HT=ht, DZ8W=dz8w & |
---|
746 | ! , GRAV=G, CP=cp & |
---|
747 | ! ,RAIR=r_d, RVAPOR=R_v & |
---|
748 | ! ,XLS=xls, XLV=xlv, XLF=xlf & |
---|
749 | ! ,RHOWATER=rhowater, RHOSNOW=rhosnow & |
---|
750 | ! ,EP2=ep_2,SVP1=svp1,SVP2=svp2 & |
---|
751 | ! ,SVP3=svp3,SVPT0=svpt0 & |
---|
752 | ,RAINNC=rainnc, RAINNCV=rainncv & |
---|
753 | ! ,SNOWNC=snownc, SNOWNCV=snowncv & |
---|
754 | ! ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr & |
---|
755 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
756 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
757 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
758 | ! ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & |
---|
759 | ! ,F_QG=f_qg & |
---|
760 | ! ,F_QNDROP=f_qndrop & |
---|
761 | ! ,QG=qg_curr & |
---|
762 | ! ,QNDROP=qndrop_curr & |
---|
763 | ) |
---|
764 | ELSE |
---|
765 | CALL wrf_error_fatal ( 'arguments not present for calling sbu_ylin' ) |
---|
766 | ENDIF |
---|
767 | |
---|
768 | |
---|
769 | CASE (WSM3SCHEME) |
---|
770 | CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm3' ) |
---|
771 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
772 | PRESENT( QR_CURR ) .AND. & |
---|
773 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
774 | PRESENT( W ) ) THEN |
---|
775 | CALL wsm3( & |
---|
776 | TH=th & |
---|
777 | ,Q=qv_curr & |
---|
778 | ,QCI=qc_curr & |
---|
779 | ,QRS=qr_curr & |
---|
780 | ,W=w,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w & |
---|
781 | ,DELT=dt,G=g,CPD=cp,CPV=cpv & |
---|
782 | ,RD=r_d,RV=r_v,T0C=svpt0 & |
---|
783 | ,EP1=ep_1, EP2=ep_2, QMIN=epsilon & |
---|
784 | ,XLS=xls, XLV0=xlv, XLF0=xlf & |
---|
785 | ,DEN0=rhoair0, DENR=rhowater & |
---|
786 | ,CLIQ=cliq,CICE=cice,PSAT=psat & |
---|
787 | ,RAIN=rainnc ,RAINNCV=rainncv & |
---|
788 | ,SNOW=snownc ,SNOWNCV=snowncv & |
---|
789 | ,SR=sr & |
---|
790 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
791 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
792 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
793 | ) |
---|
794 | ELSE |
---|
795 | CALL wrf_error_fatal ( 'arguments not present for calling wsm3' ) |
---|
796 | ENDIF |
---|
797 | |
---|
798 | CASE (WSM5SCHEME) |
---|
799 | CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm5' ) |
---|
800 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
801 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
802 | PRESENT( QS_CURR ) .AND. & |
---|
803 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN |
---|
804 | CALL wsm5( & |
---|
805 | TH=th & |
---|
806 | ,Q=qv_curr & |
---|
807 | ,QC=qc_curr & |
---|
808 | ,QR=qr_curr & |
---|
809 | ,QI=qi_curr & |
---|
810 | ,QS=qs_curr & |
---|
811 | ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w & |
---|
812 | ,DELT=dt,G=g,CPD=cp,CPV=cpv & |
---|
813 | ,RD=r_d,RV=r_v,T0C=svpt0 & |
---|
814 | ,EP1=ep_1, EP2=ep_2, QMIN=epsilon & |
---|
815 | ,XLS=xls, XLV0=xlv, XLF0=xlf & |
---|
816 | ,DEN0=rhoair0, DENR=rhowater & |
---|
817 | ,CLIQ=cliq,CICE=cice,PSAT=psat & |
---|
818 | ,RAIN=rainnc ,RAINNCV=rainncv & |
---|
819 | ,SNOW=snownc ,SNOWNCV=snowncv & |
---|
820 | ,SR=sr & |
---|
821 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
822 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
823 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
824 | ) |
---|
825 | ELSE |
---|
826 | CALL wrf_error_fatal ( 'arguments not present for calling wsm5' ) |
---|
827 | ENDIF |
---|
828 | |
---|
829 | CASE (WSM6SCHEME) |
---|
830 | CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6' ) |
---|
831 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
832 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
833 | PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. & |
---|
834 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN |
---|
835 | CALL wsm6( & |
---|
836 | TH=th & |
---|
837 | ,Q=qv_curr & |
---|
838 | ,QC=qc_curr & |
---|
839 | ,QR=qr_curr & |
---|
840 | ,QI=qi_curr & |
---|
841 | ,QS=qs_curr & |
---|
842 | ,QG=qg_curr & |
---|
843 | ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w & |
---|
844 | ,DELT=dt,G=g,CPD=cp,CPV=cpv & |
---|
845 | ,RD=r_d,RV=r_v,T0C=svpt0 & |
---|
846 | ,EP1=ep_1, EP2=ep_2, QMIN=epsilon & |
---|
847 | ,XLS=xls, XLV0=xlv, XLF0=xlf & |
---|
848 | ,DEN0=rhoair0, DENR=rhowater & |
---|
849 | ,CLIQ=cliq,CICE=cice,PSAT=psat & |
---|
850 | ,RAIN=rainnc ,RAINNCV=rainncv & |
---|
851 | ,SNOW=snownc ,SNOWNCV=snowncv & |
---|
852 | ,SR=sr & |
---|
853 | ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv & |
---|
854 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
855 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
856 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
857 | ) |
---|
858 | ELSE |
---|
859 | CALL wrf_error_fatal ( 'arguments not present for calling wsm6' ) |
---|
860 | ENDIF |
---|
861 | |
---|
862 | CASE (WDM5SCHEME) |
---|
863 | CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm5' ) |
---|
864 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
865 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
866 | PRESENT( QS_CURR ) .AND. PRESENT( QNN_CURR ) .AND. & |
---|
867 | PRESENT ( QNC_CURR ) .AND. PRESENT( QNR_CURR ).AND. & |
---|
868 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN |
---|
869 | CALL wdm5( & |
---|
870 | TH=th & |
---|
871 | ,Q=qv_curr & |
---|
872 | ,QC=qc_curr & |
---|
873 | ,QR=qr_curr & |
---|
874 | ,QI=qi_curr & |
---|
875 | ,QS=qs_curr & |
---|
876 | ,NN=qnn_curr & |
---|
877 | ,NC=qnc_curr & |
---|
878 | ,NR=qnr_curr & |
---|
879 | ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w & |
---|
880 | ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=n_ccn0 & |
---|
881 | ,RD=r_d,RV=r_v,T0C=svpt0 & |
---|
882 | ,EP1=ep_1, EP2=ep_2, QMIN=epsilon & |
---|
883 | ,XLS=xls, XLV0=xlv, XLF0=xlf & |
---|
884 | ,DEN0=rhoair0, DENR=rhowater & |
---|
885 | ,CLIQ=cliq,CICE=cice,PSAT=psat & |
---|
886 | ,RAIN=rainnc ,RAINNCV=rainncv & |
---|
887 | ,SNOW=snownc ,SNOWNCV=snowncv & |
---|
888 | ,SR=sr & |
---|
889 | ,ITIMESTEP=itimestep & |
---|
890 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
891 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
892 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
893 | ) |
---|
894 | ELSE |
---|
895 | CALL wrf_error_fatal ( 'arguments not present for calling wdm5') |
---|
896 | ENDIF |
---|
897 | |
---|
898 | CASE (WDM6SCHEME) |
---|
899 | CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm6' ) |
---|
900 | IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. & |
---|
901 | PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. & |
---|
902 | PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. & |
---|
903 | PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. & |
---|
904 | PRESENT( QNR_CURR ).AND. & |
---|
905 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN |
---|
906 | CALL wdm6( & |
---|
907 | TH=th & |
---|
908 | ,Q=qv_curr & |
---|
909 | ,QC=qc_curr & |
---|
910 | ,QR=qr_curr & |
---|
911 | ,QI=qi_curr & |
---|
912 | ,QS=qs_curr & |
---|
913 | ,QG=qg_curr & |
---|
914 | ,NN=qnn_curr & |
---|
915 | ,NC=qnc_curr & |
---|
916 | ,NR=qnr_curr & |
---|
917 | ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w & |
---|
918 | ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=n_ccn0 & |
---|
919 | ,RD=r_d,RV=r_v,T0C=svpt0 & |
---|
920 | ,EP1=ep_1, EP2=ep_2, QMIN=epsilon & |
---|
921 | ,XLS=xls, XLV0=xlv, XLF0=xlf & |
---|
922 | ,DEN0=rhoair0, DENR=rhowater & |
---|
923 | ,CLIQ=cliq,CICE=cice,PSAT=psat & |
---|
924 | ,RAIN=rainnc ,RAINNCV=rainncv & |
---|
925 | ,SNOW=snownc ,SNOWNCV=snowncv & |
---|
926 | ,SR=sr & |
---|
927 | ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv & |
---|
928 | ,ITIMESTEP=itimestep & |
---|
929 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
930 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
931 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
932 | ) |
---|
933 | ELSE |
---|
934 | CALL wrf_error_fatal ( 'arguments not present for calling wdm6') |
---|
935 | ENDIF |
---|
936 | #if(NMM_CORE==1) |
---|
937 | CASE (ETAMP_HWRF) |
---|
938 | CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew_HWRF') |
---|
939 | |
---|
940 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. & |
---|
941 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
942 | PRESENT( mp_restart_state ) .AND. & |
---|
943 | PRESENT( tbpvs_state ) .AND. & |
---|
944 | PRESENT( tbpvs0_state ) ) THEN |
---|
945 | |
---|
946 | CALL ETAMP_NEW_HWRF( & |
---|
947 | ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id & |
---|
948 | ,RAINNC=rainnc,RAINNCV=rainncv & |
---|
949 | ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th & |
---|
950 | ,QV=qv_curr & |
---|
951 | ,QT=qt_curr & |
---|
952 | ,LOWLYR=LOWLYR,SR=SR & |
---|
953 | ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY & |
---|
954 | ,F_RIMEF_PHY=F_RIMEF_PHY & |
---|
955 | ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr & |
---|
956 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
957 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
958 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
959 | ) |
---|
960 | ELSE |
---|
961 | CALL wrf_error_fatal ( 'arguments not present for calling etampnew' ) |
---|
962 | ENDIF |
---|
963 | #endif |
---|
964 | CASE (ETAMPNEW) |
---|
965 | CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew') |
---|
966 | |
---|
967 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. & |
---|
968 | PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. & |
---|
969 | PRESENT( mp_restart_state ) .AND. & |
---|
970 | PRESENT( tbpvs_state ) .AND. & |
---|
971 | PRESENT( tbpvs0_state ) ) THEN |
---|
972 | CALL ETAMP_NEW( & |
---|
973 | ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy & |
---|
974 | ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th & |
---|
975 | ,QV=qv_curr & |
---|
976 | ,QC=qc_curr & |
---|
977 | ,QS=qs_curr & |
---|
978 | ,QR=qr_curr & |
---|
979 | ,QT=qt_curr & |
---|
980 | ,LOWLYR=LOWLYR,SR=SR & |
---|
981 | ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY & |
---|
982 | ,F_RIMEF_PHY=F_RIMEF_PHY & |
---|
983 | ,RAINNC=rainnc,RAINNCV=rainncv & |
---|
984 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
985 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
986 | ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte & |
---|
987 | ,MP_RESTART_STATE=mp_restart_state & |
---|
988 | ,TBPVS_STATE=tbpvs_state,TBPVS0_STATE=tbpvs0_state & |
---|
989 | ) |
---|
990 | ELSE |
---|
991 | CALL wrf_error_fatal ( 'arguments not present for calling etampnew' ) |
---|
992 | ENDIF |
---|
993 | |
---|
994 | CASE DEFAULT |
---|
995 | |
---|
996 | WRITE( wrf_err_message , * ) 'The microphysics option does not exist: mp_physics = ', mp_physics |
---|
997 | CALL wrf_error_fatal ( wrf_err_message ) |
---|
998 | |
---|
999 | END SELECT micro_select |
---|
1000 | |
---|
1001 | ENDDO |
---|
1002 | #ifndef RUN_ON_GPU |
---|
1003 | !$OMP END PARALLEL DO |
---|
1004 | #endif |
---|
1005 | |
---|
1006 | CALL wrf_debug ( 200 , 'microphysics_driver: returning from' ) |
---|
1007 | |
---|
1008 | RETURN |
---|
1009 | |
---|
1010 | END SUBROUTINE microphysics_driver |
---|
1011 | |
---|
1012 | END MODULE module_microphysics_driver |
---|